Bug 1305145 - Move fontconfig detection to Python configure. r=glandium
☠☠ backed out by acee3d0166dc ☠ ☠
authorChris Manchester <cmanchester@mozilla.com>
Fri, 14 Oct 2016 11:06:31 -0700
changeset 360958 aece1b8a86732fae5e0577c6567fb90e31e191ee
parent 360957 85082a1118068529ac58b413772246bd83428c0f
child 360959 ab38e43fdcb6cb9e0d63fb4f4a7de7f30ab8accc
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1305145
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1305145 - Move fontconfig detection to Python configure. r=glandium MozReview-Commit-ID: J6XQFA6whCr
old-configure.in
toolkit/moz.configure
--- a/old-configure.in
+++ b/old-configure.in
@@ -64,17 +64,16 @@ GTK3_VERSION=3.4.0
 GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4
 WINDRES_VERSION=2.14.90
 W32API_VERSION=3.14
 GNOMEUI_VERSION=2.2.0
 GCONF_VERSION=1.2.1
 STARTUP_NOTIFICATION_VERSION=0.8
 DBUS_VERSION=0.60
 SQLITE_VERSION=3.14.1
-FONTCONFIG_VERSION=2.7.0
 
 dnl Set various checks
 dnl ========================================================
 MISSING_X=
 
 dnl Initialize the Pthread test variables early so they can be
 dnl  overridden by each platform.
 dnl ========================================================
@@ -5170,21 +5169,18 @@ if test "$USE_FC_FREETYPE"; then
         CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
         MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
             [AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
         CPPFLAGS="$_SAVE_CPPFLAGS"
     else
         AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
     fi
 
-    PKG_CHECK_MODULES(_FONTCONFIG, fontconfig >= $FONTCONFIG_VERSION,
-    [
-        FT2_CFLAGS="$FT2_CFLAGS $_FONTCONFIG_CFLAGS"
-        FT2_LIBS="$FT2_LIBS $_FONTCONFIG_LIBS"
-    ])
+    FT2_CFLAGS="$FT2_CFLAGS $_FONTCONFIG_CFLAGS"
+    FT2_LIBS="$FT2_LIBS $_FONTCONFIG_LIBS"
 fi
 
 dnl ========================================================
 dnl Check for pixman and cairo
 dnl ========================================================
 
 MOZ_TREE_CAIRO=1
 MOZ_ARG_ENABLE_BOOL(system-cairo,
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -275,16 +275,27 @@ def fc_freetype(value, toolkit):
 add_old_configure_assignment('USE_FC_FREETYPE', fc_freetype)
 
 # Pango
 # ==============================================================
 pkg_check_modules('MOZ_PANGO',
                   'pango >= 1.22.0 pangoft2 >= 1.22.0 pangocairo >= 1.22.0',
                   when=toolkit_gtk)
 
+# Fontconfig
+# ==============================================================
+fontconfig_info = pkg_check_modules('_FONTCONFIG', 'fontconfig >= 2.7.0',
+                                    when=fc_freetype)
+
+add_old_configure_assignment('_FONTCONFIG_CFLAGS',
+                             delayed_getattr(fontconfig_info, 'cflags'))
+add_old_configure_assignment('_FONTCONFIG_LIBS',
+                             delayed_getattr(fontconfig_info, 'libs'))
+
+
 # Apple platform decoder support
 # ==============================================================
 @depends(toolkit)
 def applemedia(toolkit):
     if toolkit in ('cocoa', 'uikit'):
         return True
 
 set_config('MOZ_APPLEMEDIA', applemedia)