Bug 1452509 - Move --enable-pulseaudio to moz.configure. r=froydnj
authorJan Beich <jbeich@FreeBSD.org>
Sun, 18 Mar 2018 23:55:25 +0000
changeset 466613 dc42a9d9c636524e26406d20ace0cabae459880c
parent 466612 1aa13977ac86314798b54b064c78dc777afd534b
child 466614 5e8f0c6349c1b33775c8006d4a13818582530998
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1452509
milestone61.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 1452509 - Move --enable-pulseaudio to moz.configure. r=froydnj MozReview-Commit-ID: J1fJUukDJXh
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -200,17 +200,16 @@ def old_configure_options(*options):
     '--enable-negotiateauth',
     '--enable-nfc',
     '--enable-nspr-build',
     '--enable-official-branding',
     '--enable-parental-controls',
     '--enable-pie',
     '--enable-posix-nspr-emulation',
     '--enable-pref-extensions',
-    '--enable-pulseaudio',
     '--enable-raw',
     '--enable-readline',
     '--enable-reflow-perf',
     '--enable-sandbox',
     '--enable-signmar',
     '--enable-startup-notification',
     '--enable-startupcache',
     '--enable-strip',
--- a/old-configure.in
+++ b/old-configure.in
@@ -2595,43 +2595,16 @@ if test -n "$MOZ_TREMOR"; then
     AC_DEFINE(MOZ_TREMOR)
 fi
 
 MOZ_WEBM_ENCODER=1
 AC_DEFINE(MOZ_WEBM_ENCODER)
 AC_SUBST(MOZ_WEBM_ENCODER)
 
 dnl ========================================================
-dnl = Disable PulseAudio
-dnl ========================================================
-
-dnl If using Desktop Linux, ensure that the PA library is available
-case "$OS_TARGET" in
-WINNT|Darwin|Android|OpenBSD)
-    ;;
-*)
-    MOZ_PULSEAUDIO=1
-    ;;
-esac
-
-MOZ_ARG_DISABLE_BOOL(pulseaudio,
-[  --disable-pulseaudio          Disable PulseAudio support],
-   MOZ_PULSEAUDIO=,
-   MOZ_PULSEAUDIO=1)
-
-if test -n "$MOZ_PULSEAUDIO"; then
-    AC_DEFINE(MOZ_PULSEAUDIO)
-    PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
-         [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
-          AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])])
-fi
-
-AC_SUBST(MOZ_PULSEAUDIO)
-
-dnl ========================================================
 dnl NegotiateAuth
 dnl ========================================================
 
 MOZ_ARG_DISABLE_BOOL(negotiateauth,
 [  --disable-negotiateauth Disable GSS-API negotiation ],
     MOZ_AUTH_EXTENSION=,
     MOZ_AUTH_EXTENSION=1 )
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -70,16 +70,30 @@ set_define('MOZ_ALSA', depends_if(alsa)(
 option('--enable-jack', env='MOZ_JACK',
        help='Enable JACK audio backend.')
 
 jack = pkg_check_modules('MOZ_JACK', 'jack', when='--enable-jack')
 
 set_config('MOZ_JACK', depends_if(jack)(lambda _: True))
 set_define('MOZ_JACK', depends_if(jack)(lambda _: True))
 
+# PulseAudio cubeb backend
+# ==============================================================
+@depends(target)
+def pulseaudio_default(target):
+    return target.os not in ('WINNT', 'OSX', 'iOS', 'Android', 'OpenBSD')
+
+option('--enable-pulseaudio', env='MOZ_PULSEAUDIO', default=pulseaudio_default,
+       help='Enable PulseAudio audio backend.')
+
+pulseaudio = pkg_check_modules('MOZ_PULSEAUDIO', 'libpulse', when='--enable-pulseaudio')
+
+set_config('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
+set_define('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
+
 # Javascript engine
 # ==============================================================
 include('../js/moz.configure')
 
 
 # Rust
 # ==============================================================
 include('../build/moz.configure/rust.configure',