Bug 863672 - Port MOZ_WEBSPEECH and MOZ_GAMEPAD changes from mozilla-aurora configure.in to comm-aurora configure.in, r=jcranmer, a=Standard8
authorFrank Wein <mcsmurf@mcsmurf.de>
Tue, 07 May 2013 15:16:57 +0200
changeset 15284 5a3559594fce031e7112fcf2f7258fb80a3b227e
parent 15283 329ad226ac9a0460b6193cfdb64a6892fb510a56
child 15285 35b2907e98c3566854959981d3dc7f7ec2a6d3a4
push id898
push userbugzilla@standard8.plus.com
push dateMon, 13 May 2013 17:03:31 +0000
treeherdercomm-beta@3106694b14de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, Standard8
bugs863672
Bug 863672 - Port MOZ_WEBSPEECH and MOZ_GAMEPAD changes from mozilla-aurora configure.in to comm-aurora configure.in, r=jcranmer, a=Standard8
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3802,16 +3802,17 @@ MOZ_RDF=1
 MOZ_SAFE_BROWSING=
 MOZ_HELP_VIEWER=
 MOZ_SPELLCHECK=1
 MOZ_STORAGE=1
 MOZ_TIMELINE=
 MOZ_UI_LOCALE=en-US
 MOZ_UNIVERSALCHARDET=1
 MOZ_URL_CLASSIFIER=
+MOZ_WEBSPEECH=1
 MOZ_XSLT_STANDALONE=
 MOZ_XTF=1
 MOZ_XUL=1
 MOZ_ZIPWRITER=1
 NS_PRINTING=1
 NSS_DISABLE_DBM=
 NECKO_WIFI=1
 BUILD_CTYPES=1
@@ -4391,16 +4392,30 @@ if test "$MOZ_WIDGET_TOOLKIT" = "qt"; th
     NS_PRINTING=
 fi
 
 if test "$NS_PRINTING"; then
     AC_DEFINE(NS_PRINTING)
 fi
 
 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
+    AC_DEFINE(MOZ_WEBSPEECH)
+fi
+
+AC_SUBST(MOZ_WEBSPEECH)
+
+dnl ========================================================
 dnl Libeditor can be build as plaintext-only,
 dnl or as a full html and text editing component.
 dnl We build both by default.
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(plaintext-editor-only,
 [  --enable-plaintext-editor-only
                           Allow only plaintext editing],
     MOZ_PLAINTEXT_EDITOR_ONLY=1,
@@ -4590,16 +4605,70 @@ if test -n "$MOZ_ANGLE_RENDERER" -a -z "
   if test -z "$MOZ_D3DCOMPILER_CAB"; then
     AC_MSG_ERROR([Couldn't find the DirectX redistributable files. Either reinstall the DirectX SDK (making sure the "DirectX Redistributable Files" option is selected), or reconfigure with --disable-webgl.])
   fi
 
   MOZ_D3DCOMPILER_DLL=D3DCompiler_$MOZ_D3DX9_VERSION.dll
 fi
 
 dnl ========================================================
+dnl Gamepad support
+dnl ========================================================
+MOZ_GAMEPAD=
+MOZ_GAMEPAD_BACKEND=stub
+
+# Gamepad DOM is built on supported platforms by default.
+case "$OS_TARGET" in
+     Darwin|WINNT|Linux)
+       MOZ_GAMEPAD=1
+       ;;
+     *)
+       ;;
+esac
+
+MOZ_ARG_DISABLE_BOOL(gamepad,
+[  --disable-gamepad   Disable gamepad support],
+    MOZ_GAMEPAD=,
+    MOZ_GAMEPAD=1)
+
+if test "$MOZ_GAMEPAD"; then
+    case "$OS_TARGET" in
+    Darwin)
+        MOZ_GAMEPAD_BACKEND=cocoa
+        ;;
+    WINNT)
+        if test -n "$MOZ_DIRECTX_SDK_PATH" ; then
+            if ! test -f "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_DIRECTX_SDK_CPU_SUFFIX/dxguid.lib ; then
+               MOZ_GAMEPAD=
+            fi
+        elif test "$GCC" != "yes"; then
+            MOZ_GAMEPAD=
+        fi
+        if test -z "$MOZ_GAMEPAD"; then
+           AC_MSG_ERROR([Couldn't find the DirectX SDK, needed for gamepad support. Please install it or, reconfigure with --disable-gamepad to disable gamepad support.])
+        fi
+        MOZ_GAMEPAD_BACKEND=windows
+        ;;
+    Linux)
+        AC_CHECK_HEADERS([linux/joystick.h])
+        if test "$ac_cv_header_linux_joystick_h" != "yes"; then
+          AC_MSG_ERROR([Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers or reconfigure with --disable-gamepad to disable gamepad support.])
+        fi
+        MOZ_GAMEPAD_BACKEND=linux
+        ;;
+    *)
+        ;;
+   esac
+
+  AC_DEFINE(MOZ_GAMEPAD)
+fi
+AC_SUBST(MOZ_GAMEPAD)
+AC_SUBST(MOZ_GAMEPAD_BACKEND)
+
+dnl ========================================================
 dnl = Breakpad crash reporting (on by default on supported platforms)
 dnl ========================================================
 
 case $target in
 i?86-*-mingw*|x86_64-*-mingw*)
   MOZ_CRASHREPORTER=1
   ;;
 i?86-apple-darwin*|x86_64-apple-darwin*)