meson.build 11.2 KB
Newer Older
1 2
subdir('rtp')

3 4 5 6 7 8 9 10
# module name, sources, [headers, extra flags, extra deps, extra libs]
all_modules = [
  [ 'module-allow-passthrough', 'module-allow-passthrough.c' ],
  [ 'module-always-sink', 'module-always-sink.c' ],
  [ 'module-always-source', 'module-always-source.c' ],
  [ 'module-augment-properties', 'module-augment-properties.c' ],
#  [ 'module-bonjour-publish', 'macosx/module-bonjour-publish.c' ],
  [ 'module-card-restore', 'module-card-restore.c' ],
11 12 13
  [ 'module-cli', 'module-cli.c', [], [], [], libcli ],
  [ 'module-cli-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_TCP_SOCKETS'], [], libprotocol_cli ],
  [ 'module-cli-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_UNIX_SOCKETS'], [], libprotocol_cli ],
14 15 16 17 18 19
  [ 'module-combine', 'module-combine.c' ],
  [ 'module-combine-sink', 'module-combine-sink.c' ],
#  [ 'module-coreaudio-detect', 'macosx/module-coreaudio-detect.c' ],
#  [ 'module-coreaudio-device', 'macosx/module-coreaudio-device.c' ],
  [ 'module-default-device-restore', 'module-default-device-restore.c', [], [], [], libprotocol_native ],
  [ 'module-detect', 'module-detect.c' ],
20
  [ 'module-device-manager', 'module-device-manager.c', [], [], [], libprotocol_native ],
21
  [ 'module-device-restore', 'module-device-restore.c', [], [], [dbus_dep], libprotocol_native ],
22 23
#  [ 'module-esound-compat-spawnfd', 'module-esound-compat-spawnfd.c' ],
#  [ 'module-esound-compat-spawnpid', 'module-esound-compat-spawnpid.c' ],
24 25
#  [ 'module-esound-protocol-tcp', 'module-protocol-stub.c' ],
#  [ 'module-esound-protocol-unix', 'module-protocol-stub.c' ],
26
#  [ 'module-esound-sink', 'module-esound-sink.c' ],
27 28 29
  [ 'module-filter-apply', 'module-filter-apply.c' ],
  [ 'module-filter-heuristics', 'module-filter-heuristics.c' ],
#  [ 'module-gconf', 'gconf/module-gconf.c' ],
30 31
  [ 'module-http-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_TCP_SOCKETS'], [], libprotocol_http ],
  [ 'module-http-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_UNIX_SOCKETS'], [], libprotocol_http ],
32
  [ 'module-intended-roles', 'module-intended-roles.c' ],
33
  [ 'module-ladspa-sink', 'module-ladspa-sink.c', 'ladspa.h', ['-DLADSPA_PATH="' + libdir + '/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa"'], [dbus_dep, libm_dep, ltdl_dep] ],
34 35
  [ 'module-loopback', 'module-loopback.c' ],
  [ 'module-match', 'module-match.c' ],
36
  [ 'module-native-protocol-fd', 'module-native-protocol-fd.c', [], [], [], libprotocol_native ],
37 38 39 40 41 42 43 44 45 46 47 48
  [ 'module-native-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_NATIVE', '-DUSE_TCP_SOCKETS'], [], libprotocol_native ],
  [ 'module-native-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_NATIVE', '-DUSE_UNIX_SOCKETS'], [], libprotocol_native ],
  [ 'module-null-sink', 'module-null-sink.c' ],
  [ 'module-null-source', 'module-null-source.c' ],
  [ 'module-pipe-sink', 'module-pipe-sink.c' ],
  [ 'module-pipe-source', 'module-pipe-source.c' ],
  [ 'module-position-event-sounds', 'module-position-event-sounds.c' ],
  [ 'module-remap-sink', 'module-remap-sink.c' ],
  [ 'module-remap-source', 'module-remap-source.c' ],
  [ 'module-rescue-streams', 'module-rescue-streams.c' ],
  [ 'module-role-cork', ['module-role-cork.c', 'stream-interaction.c'], 'stream-interaction.h' ],
  [ 'module-role-ducking', ['module-role-ducking.c', 'stream-interaction.c'], 'stream-interaction.h' ],
49 50 51 52
  [ 'module-rtp-recv', 'rtp/module-rtp-recv.c', [], [], [], librtp ],
  [ 'module-rtp-send', 'rtp/module-rtp-send.c' , [], [], [], librtp ],
  [ 'module-simple-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_TCP_SOCKETS'], [], libprotocol_simple ],
  [ 'module-simple-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_UNIX_SOCKETS'], [], libprotocol_simple ],
53 54 55 56 57 58 59
  [ 'module-sine', 'module-sine.c' ],
  [ 'module-sine-source', 'module-sine-source.c' ],
#  [ 'module-solaris', 'module-solaris.c' ],
  [ 'module-stream-restore', 'module-stream-restore.c', [], [], [dbus_dep], libprotocol_native ],
  [ 'module-suspend-on-idle', 'module-suspend-on-idle.c' ],
  [ 'module-switch-on-connect', 'module-switch-on-connect.c' ],
  [ 'module-switch-on-port-available', 'module-switch-on-port-available.c' ],
60
  [ 'module-tunnel-sink', 'module-tunnel.c', [], [], [x11_dep] ],
61
  [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c' ],
62
  [ 'module-tunnel-source', 'module-tunnel.c', [], [], [x11_dep] ],
63 64 65 66 67 68 69 70
  [ 'module-tunnel-source-new', 'module-tunnel-source-new.c' ],
  [ 'module-virtual-sink', 'module-virtual-sink.c' ],
  [ 'module-virtual-source', 'module-virtual-source.c' ],
  [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ],
  [ 'module-volume-restore', 'module-volume-restore.c' ],
#  [ 'module-waveout', 'module-waveout.c' ],
]

71 72 73 74 75 76 77 78
# Modules enabled by headers

if cc.has_header('linux/input.h')
  all_modules += [
    [ 'module-mmkbd-evdev', 'module-mmkbd-evdev.c' ],
  ]
endif

79
if cc.has_header('sys/soundcard.h')
80
  subdir('oss')
81
  all_modules += [
82
    [ 'module-oss', 'oss/module-oss.c', [], [], [], liboss_util ],
83 84 85
  ]
endif

86 87
# Modules enabled by dependencies

88 89 90
if alsa_dep.found()
  subdir('alsa')
  all_modules += [
91 92 93
    [ 'module-alsa-card', 'alsa/module-alsa-card.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
    [ 'module-alsa-sink', 'alsa/module-alsa-sink.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
    [ 'module-alsa-source', 'alsa/module-alsa-source.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
94 95 96
  ]
endif

97 98 99 100 101 102 103
if avahi_dep.found()
  all_modules += [
    [ 'module-zeroconf-discover', 'module-zeroconf-discover.c', [], [], [avahi_dep], libavahi_wrap ],
    [ 'module-zeroconf-publish', 'module-zeroconf-publish.c', [], [], [avahi_dep, dbus_dep], [libavahi_wrap, libprotocol_native] ],
  ]
endif

Arnaud Rebillout's avatar
Arnaud Rebillout committed
104 105 106 107 108
if bluez_dep.found()
  subdir('bluetooth')
  all_modules += [
    [ 'module-bluetooth-discover', 'bluetooth/module-bluetooth-discover.c' ],
    [ 'module-bluetooth-policy', 'bluetooth/module-bluetooth-policy.c', [], [], [dbus_dep] ],
Tanu Kaskinen's avatar
Tanu Kaskinen committed
109
    [ 'module-bluez5-device', 'bluetooth/module-bluez5-device.c', [], [], [], libbluez5_util ],
Arnaud Rebillout's avatar
Arnaud Rebillout committed
110 111 112 113
    [ 'module-bluez5-discover', 'bluetooth/module-bluez5-discover.c', [], [], [dbus_dep], libbluez5_util ],
  ]
endif

114 115
if dbus_dep.found()
  all_modules += [
116
    [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
117 118 119 120 121 122 123 124 125 126 127 128 129
    [ 'module-dbus-protocol',
      [ 'dbus/iface-card.c', 'dbus/iface-card.h',
	'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
	'dbus/iface-client.c', 'dbus/iface-client.h',
	'dbus/iface-core.c', 'dbus/iface-core.h',
	'dbus/iface-device.c', 'dbus/iface-device.h',
	'dbus/iface-device-port.c', 'dbus/iface-device-port.h',
	'dbus/iface-memstats.c', 'dbus/iface-memstats.h',
	'dbus/iface-module.c', 'dbus/iface-module.h',
	'dbus/iface-sample.c', 'dbus/iface-sample.h',
	'dbus/iface-stream.c', 'dbus/iface-stream.h',
	'dbus/module-dbus-protocol.c',
      ],
130 131 132 133 134 135 136 137
      [], [], [dbus_dep] ],
    [ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
  ]
endif

if dbus_dep.found() and fftw_dep.found()
  all_modules += [
    [ 'module-equalizer-sink', 'module-equalizer-sink.c', [], [], [dbus_dep, fftw_dep, libm_dep] ],
138 139 140
  ]
endif

141 142 143 144 145 146 147 148 149
if gio_dep.found()
  subdir('gsettings')
  all_modules += [
    [ 'module-gsettings',
      [ 'gsettings/module-gsettings.c', 'stdin-util.c', 'stdin-util.h' ],
      [], ['-DPA_GSETTINGS_HELPER="' + pulselibexecdir + 'gsettings-helper"'] ]
  ]
endif

150 151 152 153 154
if jack_dep.found()
  all_modules += [
    [ 'module-jack-sink', 'jack/module-jack-sink.c', [], [], [jack_dep] ],
    [ 'module-jack-source', 'jack/module-jack-source.c', [], [], [jack_dep] ],
  ]
155 156 157 158 159
  if dbus_dep.found()
    all_modules += [
      [ 'module-jackdbus-detect', 'jack/module-jackdbus-detect.c', [], [], [dbus_dep] ],
    ]
  endif
160 161
endif

162 163 164 165 166 167
if lirc_dep.found()
  all_modules += [
    [ 'module-lirc', 'module-lirc.c', [], [], [lirc_dep] ],
  ]
endif

168
if openssl_dep.found()
169
  subdir('raop')
170 171 172
  all_modules += [
    [ 'module-raop-sink', 'raop/module-raop-sink.c', [], [], [], libraop ],
  ]
173 174 175 176 177
  if avahi_dep.found()
    all_modules += [
      [ 'module-raop-discover', 'raop/module-raop-discover.c', [], [], [avahi_dep], libavahi_wrap ],
    ]
  endif
178 179
endif

180
if libsystemd_dep.found()
181
  all_modules += [
182
    [ 'module-systemd-login', 'module-systemd-login.c', [], [], [libsystemd_dep] ],
183 184 185
  ]
endif

186 187
if udev_dep.found()
  all_modules += [ [ 'module-udev-detect', 'module-udev-detect.c', [], [], [udev_dep] ] ]
188 189 190
  if get_option('hal-compat')
    all_modules += [ [ 'module-hal-detect', 'module-hal-detect-compat.c' ] ]
  endif
191 192
endif

193 194 195
if x11_dep.found()
  all_modules += [
    [ 'module-x11-bell', 'x11/module-x11-bell.c', [], [], [x11_dep] ],
196
    [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c', [], [], [x11_dep, xtst_dep] ],
197
    [ 'module-x11-publish', 'x11/module-x11-publish.c', [], [], [x11_dep], libprotocol_native ],
198
    [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c', [], [], [x11_dep, ice_dep, sm_dep] ],
199 200 201
  ]
endif

202 203 204 205 206 207 208
# Module echo-cancel is quite modular itself and requires a section of its own

module_echo_cancel_sources = [
  'echo-cancel/echo-cancel.h',
  'echo-cancel/module-echo-cancel.c',
  'echo-cancel/null.c',
]
Arnaud Rebillout's avatar
Arnaud Rebillout committed
209
module_echo_cancel_orc_sources = []
210 211 212 213
module_echo_cancel_flags = []
module_echo_cancel_deps = []
module_echo_cancel_libs = []

214 215 216 217 218 219
if get_option('adrian-aec')
  module_echo_cancel_sources += [
    'echo-cancel/adrian.c', 'echo-cancel/adrian.h',
    'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
  ]
  module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
Arnaud Rebillout's avatar
Arnaud Rebillout committed
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
  module_echo_cancel_deps += [libm_dep]

  if have_orcc
    orcsrc = 'adrian-aec'
    orc_h = custom_target(orcsrc + '-orc-gen.h',
      input : join_paths('echo-cancel', orcsrc + '.orc'),
      output : orcsrc + '-orc-gen.h',
      command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
    )
    orc_c = custom_target(orcsrc + '-orc-gen.c',
      input : join_paths('echo-cancel', orcsrc + '.orc'),
      output : orcsrc + '-orc-gen.c',
      command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
    )
    module_echo_cancel_orc_sources += [orc_c, orc_h]
    module_echo_cancel_deps += [orc_dep]
  endif
237

Arnaud Rebillout's avatar
Arnaud Rebillout committed
238
endif
239 240 241 242 243 244 245 246 247 248 249 250 251

if speex_dep.found()
  module_echo_cancel_sources += ['echo-cancel/speex.c']
  module_echo_cancel_deps += [speex_dep]
endif

if webrtc_dep.found()
  subdir('echo-cancel')
  module_echo_cancel_libs += [libwebrtc_util]
endif

all_modules += [
  [ 'module-echo-cancel',
Arnaud Rebillout's avatar
Arnaud Rebillout committed
252
    module_echo_cancel_sources + module_echo_cancel_orc_sources,
253 254 255 256 257 258 259 260 261
    [],
    module_echo_cancel_flags,
    module_echo_cancel_deps,
    module_echo_cancel_libs,
  ]
]

# Generate a shared module object for each modules

262 263 264 265 266 267 268 269 270 271 272 273 274 275
foreach m : all_modules
  name = m[0]
  sources = m[1]
  headers = m.get(2, [])
  extra_flags = m.get(3, [])
  extra_deps = m.get(4, [])
  extra_libs = m.get(5, [])

  mod = shared_module(name,
    sources,
    headers,
    include_directories : [configinc, topinc],
    c_args : [pa_c_args, server_c_args, '-DPA_MODULE_NAME=' + name.underscorify()] + extra_flags,
    install : true,
276
    install_dir : modlibexecdir,
277
    dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep] + extra_deps,
278
    link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
279 280 281 282
    link_with : extra_libs,
    name_prefix : '',
    implicit_include_directories : false)
endforeach