wmbattery: use PKG_CHECK_MODULES, rather than calling pkg-config explicitly.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
parent
08912c26f3
commit
7434685dae
|
@ -43,18 +43,20 @@ OBJS=wmbattery.o acpi.o sonypi.o
|
|||
|
||||
ifdef USE_HAL
|
||||
CPPFLAGS += -DHAL
|
||||
LIBS += $(shell pkg-config --libs hal)
|
||||
CFLAGS += @HAL_CFLAGS@
|
||||
LIBS += @HAL_LIBS@
|
||||
OBJS += simplehal.o
|
||||
simplehal.o: simplehal.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags hal) -c simplehal.c -o simplehal.o
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c simplehal.c -o simplehal.o
|
||||
endif
|
||||
|
||||
ifdef USE_UPOWER
|
||||
CPPFLAGS += -DUPOWER
|
||||
LIBS += $(shell pkg-config --libs upower-glib)
|
||||
CFLAGS += @UPOWER_GLIB_CFLAGS@
|
||||
LIBS += @UPOWER_GLIB_LIBS@
|
||||
OBJS += upower.o
|
||||
upower.o: upower.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags upower-glib) -c upower.c -o upower.o
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c upower.c -o upower.o
|
||||
endif
|
||||
|
||||
wmbattery: $(OBJS)
|
||||
|
|
|
@ -28,6 +28,8 @@ AC_CHECK_LIB(X11, XOpenDisplay)
|
|||
AC_CHECK_LIB(Xext, XShapeCombineMask)
|
||||
AC_CHECK_LIB(Xpm, XpmReadFileToPixmap)
|
||||
AC_CHECK_LIB(apm, apm_read)
|
||||
dnl PKG_CHECK_MODULES([HAL], [hal])
|
||||
PKG_CHECK_MODULES([UPOWER_GLIB], [upower-glib])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
|
Loading…
Reference in a new issue