Bug 1305145 - Move Pango detection to Python configure. draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 06 Oct 2016 11:58:52 -0700
changeset 421741 ce634b2c583b1e3ad550971e77ce5280b2c580d2
parent 421740 3d7b169c6d4cd592efdf5b6c0718269bec176390
child 421742 b68870f0fc1357b8b8f1caf6ee9dbc839a0f0777
push id31579
push userbmo:cmanchester@mozilla.com
push dateThu, 06 Oct 2016 18:59:13 +0000
bugs1305145, 947379
milestone52.0a1
Bug 1305145 - Move Pango detection to Python configure. A test against MOZ_PANGO is also removed, this has not been set since bug 947379. MozReview-Commit-ID: IwpsCda6mmw
old-configure.in
toolkit/moz.configure
--- a/old-configure.in
+++ b/old-configure.in
@@ -54,17 +54,16 @@ NSS_VERSION=3
 dnl Set the minimum version of toolkit libs used by mozilla
 dnl ========================================================
 GLIB_VERSION=2.22
 # 2_26 is the earliest version we can set GLIB_VERSION_MIN_REQUIRED.
 # The macro won't be used when compiling with earlier versions anyway.
 GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26
 GIO_VERSION=2.22
 CAIRO_VERSION=1.10
-PANGO_VERSION=1.22.0
 GTK2_VERSION=2.18.0
 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
@@ -2668,26 +2667,16 @@ dnl values set by configure.sh above.
 dnl ========================================================
 
 MOZ_ANDROID_GOOGLE_PLAY_SERVICES
 MOZ_ANDROID_GOOGLE_CLOUD_MESSAGING
 MOZ_ANDROID_INSTALL_TRACKING
 
 
 dnl ========================================================
-dnl = Pango
-dnl ========================================================
-if test "$MOZ_ENABLE_GTK"
-then
-    PKG_CHECK_MODULES(_PANGOCHK, pango >= $PANGO_VERSION)
-
-    PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION)
-fi
-
-dnl ========================================================
 dnl = GIO and GConf support module
 dnl ========================================================
 
 if test "$MOZ_X11"
 then
     dnl build the GIO extension by default only when the
     dnl GTK2 toolkit is in use.
     if test "$MOZ_ENABLE_GTK"
@@ -5187,23 +5176,18 @@ if test "$USE_FC_FREETYPE"; then
             [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,
     [
-        if test "$MOZ_PANGO"; then
-            MOZ_PANGO_CFLAGS="$MOZ_PANGO_CFLAGS $_FONTCONFIG_CFLAGS"
-            MOZ_PANGO_LIBS="$MOZ_PANGO_LIBS $_FONTCONFIG_LIBS"
-        else
-            FT2_CFLAGS="$FT2_CFLAGS $_FONTCONFIG_CFLAGS"
-            FT2_LIBS="$FT2_LIBS $_FONTCONFIG_LIBS"
-        fi
+        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
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -269,16 +269,21 @@ option(env='USE_FC_FREETYPE',
 @depends('USE_FC_FREETYPE', toolkit)
 def fc_freetype(value, toolkit):
     if value or (toolkit in ('gtk2', 'gtk3') and
                  value.origin == 'default'):
         return True
 
 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)
 
 # Apple platform decoder support
 # ==============================================================
 @depends(toolkit)
 def applemedia(toolkit):
     if toolkit in ('cocoa', 'uikit'):
         return True