2022-07-26 03:49:25 +08:00
|
|
|
project('pulseaudio', 'c',
|
2022-07-27 10:22:09 +08:00
|
|
|
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version'), check : false).stdout().strip(),
|
2019-04-17 18:28:45 +08:00
|
|
|
meson_version : '>= 0.50.0',
|
2023-08-13 19:24:41 +08:00
|
|
|
default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ]
|
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
|
|
|
)
|
|
|
|
|
2022-07-27 10:22:09 +08:00
|
|
|
if not meson.is_subproject()
|
|
|
|
meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
|
|
|
|
endif
|
2021-03-02 13:22:22 +08:00
|
|
|
|
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
|
2020-01-14 17:15:36 +08:00
|
|
|
pa_protocol_version = 35
|
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
|
|
|
|
2019-07-11 07:25:38 +08:00
|
|
|
# The stable ABI for client applications, for the version info x:y:z
|
2019-09-02 12:29:29 +08:00
|
|
|
# always will hold x=z
|
2023-08-12 23:34:15 +08:00
|
|
|
libpulse_version_info = [24, 3, 24]
|
2019-07-11 07:25:38 +08:00
|
|
|
|
|
|
|
# A simplified, synchronous, ABI-stable interface for client
|
2019-09-02 12:29:29 +08:00
|
|
|
# applications, for the version info x:y:z always will hold x=z
|
2019-07-11 07:25:38 +08:00
|
|
|
libpulse_simple_version_info = [1, 1, 1]
|
|
|
|
|
|
|
|
# The ABI-stable GLib adapter for client applications, for the version
|
2019-09-02 12:29:29 +08:00
|
|
|
# info x:y:z always will hold x=z
|
2020-09-21 06:43:05 +08:00
|
|
|
libpulse_mainloop_glib_version_info = [0, 6, 0]
|
2019-07-11 07:25:38 +08:00
|
|
|
|
|
|
|
libpulse_version = '@0@.@1@.@2@'.format(
|
|
|
|
libpulse_version_info[0] - libpulse_version_info[2],
|
|
|
|
libpulse_version_info[0],
|
|
|
|
libpulse_version_info[1],
|
|
|
|
)
|
|
|
|
|
|
|
|
libpulse_simple_version = '@0@.@1@.@2@'.format(
|
|
|
|
libpulse_simple_version_info[0] - libpulse_simple_version_info[2],
|
|
|
|
libpulse_simple_version_info[0],
|
|
|
|
libpulse_simple_version_info[1],
|
|
|
|
)
|
|
|
|
|
|
|
|
libpulse_mainloop_glib_version = '@0@.@1@.@2@'.format(
|
|
|
|
libpulse_mainloop_glib_version_info[0] - libpulse_mainloop_glib_version_info[2],
|
|
|
|
libpulse_mainloop_glib_version_info[0],
|
|
|
|
libpulse_mainloop_glib_version_info[1],
|
|
|
|
)
|
2018-10-20 16:30:19 +08:00
|
|
|
|
2021-09-24 20:19:05 +08:00
|
|
|
i18n = import('i18n')
|
|
|
|
|
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'))
|
2018-11-19 16:48:35 +08:00
|
|
|
includedir = join_paths(prefix, get_option('includedir'))
|
2018-10-09 11:37:42 +08:00
|
|
|
libdir = join_paths(prefix, get_option('libdir'))
|
2018-10-21 16:39:30 +08:00
|
|
|
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
2018-11-05 13:21:31 +08:00
|
|
|
mandir = join_paths(prefix, get_option('mandir'))
|
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'))
|
2019-07-01 23:49:04 +08:00
|
|
|
localedir = join_paths(prefix, get_option('localedir'))
|
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
|
|
|
localstatedir = join_paths(prefix, get_option('localstatedir'))
|
|
|
|
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
2019-07-11 06:52:50 +08:00
|
|
|
privlibdir = join_paths(libdir, 'pulseaudio')
|
2021-09-24 20:19:05 +08:00
|
|
|
po_dir = join_paths(meson.current_source_dir(), 'po')
|
2020-08-02 23:43:03 +08:00
|
|
|
|
2021-01-03 17:07:11 +08:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
# Windows only supports loading libraries from the same dir as the executable
|
|
|
|
privlibdir = bindir
|
|
|
|
endif
|
|
|
|
|
2020-08-02 23:43:03 +08:00
|
|
|
alsadatadir = get_option('alsadatadir')
|
|
|
|
if alsadatadir == ''
|
|
|
|
alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
|
|
|
|
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-11-19 16:48:35 +08:00
|
|
|
pkgconfigdir = join_paths(libdir, 'pkgconfig')
|
2018-10-21 16:39:30 +08:00
|
|
|
pulselibexecdir = join_paths(libexecdir, 'pulse')
|
2018-10-22 12:31:04 +08:00
|
|
|
pulsesysconfdir = join_paths(sysconfdir, 'pulse')
|
2018-10-21 16:39:30 +08:00
|
|
|
|
2018-10-13 14:20:03 +08:00
|
|
|
modlibexecdir = get_option('modlibexecdir')
|
|
|
|
if modlibexecdir == ''
|
2020-01-03 14:45:25 +08:00
|
|
|
modlibexecdir = join_paths(libdir, 'pulseaudio', 'modules')
|
2018-10-13 14:20:03 +08:00
|
|
|
endif
|
|
|
|
|
2021-09-14 13:55:51 +08:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
# Windows only supports loading libraries from the same dir as the executable
|
|
|
|
modlibexecdir = bindir
|
|
|
|
endif
|
|
|
|
|
2019-07-11 06:52:50 +08:00
|
|
|
padsplibdir = get_option('padsplibdir')
|
|
|
|
if padsplibdir == ''
|
|
|
|
padsplibdir = privlibdir
|
|
|
|
endif
|
|
|
|
|
|
|
|
pulsedsp_location = get_option('pulsedsp-location')
|
|
|
|
if pulsedsp_location == ''
|
|
|
|
pulsedsp_location = join_paths(prefix, padsplibdir)
|
2018-10-09 11:26:57 +08:00
|
|
|
endif
|
|
|
|
|
2018-11-26 14:33:44 +08:00
|
|
|
systemduserunitdir = get_option('systemduserunitdir')
|
|
|
|
# the default value is set below
|
|
|
|
|
2018-11-26 16:12:04 +08:00
|
|
|
udevrulesdir = get_option('udevrulesdir')
|
|
|
|
if udevrulesdir == ''
|
2018-11-26 16:50:56 +08:00
|
|
|
# absolute path, otherwise meson prepends the prefix
|
|
|
|
udevrulesdir = '/lib/udev/rules.d'
|
2018-11-26 16:12:04 +08:00
|
|
|
endif
|
|
|
|
|
2018-11-05 13:17:37 +08:00
|
|
|
vapidir = join_paths(datadir, 'vala', 'vapi')
|
|
|
|
|
2018-11-05 12:42:24 +08:00
|
|
|
bashcompletiondir = get_option('bashcompletiondir')
|
|
|
|
if bashcompletiondir == ''
|
|
|
|
bash_completion_dep = dependency('bash-completion', required : false)
|
|
|
|
if bash_completion_dep.found()
|
|
|
|
bashcompletiondir = bash_completion_dep.get_pkgconfig_variable('completionsdir')
|
|
|
|
else
|
|
|
|
bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
zshcompletiondir = get_option('zshcompletiondir')
|
|
|
|
if zshcompletiondir == ''
|
|
|
|
zshcompletiondir = join_paths(datadir, 'zsh', 'site-functions')
|
|
|
|
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)
|
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())
|
2022-08-29 03:13:55 +08:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
cdata.set_quoted('PA_SOEXT', '.dll')
|
|
|
|
else
|
|
|
|
cdata.set_quoted('PA_SOEXT', '.so')
|
|
|
|
endif
|
2018-10-22 12:31:04 +08:00
|
|
|
cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir)
|
2020-09-02 21:49:07 +08:00
|
|
|
cdata.set('PA_DEFAULT_CONFIG_DIR_UNQUOTED', pulsesysconfdir)
|
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-13 14:20:03 +08:00
|
|
|
cdata.set_quoted('PA_DLSEARCHPATH', modlibexecdir)
|
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')
|
2020-06-17 18:33:11 +08:00
|
|
|
cdata.set_quoted('PA_ALSA_DATA_DIR', alsadatadir)
|
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('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
|
2019-07-01 23:49:04 +08:00
|
|
|
cdata.set_quoted('PULSE_LOCALEDIR', localedir)
|
|
|
|
cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
|
|
|
|
cdata.set('ENABLE_NLS', 1)
|
2020-08-11 00:47:45 +08:00
|
|
|
cdata.set('top_srcdir', meson.source_root())
|
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-22 12:57:26 +08:00
|
|
|
# Platform specifics
|
2018-12-27 20:02:30 +08:00
|
|
|
# First some defaults to keep config file generation happy
|
|
|
|
cdata.set('HAVE_COREAUDIO', 0)
|
|
|
|
cdata.set('HAVE_WAVEOUT', 0)
|
2021-05-18 04:03:28 +08:00
|
|
|
cdata.set('OS_IS_FREEBSD', 0)
|
2020-10-01 22:24:40 +08:00
|
|
|
|
|
|
|
platform_socket_dep = []
|
|
|
|
platform_dep = []
|
|
|
|
|
2021-06-03 14:43:10 +08:00
|
|
|
if host_machine.endian() == 'big'
|
|
|
|
cdata.set('WORDS_BIGENDIAN', 1)
|
|
|
|
endif
|
|
|
|
|
2018-10-22 12:57:26 +08:00
|
|
|
# FIXME: This was not tested. Maybe some flags should better be CFLAGS,
|
|
|
|
# rather than ending up in the config.h file?
|
|
|
|
if host_machine.system() == 'darwin'
|
|
|
|
cdata.set('OS_IS_DARWIN', 1)
|
2024-05-02 01:54:17 +08:00
|
|
|
cdata.set('HAVE_COREAUDIO', 1)
|
2018-10-22 12:57:26 +08:00
|
|
|
cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
|
|
|
|
elif host_machine.system() == 'windows'
|
|
|
|
cdata.set('OS_IS_WIN32', 1)
|
2020-10-01 22:24:40 +08:00
|
|
|
cdata.set('HAVE_WINDOWS_H', 1)
|
|
|
|
cdata.set('HAVE_WAVEOUT', 1)
|
|
|
|
cdata.set('HAVE_WINSOCK2_H', 1)
|
|
|
|
cdata.set('HAVE_WS2TCPIP_H', 1)
|
2018-10-22 12:57:26 +08:00
|
|
|
cdata.set('WIN32_LEAN_AND_MEAN', 1) # Needed to avoid including unnecessary headers on Windows
|
2020-10-01 22:24:40 +08:00
|
|
|
cdata.set('gid_t', 'int')
|
|
|
|
cdata.set('uid_t', 'int')
|
|
|
|
ws2_32_dep = meson.get_compiler('c').find_library('ws2_32')
|
|
|
|
winsock_dep = meson.get_compiler('c').find_library('wsock32')
|
|
|
|
ole32_dep = meson.get_compiler('c').find_library('ole32')
|
|
|
|
ssp_dep = meson.get_compiler('c').find_library('ssp')
|
|
|
|
pcreposix_dep = meson.get_compiler('c').find_library('pcreposix')
|
|
|
|
platform_socket_dep = [ws2_32_dep, winsock_dep]
|
|
|
|
platform_dep = [ole32_dep, ssp_dep, pcreposix_dep]
|
2020-04-03 20:37:24 +08:00
|
|
|
elif host_machine.system() == 'freebsd'
|
|
|
|
cdata.set('OS_IS_FREEBSD', 1)
|
2018-10-22 12:57:26 +08:00
|
|
|
#elif host_machine.system() == 'solaris'
|
|
|
|
# # Apparently meson has no solaris support?
|
|
|
|
# # Needed to get declarations for msg_control and msg_controllen on Solaris
|
|
|
|
# cdata.set('_XOPEN_SOURCE', 600)
|
|
|
|
# cdata.set('__EXTENSIONS__', 1)
|
|
|
|
endif
|
|
|
|
|
2019-08-15 18:19:30 +08:00
|
|
|
if cc.has_type('_Bool')
|
|
|
|
cdata.set('HAVE_STD_BOOL', 1)
|
|
|
|
endif
|
|
|
|
|
2019-08-15 18:00:00 +08:00
|
|
|
if host_machine.cpu_family() == 'x86_64' or cc.sizeof('void *') >= 8
|
|
|
|
cdata.set('HAVE_FAST_64BIT_OPERATIONS', 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
|
|
|
# Headers
|
|
|
|
|
|
|
|
check_headers = [
|
|
|
|
'arpa/inet.h',
|
2019-08-09 02:23:12 +08:00
|
|
|
'byteswap.h',
|
|
|
|
'dlfcn.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',
|
2019-08-09 02:23:12 +08:00
|
|
|
'linux/sockios.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
|
|
|
'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',
|
2019-08-13 23:27:37 +08:00
|
|
|
'stdint.h',
|
2019-08-15 18:19:30 +08:00
|
|
|
'sys/atomic.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
|
|
|
'sys/capability.h',
|
2019-08-15 18:19:30 +08:00
|
|
|
'sys/conf.h',
|
2019-08-09 02:23:12 +08:00
|
|
|
'sys/dl.h',
|
2018-10-31 13:32:39 +08:00
|
|
|
'sys/eventfd.h',
|
2019-06-27 08:31:14 +08:00
|
|
|
'sys/filio.h',
|
2019-08-09 02:23:12 +08:00
|
|
|
'sys/ioctl.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
|
|
|
'sys/mman.h',
|
|
|
|
'sys/prctl.h',
|
|
|
|
'sys/resource.h',
|
|
|
|
'sys/select.h',
|
|
|
|
'sys/socket.h',
|
2019-08-09 02:23:12 +08:00
|
|
|
'sys/syscall.h',
|
|
|
|
'sys/uio.h',
|
2018-10-31 19:39:40 +08:00
|
|
|
'sys/un.h',
|
2018-05-20 10:59:02 +08:00
|
|
|
'sys/wait.h',
|
2019-08-09 02:23:12 +08:00
|
|
|
'syslog.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
|
|
|
'xlocale.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach h : check_headers
|
|
|
|
if cc.has_header(h)
|
|
|
|
define = 'HAVE_' + h.underscorify().to_upper()
|
|
|
|
cdata.set(define, 1)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2020-02-14 13:29:33 +08:00
|
|
|
if cc.has_header('valgrind/memcheck.h', required: get_option('valgrind'))
|
|
|
|
cdata.set('HAVE_VALGRIND_MEMCHECK_H', 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
|
|
|
# FIXME: move this to the above set
|
2020-10-01 22:24:40 +08:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
if cc.has_header('pthread.h')
|
|
|
|
cdata.set('HAVE_PTHREAD', 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
|
|
|
endif
|
|
|
|
|
2019-08-15 18:19:30 +08:00
|
|
|
if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT')
|
|
|
|
cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1)
|
|
|
|
endif
|
|
|
|
|
2021-08-07 02:40:23 +08:00
|
|
|
# Headers which are usable
|
|
|
|
|
|
|
|
check_usable_headers = [
|
|
|
|
'cpuid.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach h : check_usable_headers
|
|
|
|
if cc.check_header(h)
|
|
|
|
define = 'HAVE_' + h.underscorify().to_upper()
|
|
|
|
cdata.set(define, 1)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
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
|
|
|
# Functions
|
|
|
|
|
|
|
|
check_functions = [
|
|
|
|
'accept4',
|
|
|
|
'clock_gettime',
|
2019-08-09 02:23:12 +08:00
|
|
|
'ctime_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
|
|
|
'fchmod',
|
|
|
|
'fchown',
|
|
|
|
'fork',
|
|
|
|
'fstat',
|
|
|
|
'getaddrinfo',
|
2018-05-20 10:59:02 +08:00
|
|
|
'getgrgid_r',
|
2019-08-09 02:23:12 +08:00
|
|
|
'getgrnam_r',
|
2018-05-20 10:59:02 +08:00
|
|
|
'getpwnam_r',
|
2019-08-09 02:23:12 +08:00
|
|
|
'getpwuid_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',
|
2019-08-09 02:23:12 +08:00
|
|
|
'lrintf',
|
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
|
|
|
'lstat',
|
|
|
|
'memfd_create',
|
2018-10-22 12:39:56 +08:00
|
|
|
'mkfifo',
|
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
|
|
|
'mlock',
|
|
|
|
'nanosleep',
|
2019-08-09 02:23:12 +08:00
|
|
|
'open64',
|
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
|
|
|
'paccept',
|
|
|
|
'pipe',
|
|
|
|
'pipe2',
|
2019-08-09 02:23:12 +08:00
|
|
|
'posix_fadvise',
|
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
|
|
|
'posix_madvise',
|
2019-08-09 02:23:12 +08:00
|
|
|
'posix_memalign',
|
|
|
|
'ppoll',
|
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
|
|
|
'readlink',
|
|
|
|
'setegid',
|
|
|
|
'seteuid',
|
2019-08-09 02:23:12 +08:00
|
|
|
'setpgid',
|
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
|
|
|
'setregid',
|
|
|
|
'setresgid',
|
|
|
|
'setresuid',
|
2019-08-09 02:23:12 +08:00
|
|
|
'setreuid',
|
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
|
|
|
'setsid',
|
|
|
|
'sig2str',
|
|
|
|
'sigaction',
|
2019-08-09 02:23:12 +08:00
|
|
|
'strerror_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
|
|
|
'strtod_l',
|
2019-08-09 02:23:12 +08:00
|
|
|
'strtof',
|
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
|
|
|
'symlink',
|
|
|
|
'sysconf',
|
|
|
|
'uname',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach f : check_functions
|
|
|
|
if cc.has_function(f)
|
|
|
|
define = 'HAVE_' + f.underscorify().to_upper()
|
2020-10-01 22:24:40 +08:00
|
|
|
|
|
|
|
if f == 'posix_memalign' and host_machine.system() == 'windows'
|
|
|
|
message('Win32/mingw32 does not properly define posix_memalign.')
|
|
|
|
elif f == 'fork' and host_machine.system() == 'windows'
|
|
|
|
# __builtin_fork is defined and compiles properly, but calling __builtin_fork() does not.
|
|
|
|
# This causes Meson to think that Windows has a fork() which causes a link error...
|
|
|
|
message('Win32/mingw32 does not properly define fork.')
|
|
|
|
else
|
|
|
|
cdata.set(define, 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
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2020-04-04 00:05:22 +08:00
|
|
|
if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create') \
|
|
|
|
or cc.has_function('memfd_create')
|
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_MEMFD', 1)
|
|
|
|
endif
|
|
|
|
|
2019-09-15 20:22:49 +08:00
|
|
|
if cc.has_function('dgettext')
|
2020-10-01 22:24:40 +08:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
libintl_dep = []
|
|
|
|
else
|
|
|
|
libintl_dep = cc.find_library('intl')
|
|
|
|
endif
|
2019-09-15 20:22:49 +08:00
|
|
|
else
|
|
|
|
libintl_dep = cc.find_library('intl')
|
|
|
|
endif
|
|
|
|
|
2018-10-31 13:34:03 +08:00
|
|
|
# Symbols
|
|
|
|
|
|
|
|
if cc.has_header_symbol('signal.h', 'SIGXCPU')
|
|
|
|
cdata.set('HAVE_SIGXCPU', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not cc.has_header_symbol('netinet/in.h', 'INADDR_NONE')
|
|
|
|
if not cc.has_header_symbol('winsock2.h', 'INADDR_NONE')
|
|
|
|
# Define INADDR_NONE if not found (Solaris)
|
|
|
|
cdata.set('INADDR_NONE', '0xffffffff')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-08-15 18:00:26 +08:00
|
|
|
check_decls = [
|
|
|
|
[ 'environ', 'unistd.h', '#define _GNU_SOURCE' ],
|
|
|
|
[ 'SOUND_PCM_READ_RATE', 'sys/soundcard.h', '' ],
|
|
|
|
[ 'SOUND_PCM_READ_CHANNELS', 'sys/soundcard.h', '' ],
|
|
|
|
[ 'SOUND_PCM_READ_BITS', 'sys/soundcard.h', '' ],
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach s : check_decls
|
|
|
|
if cc.has_header_symbol(s[1], s[0], prefix : s[2])
|
|
|
|
define = 'HAVE_DECL_' + s[0].to_upper()
|
|
|
|
cdata.set(define, 1)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
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
|
|
|
# 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')
|
|
|
|
|
2019-08-03 04:22:09 +08:00
|
|
|
# CFLAGS/LDFLAGS
|
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_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE']
|
|
|
|
server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO']
|
|
|
|
cdata.set('MESON_BUILD', 1)
|
|
|
|
|
2019-08-03 04:22:09 +08:00
|
|
|
# On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly,
|
|
|
|
# so we request the nodelete flag to be enabled.
|
|
|
|
# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
|
2020-10-01 22:24:40 +08:00
|
|
|
# Windows doesn't support this flag.
|
2022-08-29 03:13:55 +08:00
|
|
|
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
|
2020-10-01 22:24:40 +08:00
|
|
|
nodelete_link_args = ['-Wl,-z,nodelete']
|
|
|
|
else
|
|
|
|
nodelete_link_args = []
|
|
|
|
endif
|
2019-08-03 04:22:09 +08:00
|
|
|
|
2018-11-28 21:43:53 +08:00
|
|
|
# Code coverage
|
|
|
|
|
|
|
|
if get_option('gcov')
|
2022-07-26 03:49:25 +08:00
|
|
|
add_languages('cpp')
|
2018-11-28 21:43:53 +08:00
|
|
|
add_project_arguments('--coverage', language: ['c', 'cpp'])
|
|
|
|
add_project_link_arguments('--coverage', language: ['c', 'cpp'])
|
|
|
|
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
|
|
|
# Core Dependencies
|
|
|
|
|
|
|
|
libm_dep = cc.find_library('m', required : true)
|
2019-08-09 02:23:12 +08:00
|
|
|
|
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
|
|
|
thread_dep = dependency('threads')
|
2019-08-09 02:23:12 +08:00
|
|
|
foreach f : [
|
|
|
|
'pthread_getname_np',
|
|
|
|
'pthread_setaffinity_np',
|
|
|
|
'pthread_setname_np',
|
|
|
|
]
|
|
|
|
if cc.has_function(f, dependencies : thread_dep)
|
|
|
|
define = 'HAVE_' + f.underscorify().to_upper()
|
|
|
|
cdata.set(define, 1)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
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
|
|
|
cap_dep = cc.find_library('cap', required : false)
|
|
|
|
|
2018-10-31 13:36:01 +08:00
|
|
|
shm_dep = cc.find_library('rt', required : false)
|
2020-04-02 22:18:22 +08:00
|
|
|
if cc.has_function('shm_open', dependencies : shm_dep)
|
2018-10-31 13:36:01 +08:00
|
|
|
cdata.set('HAVE_SHM_OPEN', 1)
|
|
|
|
endif
|
|
|
|
|
2019-08-09 02:23:12 +08:00
|
|
|
dl_dep = cc.find_library('dl', required : false)
|
2020-04-02 22:11:20 +08:00
|
|
|
if cc.has_function('dladdr', dependencies : dl_dep)
|
2019-08-09 02:23:12 +08:00
|
|
|
cdata.set('HAVE_DLADDR', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
have_iconv = false
|
|
|
|
if cc.has_function('iconv_open')
|
|
|
|
iconv_dep = dependency('', required : false)
|
|
|
|
have_iconv = true
|
2020-04-03 23:51:59 +08:00
|
|
|
# tell the libiconv header to pretend to be libc iconv
|
|
|
|
cdata.set('LIBICONV_PLUG', 1)
|
2019-08-09 02:23:12 +08:00
|
|
|
else
|
|
|
|
iconv_dep = cc.find_library('iconv', required : false)
|
|
|
|
have_iconv = iconv_dep.found()
|
|
|
|
endif
|
|
|
|
if have_iconv
|
|
|
|
cdata.set('HAVE_ICONV', 1)
|
|
|
|
iconvconsttest = '''#include <iconv.h>
|
|
|
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
|
|
'''
|
|
|
|
if cc.compiles(iconvconsttest, dependencies : iconv_dep)
|
|
|
|
cdata.set('ICONV_CONST', '')
|
|
|
|
else
|
|
|
|
cdata.set('ICONV_CONST', 'const')
|
|
|
|
endif
|
|
|
|
endif
|
2019-05-30 01:20:37 +08:00
|
|
|
|
2020-04-02 22:34:32 +08:00
|
|
|
# Used for backtraces on BSD
|
|
|
|
execinfo_dep = cc.find_library('execinfo', required : false)
|
|
|
|
|
2019-08-15 15:37:54 +08:00
|
|
|
# Atomic operations
|
|
|
|
|
|
|
|
if get_option('atomic-arm-memory-barrier')
|
|
|
|
cdata.set('ATOMIC_ARM_MEMORY_BARRIER_ENABLED', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
need_libatomic_ops = false
|
|
|
|
|
2022-07-01 20:03:44 +08:00
|
|
|
atomictest = '''int main() {
|
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
|
|
|
volatile int atomic = 2;
|
|
|
|
__sync_bool_compare_and_swap (&atomic, 2, 3);
|
2022-07-01 20:03:44 +08:00
|
|
|
return 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
|
|
|
}
|
|
|
|
'''
|
2019-08-15 15:37:54 +08:00
|
|
|
|
2022-07-01 20:03:44 +08:00
|
|
|
if cc.links(atomictest)
|
2019-08-15 15:37:54 +08:00
|
|
|
cdata.set('HAVE_ATOMIC_BUILTINS', 1)
|
|
|
|
|
2022-07-01 20:03:44 +08:00
|
|
|
newatomictest = '''int main() {
|
2019-05-30 01:20:37 +08:00
|
|
|
int c = 0;
|
|
|
|
__atomic_store_n(&c, 4, __ATOMIC_SEQ_CST);
|
2022-07-01 20:03:44 +08:00
|
|
|
return 0;
|
2019-05-30 01:20:37 +08:00
|
|
|
}
|
|
|
|
'''
|
|
|
|
|
2022-07-01 20:03:44 +08:00
|
|
|
if(cc.links(newatomictest))
|
2019-08-15 15:37:54 +08:00
|
|
|
cdata.set('HAVE_ATOMIC_BUILTINS_MEMORY_MODEL', 1)
|
2019-05-30 01:20:37 +08:00
|
|
|
endif
|
|
|
|
|
2019-08-15 15:37:54 +08:00
|
|
|
elif host_machine.cpu_family() == 'arm'
|
|
|
|
if host_machine.system() == 'linux' and get_option('atomic-arm-linux-helpers')
|
|
|
|
cdata.set('ATOMIC_ARM_LINUX_HELPERS', 1)
|
|
|
|
else
|
2019-08-22 20:28:20 +08:00
|
|
|
armatomictest = '''int func() {
|
2019-08-15 15:37:54 +08:00
|
|
|
volatile int a=0;
|
|
|
|
int o=0, n=1, r;
|
2019-08-22 20:28:20 +08:00
|
|
|
asm volatile (
|
|
|
|
"ldrex %0, [%1]\n"
|
|
|
|
"subs %0, %0, %2\n"
|
|
|
|
"strexeq %0, %3, [%1]\n"
|
|
|
|
: "=&r" (r)
|
|
|
|
: "r" (&a), "Ir" (o), "r" (n)
|
2019-08-15 15:37:54 +08:00
|
|
|
: "cc");
|
|
|
|
return (a==1 ? 0 : -1);
|
2019-08-22 20:28:20 +08:00
|
|
|
}
|
2019-08-15 15:37:54 +08:00
|
|
|
'''
|
|
|
|
|
2019-08-22 20:28:20 +08:00
|
|
|
if cc.compiles(armatomictest)
|
2019-08-15 15:37:54 +08:00
|
|
|
cdata.set('ATOMIC_ARM_INLINE_ASM', 1)
|
|
|
|
else
|
|
|
|
need_libatomic_ops = true
|
|
|
|
endif
|
|
|
|
endif # arm && !linux
|
|
|
|
|
|
|
|
elif not ['freebsd', 'netbsd'].contains(host_machine.system())
|
|
|
|
need_libatomic_ops = true
|
|
|
|
endif # !atomic helpers && !arm
|
|
|
|
|
|
|
|
if need_libatomic_ops
|
|
|
|
assert(cc.has_header('atomic_ops.h'), 'Need libatomic_ops')
|
|
|
|
|
|
|
|
cdata.set('AO_REQUIRE_CAS', 1)
|
|
|
|
|
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
libatomic_ops_dep = cc.find_library('atomic_ops', required : true)
|
|
|
|
else
|
|
|
|
libatomic_ops_dep = dependency('', required: false)
|
|
|
|
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
|
|
|
else
|
2019-08-15 15:37:54 +08:00
|
|
|
libatomic_ops_dep = dependency('', required: false)
|
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
|
|
|
endif
|
|
|
|
|
2019-08-15 15:38:14 +08:00
|
|
|
# ARM checks
|
|
|
|
# ARMV6 instructions we need
|
|
|
|
if host_machine.cpu_family() == 'arm'
|
2019-08-22 20:28:20 +08:00
|
|
|
armv6test = '''int func() {
|
2019-08-15 15:38:14 +08:00
|
|
|
volatile int a = -60000, b = 0xaaaabbbb, c = 0xccccdddd;
|
|
|
|
asm volatile ("ldr r0, %2 \n"
|
|
|
|
"ldr r2, %3 \n"
|
|
|
|
"ldr r3, %4 \n"
|
|
|
|
"ssat r1, #8, r0 \n"
|
|
|
|
"str r1, %0 \n"
|
|
|
|
"pkhbt r1, r3, r2, LSL #8 \n"
|
|
|
|
"str r1, %1 \n"
|
|
|
|
: "=m" (a), "=m" (b)
|
|
|
|
: "m" (a), "m" (b), "m" (c)
|
|
|
|
: "r0", "r1", "r2", "r3", "cc");
|
|
|
|
return (a == -128 && b == 0xaabbdddd) ? 0 : -1;
|
2019-08-22 20:28:20 +08:00
|
|
|
}
|
2019-08-15 15:38:14 +08:00
|
|
|
'''
|
|
|
|
|
|
|
|
if cc.compiles(armv6test)
|
|
|
|
cdata.set('HAVE_ARMV6', 1)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
# NEON checks are automatically done by the unstable-simd module
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
# Dependencies common to client, daemon and modules
|
2018-10-21 18:15:04 +08:00
|
|
|
|
|
|
|
if get_option('ipv6')
|
|
|
|
cdata.set('HAVE_IPV6', 1)
|
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
|
|
|
|
if dbus_dep.found()
|
|
|
|
cdata.set('HAVE_DBUS', 1)
|
2018-10-21 18:15:04 +08:00
|
|
|
endif
|
|
|
|
|
2021-11-11 06:44:30 +08:00
|
|
|
glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib'))
|
|
|
|
if glib_dep.found()
|
|
|
|
cdata.set('HAVE_GLIB', 1)
|
|
|
|
cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
|
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
|
stream-restore: Forget pre-14.0 stream routing
Prior to commits f899d5f4669dcd536cc142cee99fe359dd8af3d6 and
f62a49b8cf109c011a9818d2358beb6834e6ec25, GNOME's sound settings
overwrote the routing for all entries in the stream-restore database
when selecting a device. Now we prevent that from happening (see the
aforementioned commits), but the old overwritten settings can still be in
the database after updating to PulseAudio 14.0, and they can cause
problems, as documented here:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832
We can't distinguish between devices set by GNOME's sound settings
and devices set by the user, so this patch discards all old device
settings, even though that is going to cause PulseAudio to forget routing
settings for many users. This is less bad than keeping the incorrect
routing settings in the database, because it's difficult for users to
figure out how to fix the situation when e.g. speaker test tones go to
the internal speakers no matter what device is selected as the default,
whereas old manual configuration can be restored restored by doing the
manual configuration again. Also, it's probably more common to have at
some point changed the default device in GNOME's sound settings than it
is to have any manual per-stream routing settings.
This is disabled by default, because this causes data loss, but
distributions that use GNOME are recommended to enable this with
the --enable-stream-restore-clear-old-devices (Autotools) or
-Dstream-restore-clear-old-devices=true (Meson) build option.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832
2020-05-26 20:04:59 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
libsystemd_dep = dependency('libsystemd', required : get_option('systemd'))
|
|
|
|
if libsystemd_dep.found()
|
|
|
|
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
|
|
|
|
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
|
|
|
|
cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
|
2019-01-16 18:58:42 +08:00
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
x11_dep = dependency('x11-xcb', required : get_option('x11'))
|
2020-01-16 03:34:30 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
# OSS support
|
|
|
|
if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
|
|
|
|
# OSS output via daemon module-detect
|
|
|
|
cdata.set('HAVE_OSS_OUTPUT', 1)
|
|
|
|
# OSS wrapper
|
|
|
|
cdata.set('HAVE_OSS_WRAPPER', 1)
|
|
|
|
cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
|
2018-10-21 18:15:04 +08:00
|
|
|
endif
|
|
|
|
|
2021-11-11 06:44:30 +08:00
|
|
|
fftw_dep = dependency('fftw3f', required : get_option('fftw'))
|
|
|
|
if fftw_dep.found()
|
|
|
|
cdata.set('HAVE_FFTW', 1)
|
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
# Client library dependencies
|
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
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('client')
|
|
|
|
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
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
|
|
|
|
if gtk_dep.found()
|
|
|
|
cdata.set('HAVE_GTK', 1)
|
|
|
|
endif
|
2018-10-20 16:29:03 +08:00
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
# Daemon and module dependencies
|
2018-10-20 16:41:28 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('daemon')
|
|
|
|
# FIXME: make sure it's >= 2.2
|
|
|
|
ltdl_dep = cc.find_library('ltdl', required : true)
|
2018-11-28 16:42:25 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
# 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:00:25 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('database') == 'tdb'
|
|
|
|
database_dep = dependency('tdb')
|
|
|
|
elif get_option('database') == 'gdbm'
|
|
|
|
database_dep = cc.find_library('gdbm', required : true)
|
|
|
|
else
|
|
|
|
database_dep = dependency('', required: false)
|
|
|
|
endif
|
2018-10-21 18:15:04 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('legacy-database-entry-format')
|
|
|
|
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
|
|
|
|
endif
|
2018-10-21 17:47:03 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('stream-restore-clear-old-devices')
|
|
|
|
cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
|
|
|
|
endif
|
2018-10-21 18:15:04 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('running-from-build-tree')
|
|
|
|
cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
|
|
|
|
endif
|
2021-02-11 13:56:22 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('enable-smoother-2')
|
|
|
|
cdata.set('USE_SMOOTHER_2', 1)
|
|
|
|
endif
|
2021-02-09 14:18:18 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
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)
|
2020-12-23 01:54:40 +08:00
|
|
|
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
|
|
|
|
2022-07-11 18:17:18 +08:00
|
|
|
gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : false)
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('gsettings').enabled()
|
|
|
|
assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
|
|
|
|
cdata.set('HAVE_GSETTINGS', 1)
|
|
|
|
else
|
|
|
|
cdata.set('HAVE_GSETTINGS', 0)
|
|
|
|
endif
|
2018-09-27 16:39:21 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
have_orcc = false
|
|
|
|
orcc_args = []
|
|
|
|
orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
|
|
|
|
orcc = find_program('orcc', required : get_option('orc'))
|
|
|
|
if orc_dep.found() and orcc.found()
|
|
|
|
have_orcc = true
|
|
|
|
orcc_args = [orcc]
|
|
|
|
#orcc_args = [orcc, '--include', 'glib.h']
|
|
|
|
cdata.set('HAVE_ORC', 1)
|
|
|
|
else
|
|
|
|
cdata.set('DISABLE_ORC', 1)
|
|
|
|
endif
|
2018-10-19 19:18:58 +08:00
|
|
|
|
2021-11-05 01:12:03 +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-09-20 18:37:12 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
|
|
|
|
if speex_dep.found()
|
|
|
|
cdata.set('HAVE_SPEEX', 1)
|
|
|
|
endif
|
2021-02-17 14:44:34 +08:00
|
|
|
|
2021-11-05 01:12: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
|
2021-06-19 01:48:12 +08:00
|
|
|
|
2020-10-21 05:29:55 +08:00
|
|
|
webrtc_dep = dependency('webrtc-audio-processing-1', version : '>= 1.0', required : get_option('webrtc-aec'))
|
2021-11-05 01:12:03 +08:00
|
|
|
if webrtc_dep.found()
|
|
|
|
cdata.set('HAVE_WEBRTC', 1)
|
2018-10-19 18:40:06 +08:00
|
|
|
endif
|
2021-11-05 01:12:03 +08:00
|
|
|
|
|
|
|
systemd_dep = dependency('systemd', required : get_option('systemd'))
|
|
|
|
if systemd_dep.found() and systemduserunitdir == ''
|
|
|
|
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
|
2018-10-19 18:40:06 +08:00
|
|
|
endif
|
2018-09-22 18:37:19 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
libelogind_dep = dependency('libelogind', required : get_option('elogind'))
|
|
|
|
if libelogind_dep.found()
|
|
|
|
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
|
|
|
|
endif
|
2018-10-19 18:51:58 +08:00
|
|
|
|
2022-06-13 02:49:32 +08:00
|
|
|
if get_option('consolekit').enabled()
|
|
|
|
assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
|
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
|
|
|
|
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
|
|
|
|
cdata.set('HAVE_LIBWRAP', 1)
|
|
|
|
endif
|
2018-09-20 17:48:25 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if x11_dep.found()
|
|
|
|
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)
|
|
|
|
cdata.set('HAVE_X11', 1)
|
|
|
|
if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep)
|
|
|
|
cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
|
|
|
|
endif
|
|
|
|
endif
|
2018-09-20 20:30:21 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
|
|
|
|
if avahi_dep.found()
|
|
|
|
cdata.set('HAVE_AVAHI', 1)
|
|
|
|
else
|
|
|
|
cdata.set('HAVE_AVAHI', 0)
|
|
|
|
endif
|
2018-09-20 18:05:06 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
|
2018-10-01 12:01:47 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
bluez_dep = dependency('bluez', required : get_option('bluez5'))
|
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
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if bluez_dep.found()
|
|
|
|
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
|
|
|
|
endif
|
2018-10-01 12:01:47 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
|
|
|
|
if jack_dep.found()
|
|
|
|
cdata.set('HAVE_JACK', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
lirc_dep = dependency('lirc', required : get_option('lirc'))
|
|
|
|
if lirc_dep.found()
|
|
|
|
cdata.set('HAVE_LIRC', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
|
|
|
|
if openssl_dep.found()
|
|
|
|
cdata.set('HAVE_OPENSSL', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
|
|
|
|
if udev_dep.found()
|
|
|
|
cdata.set('HAVE_UDEV', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('hal-compat')
|
|
|
|
cdata.set('HAVE_HAL_COMPAT', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
|
|
|
|
gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('gstreamer'))
|
|
|
|
gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
|
|
|
|
|
|
|
|
have_gstreamer = false
|
|
|
|
if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
|
|
|
|
assert(gio_dep.found(), 'GStreamer-based RTP needs glib I/O library (GIO)')
|
|
|
|
have_gstreamer = true
|
|
|
|
endif
|
2016-05-12 21:56:55 +08:00
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
bluez5_gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('bluez5-gstreamer'))
|
|
|
|
bluez5_gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('bluez5-gstreamer'))
|
|
|
|
have_bluez5_gstreamer = false
|
|
|
|
if bluez5_gst_dep.found() and bluez5_gstapp_dep.found()
|
|
|
|
have_bluez5_gstreamer = true
|
|
|
|
cdata.set('HAVE_GSTLDAC', 1)
|
|
|
|
cdata.set('HAVE_GSTAPTX', 1)
|
|
|
|
endif
|
2020-10-27 19:28:21 +08:00
|
|
|
endif
|
|
|
|
|
2018-11-26 18:29:28 +08:00
|
|
|
# These are required for the CMake file generation
|
|
|
|
cdata.set('PA_LIBDIR', libdir)
|
|
|
|
cdata.set('PA_INCDIR', includedir)
|
|
|
|
|
2018-10-31 13:45:11 +08:00
|
|
|
# Test dependencies
|
|
|
|
|
|
|
|
check_dep = dependency('check', version : '>= 0.9.10', required : get_option('tests'))
|
|
|
|
|
2019-08-22 21:23:13 +08:00
|
|
|
# Subdirs
|
|
|
|
|
2021-05-19 05:52:56 +08:00
|
|
|
if get_option('doxygen')
|
|
|
|
subdir('doxygen')
|
|
|
|
endif
|
2021-11-04 21:35:19 +08:00
|
|
|
if get_option('client')
|
2021-09-24 20:19:05 +08:00
|
|
|
subdir('po')
|
|
|
|
endif
|
2019-08-22 21:23:13 +08:00
|
|
|
if get_option('man')
|
|
|
|
subdir('man')
|
|
|
|
endif
|
|
|
|
subdir('shell-completion/bash')
|
2021-11-05 05:34:26 +08:00
|
|
|
subdir('shell-completion/zsh')
|
2019-08-22 21:23:13 +08:00
|
|
|
subdir('src')
|
2021-11-04 21:35:19 +08:00
|
|
|
if get_option('client')
|
2021-09-24 20:19:05 +08:00
|
|
|
subdir('vala')
|
|
|
|
endif
|
2019-08-22 21:23:13 +08:00
|
|
|
|
2018-10-19 20:08:03 +08:00
|
|
|
# Now generate config.h from everything above
|
|
|
|
configure_file(output : 'config.h', configuration : cdata)
|
|
|
|
|
2021-11-04 21:35:19 +08:00
|
|
|
if get_option('client')
|
2021-09-24 20:19:05 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
# pkg-config files
|
|
|
|
|
|
|
|
pc_cdata = configuration_data()
|
|
|
|
|
|
|
|
pc_cdata.set('prefix', prefix)
|
|
|
|
pc_cdata.set('exec_prefix', prefix)
|
|
|
|
pc_cdata.set('libdir', libdir)
|
|
|
|
pc_cdata.set('includedir', includedir)
|
|
|
|
pc_cdata.set('modlibexecdir', modlibexecdir)
|
|
|
|
pc_cdata.set('PACKAGE_VERSION', pa_version_str)
|
|
|
|
pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
|
|
|
|
# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
|
|
|
|
# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
|
|
|
|
# get_configtool_variable() work with it, so we have no way to get this flag right,
|
|
|
|
# unless we do all the work ourselves. See current work in glib, also meson #553.
|
|
|
|
pc_cdata.set('PTHREAD_LIBS', '-pthread')
|
|
|
|
|
|
|
|
pc_files = [
|
|
|
|
'libpulse.pc',
|
|
|
|
'libpulse-simple.pc',
|
|
|
|
]
|
2018-11-19 16:48:35 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
if glib_dep.found()
|
|
|
|
pc_files += 'libpulse-mainloop-glib.pc'
|
|
|
|
endif
|
2018-11-19 16:48:35 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
foreach file : pc_files
|
|
|
|
configure_file(
|
|
|
|
input : file + '.in',
|
|
|
|
output : file,
|
|
|
|
configuration : pc_cdata,
|
|
|
|
install_dir : pkgconfigdir)
|
|
|
|
endforeach
|
2018-11-19 16:48:35 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
# CMake files
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
m4 = find_program('m4', required: true)
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
cmake_template_file = configure_file(
|
|
|
|
input : 'PulseAudioConfig.cmake.in',
|
|
|
|
output : 'PulseAudioConfig.cmake.tmp',
|
|
|
|
configuration: cdata,
|
|
|
|
)
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
custom_target('PulseAudioConfig.cmake',
|
|
|
|
input : cmake_template_file,
|
|
|
|
output : 'PulseAudioConfig.cmake',
|
|
|
|
capture : true,
|
|
|
|
command : [m4, '@INPUT@'],
|
|
|
|
build_by_default : true,
|
|
|
|
install : true,
|
|
|
|
install_dir : cmakedir,
|
|
|
|
)
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-05 06:52:38 +08:00
|
|
|
configure_file(
|
|
|
|
input : 'PulseAudioConfigVersion.cmake.in',
|
|
|
|
output : 'PulseAudioConfigVersion.cmake',
|
|
|
|
configuration: cdata,
|
|
|
|
install : true,
|
|
|
|
install_dir : cmakedir,
|
|
|
|
)
|
2018-11-26 18:29:28 +08:00
|
|
|
|
2021-11-04 21:35:19 +08:00
|
|
|
endif # client
|
2021-09-24 20:19:05 +08:00
|
|
|
|
2018-10-19 20:08:03 +08:00
|
|
|
############################################################
|
|
|
|
|
|
|
|
# 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),
|
2018-11-05 13:21:31 +08:00
|
|
|
'mandir: @0@'.format(mandir),
|
2018-10-19 20:08:03 +08:00
|
|
|
'datadir: @0@'.format(datadir),
|
|
|
|
'sysconfdir: @0@'.format(sysconfdir),
|
|
|
|
'localstatedir: @0@'.format(localstatedir),
|
2018-10-13 14:20:03 +08:00
|
|
|
'modlibexecdir: @0@'.format(modlibexecdir),
|
2020-08-02 23:43:03 +08:00
|
|
|
'alsadatadir: @0@'.format(alsadatadir),
|
2018-10-19 20:08:03 +08:00
|
|
|
'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')),
|
2018-11-05 12:42:24 +08:00
|
|
|
'Bash completions directory: @0@'.format(bashcompletiondir),
|
|
|
|
'Zsh completions directory: @0@'.format(zshcompletiondir),
|
2018-10-19 20:08:03 +08:00
|
|
|
'Compiler: @0@ @1@'.format(cc.get_id(), cc.version()),
|
|
|
|
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
|
|
|
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
|
|
|
# 'LIBS: @0@'.format(${LIBS}),
|
2021-04-18 18:13:52 +08:00
|
|
|
'',
|
|
|
|
'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable pulseaudio client: @0@'.format(get_option('client')),
|
2018-10-19 20:08:03 +08:00
|
|
|
'',
|
|
|
|
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
|
|
|
|
'Enable X11: @0@'.format(x11_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable D-Bus: @0@'.format(dbus_dep.found()),
|
2021-11-11 06:44:30 +08:00
|
|
|
'Enable GLib 2: @0@'.format(glib_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable systemd integration: @0@'.format(libsystemd_dep.found()),
|
2021-11-11 06:44:30 +08:00
|
|
|
'Enable FFTW: @0@'.format(fftw_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable IPv6: @0@'.format(get_option('ipv6')),
|
|
|
|
'Enable Gcov coverage: @0@'.format(get_option('gcov')),
|
|
|
|
'Enable Valgrind: @0@'.format(cdata.has('HAVE_VALGRIND_MEMCHECK_H')),
|
|
|
|
'Enable man pages: @0@'.format(get_option('man')),
|
|
|
|
'Enable unit tests: @0@'.format(get_option('tests')),
|
|
|
|
]
|
|
|
|
|
|
|
|
if get_option('client')
|
|
|
|
summary += [
|
|
|
|
'',
|
|
|
|
'--- Pulseaudio client features ---',
|
|
|
|
'',
|
|
|
|
'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
|
|
|
|
'Enable Async DNS: @0@'.format(asyncns_dep.found()),
|
2020-12-14 13:48:11 +08:00
|
|
|
'Enable OSS Wrapper: @0@'.format(cdata.has('HAVE_OSS_WRAPPER')),
|
2021-11-05 01:12:03 +08:00
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('daemon')
|
|
|
|
summary += [
|
|
|
|
'',
|
|
|
|
'--- Pulseaudio daemon features ---',
|
|
|
|
'',
|
|
|
|
'Safe X11 I/O errors: @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),
|
|
|
|
'Enable Avahi: @0@'.format(avahi_dep.found()),
|
|
|
|
'Enable OSS Output: @0@'.format(cdata.has('HAVE_OSS_OUTPUT')),
|
2018-10-19 20:08:03 +08:00
|
|
|
# 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}),
|
|
|
|
'Enable Alsa: @0@'.format(alsa_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable Jack: @0@'.format(jack_dep.found()),
|
|
|
|
'Enable LIRC: @0@'.format(lirc_dep.found()),
|
2018-10-19 20:08:03 +08:00
|
|
|
# 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}),
|
|
|
|
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
|
|
|
|
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}),
|
|
|
|
'Enable GSettings: @0@'.format(gio_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable BlueZ 5: @0@'.format(cdata.has('HAVE_BLUEZ_5')),
|
|
|
|
' Enable native headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_NATIVE_HEADSET')),
|
|
|
|
' Enable ofono headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_OFONO_HEADSET')),
|
|
|
|
' Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer),
|
|
|
|
'Enable GStreamer: @0@'.format(have_gstreamer),
|
2018-10-19 20:08:03 +08:00
|
|
|
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
|
2018-11-28 16:42:25 +08:00
|
|
|
'Enable ORC: @0@'.format(have_orcc),
|
2018-10-19 20:08:03 +08:00
|
|
|
'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()),
|
|
|
|
'',
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable udev: @0@'.format(udev_dep.found()),
|
|
|
|
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
|
|
|
|
'Enable systemd units: @0@'.format(systemd_dep.found()),
|
|
|
|
'Enable elogind: @0@'.format(libelogind_dep.found()),
|
2022-06-13 02:49:32 +08:00
|
|
|
'Enable ConsoleKit: @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
|
2021-11-05 01:12:03 +08:00
|
|
|
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
|
|
|
|
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
2018-10-19 20:08:03 +08:00
|
|
|
'Database: @0@'.format(get_option('database')),
|
|
|
|
'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
|
stream-restore: Forget pre-14.0 stream routing
Prior to commits f899d5f4669dcd536cc142cee99fe359dd8af3d6 and
f62a49b8cf109c011a9818d2358beb6834e6ec25, GNOME's sound settings
overwrote the routing for all entries in the stream-restore database
when selecting a device. Now we prevent that from happening (see the
aforementioned commits), but the old overwritten settings can still be in
the database after updating to PulseAudio 14.0, and they can cause
problems, as documented here:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832
We can't distinguish between devices set by GNOME's sound settings
and devices set by the user, so this patch discards all old device
settings, even though that is going to cause PulseAudio to forget routing
settings for many users. This is less bad than keeping the incorrect
routing settings in the database, because it's difficult for users to
figure out how to fix the situation when e.g. speaker test tones go to
the internal speakers no matter what device is selected as the default,
whereas old manual configuration can be restored restored by doing the
manual configuration again. Also, it's probably more common to have at
some point changed the default device in GNOME's sound settings than it
is to have any manual per-stream routing settings.
This is disabled by default, because this causes data loss, but
distributions that use GNOME are recommended to enable this with
the --enable-stream-restore-clear-old-devices (Autotools) or
-Dstream-restore-clear-old-devices=true (Meson) build option.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/832
2020-05-26 20:04:59 +08:00
|
|
|
'module-stream-restore:',
|
|
|
|
' Clear old devices: @0@'.format(get_option('stream-restore-clear-old-devices')),
|
2019-01-16 18:58:42 +08:00
|
|
|
'Running from build tree: @0@'.format(get_option('running-from-build-tree')),
|
2018-10-19 20:08:03 +08:00
|
|
|
'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}),
|
|
|
|
]
|
2021-11-05 01:12:03 +08:00
|
|
|
endif
|
2018-10-19 20:08:03 +08:00
|
|
|
|
|
|
|
message('\n '.join(summary))
|
|
|
|
|
|
|
|
# Sanity checks
|
2018-10-19 19:44:20 +08:00
|
|
|
|
2021-09-24 05:02:40 +08:00
|
|
|
if get_option('daemon') and not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
|
2018-10-19 19:44:20 +08:00
|
|
|
error('At least one echo canceller implementation must be available!')
|
|
|
|
endif
|
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if get_option('daemon') and samplerate_dep.found()
|
2018-10-19 20:08:03 +08:00
|
|
|
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
|
|
|
|
2021-11-05 01:12:03 +08:00
|
|
|
if host_machine.system() != 'windows' and 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 get_option('daemon') and host_machine.system() == 'linux' and 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 get_option('daemon') and host_machine.system() != 'windows' and 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))
|
2018-10-19 20:08:03 +08:00
|
|
|
endif
|