Bug 1452509 - Require Jack package for --enable-jack build. r=froydnj
authorJan Beich <jbeich@FreeBSD.org>
Sun, 18 Mar 2018 23:42:22 +0000
changeset 413077 f0b124af6c5b5254e5014f2b2cee5cfbcdef147c
parent 413076 e19ab548cb37589be01ff2e49627849ffeee6371
child 413078 41ed6d6a2a90e29970cf759acc838913b6c48f94
push id33833
push useraiakab@mozilla.com
push dateFri, 13 Apr 2018 09:41:15 +0000
treeherdermozilla-central@260e4c83c8a9 [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 - Require Jack package for --enable-jack build. r=froydnj MozReview-Commit-ID: HT3ZCrEAN8Y
media/libcubeb/src/moz.build
toolkit/moz.configure
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -83,12 +83,13 @@ if CONFIG['OS_TARGET'] == 'Android':
     SOURCES += [
         'cubeb_audiotrack.c',
     ]
     DEFINES['USE_AUDIOTRACK'] = True
 
 FINAL_LIBRARY = 'gkmedias'
 
 CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
+CFLAGS += CONFIG['MOZ_JACK_CFLAGS']
 CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -55,23 +55,20 @@ imply_option('--enable-profiling', dmd)
 imply_option('--enable-jemalloc', dmd)
 imply_option('--enable-replace-malloc', dmd)
 
 # JACK cubeb backend
 # ==============================================================
 option('--enable-jack', env='MOZ_JACK',
        help='Enable JACK audio backend.')
 
-@depends('--enable-jack')
-def jack(value):
-    if value:
-        return True
+jack = pkg_check_modules('MOZ_JACK', 'jack', when='--enable-jack')
 
-set_config('MOZ_JACK', jack)
-set_define('MOZ_JACK', jack)
+set_config('MOZ_JACK', depends_if(jack)(lambda _: True))
+set_define('MOZ_JACK', depends_if(jack)(lambda _: True))
 
 # Javascript engine
 # ==============================================================
 include('../js/moz.configure')
 
 
 # Rust
 # ==============================================================