From 46dcfee46cb241a0f8e34da679ca8b42e8ee8d46 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 13 Mar 2011 18:36:47 -0400 Subject: [PATCH] Backport 2011-03-06T01:42:13Z!rgm@gnu.org from trunk. * configure.in (FREETYPE_LIBS): Actually set it to something. * 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). --- ChangeLog | 11 +++++++++++ configure.in | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b3dcc3af64..b45615d4317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-03-13 Glenn Morris + + * configure.in (FREETYPE_LIBS): Actually set it to something. + +2011-03-13 Miles Bader + + * 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). + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/configure.in b/configure.in index cfb2a2eb7dc..bc83bc6d703 100644 --- a/configure.in +++ b/configure.in @@ -2034,21 +2034,21 @@ if test "${HAVE_X11}" = "yes"; then fi # "$HAVE_XFT" != no fi # "x${with_xft}" != "xno" - dnl For the "Does Emacs use" message at the end. - if test "$HAVE_XFT" != "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= + if test "$HAVE_XFT" != "yes"; then + dnl For the "Does Emacs use" message at the end. + HAVE_XFT=no + HAVE_FREETYPE=no + else + dnl Strict linkers fail with + dnl ftfont.o: undefined reference to symbol 'FT_New_Face' + dnl if -lfreetype is not specified. + dnl The following is needed to set FREETYPE_LIBS. + PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, + HAVE_FREETYPE=no) + + test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype) fi HAVE_LIBOTF=no -- 2.39.2