]> Dogcows Code - chaz/openbox/commitdiff
mad wicked xft checks
authorDana Jansens <danakj@orodu.net>
Mon, 11 Nov 2002 08:33:43 +0000 (08:33 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 11 Nov 2002 08:33:43 +0000 (08:33 +0000)
configure.ac
src/Makefile.am

index b7d371bb878b62687be12c616db1ebc88807c731..6b5537e62d1e32be21453d8078e18cfd6be0188d 100644 (file)
@@ -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],
index a998e93d913e65c12debc8cb5bc1e4509379cc9e..6fe76c90f55ddf2e472b1e3e156deb9cc1d4c4d7 100644 (file)
@@ -2,12 +2,12 @@ localedir=$(datadir)/locale
 DEFAULT_MENU=$(pkgdatadir)/menu
 DEFAULT_STYLE=$(pkgdatadir)/styles/mbdtex
 
-CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@ \
+CPPFLAGS=$(XFT_CFLAGS) @CPPFLAGS@ \
 -DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
 -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \
 -DLOCALEDIR=\"$(localedir)\"
 
-LDFLAGS=`pkg-config --libs xft`
+LIBS=$(XFT_LIBS) @LIBS@
 
 INCLUDES= -I../otk
 
This page took 0.026378 seconds and 4 git commands to generate.