Index: src/build/common.gypi =================================================================== --- src/build/common.gypi (revision 239) +++ src/build/common.gypi (revision 240) @@ -25,6 +25,13 @@ 'direct_show_base_classes': 'C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses/', }], + ['build_with_chromium==1', { + # Exclude pulse audio on Chromium since its prerequisites don't + # include pulse audio. + 'include_pulse_audio%': 0, + }, { + 'include_pulse_audio%': 1, + }], ], # conditions }, 'target_defaults': { Index: src/modules/audio_device/main/source/audio_device.gyp =================================================================== --- src/modules/audio_device/main/source/audio_device.gyp (revision 239) +++ src/modules/audio_device/main/source/audio_device.gyp (revision 240) @@ -52,18 +52,12 @@ 'Linux/alsasymboltable.h', 'Linux/audio_device_linux_alsa.cc', 'Linux/audio_device_linux_alsa.h', - 'Linux/audio_device_linux_pulse.cc', - 'Linux/audio_device_linux_pulse.h', 'Linux/audio_device_utility_linux.cc', 'Linux/audio_device_utility_linux.h', 'Linux/audio_mixer_manager_linux_alsa.cc', 'Linux/audio_mixer_manager_linux_alsa.h', - 'Linux/audio_mixer_manager_linux_pulse.cc', - 'Linux/audio_mixer_manager_linux_pulse.h', 'Linux/latebindingsymboltable.cc', 'Linux/latebindingsymboltable.h', - 'Linux/pulseaudiosymboltable.cc', - 'Linux/pulseaudiosymboltable.h', 'Mac/audio_device_mac.cc', 'Mac/audio_device_mac.h', 'Mac/audio_device_utility_mac.cc', @@ -89,16 +83,10 @@ 'Linux/alsasymboltable.h', 'Linux/audio_device_linux_alsa.cc', 'Linux/audio_device_linux_alsa.h', - 'Linux/audio_device_linux_pulse.cc', - 'Linux/audio_device_linux_pulse.h', 'Linux/audio_mixer_manager_linux_alsa.cc', 'Linux/audio_mixer_manager_linux_alsa.h', - 'Linux/audio_mixer_manager_linux_pulse.cc', - 'Linux/audio_mixer_manager_linux_pulse.h', 'Linux/latebindingsymboltable.cc', 'Linux/latebindingsymboltable.h', - 'Linux/pulseaudiosymboltable.cc', - 'Linux/pulseaudiosymboltable.h', # Don't remove these, needed for dummy device # 'Linux/audio_device_utility_linux.cc', # 'Linux/audio_device_utility_linux.h', @@ -131,7 +119,6 @@ }], ['OS=="linux"', { 'defines': [ - 'LINUX_PULSE', 'LINUX_ALSA', ], 'include_dirs': [ @@ -141,9 +128,28 @@ 'libraries': [ '-ldl', '-lasound', - '-lpulse', ], }, + 'conditions': [ + ['include_pulse_audio==1', { + 'defines': [ + 'LINUX_PULSE', + ], + 'sources': [ + 'Linux/audio_device_linux_pulse.cc', + 'Linux/audio_device_linux_pulse.h', + 'Linux/audio_mixer_manager_linux_pulse.cc', + 'Linux/audio_mixer_manager_linux_pulse.h', + 'Linux/pulseaudiosymboltable.cc', + 'Linux/pulseaudiosymboltable.h', + ], + 'link_settings': { + 'libraries': [ + '-lpulse', + ], + }, + }], + ], }], ['OS=="mac"', { 'include_dirs': [ Index: src/build/common.gypi =================================================================== --- src/build/common.gypi (revision 241) +++ src/build/common.gypi (revision 242) @@ -10,9 +10,19 @@ { 'variables': { - # TODO(ajm): use webrtc_standalone to match NaCl? - 'build_with_chromium%': 1, # 1 to build webrtc with chromium + # Putting a variables dict inside another variables dict looks kind of + # weird. This is done so that 'build_with_chromium' is defined as + # variable within the outer variables dict here. This is necessary + # to get these variables defined for the conditions within this variables + # dict that operate on these variables (e.g., for setting + # 'include_pulse_audio', we need to have 'build_with_chromium' already set). + 'variables': { + # TODO(ajm): use webrtc_standalone to match NaCl? + 'build_with_chromium%': 1, # 1 to build webrtc with chromium + }, + 'build_with_chromium%': '<(build_with_chromium)', + # Selects fixed-point code where possible. # TODO(ajm): we'd like to set this based on the target OS/architecture. 'prefer_fixed_point%': 0,