Bug 1491419 - move --enable-raw to moz.configure; r=nalexander
authorNathan Froyd <froydnj@mozilla.com>
Mon, 01 Oct 2018 14:51:27 -0400
changeset 497458 362984e9cc333ae8ce0bc49c0822bfc66ac726c5
parent 497457 d7ba9ef59ccef7f46b1b5ed2f183b2ac469def3a
child 497459 2806d89b9234e71375db86c4387d8af67fbf5588
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [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-raw 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
@@ -195,17 +195,16 @@ def old_configure_options(*options):
     '--enable-necko-wifi',
     '--enable-negotiateauth',
     '--enable-nfc',
     '--enable-nspr-build',
     '--enable-official-branding',
     '--enable-parental-controls',
     '--enable-posix-nspr-emulation',
     '--enable-pref-extensions',
-    '--enable-raw',
     '--enable-readline',
     '--enable-reflow-perf',
     '--enable-sandbox',
     '--enable-signmar',
     '--enable-startup-notification',
     '--enable-startupcache',
     '--enable-strip',
     '--enable-synth-pico',
--- 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_RAW=
 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=
@@ -1931,23 +1930,16 @@ MOZ_DEVTOOLS=server
 
 case "$target_os" in
     mingw*)
         NS_ENABLE_TSF=1
         AC_DEFINE(NS_ENABLE_TSF)
         ;;
 esac
 
-case "${target}" in
-    *-android*|*-linuxandroid*)
-        MOZ_RAW=1
-        ;;
-
-esac
-
 # Optional Firefox for Android partner distribution directory.
 MOZ_ARG_WITH_STRING(android-distribution-directory,
 [  --with-android-distribution-directory=dir
                           Optional Firefox for Android partner distribution directory.],
   MOZ_ANDROID_DISTRIBUTION_DIRECTORY=$withval)
 
 if test -n "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY"; then
   # A distribution directory must have an assets/distribution directory.
@@ -2334,17 +2326,16 @@ fi
 
 AC_TRY_COMPILE([#include <linux/ethtool.h>],
                [ struct ethtool_cmd cmd; cmd.speed_hi = 0; ],
                MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI=1)
 
 AC_SUBST(MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI)
 
 if test -n "$MOZ_WEBRTC"; then
-    MOZ_RAW=1
     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 ========================================================
@@ -2356,30 +2347,16 @@ MOZ_ARG_ENABLE_BOOL(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 = Enable Raw Codecs
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(raw,
-[  --enable-raw           Enable support for RAW media],
-    MOZ_RAW=1,
-    MOZ_RAW=)
-
-if test -n "$MOZ_RAW"; then
-    AC_DEFINE(MOZ_RAW)
-fi
-
-AC_SUBST(MOZ_RAW)
-
-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
   # We load VideoToolbox and CoreMedia dynamically, so they don't appear here.
   LDFLAGS="$LDFLAGS -framework AudioToolbox"
   dnl Verify CoreMedia is available.
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -978,16 +978,32 @@ 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)
 
+# RAW media
+# ==============================================================
+
+@depends(target, webrtc)
+def raw_media_default(target, webrtc):
+    if target.os == 'Android':
+        return True
+    if webrtc:
+        return True
+
+option('--enable-raw', help='Enable support for RAW media',
+       default=raw_media_default)
+
+set_config('MOZ_RAW', depends_if('--enable-raw')(lambda _: True))
+set_define('MOZ_RAW', depends_if('--enable-raw')(lambda _: True))
+
 # ASan Reporter Addon
 # ==============================================================
 option('--enable-address-sanitizer-reporter',
        help='Enable Address Sanitizer Reporter Extension')
 
 @depends('--enable-address-sanitizer-reporter')
 def enable_asan_reporter(value):
     if value: