]> git.eshelyaron.com Git - emacs.git/commitdiff
Add check for libXft.
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 26 Jan 2007 16:32:49 +0000 (16:32 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 26 Jan 2007 16:32:49 +0000 (16:32 +0000)
configure.in
src/ChangeLog

index ceed242cd492b4e11d6bfb6f662b9539edbacbb6..3c0dad5a5610fa0c5fe1ce3a2c498a88cfc7b77d 100644 (file)
@@ -2150,6 +2150,37 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
   fi
 fi
 
+### Link with -lXft if available to work around a bug.
+HAVE_XFT=maybe
+if test "${HAVE_GTK}" = "yes"; then
+  dnl Check if --with-pkg-config-prog has been given.
+  if test "X${with_pkg_config_prog}" != X; then
+    PKG_CONFIG="${with_pkg_config_prog}"
+  fi
+
+  PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
+  if test "$HAVE_XFT" != no; then
+    OLD_CFLAGS="$CPPFLAGS"
+    OLD_CFLAGS="$CFLAGS"
+    OLD_LIBS="$LIBS"
+    CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
+    CFLAGS="$CFLAGS $XFT_CFLAGS"
+    LIBS="$XFT_LIBS $LIBS"
+    AC_CHECK_HEADER(X11/Xft/Xft.h,
+      AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))
+
+    if test "${HAVE_XFT}" = "yes"; then
+      AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.])
+      AC_SUBST(XFT_LIBS)
+      C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
+    else
+      CFLAGS="$OLD_CPPFLAGS"
+      CFLAGS="$OLD_CFLAGS"
+      LIBS="$OLD_LIBS"
+    fi
+  fi
+fi
+
 dnl Do not put whitespace before the #include statements below.
 dnl Older compilers (eg sunos4 cc) choke on it.
 if test x"${USE_X_TOOLKIT}" = xmaybe; then
index 3bf6763f6b7717119d6267495d219b89e83ff50f..3d7db34a057347c6ae220d77b6725e4a5d2a5121 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-26  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * Makefile.in: Use XFT_LIBS if defined.
+
 2007-01-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use