Add option to enable/disable HAL plugin
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 14 Oct 2008 12:41:46 +0000 (14:41 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 14 Oct 2008 12:41:46 +0000 (14:41 +0200)
configure.ac

index 5857197..1d438b1 100644 (file)
@@ -74,7 +74,9 @@ AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
 PKG_CHECK_MODULES(HAL, hal >= 0.5.8, hal_found=yes, hal_found=no)
 AC_SUBST(HAL_CFLAGS)
 AC_SUBST(HAL_LIBS)
-AM_CONDITIONAL(HAL, test "${hal_found}" = "yes")
+AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal],
+                       [enable HAL plugin]), [enable_hal=${enableval}])
+AM_CONDITIONAL(HAL, test "${enable_hal}" = "yes" && test "${hal_found}" = "yes")
 
 PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, polkit_found=yes, polkit_found=no)
 AC_SUBST(POLKIT_CFLAGS)