From 97e39da5b9305cacf64f727bc9cd19d870f9a1a9 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 16 Mar 2016 17:37:42 +0900 Subject: [PATCH] Bug 1257104 - Move MOZ_APPLEMEDIA to moz.configure. r=ted Note the AC_DEFINE used to be in a COMPILE_ENVIRONMENT block, but the define is actually used in Gecko preferences, so it's actually better that the define is always set when MOZ_APPLEMEDIA is enabled. --- old-configure.in | 6 ------ toolkit/moz.configure | 12 ++++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/old-configure.in b/old-configure.in index e5b9b8b816ec..19868067250a 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4325,13 +4325,8 @@ fi dnl ======================================================== dnl = Apple platform decoder support dnl ======================================================== -if test "$MOZ_WIDGET_TOOLKIT" = "cocoa" || test "$MOZ_WIDGET_TOOLKIT" = "uikit"; then - MOZ_APPLEMEDIA=1 -fi - if test "$COMPILE_ENVIRONMENT"; then if test -n "$MOZ_APPLEMEDIA"; then - AC_DEFINE(MOZ_APPLEMEDIA) # hack in frameworks for fmp4 - see bug 1029974 # We load VideoToolbox and CoreMedia dynamically, so they don't appear here. LDFLAGS="$LDFLAGS -framework AudioToolbox" @@ -8024,7 +8019,6 @@ AC_SUBST(MOZ_FMP4) AC_SUBST(MOZ_EME) AC_SUBST(MOZ_DIRECTSHOW) AC_SUBST(MOZ_ANDROID_OMX) -AC_SUBST(MOZ_APPLEMEDIA) AC_SUBST(MOZ_OMX_PLUGIN) AC_SUBST(MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE) AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT) diff --git a/toolkit/moz.configure b/toolkit/moz.configure index a95e1a4057be..ec231d608eac 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -145,3 +145,15 @@ def fc_freetype(value, toolkit): if value or (toolkit in ('gtk2', 'gtk3', 'qt') and value.origin == 'default'): add_old_configure_assignment('USE_FC_FREETYPE', '1') + + +# Apple platform decoder support +# ============================================================== +@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