Bug 1257104 - Move --disable-ffmpeg to moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -195,17 +195,16 @@ def old_configure_options(*options):
'--enable-dmd',
'--enable-dtrace',
'--enable-dump-painting',
'--enable-elf-hack',
'--enable-eme',
'--enable-extensions',
'--enable-faststripe',
'--enable-feeds',
- '--enable-ffmpeg',
'--enable-fmp4',
'--enable-gamepad',
'--enable-gc-trace',
'--enable-gconf',
'--enable-gczeal',
'--enable-gio',
'--enable-gnomeui',
'--enable-gold',
--- a/old-configure.in
+++ b/old-configure.in
@@ -3066,17 +3066,16 @@ MOZ_TREMOR=
MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_DIRECTSHOW=
if test -n "$MOZ_FMP4"; then
MOZ_FMP4=1
else
MOZ_FMP4=
fi
-MOZ_FFMPEG=
MOZ_WEBRTC=1
MOZ_PEERCONNECTION=
MOZ_SRTP=
MOZ_WEBRTC_SIGNALING=
MOZ_WEBRTC_ASSERT_ALWAYS=1
MOZ_WEBRTC_HARDWARE_AEC_NS=
MOZ_SCTP=
MOZ_ANDROID_OMX=
@@ -4348,37 +4347,16 @@ MOZ_ARG_DISABLE_BOOL(directshow,
MOZ_DIRECTSHOW=,
MOZ_DIRECTSHOW=1)
if test -n "$MOZ_DIRECTSHOW"; then
AC_DEFINE(MOZ_DIRECTSHOW)
fi;
dnl ========================================================
-dnl FFmpeg H264/AAC Decoding Support
-dnl ========================================================
-case "$OS_TARGET" in
-WINNT|Android)
- ;;
-*)
- MOZ_FFMPEG=1
- ;;
-esac
-
-MOZ_ARG_DISABLE_BOOL(ffmpeg,
-[ --disable-ffmpeg Disable FFmpeg for fragmented H264/AAC decoding],
- MOZ_FFMPEG=,
- MOZ_FFMPEG=1
-)
-
-if test -n "$MOZ_FFMPEG"; then
- AC_DEFINE(MOZ_FFMPEG)
-fi;
-
-dnl ========================================================
dnl = Built-in fragmented MP4 support.
dnl ========================================================
if test "$OS_TARGET" = Android -a -z "$gonkdir"; then
MOZ_FMP4=1
fi
if test -n "$MOZ_WMF" -o -n "$MOZ_FFMPEG" -o -n "$MOZ_APPLEMEDIA"; then
@@ -7986,17 +7964,16 @@ AC_SUBST(CC_VERSION)
AC_SUBST(CXX_VERSION)
AC_SUBST(MSMANIFEST_TOOL)
AC_SUBST(NS_ENABLE_TSF)
AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
AC_SUBST(MOZ_VORBIS)
AC_SUBST(MOZ_TREMOR)
-AC_SUBST(MOZ_FFMPEG)
AC_SUBST(MOZ_FFVPX)
AC_SUBST_LIST(FFVPX_ASFLAGS)
AC_SUBST(MOZ_FMP4)
AC_SUBST(MOZ_EME)
AC_SUBST(MOZ_DIRECTSHOW)
AC_SUBST(MOZ_ANDROID_OMX)
AC_SUBST(MOZ_OMX_PLUGIN)
AC_SUBST(MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -173,8 +173,24 @@ def wmf(value, target):
if value and target.os != 'WINNT':
error('Cannot enable Windows Media Foundation support on %s'
% target.os)
if value:
set_config('MOZ_WMF', '1')
set_define('MOZ_WMF', '1')
add_old_configure_assignment('MOZ_WMF', '1')
return bool(value)
+
+
+# FFmpeg H264/AAC Decoding Support
+# ==============================================================
+option('--disable-ffmpeg',
+ help='Disable FFmpeg for fragmented H264/AAC decoding')
+
+@depends('--disable-ffmpeg', target)
+def ffmpeg(value, target):
+ if value.origin == 'default':
+ value = target.os not in ('Android', 'WINNT')
+ if value:
+ set_define('MOZ_FFMPEG', '1')
+ set_config('MOZ_FFMPEG', '1')
+ add_old_configure_assignment('MOZ_FFMPEG', '1')
+ return bool(value)