[Pkg-wmaker-commits] [fookb] 04/17: fookb: Use pkg-config to check for libraries.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sun Sep 10 14:35:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository fookb.
commit 4007a5bce57c5c30db89bffbde4f967e28413470
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Sat Sep 9 21:24:20 2017 -0400
fookb: Use pkg-config to check for libraries.
---
configure.ac | 106 +++--------------------------------------------------------
1 file changed, 4 insertions(+), 102 deletions(-)
diff --git a/configure.ac b/configure.ac
index f41d1ae..e0ca3ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,109 +10,11 @@ AC_INIT(fookb.c)
dnl Checks for programs.
AC_PROG_CC
-WUTIL_LIB="-lWUtil"
-AC_SUBST(WUTIL_LIB)
-dnl }}}1
+dnl Checks for libraries.
-dnl Checks for libraries. {{{1
-
-dnl Basic checks: X compilation settings and essential libraries {{{2
-
-AC_PATH_XTRA
-dnl Adds C compiler flags to X_CFLAGS and X linker flags to X_CFLAGS
-dnl Extra libraries will be in X_EXTRA_LIBS
-dnl Libraries wich should be linked before -lX11 will be in X_PRE_LIBS
-dnl We do not check X_DISPLAY_MISSING because we need to check for
-dnl XkbOpenDisplay in libX11 anyway.
-
-AC_CHECK_LIB(
- [X11],
- [XkbOpenDisplay],
- ,
- [AC_MSG_ERROR([[Fatal: no libX11 or no XkbOpenDisplay() in libX11]])],
- $X_LIBS
-)
-
-AC_CHECK_LIB(
- [Xpm],
- [XpmReadFileToImage],
- ,
- [AC_MSG_ERROR([[Fatal: no libXpm found!]])],
- $X_LIBS
-)
-
-dnl }}}2
-
-dnl --enable/disable libWUtil (property lists handling) {{{2
-
-AC_ARG_ENABLE(
- [libWUtil],
- [ --enable-libWUtil try to use property lists handling in libWUtil],
- [
- if test $enable_libWUtil = yes ; then
-
-dnl enabled: libWUtil and WINGs/WUtil.h check {{{3
- AC_CHECK_LIB(
- [WUtil],
- [WMReadPropListFromFile],
- [
- dnl library is found; let's check header file {{{4
- AC_CHECK_HEADERS(
- [WINGs/WUtil.h],
- ,
- [
- AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
- WUTIL_LIB=""
- ]
- )
- dnl }}}4
- ],
- [
- AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
- WUTIL_LIB=""
- ]
- ,
- $X_LIBS
- )
- dnl That's EVEN BETTER than LISP!!!
-dnl }}}3
- else
-dnl if --disable-libWUtil is given we just do almost nothing
- UTIL_LIB=""
- fi
- ],
- [
-dnl neither --enable nor --disable-libWUtil is not given.
-dnl By default we will try to search for libWUtil {{{3
- AC_CHECK_LIB(
- [WUtil],
- [WMReadPropListFromFile],
- [
- dnl library is found; let's check header file {{{4
- AC_CHECK_HEADERS(
- [WINGs/WUtil.h],
- ,
- [
- AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
- WUTIL_LIB=""
- ]
- )
- dnl }}}4
- ],
- [
- AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
- WUTIL_LIB=""
- ]
- ,
- $X_LIBS
- )
-dnl }}}3
- ]
-)
-
-dnl }}}2
-
-dnl }}}1
+PKG_CHECK_MODULES([Xlib], [x11])
+PKG_CHECK_MODULES([libXpm], [xpm])
+PKG_CHECK_MODULES([WUtil], [WUtil])
AC_ARG_ENABLE(
[wmaker],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/fookb.git
More information about the Pkg-wmaker-commits
mailing list