Subject: bug#8030: configure.in clears FONTCONFIG_CFLAGS and FONTCONFIG_LIBS

From: Sven Joachim <[email-masked]>
Date: Wed, 23 Feb 2011 20:05:34 +0100

It seems to me that bugs #7936 and #8030 are the same, so they should
probably be merged.

Moreover, AFAICS the root of the problem is that configure.in (in Emacs
23.2 and emacs-23) inadvertently clears FONTCONFIG_LIBS, so that
'-lfontconfig' is not passed to the linker.  This has been fixed by
Miles on the trunk in revision 102932:

revno: 102932
committer: Miles Bader <[email-masked]>
branch nick: trunk
timestamp: Sat 2011-01-22 11:45:57 +0900
message:
  configure.in: Don't zero-out FONTCONFIG_CFLAGS and FONTCONFIG_LIBS
  when building with XFT (doing so is incorrect, as Emacs directly uses
  fontconfig, and breaks building when using a strict linker).

--8<---------------cut here---------------start------------->8---
=== modified file 'configure.in'
--- configure.in	2011-01-22 00:12:10 +0000
+++ configure.in	2011-01-22 02:45:57 +0000
@@ -2252,17 +2252,9 @@ if test "${HAVE_X11}" = "yes"; then
        HAVE_XFT=no
     fi
 
-
-    HAVE_FREETYPE=no
     ## We used to allow building with FreeType and without Xft.
     ## However, the ftx font backend driver is not in good shape.
-    if test "${HAVE_XFT}" = "yes"; then
-      dnl As we use Xft, we anyway use freetype.
-      dnl There's no need for additional CFLAGS and LIBS.
-      HAVE_FREETYPE=yes
-      FONTCONFIG_CFLAGS=
-      FONTCONFIG_LIBS=
-    fi
+    HAVE_FREETYPE=$HAVE_XFT
 
     HAVE_LIBOTF=no
     if test "${HAVE_FREETYPE}" = "yes"; then

--8<---------------cut here---------------end--------------->8---

This bug causes Emacs to FTBFS on GNU/Linux as well with a strict
linker when configured "--with-x-toolkit=lucid", see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614823.  I can confirm
that Miles' change fixes that problem.

Any chance to get this fix into Emacs 23.3?

Regards,
        Sven