X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=configure.ac;h=6b5537e62d1e32be21453d8078e18cfd6be0188d;hb=5be1363981349a23637da6a6fc718ae48a7a6667;hp=b7d371bb878b62687be12c616db1ebc88807c731;hpb=cf0823dcf3d1ee8e61be0dfc842b1be3a34b3aee;p=chaz%2Fopenbox diff --git a/configure.ac b/configure.ac index b7d371bb..6b5537e6 100644 --- a/configure.ac +++ b/configure.ac @@ -93,13 +93,23 @@ AC_CHECK_LIB([X11], [XOpenDisplay], dnl Check for Xft2 AC_MSG_CHECKING([for Xft version 2]) +dnl Store these +OLDLIBS=$LIBS +OLDCPPFLAGS=$CPPFLAGS XFT2="" +XFT_CFLAGS="" +XFT_LIBS="" if pkg-config xft; then AC_MSG_RESULT([yes]) - XFT2="yes" - LIBS="$LIBS `pkg-config --libs xft`" - CXXFLAGS="`pkg-config --cflags xft` $CXXFLAGS" + XFT_CFLAGS="`pkg-config --cflags xft`" + XFT_LIBS="`pkg-config --libs xft`" + + dnl Set these for checking with the tests below. They'll be restored after + LIBS="$LIBS $XFT_LIBS" + CPPFLAGS="$XFT_CFLAGS $CPPFLAGS" else + dnl This is for Xft version 1 + XFT_LIBS="-lXft" AC_MSG_RESULT([no]) fi @@ -115,8 +125,6 @@ AC_CHECK_LIB([Xft], [XftFontOpenXlfd], ], [ AC_MSG_RESULT([yes]) - dnl This is for Xft version 1 - test "$XFT2" = "yes" || LIBS="$LIBS -lXft" ], [ AC_MSG_RESULT([no]) @@ -126,6 +134,12 @@ See http://www.fontconfig.org/ ] ) ) +dnl Restore the old values. Use XFT_CFLAGS and XFT_LIBS in the Makefile.am's +LIBS=$OLDLIBS +CPPFLAGS=$OLDCPPFLAGS + +AC_SUBST([XFT_CFLAGS]) +AC_SUBST([XFT_LIBS]) dnl Check for XShape extension support AC_CHECK_LIB([Xext], [XShapeCombineShape],