[gimp] configure: warning when compiling with old fontconfig on Win32.



commit 6b2963928eaf353d3ba14b7f4bb2c98c2a22d66e
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.

 INSTALL.in   |    6 ++++++
 configure.ac |   23 ++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/INSTALL.in b/INSTALL.in
index bf43a0f..21690b5 100644
--- a/INSTALL.in
+++ b/INSTALL.in
@@ -59,6 +59,12 @@ header files installed.
      and fontconfig @FONTCONFIG_REQUIRED_VERSION@ or newer. Older versions are known to have
      bugs that seriously affect the stability of GIMP.
 
+     On Windows platforms in particular, we recommend fontconfig @FONTCONFIG_WIN32_RECOMMENDED_VERSION@
+     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.
+
      We also require HarfBuzz @HARFBUZZ_REQUIRED_VERSION@ or newer, an
      OpenType text shaping tool. As this is a dependency for Pango, you
      will likely have it installed, but you may have to install a
diff --git a/configure.ac b/configure.ac
index db7af4d..86e6fc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,7 @@ m4_define([cairo_required_version], [1.12.2])
 m4_define([cairo_pdf_required_version], [1.12.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([freetype2_required_version], [2.1.7])
 m4_define([harfbuzz_required_version], [0.9.19])
 m4_define([gtkdoc_required_version], [1.0])
@@ -139,6 +140,7 @@ LIBLZMA_REQUIRED_VERSION=liblzma_required_version
 PANGOCAIRO_REQUIRED_VERSION=pangocairo_required_version
 BABL_REQUIRED_VERSION=babl_required_version
 FONTCONFIG_REQUIRED_VERSION=fontconfig_required_version
+FONTCONFIG_WIN32_RECOMMENDED_VERSION=fontconfig_win32_recommended_version
 FREETYPE2_REQUIRED_VERSION=freetype2_required_version
 HARFBUZZ_REQUIRED_VERSION=harfbuzz_required_version
 WEBKIT_REQUIRED_VERSION=webkit_required_version
@@ -163,6 +165,7 @@ AC_SUBST(LIBLZMA_REQUIRED_VERSION)
 AC_SUBST(PANGOCAIRO_REQUIRED_VERSION)
 AC_SUBST(BABL_REQUIRED_VERSION)
 AC_SUBST(FONTCONFIG_REQUIRED_VERSION)
+AC_SUBST(FONTCONFIG_WIN32_RECOMMENDED_VERSION)
 AC_SUBST(FREETYPE2_REQUIRED_VERSION)
 AC_SUBST(HARFBUZZ_REQUIRED_VERSION)
 AC_SUBST(WEBKIT_REQUIRED_VERSION)
@@ -648,6 +651,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
@@ -2361,5 +2382,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]