diff --git a/wmbattery/Makefile.in b/wmbattery/Makefile.in index 1129897..5c1529b 100644 --- a/wmbattery/Makefile.in +++ b/wmbattery/Makefile.in @@ -15,11 +15,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@ - -#remove hal support -#USE_HAL = 1 - -USE_UPOWER = 1 +USE_HAL = @USE_HAL@ +USE_UPOWER = @USE_UPOWER@ all: wmbattery diff --git a/wmbattery/configure.ac b/wmbattery/configure.ac index abdc3dd..496caff 100644 --- a/wmbattery/configure.ac +++ b/wmbattery/configure.ac @@ -28,8 +28,18 @@ PKG_CHECK_MODULES([Xlib], [x11]) PKG_CHECK_MODULES([Xext], [xext]) PKG_CHECK_MODULES([libXpm], [xpm]) AC_CHECK_LIB(apm, apm_read) -dnl PKG_CHECK_MODULES([HAL], [hal]) -PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib]) +AC_ARG_ENABLE(hal, AS_HELP_STRING([--enable-hal], [enable hal]), + [], [enable_hal=no]) +AS_IF([test x$enable_hal != xno], [ + PKG_CHECK_MODULES([HAL], [hal]) + AC_SUBST(USE_HAL, 1) +]) +AC_ARG_ENABLE(upower, AS_HELP_STRING([--disable-upower], [disable upower]), + [], [enable_upower=yes]) +AS_IF([test x$enable_upower != xno], [ + PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib]) + AC_SUBST(USE_UPOWER, 1) +]) dnl Checks for header files. AC_HEADER_STDC