[tracker/miner-web-review: 41/74] Do not link against HAL when using DeviceKit-power
- From: Adrien Bustany <abustany src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-web-review: 41/74] Do not link against HAL when using DeviceKit-power
- Date: Mon, 1 Mar 2010 11:30:09 +0000 (UTC)
commit b0aecb4d008c762c4ebe8fe2e1a5e598b345c7ca
Author: Jürg Billeter <j bitron ch>
Date: Thu Feb 25 15:52:14 2010 +0100
Do not link against HAL when using DeviceKit-power
configure.ac | 68 +++++++++++++++++++++++++++++----------------------------
1 files changed, 35 insertions(+), 33 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7492331..e1424f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -414,38 +414,6 @@ fi
##################################################################
-# Check for HAL
-##################################################################
-
-AC_ARG_ENABLE(hal,
- AS_HELP_STRING([--disable-hal],
- [disable HAL support for AC power detection [[default=yes]]]),,
- [enable_hal=yes])
-
-if test "x$enable_hal" != "xno"; then
- PKG_CHECK_MODULES(HAL,
- [hal >= $HAL_REQUIRED],
- [have_hal=yes] ,
- [have_hal=no])
- AC_SUBST(HAL_CFLAGS)
- AC_SUBST(HAL_LIBS)
-
- if test "x$have_hal" = "xyes"; then
- AC_DEFINE(HAVE_HAL, [], [Define if we have HAL])
- fi
-else
- have_hal="no (disabled)"
-fi
-
-if test "x$enable_hal" = "xyes"; then
- if test "x$have_hal" != "xyes"; then
- AC_MSG_ERROR([Couldn't find hal >= $HAL_REQUIRED.])
- fi
-fi
-
-AM_CONDITIONAL(HAVE_HAL, test "x$have_hal" = "xyes")
-
-##################################################################
# Check for DeviceKit-power
##################################################################
@@ -471,13 +439,47 @@ fi
if test "x$enable_devkit_power" = "xyes"; then
if test "x$have_devkit_power" != "xyes"; then
- AC_MSG_ERROR([Couldn't find devkit_power >= $DEVKIT_POWER_REQUIRED and devkit_power-storage.])
+ AC_MSG_ERROR([Couldn't find devkit_power >= $DEVKIT_POWER_REQUIRED.])
fi
fi
AM_CONDITIONAL(HAVE_DEVKIT_POWER, test "x$have_devkit_power" = "xyes")
##################################################################
+# Check for HAL
+##################################################################
+
+AC_ARG_ENABLE(hal,
+ AS_HELP_STRING([--disable-hal],
+ [disable HAL support for AC power detection [[default=auto]]]),,
+ [enable_hal=auto])
+
+if test "x$have_devkit_power" != "xyes" && test "x$enable_hal" != "xno"; then
+ PKG_CHECK_MODULES(HAL,
+ [hal >= $HAL_REQUIRED],
+ [have_hal=yes] ,
+ [have_hal=no])
+ AC_SUBST(HAL_CFLAGS)
+ AC_SUBST(HAL_LIBS)
+
+ if test "x$have_hal" = "xyes"; then
+ AC_DEFINE(HAVE_HAL, [], [Define if we have HAL])
+ fi
+else
+ have_hal="no (disabled)"
+fi
+
+if test "x$enable_hal" = "xyes"; then
+ if test "x$have_devkit_power" = "xyes"; then
+ AC_MSG_ERROR([Only one of DeviceKit-power and HAL can be used.])
+ elif test "x$have_hal" != "xyes"; then
+ AC_MSG_ERROR([Couldn't find hal >= $HAL_REQUIRED.])
+ fi
+fi
+
+AM_CONDITIONAL(HAVE_HAL, test "x$have_hal" = "xyes")
+
+##################################################################
# Check for libxml2
##################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]