• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1subdir('rtp')
2
3# module name, sources, [headers, extra flags, extra deps, extra libs]
4all_modules = [
5  [ 'module-allow-passthrough', 'module-allow-passthrough.c' ],
6  [ 'module-always-sink', 'module-always-sink.c' ],
7  [ 'module-always-source', 'module-always-source.c' ],
8  [ 'module-augment-properties', 'module-augment-properties.c' ],
9#  [ 'module-bonjour-publish', 'macosx/module-bonjour-publish.c' ],
10  [ 'module-card-restore', 'module-card-restore.c' ],
11  [ 'module-cli', 'module-cli.c', [], [], [], libcli ],
12  [ 'module-cli-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_TCP_SOCKETS'], [], libprotocol_cli ],
13  [ 'module-cli-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_UNIX_SOCKETS'], [], libprotocol_cli ],
14  [ 'module-combine', 'module-combine.c' ],
15  [ 'module-combine-sink', 'module-combine-sink.c' ],
16#  [ 'module-coreaudio-detect', 'macosx/module-coreaudio-detect.c' ],
17#  [ 'module-coreaudio-device', 'macosx/module-coreaudio-device.c' ],
18  [ 'module-default-device-restore', 'module-default-device-restore.c', [], [], [], libprotocol_native ],
19  [ '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#  [ 'module-esound-compat-spawnfd', 'module-esound-compat-spawnfd.c' ],
23#  [ 'module-esound-compat-spawnpid', 'module-esound-compat-spawnpid.c' ],
24#  [ 'module-esound-protocol-tcp', 'module-protocol-stub.c' ],
25#  [ 'module-esound-protocol-unix', 'module-protocol-stub.c' ],
26#  [ 'module-esound-sink', 'module-esound-sink.c' ],
27  [ 'module-filter-apply', 'module-filter-apply.c' ],
28  [ 'module-filter-heuristics', 'module-filter-heuristics.c' ],
29#  [ 'module-gconf', 'gconf/module-gconf.c' ],
30  [ 'module-http-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_TCP_SOCKETS'], [], libprotocol_http ],
31  [ '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="' + join_paths(libdir, 'ladspa') + ':/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa"'], [dbus_dep, libm_dep, ltdl_dep] ],
34  [ 'module-loopback', 'module-loopback.c' ],
35  [ 'module-match', 'module-match.c' ],
36  [ 'module-native-protocol-fd', 'module-native-protocol-fd.c', [], [], [], libprotocol_native ],
37  [ 'module-native-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_NATIVE', '-DUSE_TCP_SOCKETS'], [], libprotocol_native ],
38  [ 'module-native-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_NATIVE', '-DUSE_UNIX_SOCKETS'], [], libprotocol_native ],
39  [ 'module-null-sink', 'module-null-sink.c' ],
40  [ 'module-null-source', 'module-null-source.c' ],
41  [ 'module-position-event-sounds', 'module-position-event-sounds.c' ],
42  [ 'module-remap-sink', 'module-remap-sink.c' ],
43  [ 'module-remap-source', 'module-remap-source.c' ],
44  [ 'module-rescue-streams', 'module-rescue-streams.c' ],
45  [ 'module-role-cork', ['module-role-cork.c', 'stream-interaction.c'], 'stream-interaction.h' ],
46  [ 'module-role-ducking', ['module-role-ducking.c', 'stream-interaction.c'], 'stream-interaction.h' ],
47  [ 'module-rtp-recv', 'rtp/module-rtp-recv.c', [], [], [], librtp ],
48  [ 'module-rtp-send', 'rtp/module-rtp-send.c' , [], [], [], librtp ],
49  [ 'module-simple-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_TCP_SOCKETS'], [], libprotocol_simple ],
50  [ 'module-simple-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_UNIX_SOCKETS'], [], libprotocol_simple ],
51  [ 'module-sine', 'module-sine.c' ],
52  [ 'module-sine-source', 'module-sine-source.c' ],
53#  [ 'module-solaris', 'module-solaris.c' ],
54  [ 'module-stream-restore', 'module-stream-restore.c', [], [], [dbus_dep], libprotocol_native ],
55  [ 'module-suspend-on-idle', 'module-suspend-on-idle.c' ],
56  [ 'module-switch-on-connect', 'module-switch-on-connect.c' ],
57  [ 'module-switch-on-port-available', 'module-switch-on-port-available.c' ],
58  [ 'module-tunnel-sink', 'module-tunnel.c', [], ['-DTUNNEL_SINK=1'], [x11_dep] ],
59  [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c' ],
60  [ 'module-tunnel-source', 'module-tunnel.c', [], [], [x11_dep] ],
61  [ 'module-tunnel-source-new', 'module-tunnel-source-new.c' ],
62  [ 'module-virtual-sink', 'module-virtual-sink.c' ],
63  [ 'module-virtual-source', 'module-virtual-source.c' ],
64  [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ],
65  [ 'module-volume-restore', 'module-volume-restore.c' ],
66#  [ 'module-waveout', 'module-waveout.c' ],
67]
68
69# Modules enabled by headers
70
71if cc.has_header('linux/input.h')
72  all_modules += [
73    [ 'module-mmkbd-evdev', 'module-mmkbd-evdev.c' ],
74  ]
75endif
76
77if cc.has_header('sys/soundcard.h')
78  subdir('oss')
79  all_modules += [
80    [ 'module-oss', 'oss/module-oss.c', [], [], [], liboss_util ],
81  ]
82endif
83
84if cc.has_function('mkfifo')
85  all_modules += [
86    [ 'module-pipe-sink', 'module-pipe-sink.c' ],
87    [ 'module-pipe-source', 'module-pipe-source.c' ]
88  ]
89endif
90
91# Modules enabled by dependencies
92
93if alsa_dep.found()
94  subdir('alsa')
95  all_modules += [
96    [ 'module-alsa-card', 'alsa/module-alsa-card.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
97    [ 'module-alsa-sink', 'alsa/module-alsa-sink.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
98    [ 'module-alsa-source', 'alsa/module-alsa-source.c', [], [], [alsa_dep, libm_dep], libalsa_util ],
99  ]
100endif
101
102if avahi_dep.found()
103  all_modules += [
104    [ 'module-zeroconf-discover', 'module-zeroconf-discover.c', [], [], [avahi_dep], libavahi_wrap ],
105    [ 'module-zeroconf-publish', 'module-zeroconf-publish.c', [], [], [avahi_dep, dbus_dep], [libavahi_wrap, libprotocol_native] ],
106  ]
107endif
108
109if get_option('bluez5')
110  subdir('bluetooth')
111  all_modules += [
112    [ 'module-bluetooth-discover', 'bluetooth/module-bluetooth-discover.c' ],
113    [ 'module-bluetooth-policy', 'bluetooth/module-bluetooth-policy.c', [], [], [dbus_dep] ],
114    [ 'module-bluez5-device', 'bluetooth/module-bluez5-device.c', [], [], [], libbluez5_util ],
115    [ 'module-bluez5-discover', 'bluetooth/module-bluez5-discover.c', [], [], [dbus_dep], libbluez5_util ],
116  ]
117endif
118
119if dbus_dep.found()
120  all_modules += [
121    [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
122    [ 'module-dbus-protocol',
123      [ 'dbus/iface-card.c', 'dbus/iface-card.h',
124	'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
125	'dbus/iface-client.c', 'dbus/iface-client.h',
126	'dbus/iface-core.c', 'dbus/iface-core.h',
127	'dbus/iface-device.c', 'dbus/iface-device.h',
128	'dbus/iface-device-port.c', 'dbus/iface-device-port.h',
129	'dbus/iface-memstats.c', 'dbus/iface-memstats.h',
130	'dbus/iface-module.c', 'dbus/iface-module.h',
131	'dbus/iface-sample.c', 'dbus/iface-sample.h',
132	'dbus/iface-stream.c', 'dbus/iface-stream.h',
133	'dbus/module-dbus-protocol.c',
134      ],
135      [], [], [dbus_dep] ],
136    [ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
137  ]
138endif
139
140if dbus_dep.found() and fftw_dep.found()
141  all_modules += [
142    [ 'module-equalizer-sink', 'module-equalizer-sink.c', [], [], [dbus_dep, fftw_dep, libm_dep] ],
143  ]
144endif
145
146if gio_dep.found()
147  subdir('gsettings')
148  all_modules += [
149    [ 'module-gsettings',
150      [ 'gsettings/module-gsettings.c', 'stdin-util.c', 'stdin-util.h' ],
151      [], ['-DPA_GSETTINGS_HELPER="' + join_paths(pulselibexecdir, 'gsettings-helper') + '"'] ]
152  ]
153endif
154
155if jack_dep.found()
156  all_modules += [
157    [ 'module-jack-sink', 'jack/module-jack-sink.c', [], [], [jack_dep] ],
158    [ 'module-jack-source', 'jack/module-jack-source.c', [], [], [jack_dep] ],
159  ]
160  if dbus_dep.found()
161    all_modules += [
162      [ 'module-jackdbus-detect', 'jack/module-jackdbus-detect.c', [], [], [dbus_dep] ],
163    ]
164  endif
165endif
166
167if lirc_dep.found()
168  all_modules += [
169    [ 'module-lirc', 'module-lirc.c', [], [], [lirc_dep] ],
170  ]
171endif
172
173if openssl_dep.found()
174  subdir('raop')
175  all_modules += [
176    [ 'module-raop-sink', 'raop/module-raop-sink.c', [], [], [], libraop ],
177  ]
178  if avahi_dep.found()
179    all_modules += [
180      [ 'module-raop-discover', 'raop/module-raop-discover.c', [], [], [avahi_dep], libavahi_wrap ],
181    ]
182  endif
183endif
184
185if libsystemd_dep.found()
186  all_modules += [
187    [ 'module-systemd-login', 'module-systemd-login.c', [], [], [libsystemd_dep] ],
188  ]
189endif
190
191if udev_dep.found()
192  all_modules += [ [ 'module-udev-detect', 'module-udev-detect.c', [], [], [udev_dep] ] ]
193  if get_option('hal-compat')
194    all_modules += [ [ 'module-hal-detect', 'module-hal-detect-compat.c' ] ]
195  endif
196endif
197
198if x11_dep.found()
199  all_modules += [
200    [ 'module-x11-bell', 'x11/module-x11-bell.c', [], [], [x11_dep] ],
201    [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c', [], [], [x11_dep, xtst_dep] ],
202    [ 'module-x11-publish', 'x11/module-x11-publish.c', [], [], [x11_dep], libprotocol_native ],
203    [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c', [], [], [x11_dep, ice_dep, sm_dep] ],
204  ]
205endif
206
207# Module echo-cancel is quite modular itself and requires a section of its own
208
209module_echo_cancel_sources = [
210  'echo-cancel/echo-cancel.h',
211  'echo-cancel/module-echo-cancel.c',
212  'echo-cancel/null.c',
213]
214module_echo_cancel_orc_sources = []
215module_echo_cancel_flags = []
216module_echo_cancel_deps = []
217module_echo_cancel_libs = []
218
219if get_option('adrian-aec')
220  module_echo_cancel_sources += [
221    'echo-cancel/adrian.c', 'echo-cancel/adrian.h',
222    'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
223  ]
224  module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
225  module_echo_cancel_deps += [libm_dep]
226
227  if have_orcc
228    orcsrc = 'adrian-aec'
229    orc_h = custom_target(orcsrc + '-orc-gen.h',
230      input : join_paths('echo-cancel', orcsrc + '.orc'),
231      output : orcsrc + '-orc-gen.h',
232      command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
233    )
234    orc_c = custom_target(orcsrc + '-orc-gen.c',
235      input : join_paths('echo-cancel', orcsrc + '.orc'),
236      output : orcsrc + '-orc-gen.c',
237      command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
238    )
239    module_echo_cancel_orc_sources += [orc_c, orc_h]
240    module_echo_cancel_deps += [orc_dep]
241  endif
242
243endif
244
245if speex_dep.found()
246  module_echo_cancel_sources += ['echo-cancel/speex.c']
247  module_echo_cancel_deps += [speex_dep]
248endif
249
250if webrtc_dep.found()
251  subdir('echo-cancel')
252  module_echo_cancel_libs += [libwebrtc_util]
253endif
254
255all_modules += [
256  [ 'module-echo-cancel',
257    module_echo_cancel_sources + module_echo_cancel_orc_sources,
258    [],
259    module_echo_cancel_flags,
260    module_echo_cancel_deps,
261    module_echo_cancel_libs,
262  ]
263]
264
265# Generate a shared module object for each modules
266
267# FIXME: Not all modules actually have a dep in modlibexecdir
268# FIXME: meson doesn't support multiple RPATH arguments currently
269rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
270
271foreach m : all_modules
272  name = m[0]
273  sources = m[1]
274  headers = m.get(2, [])
275  extra_flags = m.get(3, [])
276  extra_deps = m.get(4, [])
277  extra_libs = m.get(5, [])
278
279  mod = shared_module(name,
280    sources,
281    headers,
282    include_directories : [configinc, topinc],
283    c_args : [pa_c_args, server_c_args, '-DPA_MODULE_NAME=' + name.underscorify()] + extra_flags,
284    install : true,
285    install_rpath : rpath_dirs,
286    install_dir : modlibexecdir,
287    dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep] + extra_deps,
288    link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
289    link_with : extra_libs,
290    name_prefix : '',
291    implicit_include_directories : false)
292endforeach
293