wmbattery: use PKG_CHECK_MODULES for X libraries and headers.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
Jeremy Sowden 2019-10-27 19:55:46 +00:00 committed by Carlos R. Mafra
parent 7434685dae
commit 37a58aa3eb
2 changed files with 5 additions and 7 deletions

View file

@ -8,13 +8,13 @@ man1dir = @mandir@/man1
srcdir = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@ -Wall
CFLAGS = @CFLAGS@ -Wall @Xlib_CFLAGS@ @Xext_CFLAGS@ @libXpm_CFLAGS@
CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@
#remove hal support
#USE_HAL = 1

View file

@ -24,17 +24,15 @@ if test "x${x_libraries}" != "x"; then
fi
dnl Checks for libraries.
AC_CHECK_LIB(X11, XOpenDisplay)
AC_CHECK_LIB(Xext, XShapeCombineMask)
AC_CHECK_LIB(Xpm, XpmReadFileToPixmap)
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])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(X11/xpm.h)
AC_CHECK_HEADERS(X11/extensions/shape.h)
AC_CHECK_HEADERS(getopt.h)
dnl FreeBSD needs apm_bios.h
AC_CHECK_HEADERS(machine/apm_bios.h)