Commit 114cdfbd authored by Arun Raghavan's avatar Arun Raghavan
Browse files

build-sys: First pass at a meson-ified build system

This is a working implementation of a build with meson. The server,
utils, and most modules build with this, and it is possible to run from
a build tree and play/capture audio on ALSA devices.

There are a number of FIXMEs, of course, and a number of features that
need to be enabled (modules, dependencies, installation, etc.), but this
should provide everything we need to get there relatively quickly.

To use this, install meson (distro package, or mesonbuild.com) and run:

  $ cd <pulseaudio src dir>
  $ meson <builddir>
  $ ninja -C <builddir>
parent 04361ee0
project('pulseaudio', 'c', 'cpp',
version : '10.99.1',
meson_version : '>= 0.31.0',
default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
)
pa_version = meson.project_version()
version_split = pa_version.split('.')
pa_version_major = version_split[0]
pa_version_minor = version_split[1]
pa_version_micro = version_split[2]
pa_version_major_minor = pa_version_major + '.' + pa_version_minor
pa_api_version = 12
pa_protocol_version = 31
apiversion = '1.0'
soversion = 0
# FIXME: this doesn't actually do what we want it to
# maintaining compatibility with the previous libtool versioning
# current = minor * 100 + micro
libversion = '@0@.@1@.0'.format(soversion, pa_version_minor.to_int() * 100 + pa_version_micro.to_int())
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
cc = meson.get_compiler('c')
cdata = configuration_data()
cdata.set_quoted('PACKAGE', 'pulseaudio')
cdata.set_quoted('PACKAGE_NAME', 'pulseaudio')
cdata.set_quoted('PACKAGE_VERSION', pa_version)
cdata.set_quoted('CANONICAL_HOST', host_machine.cpu())
cdata.set_quoted('PA_MACHINE_ID', join_paths(sysconfdir, 'machine-id'))
cdata.set_quoted('PA_MACHINE_ID_FALLBACK', join_paths(localstatedir, 'lib', 'dbus', 'machine-id'))
cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
cdata.set_quoted('PA_SOEXT', '.so')
cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', join_paths(sysconfdir, 'pulse'))
cdata.set_quoted('PA_BINARY', join_paths(prefix, get_option('bindir'), 'pulseaudio'))
cdata.set_quoted('PA_SYSTEM_RUNTIME_PATH', join_paths(localstatedir, 'run', 'pulse'))
cdata.set_quoted('PA_SYSTEM_CONFIG_PATH', join_paths(localstatedir, 'lib', 'pulse'))
cdata.set_quoted('PA_SYSTEM_STATE_PATH', join_paths(localstatedir, 'lib', 'pulse'))
cdata.set_quoted('PA_DLSEARCHPATH', join_paths(prefix, get_option('libdir'), 'pulse-' + pa_version_major_minor, 'modules'))
cdata.set_quoted('PA_SYSTEM_USER', get_option('system_user'))
cdata.set_quoted('PA_SYSTEM_GROUP', get_option('system_group'))
cdata.set_quoted('PA_ACCESS_GROUP', get_option('access_group'))
cdata.set_quoted('PA_CFLAGS', 'Not yet supported on meson')
cdata.set_quoted('PA_ALSA_PATHS_DIR', join_paths(datadir, 'pulseaudio', 'alsa-mixer', 'paths'))
cdata.set_quoted('PA_ALSA_PROFILE_SETS_DIR', join_paths(datadir, 'pulseaudio', 'alsa-mixer', 'profile-sets'))
cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
# Headers
check_headers = [
'arpa/inet.h',
'cpuid.h',
'grp.h',
'langinfo.h',
'locale.h',
'netdb.h',
'netinet/in.h',
'netinet/in_systm.h',
'netinet/ip.h',
'netinet/tcp.h',
'pcreposix.h',
'poll.h',
'pwd.h',
'regex.h',
'sched.h',
'sys/capability.h',
'sys/ioctl.h',
'sys/mman.h',
'sys/prctl.h',
'sys/resource.h',
'sys/select.h',
'sys/socket.h',
'sys/un.h',
'valgrind/memcheck.h',
'xlocale.h',
]
foreach h : check_headers
if cc.has_header(h)
define = 'HAVE_' + h.underscorify().to_upper()
cdata.set(define, 1)
endif
endforeach
# FIXME: move this to the above set
if cc.has_header('pthread.h')
cdata.set('HAVE_PTHREAD', 1)
endif
# Functions
check_functions = [
'accept4',
'clock_gettime',
'fchmod',
'fchown',
'fork',
'fstat',
'getaddrinfo',
'gettimeofday',
'getuid',
'lstat',
'memfd_create',
'mlock',
'nanosleep',
'paccept',
'pipe',
'pipe2',
'posix_madvise',
'readlink',
'setegid',
'seteuid',
'setregid',
'setreuid',
'setresgid',
'setresuid',
'setsid',
'sig2str',
'sigaction',
'strtod_l',
'symlink',
'sysconf',
'uname',
]
foreach f : check_functions
if cc.has_function(f)
define = 'HAVE_' + f.underscorify().to_upper()
cdata.set(define, 1)
endif
endforeach
shm_dep = cc.find_library('rt', required : false)
if shm_dep.found()
cdata.set('HAVE_SHM_OPEN', 1)
endif
if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>')
cdata.set('HAVE_MEMFD', 1)
endif
# Types
# FIXME: do we ever care about gid_t not being defined / smaller than an int?
cdata.set('GETGROUPS_T', 'gid_t')
# Include paths
configinc = include_directories('.')
topinc = include_directories('src')
# CFLAGS
pa_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE']
server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO']
cdata.set('MESON_BUILD', 1)
# Core Dependencies
libm_dep = cc.find_library('m', required : true)
thread_dep = dependency('threads')
cap_dep = cc.find_library('cap', required : false)
if get_option('database') == 'tdb'
database_dep = dependency('tdb')
elif get_option('database') == 'gdbm'
database_dep = cc.find_library('gdbm', required : true)
endif
atomictest = '''void func() {
volatile int atomic = 2;
__sync_bool_compare_and_swap (&atomic, 2, 3);
}
'''
if cc.compiles(atomictest)
cdata.set('HAVE_ATOMIC_BUILTINS', true)
else
# FIXME: check if we need libatomic_ops
endif
# FIXME: make sure it's >= 2.2
ltdl_dep = cc.find_library('ltdl', required : true)
# FIXME: can meson support libtool -dlopen/-dlpreopen things?
# and do we still want to support this at all?
cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : false)
if dbus_dep.found()
cdata.set('HAVE_DBUS', 1)
endif
x11_dep = dependency('x11-xcb', required : false)
if x11_dep.found()
cdata.set('HAVE_X11', 1)
endif
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : false)
if alsa_dep.found()
cdata.set('HAVE_ALSA_UCM', 1)
endif
# FIXME: support ORC
cdata.set('DISABLE_ORC', 1)
# Module dependencies
udev_dep = dependency('libudev', version : '>= 143', required : false)
# Now generate config.h from everything above
configure_file(output : 'config.h', configuration : cdata)
subdir('src')
option('system_user',
type : 'string', value : 'pulse',
description : 'User for running the PulseAudio daemon as a system-wide instance (pulse)')
option('system_group',
type : 'string', value : 'pulse',
description : 'Group for running the PulseAudio daemon as a system-wide instance (pulse)')
option('access_group',
type : 'string', value : 'pulse-access',
description : 'Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)')
option('database',
type : 'combo', value : 'tdb',
choices : [ 'gdbm', 'tdb', 'simple' ],
description : 'Database backend')
......@@ -157,7 +157,11 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
#else
if (pa_run_from_build_tree()) {
pa_log_notice("Detected that we are run from the build tree, fixing search path.");
#ifdef MESON_BUILD
c->dl_search_path = pa_xstrdup(PA_BUILDDIR PA_PATH_SEP "src" PA_PATH_SEP "modules");
#else
c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
#endif
} else
c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
#endif
......
......@@ -98,6 +98,15 @@
#include "ltdl-bind-now.h"
#include "server-lookup.h"
#ifdef DISABLE_LIBTOOL_PRELOAD
/* FIXME: work around a libtool bug by making sure we have 2 elements. Bug has
* been reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29576 */
const lt_dlsymlist lt_preloaded_symbols[] = {
{ "@PROGRAM@", NULL },
{ NULL, NULL }
};
#endif
#ifdef HAVE_LIBWRAP
/* Only one instance of these variables */
int allow_severity = LOG_INFO;
......
pulseaudio_sources = [
'caps.c',
'cmdline.c',
'cpulimit.c',
'daemon-conf.c',
'dumpmodules.c',
'ltdl-bind-now.c',
'main.c',
]
pulseaudio_headers = [
'caps.h',
'cmdline.h',
'cpulimit.h',
'daemon-conf.h',
'dumpmodules.h',
'ltdl-bind-now.h',
]
if dbus_dep.found()
pulseaudio_sources += 'server-lookup.c'
pulseaudio_headers += 'server-lookup.h'
endif
# FIXME: man pages, dependencies
executable('pulseaudio',
pulseaudio_sources,
pulseaudio_headers,
install: true,
include_directories : [configinc, topinc],
link_with : [libpulsecore, libpulsecommon, libpulse],
dependencies : [ltdl_dep, cap_dep, dbus_dep],
c_args : pa_c_args,
)
libpulsecommon_sources = [
'pulse/client-conf.c',
'pulse/fork-detect.c',
'pulse/format.c',
'pulse/json.c',
'pulse/xmalloc.c',
'pulse/proplist.c',
'pulse/utf8.c',
'pulse/channelmap.c',
'pulse/sample.c',
'pulse/util.c',
'pulse/timeval.c',
'pulse/rtclock.c',
'pulse/volume.c',
'pulsecore/authkey.c',
'pulsecore/conf-parser.c',
'pulsecore/core-error.c',
'pulsecore/core-format.c',
'pulsecore/core-rtclock.c',
'pulsecore/core-util.c',
'pulsecore/dynarray.c',
'pulsecore/fdsem.c',
'pulsecore/flist.c',
'pulsecore/g711.c',
'pulsecore/hashmap.c',
'pulsecore/i18n.c',
'pulsecore/idxset.c',
'pulsecore/arpa-inet.c',
'pulsecore/iochannel.c',
'pulsecore/ioline.c',
'pulsecore/ipacl.c',
'pulsecore/lock-autospawn.c',
'pulsecore/log.c',
'pulsecore/ratelimit.c',
'pulsecore/mcalign.c',
'pulsecore/memblock.c',
'pulsecore/memblockq.c',
'pulsecore/memchunk.c',
'pulsecore/mutex-posix.c',
'pulsecore/native-common.c',
'pulsecore/once.c',
'pulsecore/packet.c',
'pulsecore/parseaddr.c',
'pulsecore/pdispatch.c',
'pulsecore/pid.c',
'pulsecore/pipe.c',
'pulsecore/memtrap.c',
'pulsecore/aupdate.c',
'pulsecore/proplist-util.c',
'pulsecore/pstream-util.c',
'pulsecore/pstream.c',
'pulsecore/queue.c',
'pulsecore/random.c',
'pulsecore/srbchannel.c',
'pulsecore/sample-util.c',
'pulsecore/semaphore-posix.c',
'pulsecore/shm.c',
'pulsecore/bitset.c',
'pulsecore/socket-client.c',
'pulsecore/socket-server.c',
'pulsecore/socket-util.c',
'pulsecore/strbuf.c',
'pulsecore/strlist.c',
'pulsecore/svolume_c.c',
'pulsecore/svolume_mmx.c',
'pulsecore/tagstruct.c',
'pulsecore/thread-posix.c',
'pulsecore/time-smoother.c',
'pulsecore/tokenizer.c',
'pulsecore/usergroup.c',
'pulsecore/sndfile-util.c',
'pulsecore/svolume_arm.c',
]
libpulsecommon_headers = [
'pulse/client-conf.h',
'pulse/fork-detect.h',
'pulse/format.h',
'pulse/json.h',
'pulse/xmalloc.h',
'pulse/proplist.h',
'pulse/utf8.h',
'pulse/channelmap.h',
'pulse/sample.h',
'pulse/util.h',
'pulse/timeval.h',
'pulse/rtclock.h',
'pulse/volume.h',
'pulsecore/atomic.h',
'pulsecore/authkey.h',
'pulsecore/conf-parser.h',
'pulsecore/core-error.h',
'pulsecore/core-format.h',
'pulsecore/core-rtclock.h',
'pulsecore/core-util.h',
'pulsecore/creds.h',
'pulsecore/dynarray.h',
'pulsecore/endianmacros.h',
'pulsecore/fdsem.h',
'pulsecore/flist.h',
'pulsecore/g711.h',
'pulsecore/hashmap.h',
'pulsecore/i18n.h',
'pulsecore/idxset.h',
'pulsecore/arpa-inet.h',
'pulsecore/iochannel.h',
'pulsecore/ioline.h',
'pulsecore/ipacl.h',
'pulsecore/llist.h',
'pulsecore/lock-autospawn.h',
'pulsecore/log.h',
'pulsecore/ratelimit.h',
'pulsecore/macro.h',
'pulsecore/mcalign.h',
'pulsecore/mem.h',
'pulsecore/memblock.h',
'pulsecore/memblockq.h',
'pulsecore/memchunk.h',
'pulsecore/mutex.h',
'pulsecore/native-common.h',
'pulsecore/once.h',
'pulsecore/packet.h',
'pulsecore/parseaddr.h',
'pulsecore/pdispatch.h',
'pulsecore/pid.h',
'pulsecore/pipe.h',
'pulsecore/memtrap.h',
'pulsecore/aupdate.h',
'pulsecore/proplist-util.h',
'pulsecore/pstream-util.h',
'pulsecore/pstream.h',
'pulsecore/queue.h',
'pulsecore/random.h',
'pulsecore/refcnt.h',
'pulsecore/srbchannel.h',
'pulsecore/sample-util.h',
'pulsecore/semaphore.h',
'pulsecore/shm.h',
'pulsecore/bitset.h',
'pulsecore/socket-client.h',
'pulsecore/socket-server.h',
'pulsecore/socket-util.h',
'pulsecore/strbuf.h',
'pulsecore/strlist.h',
'pulsecore/tagstruct.h',
'pulsecore/thread.h',
'pulsecore/time-smoother.h',
'pulsecore/tokenizer.h',
'pulsecore/usergroup.h',
'pulsecore/sndfile-util.h',
'pulsecore/socket.h',
]
if dbus_dep.found()
libpulsecommon_sources += [
'pulsecore/dbus-util.c',
'pulsecore/rtkit.c',
]
libpulsecommon_headers += [
'pulsecore/dbus-util.h',
'pulsecore/rtkit.h',
]
endif
if x11_dep.found()
libpulsecommon_sources += [
'pulse/client-conf-x11.c',
'pulsecore/x11prop.c',
]
libpulsecommon_headers += [
'pulse/client-conf-x11.h',
'pulsecore/x11prop.h',
]
endif
# FIXME: Do non-POSIX thread things
# FIXME: Do SIMD things
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_sources,
libpulsecommon_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
install : true,
dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep],
implicit_include_directories : false)
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
subdir('pulse')
subdir('pulsecore')
subdir('daemon')
subdir('modules')
subdir('utils')
libalsa_util_sources = [
'alsa-util.c',
'alsa-ucm.c',
'alsa-mixer.c',
'alsa-sink.c',
'alsa-source.c',
'../reserve-wrap.c',
]
libalsa_util_headers = [
'alsa-util.h',
'alsa-ucm.h',
'alsa-mixer.h',
'alsa-sink.h',
'alsa-source.h',
'../reserve-wrap.h',
]
if dbus_dep.found()
libalsa_util_sources += [ '../reserve.c', '../reserve-monitor.c' ]
libalsa_util_headers += [ '../reserve.h', '../reserve-monitor.h' ]
endif
libalsa_util = static_library('libalsa_util',
libalsa_util_sources,
libalsa_util_headers,
c_args : [pa_c_args, server_c_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecore_dep, alsa_dep, dbus_dep],
install : false
)
# 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-bluetooth-discover', 'bluetooth/module-bluetooth-discover.c' ],
[ 'module-bluetooth-policy', 'bluetooth/module-bluetooth-policy.c' ],
# [ 'module-bluez4-device', 'bluetooth/module-bluez4-device.c' ],
# [ 'module-bluez4-discover', 'bluetooth/module-bluez4-discover.c' ],
# [ 'module-bluez5-device', 'bluetooth/module-bluez5-device.c' ],
# [ 'module-bluez5-discover', 'bluetooth/module-bluez5-discover.c' ],
# [ 'module-bonjour-publish', 'macosx/module-bonjour-publish.c' ],
[ 'module-card-restore', 'module-card-restore.c' ],
[ 'module-cli', 'module-cli.c' ],
[ 'module-cli-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_TCP_SOCKETS'] ],
[ 'module-cli-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_CLI', '-DUSE_UNIX_SOCKETS'] ],
[ 'module-combine', 'module-combine.c' ],
[ 'module-combine-sink', 'module-combine-sink.c' ],
# [ 'module-console-kit', 'module-console-kit.c' ],
# [ 'module-coreaudio-detect', 'macosx/module-coreaudio-detect.c' ],
# [ 'module-coreaudio-device', 'macosx/module-coreaudio-device.c' ],
# [ 'module-dbus-protocol', 'module-dbus-protocol.c' ]
[ 'module-default-device-restore', 'module-default-device-restore.c', [], [], [], libprotocol_native ],
[ 'module-detect', 'module-detect.c' ],
[ 'module-device-manager', 'module-device-manager.c' ],
[ 'module-device-restore', 'module-device-restore.c', [], [], [dbus_dep], libprotocol_native ],
# [ 'module-echo-cancel', 'module-echo-cancel.c' ],
[ 'module-equalizer-sink', 'module-equalizer-sink.c', [], [], [dbus_dep] ],
[ 'module-esound-compat-spawnfd', 'module-esound-compat-spawnfd.c' ],
[ 'module-esound-compat-spawnpid', 'module-esound-compat-spawnpid.c' ],
# [ 'module-esound-protocol-tcp', 'module-protocol-stub.c' ],
# [ 'module-esound-protocol-unix', 'module-protocol-stub.c' ],
[ 'module-esound-sink', 'module-esound-sink.c' ],
[ 'module-filter-apply', 'module-filter-apply.c' ],
[ 'module-filter-heuristics', 'module-filter-heuristics.c' ],
# [ 'module-gconf', 'gconf/module-gconf.c' ],
[ 'module-hal-detect', 'module-hal-detect-compat.c' ],
[ 'module-http-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_TCP_SOCKETS'] ],
[ 'module-http-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_UNIX_SOCKETS'] ],
[ 'module-intended-roles', 'module-intended-roles.c' ],
# [ 'module-jackdbus-detect', 'jack/module-jackdbus-detect.c' ],
# [ 'module-jack-sink', 'jack/module-jack-sink.c' ],
# [ 'module-jack-source', 'jack/module-jack-source.c' ],
# [ 'module-ladspa-sink', 'module-ladspa-sink.c' ],
# [ 'module-lirc', 'module-lirc.c' ],
[ 'module-loopback', 'module-loopback.c' ],
[ 'module-match', 'module-match.c' ],
# [ 'module-mmkbd-evdev', 'module-mmkbd-evdev.c' ],
[ 'module-native-protocol-fd', 'module-native-protocol-fd.c' ],
[ '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-oss', 'oss/module-oss.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-raop-discover', 'raop/module-raop-discover.c' ],
# [ 'module-raop-sink', 'raop/module-raop-sink.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' ],
[ 'module-rtp-recv', 'rtp/module-rtp-recv.c' ],
[ 'module-rtp-send', 'rtp/module-rtp-send.c' ],
[ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep] ],
[ 'module-simple-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_TCP_SOCKETS'] ],
[ 'module-simple-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_SIMPLE', '-DUSE_UNIX_SOCKETS'] ],
[ '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' ],
[ 'module-systemd-login', 'module-systemd-login.c' ],
[ 'module-tunnel-sink', 'module-tunnel.c' ],
[ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c' ],
[ 'module-tunnel-source', 'module-tunnel.c' ],
[ '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' ],
# [ 'module-x11-bell', 'x11/module-x11-bell.c' ],
# [ 'module-x11-cork-request', 'x11/module-x11-cork-request.c' ],
# [ 'module-x11-publish', 'x11/module-x11-publish.c' ],
# [ 'module-x11-xsmp', 'x11/module-x11-xsmp.c' ],
# [ 'module-zeroconf-discover', 'module-zeroconf-discover.c' ],
# [ 'module-zeroconf-publish', 'module-zeroconf-publish.c' ],
]
if alsa_dep.found()
subdir('alsa')
all_modules += [
[ 'module-alsa-card', 'alsa/module-alsa-card.c', [], [], [alsa_dep], libalsa_util ],
[ 'module-alsa-sink', 'alsa/module-alsa-sink.c', [], [], [alsa_dep], libalsa_util ],
[ 'module-alsa-source', 'alsa/module-alsa-source.c', [], [], [alsa_dep], libalsa_util ],
]
endif
if udev_dep.found()
all_modules += [ [ 'module-udev-detect', 'module-udev-detect.c', [], [], [udev_dep] ] ]
endif
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,
dependencies : [thread_dep, libpulse_dep, libpulsecore_dep] + extra_deps,
link_with : extra_libs,
name_prefix : '',
implicit_include_directories : false)
endforeach
......@@ -23,7 +23,7 @@
#include <pulsecore/macro.h>