aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorsameo <sameo@b067294f-1dea-0310-9683-c47a78595994>2008-09-30 09:41:26 +0000
committersameo <sameo@b067294f-1dea-0310-9683-c47a78595994>2008-09-30 09:41:26 +0000
commit5588b99718969adb1aae7f93eb090364ef52759e (patch)
tree0339d3fb44c56f6a8507a010bb6c1632e35d71aa /configure.ac
parent456387f742517a1ea88c639abba91570368bc0ba (diff)
downloadmatchbox-panel-2-5588b99718969adb1aae7f93eb090364ef52759e.tar.gz
matchbox-panel-2-5588b99718969adb1aae7f93eb090364ef52759e.tar.bz2
matchbox-panel-2-5588b99718969adb1aae7f93eb090364ef52759e.zip
2008-09-30 Samuel Ortiz <sameo@linux.intel.com>
* configure.ac * applets/Makefile.am * applets/battery/battery.h * applets/battery/battery-acpi.c * applets/battery/battery-apm.c * applets/battery/Makefile.am * applets/battery/battery.c Switch between ACPI and APM at configuration time. Default is APM. git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel-2@2085 b067294f-1dea-0310-9683-c47a78595994
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 22 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 03cc81c..79104d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,10 +43,29 @@ if test x$enable_dbus != xno; then
fi
AM_CONDITIONAL(HAVE_DBUS, test x$enable_dbus = xyes)
-# apm
-AC_CHECK_HEADERS(apm.h, enable_linux_apm=yes, enable_linux_apm=no)
-AM_CONDITIONAL(HAVE_LIBAPM, test x$enable_linux_apm = xyes)
+# Where to read battery state from
+AC_ARG_WITH(
+ [battery],
+ AS_HELP_STRING([--with-battery], [where to read the battery state from]),
+ [],
+ [with_battery="apm"]
+)
+
+case "$with_battery" in
+ "acpi") AC_CHECK_HEADERS(libacpi.h, enable_linux_acpi=yes, AC_MSG_FAILURE([You need to install libacpi]))
+ enable_battery=yes
+ ;;
+ ""|"apm") AC_CHECK_HEADERS(apm.h, enable_linux_apm=yes, AC_MSG_FAILURE([You need to install apmd]))
+ enable_battery=yes
+ ;;
+ "none"|*) enable_battery=no
+ ;;
+esac
+
+AM_CONDITIONAL(HAVE_BATTERY, test x$enable_battery = xyes)
+AM_CONDITIONAL(HAVE_LIBAPM, test x$enable_linux_apm = xyes)
+AM_CONDITIONAL(HAVE_LIBACPI, test x$enable_linux_acpi = xyes)
# glib-genmarshal
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`