wmbattery: add --enable-hal and --enable-upower.

By default, upower is enabled and hal is disabled.

Fixes: 7434685dae ("wmbattery: use PKG_CHECK_MODULES, rather than calling pkg-config explicitly.")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
Jeremy Sowden 2019-10-28 22:06:38 +00:00 committed by Carlos R. Mafra
parent 6db6e92db3
commit d8d0a025e7
2 changed files with 14 additions and 7 deletions

View file

@ -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

View file

@ -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])
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