Add support for --enable-envsys when running ./configure
This commit is contained in:
parent
91cc0594d9
commit
ea844727f7
|
@ -21,6 +21,7 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@
|
||||
USE_HAL = @USE_HAL@
|
||||
USE_UPOWER = @USE_UPOWER@
|
||||
USE_ENVSYS = @USE_ENVSYS@
|
||||
|
||||
all: wmbattery
|
||||
|
||||
|
@ -80,6 +81,14 @@ upower.o: upower.c
|
|||
$(CC) $(CPPFLAGS) $(CFLAGS) -c upower.c -o upower.o
|
||||
endif
|
||||
|
||||
ifdef USE_ENVSYS
|
||||
CPPFLAGS += -DENVSYS
|
||||
LIBS += -lprop
|
||||
OBJS += envsys.o
|
||||
envsys.o: envsys.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c envsys.c -o envsys.o
|
||||
endif
|
||||
|
||||
wmbattery: $(OBJS)
|
||||
$(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
|
||||
|
|
|
@ -39,6 +39,13 @@ AS_IF([test x$enable_upower != xno], [
|
|||
PKG_CHECK_MODULES([upower], [upower-glib])
|
||||
AC_SUBST(USE_UPOWER, 1)
|
||||
])
|
||||
AC_ARG_ENABLE(envsys, AS_HELP_STRING([--enable-envsys], [enable envsys]),
|
||||
[], [enable_envsys=no])
|
||||
AS_IF([test x$enable_envsys != xno], [
|
||||
AC_CHECK_HEADERS(sys/envsys.h)
|
||||
AC_CHECK_HEADERS(prop/proplib.h)
|
||||
AC_SUBST(USE_ENVSYS, 1)
|
||||
])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
|
Loading…
Reference in a new issue