[gimp/gimp-2-8] configure: warning when compiling with old fontconfig on Win32.



commit 6fa0bc30185ea5b19e6d2084bf2ad40137f7c5c2
Author: Jehan <jehan girinstud io>
Date:   Tue Jul 22 18:20:02 2014 +0000

    configure: warning when compiling with old fontconfig on Win32.
    
    Fontconfig had a few bugs in the default configuration when compiled for
    Windows. These issues are fixed from version 2.11.1. Display a warning
    when compiling on win32 platform with older versions.
    See in particular bugs 708110 and 703331.
    (cherry picked from commit 6b2963928eaf353d3ba14b7f4bb2c98c2a22d66e)

 INSTALL      |    6 ++++++
 configure.ac |   23 ++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index bf8afaf..dee1968 100644
--- a/INSTALL
+++ b/INSTALL
@@ -57,6 +57,12 @@ header files installed.
      and fontconfig 2.2.0 or newer. Older versions are known to have
      bugs that seriously affect the stability of GIMP.
 
+     On Windows platforms in particular, we recommend fontconfig 2.11.1
+     or newer. Older versions may end up in broken font handling, due to
+     inadequate font configuration: font aliases not configured,
+     synthetic bold/italic variants unavailable, cache folder in temp
+     directory resulting in slow startups, etc.
+
   7. We use dbus-glib if available. Grab it from
      http://dbus.freedesktop.org/releases/dbus-glib/
 
diff --git a/configure.ac b/configure.ac
index fc68eda..b455f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,7 @@ m4_define([cairo_required_version], [1.10.2])
 m4_define([cairo_pdf_required_version], [1.10.2])
 m4_define([pangocairo_required_version], [1.29.4])
 m4_define([fontconfig_required_version], [2.2.0])
+m4_define([fontconfig_win32_recommended_version], [2.11.1])
 m4_define([gtkdoc_required_version], [1.0])
 m4_define([webkit_required_version], [1.6.1])
 m4_define([alsa_required_version], [1.0.0])
@@ -127,11 +128,13 @@ GLIB_REQUIRED_VERSION=glib_required_version
 GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
 GTK_REQUIRED_VERSION=gtk_required_version
 CAIRO_REQUIRED_VERSION=cairo_required_version
+FONTCONFIG_WIN32_RECOMMENDED_VERSION=fontconfig_win32_recommended_version
 PYTHON2_REQUIRED_VERSION=python2_required_version
 AC_SUBST(GLIB_REQUIRED_VERSION)
 AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
 AC_SUBST(GTK_REQUIRED_VERSION)
 AC_SUBST(CAIRO_REQUIRED_VERSION)
+AC_SUBST(FONTCONFIG_WIN32_RECOMMENDED_VERSION)
 AC_SUBST(PYTHON2_REQUIRED_VERSION)
 
 # The symbol GIMP_UNSTABLE is defined above for substitution in
@@ -590,6 +593,24 @@ CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
 
 PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
 
+# Windows platform had a few bugs fixed in earlier fontconfig.
+# Display a warning when compiling with a flawed fontconfig.
+# See bugs 708110 and 703331.
+have_recommended_fontconfig=""
+if test "x$platform_win32" = "xyes"; then
+    PKG_CHECK_MODULES(RECOMMENDED_WIN32_FONTCONFIG, fontconfig >= fontconfig_win32_recommended_version,
+                      have_recommended_fontconfig="yes", have_recommended_fontconfig="no")
+
+    if test "x$have_recommended_fontconfig" = xno; then
+        have_recommended_fontconfig="
+WARNING: Your fontconfig version is `$PKG_CONFIG --modversion fontconfig`.
+         The recommended fontconfig version under Windows is $FONTCONFIG_WIN32_RECOMMENDED_VERSION or over.
+         If you continue without updating fontconfig, your build may have partially broken font processing."
+    else
+        have_recommended_fontconfig=""
+    fi
+fi
+
 AC_MSG_CHECKING([if Pango is version 1.32.0 or newer])
 if $PKG_CONFIG --atleast-version=1.32.0 pango; then
   have_pango_1_32=yes
@@ -2473,5 +2494,5 @@ Optional Modules:
 
 Tests:
   Use xvfb-run         $have_xvfb_run
-$have_recommended_xgettext
+$have_recommended_xgettext $have_recommended_fontconfig
 ]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]