wmbattery: Use AC_CHECK_LIB instead of AC_CHECK_HEADERS to check for libapm.
If autoconf finds an apm.h other than the one belonging to libapm, we get builds errors like the ones reported by Haroldo Gambini Santos in [1]. [1] http://lists.windowmaker.org/dev/msg07937.html
This commit is contained in:
parent
085f47b758
commit
535b83d232
|
@ -8,7 +8,7 @@
|
||||||
#include <i386/apmvar.h>
|
#include <i386/apmvar.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_APM_H
|
#ifdef HAVE_LIBAPM
|
||||||
#include <apm.h>
|
#include <apm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
#define BATTERY_TIME_UNKNOWN (-1)
|
#define BATTERY_TIME_UNKNOWN (-1)
|
||||||
#endif /* AC_LINE_STATUS_ON */
|
#endif /* AC_LINE_STATUS_ON */
|
||||||
|
|
||||||
#if !defined(HAVE_APM_H)
|
#if !defined(HAVE_LIBAPM)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char driver_version[10];
|
const char driver_version[10];
|
||||||
int apm_version_major;
|
int apm_version_major;
|
||||||
|
|
|
@ -34,7 +34,6 @@ AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS(X11/xpm.h)
|
AC_CHECK_HEADERS(X11/xpm.h)
|
||||||
AC_CHECK_HEADERS(X11/extensions/shape.h)
|
AC_CHECK_HEADERS(X11/extensions/shape.h)
|
||||||
AC_CHECK_HEADERS(getopt.h)
|
AC_CHECK_HEADERS(getopt.h)
|
||||||
AC_CHECK_HEADERS(apm.h)
|
|
||||||
dnl FreeBSD needs apm_bios.h
|
dnl FreeBSD needs apm_bios.h
|
||||||
AC_CHECK_HEADERS(machine/apm_bios.h)
|
AC_CHECK_HEADERS(machine/apm_bios.h)
|
||||||
dnl NetBSD and OpenBSD need apmvar.h
|
dnl NetBSD and OpenBSD need apmvar.h
|
||||||
|
|
|
@ -148,7 +148,7 @@ int apm_exists(void)
|
||||||
return apm_read(&i);
|
return apm_read(&i);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if !defined(HAVE_APM_H)
|
#if !defined(HAVE_LIBAPM)
|
||||||
int apm_read(apm_info *i)
|
int apm_read(apm_info *i)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue