Bug 1452509 - Move --enable-alsa to moz.configure. r=froydnj
authorJan Beich <jbeich@FreeBSD.org>
Sun, 18 Mar 2018 23:46:16 +0000
changeset 466612 1aa13977ac86314798b54b064c78dc777afd534b
parent 466611 41ed6d6a2a90e29970cf759acc838913b6c48f94
child 466613 dc42a9d9c636524e26406d20ace0cabae459880c
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-alsa to moz.configure. r=froydnj MozReview-Commit-ID: Cv0HnZPvkWe
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -165,17 +165,16 @@ def old_configure_options(*options):
     return depends(prepare_configure, extra_old_configure_args, all_options,
                    *options)
 
 
 @old_configure_options(
     '--cache-file',
     '--datadir',
     '--enable-accessibility',
-    '--enable-alsa',
     '--enable-bundled-fonts',
     '--enable-content-sandbox',
     '--enable-cookies',
     '--enable-cpp-rtti',
     '--enable-crashreporter',
     '--enable-dbus',
     '--enable-debug-js-modules',
     '--enable-directshow',
--- a/old-configure.in
+++ b/old-configure.in
@@ -2594,34 +2594,16 @@ fi
 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 = Check alsa availability on Linux
-dnl ==================================
-
-MOZ_ARG_ENABLE_BOOL(alsa,
-[  --enable-alsa          Enable Alsa support],
-   MOZ_ALSA=1,
-   MOZ_ALSA=)
-
-if test -n "$MOZ_ALSA"; then
-    AC_DEFINE(MOZ_ALSA)
-    PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-         [echo "$MOZ_ALSA_PKG_ERRORS"
-          AC_MSG_ERROR([Need alsa for audio output on Linux. (On Ubuntu, you might try installing the package libasound2-dev.)])])
-fi
-
-AC_SUBST(MOZ_ALSA)
-
 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)
     ;;
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -50,16 +50,26 @@ def dmd(value):
 
 set_config('MOZ_DMD', dmd)
 set_define('MOZ_DMD', dmd)
 add_old_configure_assignment('MOZ_DMD', dmd)
 imply_option('--enable-profiling', dmd)
 imply_option('--enable-jemalloc', dmd)
 imply_option('--enable-replace-malloc', dmd)
 
+# ALSA cubeb backend
+# ==============================================================
+option('--enable-alsa', env='MOZ_ALSA',
+       help='Enable ALSA audio backend.')
+
+alsa = pkg_check_modules('MOZ_ALSA', 'alsa', when='--enable-alsa')
+
+set_config('MOZ_ALSA', depends_if(alsa)(lambda _: True))
+set_define('MOZ_ALSA', depends_if(alsa)(lambda _: True))
+
 # JACK cubeb backend
 # ==============================================================
 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))