Bug 1294864 - Move MOZ_PERMISSIONS to Python configure. r=glandium draft
authorChris Manchester <cmanchester@mozilla.com>
Mon, 15 Aug 2016 11:47:50 -0700
changeset 400762 b5a9bb7592219ba4e7e5a69b63bcfebb9a77a2a6
parent 399698 233ab21b64b5d5e9f2f16ea2d4cfb4c8b293c5c4
child 528321 2be9948e3fa957f1589994ca342348a6bb458435
push id26274
push usercmanchester@mozilla.com
push dateMon, 15 Aug 2016 18:55:26 +0000
reviewersglandium
bugs1294864
milestone51.0a1
Bug 1294864 - Move MOZ_PERMISSIONS to Python configure. r=glandium MozReview-Commit-ID: AQiEijHJTEc
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -211,17 +211,16 @@ def old_configure_options(*options):
     '--enable-nfc',
     '--enable-nspr-build',
     '--enable-official-branding',
     '--enable-omx-plugin',
     '--enable-oom-breakpoint',
     '--enable-optimize',
     '--enable-parental-controls',
     '--enable-perf',
-    '--enable-permissions',
     '--enable-pie',
     '--enable-png-arm-neon-support',
     '--enable-posix-nspr-emulation',
     '--enable-pref-extensions',
     '--enable-printing',
     '--enable-pulseaudio',
     '--enable-raw',
     '--enable-readline',
--- a/old-configure.in
+++ b/old-configure.in
@@ -3600,30 +3600,16 @@ if test -n "$MOZ_PULSEAUDIO"; then
     else
         MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src"
     fi
 fi
 
 AC_SUBST(MOZ_PULSEAUDIO)
 
 dnl ========================================================
-dnl Permissions System
-dnl ========================================================
-MOZ_ARG_DISABLE_BOOL(permissions,
-[  --disable-permissions   Disable permissions (popup and cookie blocking)],
-    MOZ_PERMISSIONS=,
-    MOZ_PERMISSIONS=1
-)
-
-AC_SUBST(MOZ_PERMISSIONS)
-if test -n "$MOZ_PERMISSIONS"; then
-    AC_DEFINE(MOZ_PERMISSIONS)
-fi
-
-dnl ========================================================
 dnl NegotiateAuth
 dnl ========================================================
 
 MOZ_ARG_DISABLE_BOOL(negotiateauth,
 [  --disable-negotiateauth Disable GSS-API negotiation ],
     MOZ_AUTH_EXTENSION=,
     MOZ_AUTH_EXTENSION=1 )
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -439,16 +439,27 @@ project_flag('MOZ_ANDROID_HISTORY',
              help='Enable Android History instead of Places',
              set_as_define=True)
 
 @depends('MOZ_PLACES', 'MOZ_ANDROID_HISTORY')
 def check_places_and_android_history(places, android_history):
     if places and android_history:
         die('Cannot use MOZ_ANDROID_HISTORY alongside MOZ_PLACES.')
 
+# Permissions system
+# ==============================================================
+
+option(name='--disable-permissions', env='MOZ_PERMISSIONS',
+       help='Disable permissions (popup and cookie blocking)')
+
+moz_permissions = depends_if('--disable-permissions')(lambda _: True)
+
+set_config('MOZ_PERMISSIONS', moz_permissions)
+set_define('MOZ_PERMISSIONS', moz_permissions)
+
 # gpsd support
 # ==============================================================
 option('--enable-gpsd', env='MOZ_GPSD',
        help='Enable gpsd support')
 
 @depends('--enable-gpsd')
 def gpsd(value):
     return bool(value)