Bug 1295480 - Move --disable-printing to python configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 16 Aug 2016 13:28:33 +0900
changeset 309745 e82d4ddfa207781225cd6b19f3157cf5065594de
parent 309744 2bbe53526d744391b92a9148369111beb42a3c1e
child 309746 3d02315aba81b3c0be2592748804ea30ae7e1a86
push id20333
push userkwierso@gmail.com
push dateThu, 18 Aug 2016 00:26:40 +0000
treeherderfx-team@11c94ec980d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1295480
milestone51.0a1
Bug 1295480 - Move --disable-printing to python configure. r=chmanchester
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -210,17 +210,16 @@ def old_configure_options(*options):
     '--enable-oom-breakpoint',
     '--enable-optimize',
     '--enable-parental-controls',
     '--enable-permissions',
     '--enable-pie',
     '--enable-png-arm-neon-support',
     '--enable-posix-nspr-emulation',
     '--enable-pref-extensions',
-    '--enable-printing',
     '--enable-pulseaudio',
     '--enable-raw',
     '--enable-readline',
     '--enable-reflow-perf',
     '--enable-release',
     '--enable-require-all-d3dc-versions',
     '--enable-safe-browsing',
     '--enable-sandbox',
--- a/old-configure.in
+++ b/old-configure.in
@@ -2351,20 +2351,16 @@ MOZ_REFLOW_PERF=
 MOZ_SAFE_BROWSING=
 MOZ_SPELLCHECK=1
 MOZ_TOOLKIT_SEARCH=1
 MOZ_UI_LOCALE=en-US
 MOZ_UNIVERSALCHARDET=1
 MOZ_URL_CLASSIFIER=
 MOZ_XUL=1
 MOZ_ZIPWRITER=1
-NS_PRINTING=1
-if test "$MOZ_IOS"; then
-   NS_PRINTING=
-fi
 MOZ_NO_SMART_CARDS=
 NSS_DISABLE_DBM=
 NECKO_COOKIES=1
 NECKO_PROTOCOLS_DEFAULT="about data file ftp http res viewsource websocket wyciwyg device"
 if test -n "$MOZ_RTSP"; then
   NECKO_PROTOCOLS_DEFAULT="$NECKO_PROTOCOLS_DEFAULT rtsp"
 fi
 BUILD_CTYPES=1
@@ -2628,33 +2624,16 @@ then
     if test "$MOZ_ENABLE_STARTUP_NOTIFICATION"; then
         AC_DEFINE(MOZ_ENABLE_STARTUP_NOTIFICATION)
     fi
 
     TK_LIBS="$TK_LIBS $MOZ_STARTUP_NOTIFICATION_LIBS"
 fi
 AC_SUBST(MOZ_ENABLE_STARTUP_NOTIFICATION)
 
-dnl ========================================================
-dnl Disable printing
-dnl ========================================================
-MOZ_ARG_DISABLE_BOOL(printing,
-[  --disable-printing      Disable printing support],
-    NS_PRINTING=,
-    NS_PRINTING=1)
-
-if test -n "$MOZ_IOS" -a -n "$NS_PRINTING"; then
-   AC_MSG_ERROR([Printing is not supported on iOS.])
-fi
-
-if test "$NS_PRINTING"; then
-    AC_DEFINE(NS_PRINTING)
-    AC_DEFINE(NS_PRINT_PREVIEW)
-fi
-
 AC_SUBST_LIST(TK_CFLAGS)
 AC_SUBST_LIST(TK_LIBS)
 
 AC_SUBST(MOC)
 AC_SUBST(RCC)
 
 dnl ========================================================
 dnl =
@@ -5783,17 +5762,16 @@ AC_SUBST(MOZ_AUTH_EXTENSION)
 AC_SUBST(MOZ_PREF_EXTENSIONS)
 AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST_SET(MOZ_EXTENSIONS)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
-AC_SUBST(NS_PRINTING)
 
 AC_SUBST(MOZ_UNIVERSALCHARDET)
 AC_SUBST(ACCESSIBILITY)
 AC_SUBST(MOZ_SPELLCHECK)
 AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
 AC_SUBST(MOZ_CRASHREPORTER)
 AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
 AC_SUBST(MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -500,8 +500,28 @@ option('--enable-ipc-fuzzer', env='MOZ_F
 def ipc_fuzzer(value, target):
     if value:
         if target.os == 'WINNT':
             die('--enable-ipc-fuzzer is not supported on this platform.')
         return bool(value)
 
 set_config('MOZ_FAULTY', ipc_fuzzer)
 set_define('MOZ_FAULTY', ipc_fuzzer)
+
+# Printing
+# ==============================================================
+@depends(target)
+def ios_disable_printing(target):
+    if target.os == 'iOS':
+        return False
+
+imply_option('--enable-printing', ios_disable_printing, reason='--target')
+
+option('--disable-printing', help='Disable printing support')
+
+@depends('--disable-printing')
+def printing(value):
+    if value:
+        return True
+
+set_config('NS_PRINTING', printing)
+set_define('NS_PRINTING', printing)
+set_define('NS_PRINT_PREVIEW', printing)