Bug 1425035 - move --enable-ui-locale to moz.configure; r=gps
authorNathan Froyd <froydnj@gmail.com>
Mon, 18 Dec 2017 14:21:26 -0800
changeset 441327 6a122e9df80af20caf1ef030f74709a634b0f606
parent 441326 4e0519ed813188051360705b9183af5e9e22d09d
child 441328 febf7082883044dc3d1e8203c35766058d699a1f
push id124
push userfmarier@mozilla.com
push dateTue, 30 Jan 2018 01:38:36 +0000
reviewersgps
bugs1425035
milestone59.0a1
Bug 1425035 - move --enable-ui-locale to moz.configure; r=gps We need MOZ_UI_LOCALE even when building the JS shell so config/config.mk variable assignments don't run into issues. But it doesn't make any sense to configure a UI locale for the JS shell. So make --enable-ui-locale a normal `option`, but give it a `default`, which is the value shell-only builds will always see.
build/moz.configure/old.configure
js/src/old-configure.in
moz.configure
old-configure.in
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -221,17 +221,16 @@ def old_configure_options(*options):
     '--enable-synth-pico',
     '--enable-system-cairo',
     '--enable-system-extension-dirs',
     '--enable-system-pixman',
     '--enable-system-sqlite',
     '--enable-tasktracer',
     '--enable-thread-sanitizer',
     '--enable-ubsan-int-overflow',
-    '--enable-ui-locale',
     '--enable-universalchardet',
     '--enable-updater',
     '--enable-valgrind',
     '--enable-verify-mar',
     '--enable-xul',
     '--enable-zipwriter',
     '--includedir',
     '--libdir',
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1390,25 +1390,16 @@ MOZ_ARG_HEADER(Application)
 dnl ========================================================
 dnl =
 dnl = Components & Features
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Components and Features)
 
 dnl ========================================================
-dnl = Localization
-dnl ========================================================
-MOZ_ARG_ENABLE_STRING(ui-locale,
-[  --enable-ui-locale=ab-CD
-                          Select the user interface locale (default: en-US)],
-    MOZ_UI_LOCALE=$enableval )
-AC_SUBST(MOZ_UI_LOCALE)
-
-dnl ========================================================
 dnl =
 dnl = Module specific options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Individual module options)
 
 dnl ========================================================
 dnl =
--- a/moz.configure
+++ b/moz.configure
@@ -275,16 +275,23 @@ def build_gtest(pgo, build_project, targ
     if not enable_tests or not enabled:
         return None
     if (automation and build_project == 'browser' and
         not (pgo and target.os == 'WINNT')):
         return True
 
 set_config('LINK_GTEST_DURING_COMPILE', build_gtest)
 
+# Localization
+# ==============================================================
+option('--enable-ui-locale', default='en-US',
+       help='Select the user interface locale (default: en-US)')
+
+set_config('MOZ_UI_LOCALE', depends('--enable-ui-locale')(lambda x: x))
+
 # clang-plugin location
 # ==============================================================
 @depends(library_name_info, check_build_environment, when='--enable-clang-plugin')
 def clang_plugin_path(library_name_info, build_env):
     topobjdir = build_env.topobjdir
     if topobjdir.endswith('/js/src'):
         topobjdir = topobjdir[:-7]
     return os.path.abspath(
--- a/old-configure.in
+++ b/old-configure.in
@@ -2001,17 +2001,16 @@ VPX_AS_CONVERSION=
 VPX_X86_ASM=
 VPX_ARM_ASM=
 LIBJPEG_TURBO_AS=
 LIBJPEG_TURBO_ASFLAGS=
 MOZ_PREF_EXTENSIONS=1
 MOZ_REFLOW_PERF=
 MOZ_SPELLCHECK=1
 MOZ_TOOLKIT_SEARCH=1
-MOZ_UI_LOCALE=en-US
 MOZ_UNIVERSALCHARDET=1
 MOZ_XUL=1
 MOZ_ZIPWRITER=1
 MOZ_NO_SMART_CARDS=
 NECKO_COOKIES=1
 MOZ_USE_NATIVE_POPUP_WINDOWS=
 MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
 ACCESSIBILITY=1
@@ -2262,25 +2261,16 @@ AC_SUBST(RCC)
 
 dnl ========================================================
 dnl =
 dnl = Components & Features
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Components and Features)
 
-dnl ========================================================
-dnl = Localization
-dnl ========================================================
-MOZ_ARG_ENABLE_STRING(ui-locale,
-[  --enable-ui-locale=ab-CD
-                          Select the user interface locale (default: en-US)],
-    MOZ_UI_LOCALE=$enableval )
-AC_SUBST(MOZ_UI_LOCALE)
-
 AC_SUBST(MOZ_OFFICIAL_BRANDING)
 if test -n "$MOZ_OFFICIAL_BRANDING"; then
   if test -z "$MOZ_OFFICIAL_BRANDING_DIRECTORY"; then
     AC_MSG_ERROR([You must specify MOZ_OFFICIAL_BRANDING_DIRECTORY to use --enable-official-branding.])
   else
     MOZ_BRANDING_DIRECTORY=${MOZ_OFFICIAL_BRANDING_DIRECTORY}
     AC_DEFINE(MOZ_OFFICIAL_BRANDING)
   fi