Bug 1295480 - Move MOZ_WEBSPEECH_POCKETSPHINX to python configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 16 Aug 2016 14:13:14 +0900
changeset 309590 ac50ed832789d241171d610d02cb433552366d67
parent 309589 60708763cd62988e199e956893f2dcc270eb2e2c
child 309591 499a0bf7810d8f61c28e10df2ad1bd481bc786ac
push id80661
push usermh@glandium.org
push dateWed, 17 Aug 2016 02:03:02 +0000
treeherdermozilla-inbound@457289ddb7c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1295480
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1295480 - Move MOZ_WEBSPEECH_POCKETSPHINX to python configure. r=chmanchester
b2g/confvars.sh
old-configure.in
toolkit/moz.configure
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -21,17 +21,16 @@ MOZ_SAFE_BROWSING=1
 
 MOZ_NO_SMART_CARDS=1
 MOZ_APP_STATIC_INI=1
 MOZ_NO_EV_CERTS=1
 
 MOZ_WEBSPEECH=1
 if test -n "$NIGHTLY_BUILD"; then
 MOZ_WEBSPEECH_MODELS=1
-MOZ_WEBSPEECH_POCKETSPHINX=1
 fi
 MOZ_WEBSPEECH_TEST_BACKEND=1
 
 if test "$OS_TARGET" = "Android"; then
 MOZ_CAPTURE=1
 MOZ_RAW=1
 MOZ_AUDIO_CHANNEL_MANAGER=1
 fi
--- a/old-configure.in
+++ b/old-configure.in
@@ -2331,17 +2331,16 @@ MOZ_WEBRTC_SIGNALING=
 MOZ_WEBRTC_ASSERT_ALWAYS=1
 MOZ_WEBRTC_HARDWARE_AEC_NS=
 MOZ_SCTP=
 MOZ_ANDROID_OMX=
 MOZ_OMX_PLUGIN=
 MOZ_VPX_ERROR_CONCEALMENT=
 MOZ_WEBSPEECH=1
 MOZ_WEBSPEECH_MODELS=
-MOZ_WEBSPEECH_POCKETSPHINX=
 MOZ_WEBSPEECH_TEST_BACKEND=1
 VPX_USE_YASM=
 VPX_ASFLAGS=
 VPX_AS_CONVERSION=
 VPX_X86_ASM=
 VPX_ARM_ASM=
 LIBJPEG_TURBO_AS=
 LIBJPEG_TURBO_ASFLAGS=
@@ -3003,25 +3002,16 @@ if test "$OS_TARGET" = "Android" -o "$CP
     AC_SUBST(MOZ_SAMPLE_TYPE_S16)
 else
     MOZ_SAMPLE_TYPE_FLOAT32=1
     AC_DEFINE(MOZ_SAMPLE_TYPE_FLOAT32)
     AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32)
 fi
 
 dnl ========================================================
-dnl = Disable Speech API pocketsphinx backend
-dnl ========================================================
-if test -n "$MOZ_WEBSPEECH_POCKETSPHINX"; then
-    AC_DEFINE(MOZ_WEBSPEECH_POCKETSPHINX)
-fi
-
-AC_SUBST(MOZ_WEBSPEECH_POCKETSPHINX)
-
-dnl ========================================================
 dnl = Disable Speech API code
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(webspeech,
 [  --disable-webspeech        Disable support for HTML Speech API],
     MOZ_WEBSPEECH=,
     MOZ_WEBSPEECH=1)
 
 if test -n "$MOZ_WEBSPEECH"; then
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -536,16 +536,26 @@ def no_speechd_on_non_gtk(toolkit):
 imply_option('--enable-synth-speechd', no_speechd_on_non_gtk,
              reason='--enable-default-toolkit')
 
 option('--disable-synth-speechd', help='Disable speech-dispatcher support')
 
 set_config('MOZ_SYNTH_SPEECHD',
            depends_if('--disable-synth-speechd')(lambda _: True))
 
+# Speech API pocketsphinx backend
+# ==============================================================
+@depends(build_project, milestone)
+def webspeech_pocketsphinx(build_project, milestone):
+    if milestone.is_nightly and build_project == 'b2g':
+        return True
+
+set_config('MOZ_WEBSPEECH_POCKETSPHINX', webspeech_pocketsphinx)
+set_define('MOZ_WEBSPEECH_POCKETSPHINX', webspeech_pocketsphinx)
+
 # WebSMS
 # ==============================================================
 @depends(build_project, '--help')
 def websms_default(build_project, _):
     return build_project in ('b2g', 'b2g/graphene')
 
 option('--enable-websms-backend', default=websms_default,
        help='Enable WebSMS backend')