Bug 1257104 - Move --disable-wmf to moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -293,17 +293,16 @@ def old_configure_options(*options):
'--enable-verify-mar',
'--enable-vtune',
'--enable-warnings-as-errors',
'--enable-webapp-runtime',
'--enable-webrtc',
'--enable-websms-backend',
'--enable-webspeech',
'--enable-webspeechtestbackend',
- '--enable-wmf',
'--enable-xul',
'--enable-zipwriter',
'--no-create',
'--prefix',
'--with-adjust-sdk-keyfile',
'--with-android-cxx-stl',
'--with-android-distribution-directory',
'--with-android-gnu-compiler-version',
--- a/old-configure.in
+++ b/old-configure.in
@@ -3061,17 +3061,16 @@ if test "$MOZ_IOS"; then
MOZ_AUTH_EXTENSION=
fi
MOZ_RAW=
MOZ_VORBIS=
MOZ_TREMOR=
MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_DIRECTSHOW=
-MOZ_WMF=
if test -n "$MOZ_FMP4"; then
MOZ_FMP4=1
else
MOZ_FMP4=
fi
MOZ_FFMPEG=
MOZ_WEBRTC=1
MOZ_PEERCONNECTION=
@@ -4349,35 +4348,16 @@ MOZ_ARG_DISABLE_BOOL(directshow,
MOZ_DIRECTSHOW=,
MOZ_DIRECTSHOW=1)
if test -n "$MOZ_DIRECTSHOW"; then
AC_DEFINE(MOZ_DIRECTSHOW)
fi;
dnl ========================================================
-dnl = Windows Media Foundation support
-dnl ========================================================
-if test "$OS_ARCH" = "WINNT"; then
- dnl Enable Windows Media Foundation support by default.
- dnl Note our minimum SDK version is Windows 7 SDK, so we are (currently)
- dnl guaranteed to have a recent-enough SDK to build WMF.
- MOZ_WMF=1
-fi
-
-MOZ_ARG_DISABLE_BOOL(wmf,
-[ --disable-wmf Disable support for Windows Media Foundation],
- MOZ_WMF=,
- MOZ_WMF=1)
-
-if test -n "$MOZ_WMF"; then
- AC_DEFINE(MOZ_WMF)
-fi;
-
-dnl ========================================================
dnl FFmpeg H264/AAC Decoding Support
dnl ========================================================
case "$OS_TARGET" in
WINNT|Android)
;;
*)
MOZ_FFMPEG=1
;;
@@ -8006,17 +7986,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_WMF)
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)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -151,8 +151,30 @@ def fc_freetype(value, toolkit):
@depends(toolkit)
def applemedia(toolkit):
if toolkit in ('cocoa', 'uikit'):
set_config('MOZ_APPLEMEDIA', '1')
set_define('MOZ_APPLEMEDIA', '1')
add_old_configure_assignment('MOZ_APPLEMEDIA', '1')
return True
return False
+
+
+# Windows Media Foundation support
+# ==============================================================
+option('--disable-wmf',
+ help='Disable support for Windows Media Foundation')
+
+@depends('--disable-wmf', target)
+def wmf(value, target):
+ if value.origin == 'default':
+ # Enable Windows Media Foundation support by default.
+ # Note our minimum SDK version is Windows 7 SDK, so we are (currently)
+ # guaranteed to have a recent-enough SDK to build WMF.
+ value = target.os == 'WINNT'
+ 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)