[Pkg-wmaker-commits] [wmbattery] 211/241: wmbattery: Use AC_CHECK_LIB instead of AC_CHECK_HEADERS to check for libapm.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:38:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbattery.

commit 799b057fc0d4f89ebab487d8c2b71af751e3d27f
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Thu Feb 19 23:34:19 2015 -0600

    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
---
 apm.h        | 4 ++--
 configure.ac | 1 -
 wmbattery.c  | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/apm.h b/apm.h
index fc2428e..04b6e7f 100644
--- a/apm.h
+++ b/apm.h
@@ -8,7 +8,7 @@
 #include <i386/apmvar.h>
 #endif
 
-#ifdef HAVE_APM_H
+#ifdef HAVE_LIBAPM
 #include <apm.h>
 #endif
 
@@ -37,7 +37,7 @@
 #define BATTERY_TIME_UNKNOWN        (-1)
 #endif /* AC_LINE_STATUS_ON */
 
-#if !defined(HAVE_APM_H)
+#if !defined(HAVE_LIBAPM)
 typedef struct {
 	const char driver_version[10];
 	int apm_version_major;
diff --git a/configure.ac b/configure.ac
index 5c5a8fc..0d9b57b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,6 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS(X11/xpm.h)
 AC_CHECK_HEADERS(X11/extensions/shape.h)
 AC_CHECK_HEADERS(getopt.h)
-AC_CHECK_HEADERS(apm.h)
 dnl FreeBSD needs apm_bios.h
 AC_CHECK_HEADERS(machine/apm_bios.h)
 dnl NetBSD and OpenBSD need apmvar.h
diff --git a/wmbattery.c b/wmbattery.c
index 74d39fd..1c74409 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -148,7 +148,7 @@ int apm_exists(void)
 	return apm_read(&i);
 }
 #endif
-#if !defined(HAVE_APM_H)
+#if !defined(HAVE_LIBAPM)
 int apm_read(apm_info *i)
 {
 	return -1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git



More information about the Pkg-wmaker-commits mailing list