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)