Bug 1256988 - Move USE_FC_FREETYPE to moz.configure draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Mar 2016 16:23:30 +0900
changeset 341019 c7b8aa7d96d8e33953968b947f1d223336e39490
parent 341018 88c2464fd6459f06e753131bc01c8023ac72ae26
child 341020 a16c09254df6a117d9f36aac9fdceb977f7eca06
push id13117
push userbmo:mh+mozilla@glandium.org
push dateWed, 16 Mar 2016 11:04:10 +0000
bugs1256988
milestone48.0a1
Bug 1256988 - Move USE_FC_FREETYPE to moz.configure
build/moz.configure/init.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -258,16 +258,17 @@ def wanted_mozconfig_variables(help):
          'MOZILLABUILD',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
          'MOZ_INSTRUMENT_EVENT_LOOP',
          'PERL',
          'RPMBUILD',
          'TAR',
          'UNZIP',
+         'USE_FC_FREETYPE',
          'WITHOUT_X',
          'XARGS',
          'ZIP',
      ])
 
 
 @depends(mozconfig, wanted_mozconfig_variables)
 def mozconfig_options(mozconfig, wanted_mozconfig_variables):
--- a/old-configure.in
+++ b/old-configure.in
@@ -3408,28 +3408,19 @@ dnl ====================================
 MOZ_ARG_HEADER(Toolkit Options)
 
 dnl ========================================================
 dnl = Enable the toolkit as needed                         =
 dnl ========================================================
 
 case "$MOZ_WIDGET_TOOLKIT" in
 
-gtk3)
-    USE_FC_FREETYPE=1
-    ;;
-
-gtk2)
-    USE_FC_FREETYPE=1
-    ;;
-
 qt)
     MOZ_ENABLE_QT=1
 
-    USE_FC_FREETYPE=1
     AC_DEFINE(QT_NO_KEYWORDS)
     ;;
 
 cocoa)
     LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
     # Use -Wl as a trick to avoid -framework and framework names from
     # being separated by AC_SUBST_LIST.
     TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL'
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -124,8 +124,20 @@ option(env='MOZ_INSTRUMENT_EVENT_LOOP',
        help='Force-enable event loop instrumentation')
 
 @depends('MOZ_INSTRUMENT_EVENT_LOOP', toolkit)
 def instrument_event_loop(value, toolkit):
     if value or toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa', 'android',
                             'gonk') and value.origin == 'default':
         set_config('MOZ_INSTRUMENT_EVENT_LOOP', '1')
         set_define('MOZ_INSTRUMENT_EVENT_LOOP', '1')
+
+
+# Fontconfig Freetype
+# ==============================================================
+option(env='USE_FC_FREETYPE',
+       help='Force-enable the use of fontconfig freetype')
+
+@depends('USE_FC_FREETYPE', toolkit)
+def fc_freetype(value, toolkit):
+    if (value or toolkit in ('gtk2', 'gtk3', 'qt') and
+            value.origin == 'default'):
+        add_old_configure_assignment('USE_FC_FREETYPE', '1')