Bug 1452509 - Make -DMOZ_ALSA global and prune duplicate -DMOZ_PULSEAUDIO. r?Build draft
authorJan Beich <jbeich@FreeBSD.org>
Mon, 19 Mar 2018 02:13:04 +0000
changeset 779049 cddf0b1f09ea955ff93e3d688bbe29e45186bbca
parent 779048 fc97173fb99bab2a71668177d8036a595896ca1b
child 779050 2956ddb223aaca4426ee5b8a7bcc85d23997365a
push id105642
push userbmo:jbeich@FreeBSD.org
push dateSun, 08 Apr 2018 20:48:34 +0000
reviewersBuild
bugs1452509
milestone61.0a1
Bug 1452509 - Make -DMOZ_ALSA global and prune duplicate -DMOZ_PULSEAUDIO. r?Build MozReview-Commit-ID: 6O0pkscXczw
old-configure.in
security/sandbox/linux/broker/moz.build
security/sandbox/linux/launch/moz.build
security/sandbox/linux/moz.build
--- a/old-configure.in
+++ b/old-configure.in
@@ -2604,16 +2604,17 @@ 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 ========================================================
--- a/security/sandbox/linux/broker/moz.build
+++ b/security/sandbox/linux/broker/moz.build
@@ -12,21 +12,16 @@ EXPORTS.mozilla += [
 
 SOURCES += [
     'SandboxBroker.cpp',
     'SandboxBrokerCommon.cpp',
     'SandboxBrokerPolicyFactory.cpp',
     'SandboxBrokerRealpath.cpp',
 ]
 
-if CONFIG['MOZ_ALSA']:
-    DEFINES['MOZ_ALSA'] = True
-if CONFIG['MOZ_PULSEAUDIO']:
-    DEFINES['MOZ_PULSEAUDIO'] = True
-
 LOCAL_INCLUDES += [
     '/security/sandbox/linux', # SandboxLogging.h, SandboxInfo.h
 ]
 
 # Need this for mozilla::ipc::FileDescriptor etc.
 include('/ipc/chromium/chromium-config.mozbuild')
 
 # Need this for safe_sprintf.h used by SandboxLogging.h,
--- a/security/sandbox/linux/launch/moz.build
+++ b/security/sandbox/linux/launch/moz.build
@@ -21,15 +21,12 @@ LOCAL_INCLUDES += [
     '/security/sandbox/chromium',
     '/security/sandbox/linux',
 ]
 
 USE_LIBS += [
     'mozsandbox',
 ]
 
-if CONFIG['MOZ_ALSA']:
-    DEFINES['MOZ_ALSA'] = True
-
 # For the X11 socket domain inspection in SandboxLaunch:
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 FINAL_LIBRARY = 'xul'
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -75,19 +75,16 @@ SOURCES += [
     'SandboxReporterClient.cpp',
 ]
 
 if CONFIG['MOZ_GMP_SANDBOX']:
     SOURCES += [
         'SandboxOpenedFiles.cpp',
     ]
 
-if CONFIG['MOZ_ALSA']:
-    DEFINES['MOZ_ALSA'] = True
-
 # This copy of SafeSPrintf doesn't need to avoid the Chromium logging
 # dependency like the one in libxul does, but this way the behavior is
 # consistent.  See also the comment in SandboxLogging.h.
 SOURCES['../chromium/base/strings/safe_sprintf.cc'].flags += ['-DNDEBUG']
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Keep clang from warning about intentional 'switch' fallthrough in icu_utf.cc:
     SOURCES['../chromium/base/third_party/icu/icu_utf.cc'].flags += ['-Wno-implicit-fallthrough']
@@ -100,19 +97,16 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
     ]
 
 # gcc lto likes to put the top level asm in syscall.cc in a different partition
 # from the function using it which breaks the build.  Work around that by
 # forcing there to be only one partition.
 if '-flto' in CONFIG['OS_CXXFLAGS'] and CONFIG['CC_TYPE'] != 'clang':
     LDFLAGS += ['--param lto-partitions=1']
 
-if CONFIG['MOZ_ALSA']:
-    DEFINES['MOZ_ALSA'] = True
-
 DEFINES['NS_NO_XPCOM'] = True
 DisableStlWrapping()
 
 LOCAL_INCLUDES += ['/security/sandbox/linux']
 LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
 LOCAL_INCLUDES += ['/security/sandbox/chromium']
 LOCAL_INCLUDES += ['/nsprpub']