Bug 1452509 - Make -DMOZ_ALSA global and prune duplicate -DMOZ_PULSEAUDIO. r?Build
MozReview-Commit-ID: 6O0pkscXczw
--- 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']