Bug 1491419 - move --enable-hardware-aec-ns to moz.configure; r=nalexander
authorNathan Froyd <froydnj@mozilla.com>
Mon, 01 Oct 2018 14:51:27 -0400
changeset 494747 2806d89b9234e71375db86c4387d8af67fbf5588
parent 494746 362984e9cc333ae8ce0bc49c0822bfc66ac726c5
child 494748 b257f734506bb147b64e7a443fd54609bbf343a3
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1491419
milestone64.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 1491419 - move --enable-hardware-aec-ns to moz.configure; r=nalexander
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -177,17 +177,16 @@ def old_configure_options(*options):
     '--enable-dbus',
     '--enable-debug-js-modules',
     '--enable-directshow',
     '--enable-dtrace',
     '--enable-dump-painting',
     '--enable-extensions',
     '--enable-feeds',
     '--enable-gconf',
-    '--enable-hardware-aec-ns',
     '--enable-icf',
     '--enable-install-strip',
     '--enable-ios-target',
     '--enable-libjpeg-turbo',
     '--enable-libproxy',
     '--enable-llvm-hacks',
     '--enable-logrefcnt',
     '--enable-memory-sanitizer',
--- a/old-configure.in
+++ b/old-configure.in
@@ -1897,17 +1897,16 @@ MOZ_ARG_HEADER(Application)
 ENABLE_SYSTEM_EXTENSION_DIRS=1
 MOZ_BRANDING_DIRECTORY=
 MOZ_OFFICIAL_BRANDING=
 MOZ_FEEDS=1
 MOZ_AUTH_EXTENSION=1
 if test "$MOZ_IOS"; then
    MOZ_AUTH_EXTENSION=
 fi
-MOZ_WEBRTC_HARDWARE_AEC_NS=
 VPX_USE_YASM=
 VPX_ASFLAGS=
 VPX_AS_CONVERSION=
 VPX_X86_ASM=
 VPX_ARM_ASM=
 LIBJPEG_TURBO_AS=
 LIBJPEG_TURBO_ASFLAGS=
 MOZ_PREF_EXTENSIONS=1
@@ -2331,29 +2330,16 @@ AC_TRY_COMPILE([#include <linux/ethtool.
 AC_SUBST(MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI)
 
 if test -n "$MOZ_WEBRTC"; then
     if test -n "$MOZ_X11"; then
       MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite"
     fi
 fi
 
-dnl ========================================================
-dnl = Force hardware AEC, disable webrtc.org AEC
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(hardware-aec-ns,
-[  --enable-hardware-aec-ns   Enable support for hardware AEC and noise suppression],
-    MOZ_WEBRTC_HARDWARE_AEC_NS=1,
-    MOZ_WEBRTC_HARDWARE_AEC_NS=)
-
-if test -n "$MOZ_WEBRTC_HARDWARE_AEC_NS"; then
-    AC_DEFINE(MOZ_WEBRTC_HARDWARE_AEC_NS)
-fi
-
-AC_SUBST(MOZ_WEBRTC_HARDWARE_AEC_NS)
 AC_SUBST_LIST(MOZ_WEBRTC_X11_LIBS)
 
 dnl ========================================================
 dnl = Apple platform decoder support
 dnl ========================================================
 if test "$COMPILE_ENVIRONMENT"; then
 if test -n "$MOZ_APPLEMEDIA"; then
   # hack in frameworks for fmp4 - see bug 1029974
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -978,16 +978,24 @@ set_config('MOZ_WEBRTC_SIGNALING', webrt
 set_define('MOZ_WEBRTC_SIGNALING', webrtc)
 set_config('MOZ_PEERCONNECTION', webrtc)
 set_define('MOZ_PEERCONNECTION', webrtc)
 # MOZ_WEBRTC_ASSERT_ALWAYS turns on a number of safety asserts in
 # opt/production builds (via MOZ_CRASH())
 set_config('MOZ_WEBRTC_ASSERT_ALWAYS', webrtc)
 set_define('MOZ_WEBRTC_ASSERT_ALWAYS', webrtc)
 
+option('--enable-hardware-aec-ns', when=webrtc,
+       help='Enable support for hardware AEC and noise suppression')
+
+set_config('MOZ_WEBRTC_HARDWARE_AEC_NS',
+           depends_if('--enable-hardware-aec-ns', when=webrtc)(lambda _: True))
+set_define('MOZ_WEBRTC_HARDWARE_AEC_NS',
+           depends_if('--enable-hardware-aec-ns', when=webrtc)(lambda _: True))
+
 # RAW media
 # ==============================================================
 
 @depends(target, webrtc)
 def raw_media_default(target, webrtc):
     if target.os == 'Android':
         return True
     if webrtc: