Bug 1257958 - Move MOZ_ANDROID_SEARCH_ACTIVITY to Python configure. draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 18 Mar 2016 13:26:47 -0700
changeset 342317 2dcad02104902b5c63862c06dfeed4a692e157d0
parent 342316 55a3c614f7fd25590a7b86bb65e482743baedb3b
child 342318 e990c6a00ef9979f76f7f7d489f389e200e87eb6
push id13388
push usercmanchester@mozilla.com
push dateFri, 18 Mar 2016 20:27:05 +0000
bugs1257958
milestone48.0a1
Bug 1257958 - Move MOZ_ANDROID_SEARCH_ACTIVITY to Python configure. MozReview-Commit-ID: blxsCpUK1m
build/moz.configure/init.configure
mobile/android/confvars.sh
mobile/android/moz.configure
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -254,16 +254,17 @@ def wanted_mozconfig_variables(help):
          'DOXYGEN',
          'DSYMUTIL',
          'EXTERNAL_SOURCE_DIR',
          'GENISOIMAGE',
          'L10NBASEDIR',
          'MOZILLABUILD',
          'MOZ_ANDROID_BEAM',
          'MOZ_ANDROID_DOWNLOADS_INTEGRATION',
+         'MOZ_ANDROID_SEARCH_ACTIVITY',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
          'MOZ_CALLGRIND',
          'MOZ_DMD',
          'MOZ_FMP4',
          'MOZ_INSTRUMENT_EVENT_LOOP',
          'MOZ_INSTRUMENTS',
          'MOZ_JPROF',
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -66,19 +66,16 @@ if test "$RELEASE_BUILD"; then
 if test "$MOZ_NATIVE_DEVICES"; then
   MOZ_INSTALL_TRACKING=1
 fi
 fi
 
 # Mark as WebGL conformant
 MOZ_WEBGL_CONFORMANT=1
 
-# Enable the Search Activity.
-MOZ_ANDROID_SEARCH_ACTIVITY=1
-
 # Enable the Mozilla Location Service stumbler.
 MOZ_ANDROID_MLS_STUMBLER=1
 
 # Build and package the install bouncer APK by default.
 MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER=1
 
 # Use the low-memory GC tuning.
 export JS_GC_SMALL_CHUNK_SIZE=1
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -1,14 +1,25 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+option(env='MOZ_ANDROID_SEARCH_ACTIVITY', default='1',
+       help='Include Search Activity on Android')
+
+@depends('MOZ_ANDROID_SEARCH_ACTIVITY')
+def search_activity(value):
+    if value:
+        set_define('MOZ_ANDROID_SEARCH_ACTIVITY', '1')
+        set_config('MOZ_ANDROID_SEARCH_ACTIVITY', '1')
+    else:
+        set_config('MOZ_ANDROID_SEARCH_ACTIVITY', '')
+
 # This adds an environment option that is enabled by default,
 # and just sets a define.
 @template
 def enabled_define(name, help):
     opt = option(env=name, default='1', help=help)
 
     @depends(opt.option)
     def enabled_option(value):
--- a/old-configure.in
+++ b/old-configure.in
@@ -2920,17 +2920,16 @@ NECKO_PROTOCOLS_DEFAULT="about app data 
 if test -n "$MOZ_RTSP"; then
   NECKO_PROTOCOLS_DEFAULT="$NECKO_PROTOCOLS_DEFAULT rtsp"
 fi
 USE_ARM_KUSER=
 BUILD_CTYPES=1
 MOZ_USE_NATIVE_POPUP_WINDOWS=
 MOZ_ANDROID_HISTORY=
 MOZ_WEBSMS_BACKEND=
-MOZ_ANDROID_SEARCH_ACTIVITY=
 MOZ_ANDROID_MLS_STUMBLER=
 MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
 MOZ_INSTALL_TRACKING=
 MOZ_SWITCHBOARD=
 ACCESSIBILITY=1
 MOZ_TIME_MANAGER=
 MOZ_SIMPLEPUSH=
 MOZ_PAY=
@@ -3779,23 +3778,16 @@ MOZ_ARG_DISABLE_BOOL(websms-backend,
     MOZ_WEBSMS_BACKEND=,
     MOZ_WEBSMS_BACKEND=1)
 
 if test -n "$MOZ_WEBSMS_BACKEND"; then
     AC_DEFINE(MOZ_WEBSMS_BACKEND)
 fi
 
 dnl ========================================================
-dnl = Include Search Activity on Android
-dnl ========================================================
-if test -n "$MOZ_ANDROID_SEARCH_ACTIVITY"; then
-    AC_DEFINE(MOZ_ANDROID_SEARCH_ACTIVITY)
-fi
-
-dnl ========================================================
 dnl = Include Mozilla Location Service Stumbler on Android
 dnl ========================================================
 if test -n "$MOZ_ANDROID_MLS_STUMBLER"; then
     AC_DEFINE(MOZ_ANDROID_MLS_STUMBLER)
 fi
 
 dnl =========================================================
 dnl = Whether to exclude font files in the build
@@ -7297,17 +7289,16 @@ AC_SUBST(MOZ_DIRECTX_SDK_PATH)
 AC_SUBST(MOZ_D3DCOMPILER_XP_DLL)
 AC_SUBST(MOZ_D3DCOMPILER_XP_CAB)
 
 AC_SUBST(MOZ_ANDROID_HISTORY)
 AC_SUBST(MOZ_WEBSMS_BACKEND)
 AC_SUBST(MOZ_DISABLE_GECKOVIEW)
 AC_SUBST(MOZ_ANDROID_GCM)
 AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
-AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
 AC_SUBST(MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER)
 AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
 AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
 AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
 AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)
 AC_SUBST(MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE)
 AC_SUBST(MOZ_ANDROID_EXCLUDE_FONTS)
 AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)