Bug 1269513 - Move --with-system-hunspell to Python configure. draft
authorChris Manchester <cmanchester@mozilla.com>
Tue, 10 May 2016 16:49:19 -0700
changeset 365520 724e131724dc892f45be0cdad00f86f2eff8d4ac
parent 365519 7a944aea44e68c28936aac0541fb01bae56c33c2
child 520586 74ee64cc3844a43c4ca5c9a260a60643b7a16072
push id17774
push usercmanchester@mozilla.com
push dateTue, 10 May 2016 23:49:34 +0000
bugs1269513
milestone49.0a1
Bug 1269513 - Move --with-system-hunspell to Python configure. MozReview-Commit-ID: ERnnsr1hnpu
build/moz.configure/old.configure
moz.configure
old-configure.in
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -243,17 +243,16 @@ def old_configure_options(*options):
     '--enable-startupcache',
     '--enable-stdcxx-compat',
     '--enable-strip',
     '--enable-synth-pico',
     '--enable-synth-speechd',
     '--enable-system-cairo',
     '--enable-system-extension-dirs',
     '--enable-system-ffi',
-    '--enable-system-hunspell',
     '--enable-system-pixman',
     '--enable-system-sqlite',
     '--enable-tasktracer',
     '--enable-tests',
     '--enable-thread-sanitizer',
     '--enable-trace-logging',
     '--enable-tree-freetype',
     '--enable-ui-locale',
--- a/moz.configure
+++ b/moz.configure
@@ -162,12 +162,23 @@ def extra_programs(target):
 
 check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'),
            allow_missing=True)
 check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
            allow_missing=True)
 check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
            allow_missing=True)
 
+option('--enable-system-hunspell',
+       help="Use system hunspell (located with pkgconfig)")
+
+@depends('--enable-system-hunspell', compile_environment)
+def check_for_hunspell(value, compile_env):
+    return value and compile_env
+
+system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell',
+                                    check_for_hunspell)
+
+set_config('MOZ_SYSTEM_HUNSPELL', system_hunspell)
 
 # Fallthrough to autoconf-based configure
 include('build/moz.configure/old.configure')
 # Please do not add anything after the include of old.configure.
--- a/old-configure.in
+++ b/old-configure.in
@@ -2614,30 +2614,16 @@ if test "$MOZ_SYSTEM_PNG" != 1 -a "$CPU_
     esac
 fi
 
 fi # SKIP_LIBRARY_CHECKS
 
 AC_SUBST(MOZ_PNG_ARM_NEON)
 
 dnl ========================================================
-dnl system HunSpell Support
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(system-hunspell,
-[  --enable-system-hunspell
-                          Use system hunspell (located with pkgconfig)],
-    MOZ_SYSTEM_HUNSPELL=1 )
-
-if test -n "$MOZ_SYSTEM_HUNSPELL"; then
-    PKG_CHECK_MODULES(MOZ_HUNSPELL, hunspell)
-fi
-
-AC_SUBST(MOZ_SYSTEM_HUNSPELL)
-
-dnl ========================================================
 dnl system libffi Support
 dnl ========================================================
 MOZ_CONFIG_FFI()
 
 dnl ========================================================
 dnl =
 dnl = Application
 dnl =