wmail: use pkg-config for X11 and dockapp.

This commit is contained in:
Jeremy Sowden 2019-06-07 09:52:20 +01:00 committed by Carlos R. Mafra
parent fa97374dd0
commit 46cd3297ae
2 changed files with 8 additions and 28 deletions

View file

@ -6,37 +6,19 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
dnl Checks for pkg-config modules.
PKG_CHECK_MODULES([X11], [x11])
PKG_CHECK_MODULES([dockapp], [dockapp])
dnl Checks for header files.
#AC_PATH_X
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h strings.h sys/time.h)
dnl Checks for X installation root directory.
AC_PATH_XTRA
X_LIBRARY_PATH="$x_libraries"
XLIBS="-lX11 $X_EXTRA_LIBS"
XCFLAGS="$X_CFLAGS"
XLFLAGS="$X_LIBS"
if test -n "$includedir"; then
XCFLAGS="$XCFLAGS -I$includedir"
fi
if test -n "$libdir"; then
XLIBS="$XLIBS -L$libdir"
fi
CPPFLAGS_old="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XCFLAGS"
AC_CHECK_HEADER(dockapp.h,,)
CPPFLAGS="$CPPFLAGS $dockapp_CFLAGS $X11_CFLAGS"
AC_CHECK_HEADER(dockapp.h)
CPPFLAGS="$CPPFLAGS_old"
AC_SUBST(XCFLAGS)
AC_SUBST(XLFLAGS)
AC_SUBST(XLIBS)
AC_SUBST(X_LIBRARY_PATH)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
@ -48,8 +30,6 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strdup strstr memcpy)
dnl Checks for libraries.
AC_CHECK_LIB(X11, XCreateGC,,,$XLFLAGS $XLIBS)
AC_CHECK_LIB(dockapp, DAInitialize,,,$XLFLAGS $XLIBS)
dnl Enable Debugging?
AC_ARG_ENABLE(debug,

View file

@ -3,9 +3,9 @@
# Makefile for wmail.
# Makes the wmail dockapp binary and cleans the directory, respectively.
LIBS = @LIBS@ @XLFLAGS@ @XLIBS@
LIBS = @LIBS@ @dockapp_LIBS@ @X11_LIBS@
CC = @CC@
CFLAGS = @CFLAGS@ @XCFLAGS@
CFLAGS = @CFLAGS@ @dockapp_CFLAGS@ @X11_CFLAGS@
CPPFLAGS = @DEFS@ @CPPFLAGS@
default all target: wmail