Bug 1295480 - Move --enable-synth-speechd to python configure. r?chmanchester
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -228,17 +228,16 @@ def old_configure_options(*options):
'--enable-skia',
'--enable-skia-gpu',
'--enable-small-chunk-size',
'--enable-startup-notification',
'--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-pixman',
'--enable-system-sqlite',
'--enable-tasktracer',
'--enable-thread-sanitizer',
'--enable-trace-logging',
--- a/old-configure.in
+++ b/old-configure.in
@@ -2860,31 +2860,16 @@ then
PKG_CHECK_MODULES(MOZ_DBUS, dbus-1 >= $DBUS_VERSION)
PKG_CHECK_MODULES(MOZ_DBUS_GLIB, dbus-glib-1 >= $DBUS_VERSION)
AC_DEFINE(MOZ_ENABLE_DBUS)
fi
fi
AC_SUBST(MOZ_ENABLE_DBUS)
dnl ========================================================
-dnl = speech-dispatcher support
-dnl ========================================================
-
-if test "$MOZ_ENABLE_GTK"
-then
- MOZ_SYNTH_SPEECHD=1
-
- MOZ_ARG_DISABLE_BOOL(synth-speechd,
- [ --disable-synth-speechd Disable speech-dispatcher support ],
- MOZ_SYNTH_SPEECHD=,
- MOZ_SYNTH_SPEECHD=1)
-fi
-AC_SUBST(MOZ_SYNTH_SPEECHD)
-
-dnl ========================================================
dnl = Disable WebSMS backend
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(websms-backend,
[ --disable-websms-backend
Disable WebSMS backend],
MOZ_WEBSMS_BACKEND=,
MOZ_WEBSMS_BACKEND=1)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -520,8 +520,23 @@ option('--disable-printing', help='Disab
@depends('--disable-printing', target)
def printing(value, target):
if value:
return True
set_config('NS_PRINTING', printing)
set_define('NS_PRINTING', printing)
set_define('NS_PRINT_PREVIEW', printing)
+
+# Speech-dispatcher support
+# ==============================================================
+@depends(toolkit)
+def no_speechd_on_non_gtk(toolkit):
+ if toolkit not in ('gtk2', 'gtk3'):
+ return False
+
+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))