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>
2017-07-31 19:37:36 +08:00
|
|
|
project('pulseaudio', 'c', 'cpp',
|
2018-10-11 22:08:19 +08:00
|
|
|
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version')).stdout().strip(),
|
2018-10-09 12:44:02 +08:00
|
|
|
meson_version : '>= 0.47.0',
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
|
|
|
|
)
|
|
|
|
|
2018-10-11 22:08:19 +08:00
|
|
|
pa_version_str = meson.project_version()
|
|
|
|
# For tarballs, the first split will do nothing, but for builds in git, we
|
|
|
|
# split out suffixes when there are commits since the last tag
|
|
|
|
# (e.g.: v11.99.1-3-gad14bdb24 -> v11.99.1)
|
|
|
|
version_split = pa_version_str.split('-')[0].split('.')
|
|
|
|
pa_version_major = version_split[0].split('v')[0]
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
pa_version_minor = version_split[1]
|
2018-10-11 22:08:19 +08:00
|
|
|
if version_split.length() > 2
|
|
|
|
pa_version_micro = version_split[2]
|
|
|
|
else
|
|
|
|
pa_version_micro = '0'
|
|
|
|
endif
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
pa_version_major_minor = pa_version_major + '.' + pa_version_minor
|
|
|
|
|
|
|
|
pa_api_version = 12
|
2018-05-20 10:38:42 +08:00
|
|
|
pa_protocol_version = 33
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
|
|
|
|
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())
|
|
|
|
|
2018-10-20 16:30:19 +08:00
|
|
|
# The ABI-stable GLib adapter for client applications.
|
|
|
|
# For the version x:y:z always will hold y=z.
|
|
|
|
libpulse_mainloop_glib_version = '0.5.0'
|
|
|
|
|
2018-10-09 11:31:16 +08:00
|
|
|
# Paths
|
|
|
|
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
prefix = get_option('prefix')
|
2018-10-19 18:45:12 +08:00
|
|
|
assert(prefix.startswith('/'), 'Prefix is not absolute: "@0@"'.format(prefix))
|
2018-10-09 11:31:16 +08:00
|
|
|
|
2018-10-09 11:37:42 +08:00
|
|
|
bindir = join_paths(prefix, get_option('bindir'))
|
|
|
|
libdir = join_paths(prefix, get_option('libdir'))
|
2018-10-21 16:39:30 +08:00
|
|
|
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
datadir = join_paths(prefix, get_option('datadir'))
|
|
|
|
localstatedir = join_paths(prefix, get_option('localstatedir'))
|
|
|
|
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
|
|
|
|
2018-10-21 16:39:30 +08:00
|
|
|
pulselibexecdir = join_paths(libexecdir, 'pulse')
|
|
|
|
|
2018-10-09 11:26:57 +08:00
|
|
|
pulsedspdir = get_option('pulsedspdir')
|
|
|
|
if pulsedspdir == ''
|
2018-10-09 11:37:42 +08:00
|
|
|
join_paths(libdir, 'pulseaudio')
|
2018-10-09 11:26:57 +08:00
|
|
|
endif
|
|
|
|
|
2018-10-09 11:40:51 +08:00
|
|
|
# Configuration data
|
|
|
|
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set_quoted('PACKAGE', 'pulseaudio')
|
|
|
|
cdata.set_quoted('PACKAGE_NAME', 'pulseaudio')
|
2018-10-11 22:08:19 +08:00
|
|
|
cdata.set_quoted('PACKAGE_VERSION', pa_version_str)
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
cdata.set_quoted('CANONICAL_HOST', host_machine.cpu())
|
2018-09-15 23:10:43 +08:00
|
|
|
cdata.set('PA_MAJOR', pa_version_major)
|
|
|
|
cdata.set('PA_MINOR', pa_version_minor)
|
|
|
|
cdata.set('PA_API_VERSION', pa_api_version)
|
|
|
|
cdata.set('PA_PROTOCOL_VERSION', pa_protocol_version)
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
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'))
|
2018-10-09 11:37:42 +08:00
|
|
|
cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio'))
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
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'))
|
2018-10-09 11:37:42 +08:00
|
|
|
cdata.set_quoted('PA_DLSEARCHPATH', join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules'))
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
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',
|
2018-05-20 10:59:02 +08:00
|
|
|
'execinfo.h',
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
'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',
|
2018-05-20 10:59:02 +08:00
|
|
|
'sys/wait.h',
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
'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',
|
2018-05-20 10:59:02 +08:00
|
|
|
'getgrgid_r',
|
|
|
|
'getpwnam_r',
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
'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)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
2018-10-21 18:15:04 +08:00
|
|
|
if get_option('database') == 'tdb'
|
|
|
|
database_dep = dependency('tdb')
|
|
|
|
elif get_option('database') == 'gdbm'
|
|
|
|
database_dep = cc.find_library('gdbm', required : true)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('ipv6')
|
|
|
|
cdata.set('HAVE_IPV6', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('legacy-database-entry-format')
|
|
|
|
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
|
|
|
|
if alsa_dep.found()
|
|
|
|
cdata.set('HAVE_ALSA', 1)
|
|
|
|
cdata.set('HAVE_ALSA_UCM', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
|
|
|
|
if asyncns_dep.found()
|
|
|
|
cdata.set('HAVE_LIBASYNCNS', 1)
|
|
|
|
endif
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
|
2018-10-19 17:24:25 +08:00
|
|
|
dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
if dbus_dep.found()
|
|
|
|
cdata.set('HAVE_DBUS', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-21 16:39:30 +08:00
|
|
|
gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
|
|
|
|
if gio_dep.found()
|
|
|
|
cdata.set('HAVE_GSETTINGS', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-20 16:29:03 +08:00
|
|
|
glib_dep = dependency('glib-2.0', version : '>= 2.4.0', required: get_option('glib'))
|
|
|
|
if glib_dep.found()
|
|
|
|
cdata.set('HAVE_GLIB', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-20 16:41:28 +08:00
|
|
|
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
|
|
|
|
if gtk_dep.found()
|
|
|
|
cdata.set('HAVE_GTK', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-21 18:00:25 +08:00
|
|
|
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
|
|
|
|
if samplerate_dep.found()
|
|
|
|
cdata.set('HAVE_LIBSAMPLERATE', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-21 18:15:04 +08:00
|
|
|
sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
|
|
|
|
|
2018-10-21 17:47:03 +08:00
|
|
|
soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
|
|
|
|
if soxr_dep.found()
|
|
|
|
cdata.set('HAVE_SOXR', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-21 18:15:04 +08:00
|
|
|
systemd_dep = dependency('libsystemd', required : get_option('systemd'))
|
|
|
|
if systemd_dep.found()
|
|
|
|
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
|
|
|
|
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
|
|
|
|
cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-09 12:44:02 +08:00
|
|
|
x11_dep = dependency('x11-xcb', required : get_option('x11'))
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
if x11_dep.found()
|
2018-10-09 12:41:07 +08:00
|
|
|
xcb_dep = dependency('xcb', required : true, version : '>= 1.6')
|
|
|
|
ice_dep = dependency('ice', required : true)
|
|
|
|
sm_dep = dependency('sm', required : true)
|
|
|
|
xtst_dep = dependency('xtst', required : true)
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
cdata.set('HAVE_X11', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# FIXME: support ORC
|
|
|
|
cdata.set('DISABLE_ORC', 1)
|
|
|
|
|
|
|
|
# Module dependencies
|
2018-09-20 16:33:18 +08:00
|
|
|
|
2018-09-27 16:39:21 +08:00
|
|
|
if cc.has_header('sys/soundcard.h')
|
|
|
|
cdata.set('HAVE_OSS_OUTPUT', 1)
|
|
|
|
cdata.set('HAVE_OSS_WRAPPER', 1)
|
2018-10-09 11:26:57 +08:00
|
|
|
cdata.set_quoted('PULSEDSP_LOCATION', pulsedspdir)
|
2018-09-27 16:39:21 +08:00
|
|
|
endif
|
|
|
|
|
2018-10-19 19:18:58 +08:00
|
|
|
if get_option('hal-compat')
|
|
|
|
cdata.set('HAVE_HAL_COMPAT', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 18:04:01 +08:00
|
|
|
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'))
|
2018-09-20 18:37:12 +08:00
|
|
|
if avahi_dep.found()
|
|
|
|
cdata.set('HAVE_AVAHI', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 18:43:21 +08:00
|
|
|
bluez_dep = dependency('bluez', version : '>= 5.0', required : get_option('bluez5'))
|
2018-10-19 18:40:06 +08:00
|
|
|
sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
|
2018-09-22 18:37:19 +08:00
|
|
|
if bluez_dep.found()
|
2018-10-19 18:40:06 +08:00
|
|
|
assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
|
|
|
|
assert(sbc_dep.found(), 'BlueZ requires SBC support')
|
|
|
|
cdata.set('HAVE_SBC', 1)
|
|
|
|
cdata.set('HAVE_BLUEZ', 1)
|
|
|
|
cdata.set('HAVE_BLUEZ_5', 1)
|
|
|
|
if get_option('bluez5-native-headset')
|
|
|
|
cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
|
|
|
|
endif
|
|
|
|
if get_option('bluez5-ofono-headset')
|
|
|
|
cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
|
|
|
|
endif
|
2018-09-22 18:37:19 +08:00
|
|
|
endif
|
|
|
|
|
2018-10-19 18:51:58 +08:00
|
|
|
fftw_dep = dependency('fftw3f', required : get_option('fftw'))
|
|
|
|
if fftw_dep.found()
|
|
|
|
cdata.set('HAVE_FFTW', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 18:48:31 +08:00
|
|
|
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
|
2018-09-20 17:48:25 +08:00
|
|
|
if jack_dep.found()
|
|
|
|
cdata.set('HAVE_JACK', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 18:58:21 +08:00
|
|
|
lirc_dep = dependency('lirc', required : get_option('lirc'))
|
2018-09-20 20:30:21 +08:00
|
|
|
if lirc_dep.found()
|
|
|
|
cdata.set('HAVE_LIRC', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 19:00:59 +08:00
|
|
|
openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
|
2018-09-20 18:05:06 +08:00
|
|
|
if openssl_dep.found()
|
|
|
|
cdata.set('HAVE_OPENSSL', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 19:09:13 +08:00
|
|
|
speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
|
2018-10-01 12:01:47 +08:00
|
|
|
if speex_dep.found()
|
|
|
|
cdata.set('HAVE_SPEEX', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 19:11:31 +08:00
|
|
|
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
|
2018-09-20 19:57:17 +08:00
|
|
|
if udev_dep.found()
|
|
|
|
cdata.set('HAVE_UDEV', 1)
|
|
|
|
endif
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
|
2018-10-19 19:25:55 +08:00
|
|
|
webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
|
2018-10-01 12:01:47 +08:00
|
|
|
if webrtc_dep.found()
|
|
|
|
cdata.set('HAVE_WEBRTC', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-19 20:08:03 +08:00
|
|
|
# Now generate config.h from everything above
|
|
|
|
configure_file(output : 'config.h', configuration : cdata)
|
|
|
|
|
|
|
|
subdir('man')
|
|
|
|
subdir('src')
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# Final summary
|
|
|
|
|
|
|
|
summary = [
|
|
|
|
'',
|
|
|
|
'---{ @0@ @1@ }---'.format(meson.project_name(), meson.project_version()),
|
|
|
|
'',
|
|
|
|
'prefix: @0@'.format(prefix),
|
|
|
|
'bindir: @0@'.format(bindir),
|
|
|
|
'libdir: @0@'.format(libdir),
|
|
|
|
'libexecdir: @0@'.format(libexecdir),
|
|
|
|
'datadir: @0@'.format(datadir),
|
|
|
|
'sysconfdir: @0@'.format(sysconfdir),
|
|
|
|
'localstatedir: @0@'.format(localstatedir),
|
|
|
|
# 'modlibexecdir: @0@'.format(${modlibexecdir}),
|
|
|
|
'System Runtime Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')),
|
|
|
|
'System State Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')),
|
|
|
|
'System Config Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')),
|
|
|
|
# 'Zsh completions directory: @0@'.format(${zshcompletiondir}),
|
|
|
|
# 'Bash completions directory: @0@'.format(${bashcompletiondir}),
|
|
|
|
'Compiler: @0@ @1@'.format(cc.get_id(), cc.version()),
|
|
|
|
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
|
|
|
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
|
|
|
# 'LIBS: @0@'.format(${LIBS}),
|
|
|
|
'',
|
|
|
|
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
|
|
|
|
'Enable X11: @0@'.format(x11_dep.found()),
|
|
|
|
# 'Enable OSS Output: @0@'.format(${ENABLE_OSS_OUTPUT}),
|
|
|
|
# 'Enable OSS Wrapper: @0@'.format(${ENABLE_OSS_WRAPPER}),
|
|
|
|
# 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}),
|
|
|
|
'Enable Alsa: @0@'.format(alsa_dep.found()),
|
|
|
|
# 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}),
|
|
|
|
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
|
|
|
|
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}),
|
|
|
|
'Enable GLib 2: @0@'.format(glib_dep.found()),
|
|
|
|
# 'Enable GConf: @0@'.format(${ENABLE_GCONF}),
|
|
|
|
'Enable GSettings: @0@'.format(gio_dep.found()),
|
|
|
|
'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
|
|
|
|
'Enable Avahi: @0@'.format(avahi_dep.found()),
|
|
|
|
'Enable Jack: @0@'.format(jack_dep.found()),
|
|
|
|
'Enable Async DNS: @0@'.format(asyncns_dep.found()),
|
|
|
|
'Enable LIRC: @0@'.format(lirc_dep.found()),
|
|
|
|
'Enable D-Bus: @0@'.format(dbus_dep.found()),
|
|
|
|
' Enable BlueZ 5: @0@'.format(bluez_dep.found()),
|
|
|
|
' Enable native headsets: @0@'.format(get_option('bluez5-native-headset')),
|
|
|
|
' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')),
|
|
|
|
'Enable udev: @0@'.format(udev_dep.found()),
|
|
|
|
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
|
|
|
|
'Enable systemd: @0@'.format(systemd_dep.found()),
|
|
|
|
# 'Enable TCP Wrappers: @0@'.format(${ENABLE_TCPWRAP}),
|
|
|
|
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
|
|
|
|
'Enable IPv6: @0@'.format(get_option('ipv6')),
|
|
|
|
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
|
|
|
'Enable FFTW: @0@'.format(fftw_dep.found()),
|
|
|
|
# 'Enable orc: @0@'.format(${ENABLE_ORC}),
|
|
|
|
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
|
|
|
|
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
|
|
|
|
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
|
|
|
|
'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()),
|
|
|
|
# 'Enable gcov coverage: @0@'.format(${ENABLE_GCOV}),
|
|
|
|
# 'Enable unit tests: @0@'.format(${ENABLE_TESTS}),
|
|
|
|
'',
|
|
|
|
'Database: @0@'.format(get_option('database')),
|
|
|
|
'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
|
|
|
|
'System User: @0@'.format(cdata.get_unquoted('PA_SYSTEM_USER')),
|
|
|
|
'System Group: @0@'.format(cdata.get_unquoted('PA_SYSTEM_GROUP')),
|
|
|
|
'Access Group: @0@'.format(cdata.get_unquoted('PA_ACCESS_GROUP')),
|
|
|
|
# 'Enable per-user EsounD socket: @0@'.format(${ENABLE_PER_USER_ESOUND_SOCKET}),
|
|
|
|
# 'Force preopen: @0@'.format(${FORCE_PREOPEN}),
|
|
|
|
# 'Preopened modules: @0@'.format(${PREOPEN_MODS}),
|
|
|
|
]
|
|
|
|
|
|
|
|
message('\n '.join(summary))
|
|
|
|
|
|
|
|
# Sanity checks
|
2018-10-19 19:44:20 +08:00
|
|
|
|
|
|
|
if not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
|
|
|
|
error('At least one echo canceller implementation must be available!')
|
|
|
|
endif
|
|
|
|
|
2018-10-19 20:08:03 +08:00
|
|
|
if samplerate_dep.found()
|
|
|
|
warning('Support for libsamplerate is DEPRECATED')
|
|
|
|
endif
|
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>
2017-07-31 19:37:36 +08:00
|
|
|
|
2018-10-19 20:08:03 +08:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
if not dbus_dep.found()
|
|
|
|
message = [
|
|
|
|
'You do not have D-Bus support enabled. It is strongly recommended',
|
|
|
|
'that you enable D-Bus support if your platform supports it.',
|
|
|
|
'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
|
|
|
|
'to the Device Reservation Protocol to speak to JACK, Bluetooth',
|
|
|
|
'support and even a native control protocol for communicating and',
|
|
|
|
'controlling the PulseAudio daemon itself.',
|
|
|
|
]
|
|
|
|
warning('\n' + '\n'.join(message))
|
|
|
|
endif
|
|
|
|
if not udev_dep.found()
|
|
|
|
message = [
|
|
|
|
'You do not have udev support enabled. It is strongly recommended',
|
|
|
|
'that you enable udev support if your platform supports it as it is',
|
|
|
|
'the primary method used to detect hardware audio devices (on Linux)',
|
|
|
|
'and is thus a critical part of PulseAudio on that platform.',
|
|
|
|
]
|
|
|
|
warning('\n' + '\n'.join(message))
|
|
|
|
endif
|
|
|
|
if not speex_dep.found()
|
|
|
|
message = [
|
|
|
|
'You do not have speex support enabled. It is strongly recommended',
|
|
|
|
'that you enable speex support if your platform supports it as it is',
|
|
|
|
'the primary method used for audio resampling and is thus a critical',
|
|
|
|
'part of PulseAudio on that platform.',
|
|
|
|
]
|
|
|
|
warning('\n' + '\n'.join(message))
|
|
|
|
endif
|
|
|
|
endif
|