Compare commits

..

21 commits

Author SHA1 Message Date
Tanu Kaskinen
6a487c5244 Update NEWS 2021-01-16 19:31:30 +02:00
Tanu Kaskinen
a9bd710596 switch-on-port-available: Pass correct port_pointers to switch_to_port()
The pp variable contains information for the port that became
unavailable, but switch_to_port() needs the information for the port
that we're switching to.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1096
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/468>
2021-01-16 19:27:02 +02:00
Arun Raghavan
d6c8c9ce37 Update NEWS
Add notes for 14.1.
2021-01-12 21:44:48 -05:00
Arun Raghavan
0a8b93f4cd Update NEWS
Missed this in the 14.0 release.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/465>
2021-01-12 21:44:38 -05:00
Patrick Gaskin
d15a6e543f cli: Fix crash when using .include with an empty directory
This would previously fail the size > 0 assertion in pa_xmalloc.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/454>
2021-01-12 21:04:10 -05:00
Igor V. Kovalenko
e68aa03f29 database: clean up remaining references to CANONICAL_HOST
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-12 21:03:17 -05:00
Igor V. Kovalenko
c6b7837df3 database: pick old database file from any arch
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-12 21:03:13 -05:00
Igor V. Kovalenko
f8653fa5c1 database: drop arch from newly created database file name
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-12 21:03:09 -05:00
Igor V. Kovalenko
c8d851b4b7 database: use existing database matching same architecture prefix
State database binary file format may depend on system architecture,
for instance gdbm binary format depends on architecture word size,
making x86 and x64 gdbm files incompatible.

If this is the case, it is handled by adding system architecture name to
database file name using automatically configured CANONICAL_HOST string.
Meson build define CANONICAL_HOST to be system architecture name, while
autotools build extends this with vendor and and operating system components.

Switch autotools build to use host_cpu for CANONICAL_HOST to match Meson
configuration. For backwards compatibility always use existing database file
matching CANONICAL_HOST prefix if it exists.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-12 21:03:03 -05:00
Igor V. Kovalenko
f031cc28f4 database: extract common method to handle machine id and architecture
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-12 21:02:55 -05:00
Igor V. Kovalenko
374d937752 build-sys: meson: use target_machine.cpu_family() for CANONICAL_HOST
target_machine provides information about the machine on which the compiled
binary's output will run.

cpu_family() returns CPU family name (such as x86_64, not more specific amd64)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/426>
2021-01-12 21:02:49 -05:00
Igor V. Kovalenko
80474384f5 ladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false
While module-ladspa-sink is still being loaded and before pa_sink_put() is
called there may be an attempt to reconfigure master sink when avoid-resampling
is true. This breaks attempting to suspend ladspa-sink which is still in INIT
state.

Fix this by skipping pa_sink_suspend if PA_SINK_IS_LINKED is false.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/445>
2021-01-07 19:18:48 -05:00
Tanu Kaskinen
72b6d24adb alsa-mixer: Add support for the Headphone,1 element
This is seen at least on HP EliteDesk 800 DM and HP EliteDesk 800 SFF.

This is used by the analog-output-headphones-2 path, but all other paths
on the same sink need to handle the element too. The existing
configuration is inconsistent between files regarding whether headphone
outputs should be muted or not when not using them. I chose to be
consistent within files, which means that Headphone,1 handling is
inconsistent between files in the same way that the existing Headphone
and Headphone2 handling is. (My opinion is that unused paths should be
always muted, but I didn't want to do that policy change in this patch.)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2021-01-07 19:18:35 -05:00
Tanu Kaskinen
1804c9de1d alsa-mixer: Move HP EliteDesk 800 SFF/DM second headphone output to path analog-output-headphones-2
The two headphone outputs should be handled in separate paths so that
volume control can be implemented properly for both outputs.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2021-01-07 19:18:29 -05:00
Tanu Kaskinen
fdf91a035d alsa-mixer: Use unambiguous descriptions with dual headphone outputs
Previously both paths had description "Headphones", which I assume can
cause confusion with users who see two ports with identical names. I
don't have this kind of hardware myself nor have I heard complaints from
users, this is just something I noticed while reading the configuration
files.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2021-01-07 19:18:25 -05:00
Kai-Heng Feng
eb2c757d2d alsa-mixer: Support dual Front Headphone Jack
There are dual Front Headphone Jacks with different indices or with
different names, they can be found on HP EliteDesk 800 SFF and HP
EliteDesk 800 DM, respectively.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2021-01-07 19:18:20 -05:00
Kai-Heng Feng
8903d2ccc0 alsa-mixer: Handle the index for ALSA mixer jack identifiers
Some systems have two jacks with same name but different index, we need
to take index into consideration to use both jacks.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2021-01-07 19:18:15 -05:00
morrishoresh
0f89157261 bluetooth: correct possible segmentation fault
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/443>
2021-01-07 19:17:57 -05:00
Hui Wang
254cb4bd1f switch-on-port-available: Switch to headset or mic on unknown avail
On some Dell AIO machines, there is no internal mic, only a multi
function audio jack, so the only input devices are headphone-mic and
headset-mic, and they share the Jack with headphone.

When there is no headset plugged in that Jack, the headphone-mic
and headset-mic are off. And since there is no available port under
the analog input source, this source is unlinked (if there is
internal mic, the source will not be unlinked). so the only pa-source
left in the PA is analog-stereo-monitor.

After the headset is plugged, we need to let switch_to_port() handle
headset-mic and headphone-mic conditionally, this will guarantee the
source will be created if it is unlinked before plugging, and then the
input profile could be selected correctly.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/390>
2021-01-07 19:17:22 -05:00
Jaroslav Kysela
b3e6e2e0df alsa: mixer - add support up 8 mixer channels
We have at least one USB hardware which supports the 8
channels in one mixer element:

  https://github.com/alsa-project/alsa-ucm-conf/pull/25

POSITION_MASK_CHANNELS define was added for the future extensions.

The override_map variable was changed from bool to mask (unsigned int).
The channel map override settings is handled for channels up to eight now.

Also added missing override-map.3 .. override-map.8 to the configuration
parser array.

The driver channel position was added to the override mask arguments
(syntax is driver:pulseaudio like left:all-left). If ommited, the ALSA's
channel positions are guessed by index.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
2021-01-07 19:17:21 -05:00
Jaroslav Kysela
de9299c7b7 alsa: mixer - use safe dB range values when the override mask is unset
Use safe values for the min_dB and max_dB fields when the position mask
is unset to avoid breakage for the upper levels.

If the range is incorrect, the volume range shown in pavucontrol shows
strange values.

(Thanks to Wim Taymans for the idea.)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
2021-01-07 19:17:13 -05:00
372 changed files with 63409 additions and 114393 deletions

2
.gitignore vendored
View file

@ -26,7 +26,6 @@ cscope.in.out
cscope.po.out cscope.po.out
pulse-daemon.log pulse-daemon.log
depcomp depcomp
install/
install-sh install-sh
libltdl libltdl
libtool libtool
@ -37,4 +36,3 @@ stamp-*
.dirstamp .dirstamp
*.orig *.orig
*.rej *.rej
subprojects/*/

View file

@ -2,22 +2,13 @@
# container and push it to the project's container registry on fd.o GitLab. # container and push it to the project's container registry on fd.o GitLab.
# This step is only run when the tag for the container changes, else it is # This step is only run when the tag for the container changes, else it is
# effectively a no-op. All of this infrastructure is inherited from the # effectively a no-op. All of this infrastructure is inherited from the
# freedesktop/ci-templates repository which is the recommended way to set up CI # wayland/ci-templates repository which is the recommended way to set up CI
# infrastructure on fd.o GitLab. # infrastructure on fd.o GitLab.
# #
# Once the container stage is done, we move on to the 'build' stage where we # Once the container stage is done, we move on to the 'build' stage where we
# run meson build. Currently, tests are also run as part of the build stage as # run an autotools and meson build in parallel. Currently, tests are also run
# there doesn't seem to be significant value to splitting the stages at the # as part of the build stage as there doesn't seem to be significant value to
# moment. # splitting the stages at the moment.
# Create merge request pipelines for open merge requests, branch pipelines
# otherwise. This allows MRs for new users to run CI.
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
stages: stages:
- container - container
@ -28,21 +19,22 @@ variables:
# CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES. # CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES.
# The tag is an arbitrary string that identifies the exact container # The tag is an arbitrary string that identifies the exact container
# contents. # contents.
FDO_DISTRIBUTION_TAG: '2023-08-13-00' FDO_DISTRIBUTION_TAG: '2020-03-07-01'
FDO_DISTRIBUTION_VERSION: '20.04' FDO_DISTRIBUTION_VERSION: '18.04'
FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio' FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio'
UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
include: include:
# We pull templates from master to avoid the overhead of periodically # We pull templates from master to avoid the overhead of periodically
# scanning for changes upstream. This does means builds might occasionally # scanning for changes upstream. This does means builds might occasionally
# break due to upstream changing things, so if you see unexpected build # break due to upstream changing things, so if you see unexpected build
# failures, this might be one cause. # failures, this might be one cause.
- project: 'freedesktop/ci-templates' - project: 'wayland/ci-templates'
ref: 'master' ref: 'master'
file: '/templates/ubuntu.yml' file: '/templates/ubuntu.yml'
build-container: build-container:
extends: .fdo.container-build@ubuntu extends: .fdo.container-ifnot-exists@ubuntu
stage: container stage: container
variables: variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
@ -51,12 +43,13 @@ build-container:
# Otherwise the changes won't have effect since an old container image will # Otherwise the changes won't have effect since an old container image will
# be used. # be used.
FDO_DISTRIBUTION_PACKAGES: >- FDO_DISTRIBUTION_PACKAGES: >-
autoconf
automake
autopoint autopoint
bash-completion bash-completion
check check
curl curl
dbus-x11 dbus-x11
doxygen
g++ g++
gcc gcc
gettext gettext
@ -81,6 +74,7 @@ build-container:
libssl-dev libssl-dev
libsystemd-dev libsystemd-dev
libtdb-dev libtdb-dev
libtool
libudev-dev libudev-dev
libwebrtc-audio-processing-dev libwebrtc-audio-processing-dev
libwrap0-dev libwrap0-dev
@ -89,33 +83,47 @@ build-container:
libxml-parser-perl libxml-parser-perl
libxml2-utils libxml2-utils
libxtst-dev libxtst-dev
m4 make
ninja-build ninja-build
pkg-config pkg-config
python3-setuptools python3-setuptools
systemd systemd
wget wget
build-meson: build-autotools:
extends: .fdo.distribution-image@ubuntu
stage: build stage: build
image: $UBUNTU_IMAGE
script: script:
# Install meson (higher than our min version to support our wrap file) - export MAKEFLAGS="-j$(nproc)"
- wget -q https://github.com/mesonbuild/meson/releases/download/0.63.2/meson-0.63.2.tar.gz - NOCONFIGURE=1 ./bootstrap.sh
- tar -xf meson-0.63.2.tar.gz - mkdir build
- cd meson-0.63.2
- python3 setup.py install
- cd ..
# needed to generate a version
- git fetch https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git --tags
# Do the actual build
- meson build -Dwebrtc-aec=enabled
- cd build - cd build
- ninja - ../configure --localstatedir=/var
- make
- make check
- make check-daemon
- ulimit -c 0 # don't dump core files on tests that are supposed to assert - ulimit -c 0 # don't dump core files on tests that are supposed to assert
- ninja test - make distcheck
- ninja test-daemon artifacts:
- ninja dist paths:
- build/
build-meson:
stage: build
image: $UBUNTU_IMAGE
script:
# Install meson
- wget -q https://github.com/mesonbuild/meson/releases/download/0.50.0/meson-0.50.0.tar.gz
- tar -xf meson-0.50.0.tar.gz
- cd meson-0.50.0
- python3 setup.py install
- cd ..
# Do the actual build
- meson build
- cd build
- ninja
- ninja test
- ninja test-daemon
artifacts: artifacts:
paths: paths:
- build/ - build/

View file

@ -1,67 +0,0 @@
# Contribution Guidelines
## A note for contributors
Thank you for your contribution!
Please make sure you tick the box labelled `Allow commits from members who can
merge to the target branch`. This allows us to make minor edits ourselves, and
then automatically rebase and merge your changes.
PulseAudio is currently maintained by three volunteer developers in their free
time (probably amounting to less than one full time developer), which is not
really enough, given the project size and scope. For this reason bug reports
and patch submissions are sometimes handled very slowly.
For non-trivial patches, we meet biweekly on IRC to discuss and prioritise
outstanding MRs. If you haven't heard from us a few days after you create the
MR, please take a look at [the patch status
page](https://www.freedesktop.org/wiki/Software/PulseAudio/PatchStatus/).
If you don't see your MR in that list either, please don't hesitate to drop a
comment pinging us, and we'll try to at least respond and make sure your
request is tracked on that list.
## Coding Style
Please take a look at the [coding style
documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/)
on our wiki.
## Commit messagse
We follow the standard git commit message format of a summary on the first line
(<=50 characterss for preference, <=72 characters otherwise), followed by a new
line, followed by a detailed commit message. An additional line at the end may
link to an issue being fixed by this MR.
The first line is usually a short description of "what" your commit does, and
the rest of the message describes the "why", along with any additional
information that readers might need to understand the rationale for the change.
If in doubt, more verbose is better than less.
If you need to describe the "how" of the commit, that is usually best
documented along with the code itself.
Commit messages are prefixed with the subsystem being affected. Your best bet
to figure out what is appropriate is to look at previous commit messages. An
example:
```
sink: Reduce chat sink priority
Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).
I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
```

View file

@ -1,67 +0,0 @@
# Contribution Guidelines
## A note for contributors
Thank you for your contribution!
Please make sure you tick the box labelled `Allow commits from members who can
merge to the target branch`. This allows us to make minor edits ourselves, and
then automatically rebase and merge your changes.
PulseAudio is currently maintained by three volunteer developers in their free
time (probably amounting to less than one full time developer), which is not
really enough, given the project size and scope. For this reason bug reports
and patch submissions are sometimes handled very slowly.
For non-trivial patches, we meet biweekly on IRC to discuss and prioritise
outstanding MRs. If you haven't heard from us a few days after you create the
MR, please take a look at [the patch status
page](https://www.freedesktop.org/wiki/Software/PulseAudio/PatchStatus/).
If you don't see your MR in that list either, please don't hesitate to drop a
comment pinging us, and we'll try to at least respond and make sure your
request is tracked on that list.
## Coding Style
Please take a look at the [coding style
documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/)
on our wiki.
## Commit messages
We follow the standard git commit message format of a summary on the first line
(<=50 characters for preference, <=72 characters otherwise), followed by a new
line, followed by a detailed commit message. An additional line at the end may
link to an issue being fixed by this MR.
The first line is usually a short description of "what" your commit does, and
the rest of the message describes the "why", along with any additional
information that readers might need to understand the rationale for the change.
If in doubt, more verbose is better than less.
If you need to describe the "how" of the commit, that is usually best
documented along with the code itself.
Commit messages are prefixed with the subsystem being affected. Your best bet
to figure out what is appropriate is to look at previous commit messages. An
example:
```
sink: Reduce chat sink priority
Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).
I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
```

149
Makefile.am Normal file
View file

@ -0,0 +1,149 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
bootstrap.sh \
coverity/model.c \
.gitlab-ci.yml \
.gitlab/issue_templates/Bug.md \
git-version-gen \
LICENSE \
pulseaudio.supp \
GPL \
LGPL \
doxygen/Makefile.am \
doxygen/Makefile.in \
doxygen/doxygen.conf.in \
PROTOCOL \
README \
CODE_OF_CONDUCT.md \
scripts/benchmark_memory_usage.sh \
scripts/plot_memory_usage.gp \
scripts/benchmarks/README \
todo \
.gitignore \
doxygen/.gitignore \
m4/.gitignore \
man/.gitignore \
po/.gitignore \
scripts/benchmarks/.gitignore \
src/.gitignore \
src/daemon/.gitignore \
src/pulse/.gitignore \
meson.build \
meson_options.txt \
doxygen/meson.build \
man/meson.build \
po/meson.build \
shell-completion/bash/meson.build \
shell-completion/zsh/meson.build \
src/daemon/meson.build \
src/meson.build \
src/modules/alsa/meson.build \
src/modules/alsa/mixer/meson.build \
src/modules/bluetooth/meson.build \
src/modules/echo-cancel/meson.build \
src/modules/gsettings/meson.build \
src/modules/gsettings/meson_post_install.py \
src/modules/meson.build \
src/modules/oss/meson.build \
src/modules/raop/meson.build \
src/modules/rtp/meson.build \
src/pulsecore/meson.build \
src/pulse/meson.build \
src/tests/meson.build \
src/tests/test-daemon.meson.sh \
src/utils/meson.build \
vala/meson.build
SUBDIRS = src doxygen man po
MAINTAINERCLEANFILES =
noinst_DATA =
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = \
vala/libpulse.deps vala/libpulse.vapi \
vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi \
vala/libpulse-simple.deps vala/libpulse-simple.vapi
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc
if HAVE_GLIB20
pkgconfig_DATA += \
libpulse-mainloop-glib.pc
endif
cmakedir = $(libdir)/cmake/PulseAudio
cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake
bashcompletiondir=@bashcompletiondir@
dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
install-bashcompletion-aliases:
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pactl
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacmd
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pasuspender
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio padsp
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacat
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio paplay
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parec
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parecord
install-data-hook: install-bashcompletion-aliases
zshcompletiondir=@zshcompletiondir@
dist_zshcompletion_DATA = shell-completion/zsh/_pulseaudio
homepage: all dist doxygen
test -d $$HOME/homepage/private
mkdir -p $$HOME/homepage/private/projects/pulseaudio $$HOME/homepage/private/projects/pulseaudio/doxygen
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/homepage/private/projects/pulseaudio
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/git.fedora/pulseaudio
cp -a doxygen/html/* $$HOME/homepage/private/projects/pulseaudio/doxygen
doxygen:
$(MAKE) -C doxygen doxygen
eolspace:
find \( -name '*.c' -o -name '*.h' -o -name 'Makefile.am' \) -exec perl -i -pe 's/\s+\n$$/\1\n/;' \{\} \;
untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
cp $(distdir).tar.gz $$HOME/git.fedora/pulseaudio/$(distdir).tar.gz
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
echo $(VERSION) > $(distdir)/.version
check-daemon:
$(MAKE) -C src check-daemon
check-daemon-long:
$(MAKE) -C src check-daemon-long
.PHONY: homepage distcleancheck doxygen
# see git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
DISTCHECK_CONFIGURE_FLAGS = --with-udev-rules-dir="$$dc_install_base/lib/udev/rules.d" --with-systemduserunitdir="$$dc_install_base/lib/systemd/user" --with-bash-completion-dir="$$dc_install_base/share/bash-completion/completions"

300
NEWS
View file

@ -1,303 +1,3 @@
PulseAudio 17.0
Changes at a glance:
* Notes for end users
* Updates to ALSA UCM-based setups
* Battery level indication to Bluetooth devices
* Support for the Bluetooth FastStream codec
* webrtc-audio-processing dependency updated
* Trigger role groups added to module-role-cork
* XDG base directory spec for profile-set loading
* Notes for application developers
* PA_RATE_MAX increased
* Notes for packagers
* webrtc-audio-processing dependency updated
Contributors
Alistair Leslie-Hughes
Alper Nebi Yasak
Arun Raghavan
Asier Sarasua Garmendia
Ataberk Özen
Balázs Meskó
Biswapriyo Nath
Dylan Van Assche
Eero Nurkkala
Ettore Atalan
Fabrice Fontaine
Fran Diéguez
Georg Chini
Gioele Barabucci
Gogo Gogsi
Hector Martin
Hugo Carvalho
Hui Wang
Igor V. Kovalenko
Jaechul Lee
Jan Kuparinen
Jan Palus
Jaroslav Kysela
Jiri Grönroos
Joachim Philipp
Jordi Mas
Marijn Suijten
Mart Raudsepp
Nicolas Cavallari
Peter Meerwald-Stadler
Philip Goto
Rosen Penev
Rudi Heitbaum
Sabri Ünal
Sean Greenslade
Seong-ho Cho
Shunsuke Shimizu
SimonP
Takashi Sakamoto
Tanu Kaskinen
Temuri Doghonadze
Toni Estevez
Weijia Wang
Wim Taymans
Yureka
acheronfail
flyingOwl
grimst
hashitaku
mooo
peijiankang
redfast00
wael
김인수
PulseAudio 16.1
A bug fix release.
* Fix parsing of percentage volumes with decimal points in pactl
* Fix crash with the "pacmd play-file" command when reads from the disk aren't frame-aligned
* Fix module-rtp-recv sometimes thinking it's receiving an Opus stream when it's not
* Fix frequent crashing in module-combine-sink, regression in 16.0
* Fix crashing on 32-bit architectures when using the GStreamer codecs for LDAC and AptX
Contributors
Georg Chini
Igor V. Kovalenko
Jaechul Lee
Jan Palus
Sean Greenslade
PulseAudio 16.0
Changes at a glance:
* Notes for end users
* Opus support in RTP modules
* Improved hardware support
* EPOS/Sennheiser GSP 670 USB/wireless headset
* SteelSeries GameDAC
* Behringer UMC22 generalized to Texas Instruments PCM2902 to support more products
* NI Komplete Audio 6 MK2 profiles
* Tunnel latency is now configurable
* Bluetooth device battery level reporting added
* Tunnel and combine-sunk latency fixes
* patcl can show information in JSON format
* Channel remixing can be disabled for module-combine-sink
* A lot of fixes to ALSA, bluetooth, and other components.
* Notes for application developers
* Stream latency reports now include resampler delay
* Module installation location changed, remember to upgrade paprefs to the latest version!
* Notes for packagers
* Opus support in the RTP modules requires enabling GStreamer
* Bluetooth battery level reporting via BlueZ requires enabling experimentals features in BlueZ
* New time smoother implementation
* Change Meson option 'daemon-only' to 'client'
* glib and fftw are now common dependencies, not only for the client.
* Enable GStreamer-based RTP by default when available
Detailed change log:
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/16.0/
Contributors
Alexey Rubtsov
Anders Jonsson
Andika Triwidada
Arun Raghavan
Biswapriyo Nath
BtbN
Chengyi Zhao
Chupligin Sergey
Craig Howard
Daniel Dantur
Daniel Hernandez
Diederik de Haas
Dylan Van Assche
Emilio Herrera
Ettore Atalan
Fran Diéguez
Georg Chini
Gogo Gogsi
Göran Uddeborg
Hela Basa
Hui Wang
Igor V. Kovalenko
Jan Kuparinen
Jaroslav Kysela
Josef Haider
João Paulo Rechi Vita
Juho Hämäläinen
Karl Ove Hufthammer
Laurent Bigonville
Luna Jernberg
Lv Genggeng
Marijn Suijten
Mart Raudsepp
Mathy Vanvoorden
Olivier Gayot
Ovari
Oğuz Ersen
Piotr Drąg
Rafael Fontenelle
Rico Tzschichholz
Sanchayan Maity
Sebastian Reichel
Sergey A
Sibo Dong
Sungjoon Moon
Takashi Sakamoto
Takuro Onoue
Tanu Kaskinen
Temuri Doghonadze
Will Thompson
Yuri Chornoivan
acheronfail
baek inchan
guest271314
liaohanqin
simmon
simple
tensorknower69
김인수
PulseAudio 15.0
Changes at a glance:
* Notes for end users
* Support for LDAC and AptX bluetooth codecs, plus "SBC XQ" (SBC with higher-quality parameters)
* Support for HFP bluetooth profiles
* Support for Bluetooth A2DP AVRCP Absolute Volume
* ALSA path configuration files can now be placed in user home directory
* module-virtual-surround-sink rewritten
* More options for module-jackdbus-detect
* Improved hardware support
* SteelSeries Arctis 9
* HP Thunderbolt Dock 120W G2
* Behringer U-Phoria UMC22
* OnePlus Type-C Bullets
* Sennheiser GSX 1000/1200 PRO
* New udev variable: PULSE_MODARGS
* max_latency_msec argument added to module-null-source
* module-filter-apply can take filter parameters from device properties
* module-match can now be loaded multiple times
* Improvements to FreeBSD support
* Windows support added to Meson
* Additional commands for pactl
* Card profiles can be set to sticky
* Notes for application developers
* New API for sending messages from clients to PulseAudio objects
* New mechanism for applications to disable shared memory on their connection to PulseAudio
* Notes for packagers
* Autotools build system have been dropped
* The startup script can now read additional configuration from the /etc/pulse/default.pa.d/ directory
* Option to build client library and utilities only
* Avoid loading X11 modules on Wayland (GNOME-only for now)
* OSS support is now configurable in Meson
* Valgrind support is now configurable in Meson
Detailed change log:
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/
Contributors
Alexey Rubtsov
Alper Nebi Yasak
Anders Jonsson
Arun Raghavan
Ben Buchwald
Benjamin Valentin
Carlos Garnacho
Carmen Bianca Bakker
Christopher Arndt
Christopher Snowhill
David
Dusan Kazik
Edward Lee
Emilio Herrera
Evan Miller
Fabian Affolter
Faidon Liambotis
Felipe Sateler
Frédéric Danis
Georg Chini
Greg V
Göran Uddeborg
Hela Basa
Henri Chain
Hui Wang
Igor V. Kovalenko
Ilja van Sprundel
Jaechul Lee
James Bottomley
Jan Alexander Steffens (heftig)
Jan Kuparinen
Jaroslav Kysela
Jason Nader
Johannes Wolf
Julien Humbert
Kai-Heng Feng
Karl Ove Hufthammer
Klaas van Schelven
Laurent Bigonville
Laurențiu Nicola
Lyndon Brown
Marijn Suijten
Martin Wilck
Mattias Jernberg
Milo Casagrande
Nazar Mokrynskyi
Oğuz Ersen
Patrick Gaskin
Patrick McLean
Paul Seyfert
Pierre Ossman
Piotr Drąg
Pjotr Vertaalt
Ricky Tigg
Robin Lahtinen
Samuel Thibault
Sanchayan Maity
Scott Worley
Sebastian Krzyszkowiak
SimonP
Takashi Sakamoto
Tanu Kaskinen
Tobias Weise
Toni Estevez
Yaron Shahrabani
Yuri Chornoivan
morrishoresh
pseyfert
scootergrisen
simmon
PulseAudio 14.2 PulseAudio 14.2
A bug fix release. A bug fix release.

View file

@ -435,23 +435,6 @@ sink, source and card ports):
string availability_group string availability_group
uint32 type uint32 type
## v35, implemented by >= 15.0
Added new command for communication with objects.
PA_COMMAND_SEND_OBJECT_MESSAGE:
sends a message to an object identified by an object path
parameters:
string object_path - unique path identifying the object
string message - message name
string message_parameters - additional parameters if required (may be
NULL, which should be treated the same as an
empty string)
The command returns a string, which may be empty or NULL (NULL should be
treated the same as an empty string).
#### If you just changed the protocol, read this #### If you just changed the protocol, read this
## module-tunnel depends on the sink/source/sink-input/source-input protocol ## module-tunnel depends on the sink/source/sink-input/source-input protocol
## internals, so if you changed these, you might have broken module-tunnel. ## internals, so if you changed these, you might have broken module-tunnel.

13
README
View file

@ -19,7 +19,7 @@ TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
IRC: IRC:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/#ircandmatrix #pulseaudio on irc.freenode.org
FRESHMEAT: FRESHMEAT:
http://freshmeat.net/projects/pulseaudio/ http://freshmeat.net/projects/pulseaudio/
@ -31,10 +31,13 @@ AUTHORS:
Several Several
HACKING: HACKING:
In order to run pulseaudio from the build dir: In order to run pulseaudio from the build dir __OPTIMIZE__ should be
meson build disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()),
meson compile -C build this can be done by passing "CFLAGS=-O0" to the configure script:
build/src/daemon/pulseaudio -n -F build/src/daemon/default.pa -p $(pwd)/build/src/modules/ ./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure
make
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/
SPELLING: SPELLING:
PulseAudio PulseAudio

22
autogen.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
# Only there to make jhbuild happy
NOCONFIGURE=1 ./bootstrap.sh
exec ./configure "$@"

48
bootstrap.sh Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env bash
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
chmod +x .git/hooks/pre-commit && \
echo "Activated pre-commit hook."
fi
if [ -f .tarball-version ]; then
echo "Marking tarball version as modified."
echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
fi
# We check for this here, because if pkg-config is not found in the
# system, it's likely that the pkg.m4 macro file is also not present,
# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
# configure file faulty.
if ! pkg-config --version &>/dev/null; then
echo "pkg-config is required to bootstrap this program"
exit 1
fi
# Other necessary programs
if ! autopoint --version &>/dev/null ; then
echo "autopoint is required to bootstrap this program"
exit 1
fi
autoreconf --force --install --verbose
if test "x$NOCONFIGURE" = "x"; then
CFLAGS="$CFLAGS -g -O0" ./configure --enable-force-preopen "$@" && \
make clean
fi

1775
configure.ac Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,49 +0,0 @@
Message API reference
The message API allows any object within pulseaudio to register a message
handler. A message handler is a function that can be called by clients using
PA_COMMAND_SEND_OBJECT_MESSAGE. A message consists at least of an object path
and a message command, both specified as strings. Additional parameters can
be specified using a single string in JSON format, but are not mandatory.
The message handler returns an error number as defined in def.h and also returns
a string in the "response" variable. Non-empty response will be in JSON format.
The reference further down lists available messages, their parameters
and return values.
Reference:
Object path: /core
Message: list-handlers
Parameters: None
Return value: JSON array of handler description objects
[{"name":"Handler name","description":"Description"} ...]
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: list-codecs
Parameters: None
Return value: JSON array of codec description objects
[{"name":"codec1","description":"Codec 1"} ...]
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: get-codec
Parameters: None
Return value: "codec name"
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: switch-codec
Parameters: "codec name"
Return value: none
Description: Set if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: set-profile-sticky
Parameters: JSON "true" or "false"
Return value: none
Description: Get if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: get-profile-sticky
Parameters: None
Return value: JSON "true" or "false"

22
doxygen/Makefile.am Normal file
View file

@ -0,0 +1,22 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
doxygen: doxygen.conf
doxygen $<
clean-local:
-rm -rf html
.PHONY: all doxygen

View file

@ -758,8 +758,8 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
# the \include command). # the \include command).
EXAMPLE_PATH = @top_srcdir@/src/utils \ EXAMPLE_PATH = @srcdir@/../src/utils \
@top_srcdir@/src/tests @srcdir@/../src/tests
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp

View file

@ -1,8 +1,3 @@
doxygen = find_program('doxygen', required: get_option('doxygen'))
if not doxygen.found()
subdir_done()
endif
cdata.set('DOXYGEN_OUTPUT_DIRECTORY', meson.current_build_dir()) cdata.set('DOXYGEN_OUTPUT_DIRECTORY', meson.current_build_dir())
doxygen_conf = configure_file( doxygen_conf = configure_file(
@ -12,4 +7,4 @@ doxygen_conf = configure_file(
) )
run_target('doxygen', run_target('doxygen',
command : [doxygen, doxygen_conf]) command : ['doxygen', doxygen_conf])

37
m4/.gitignore vendored Normal file
View file

@ -0,0 +1,37 @@
codeset.m4
extern-inline.m4
fcntl-o.m4
gettext.m4
glibc2.m4
glibc21.m4
iconv.m4
intdiv0.m4
intl.m4
intldir.m4
intlmacosx.m4
intmax.m4
inttypes-pri.m4
inttypes_h.m4
lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libtool.m4
lock.m4
longlong.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
nls.m4
po.m4
printf-posix.m4
progtest.m4
size_max.m4
stdint_h.m4
threadlib.m4
uintmax_t.m4
visibility.m4
wchar_t.m4
wint_t.m4
xsize.m4

19
m4/acx_libwrap.m4 Normal file
View file

@ -0,0 +1,19 @@
AC_DEFUN([ACX_LIBWRAP], [
LIBWRAP_LIBS=
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
AC_MSG_CHECKING([for tcpwrap library and headers])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
[struct request_info *req;
return hosts_access (req);])],
[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
LIBWRAP_LIBS="-lwrap"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
LIBS="$saved_LIBS"
])

View file

@ -0,0 +1,74 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 4
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

92
m4/ax_check_define.m4 Normal file
View file

@ -0,0 +1,92 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_define.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
#
# DESCRIPTION
#
# Complements AC_CHECK_FUNC but it does not check for a function but for a
# define to exist. Consider a usage like:
#
# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 8
AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
AC_DEFUN([AC_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
AC_CACHE_CHECK([for $1 defined], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
#ifdef $1
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
AC_DEFUN([AX_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
AC_CACHE_CHECK([for $2 defined in $1], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
#ifdef $2
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AC_DEFUN([AX_CHECK_FUNC],
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
AC_CACHE_CHECK([for $2], ac_var,
dnl AC_LANG_FUNC_LINK_TRY
[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
#undef $2
char $2 ();],[
char (*f) () = $2;
return f != $2; ])],
[AS_VAR_SET(ac_var, yes)],
[AS_VAR_SET(ac_var, no)])])
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])# AC_CHECK_FUNC

147
m4/ax_check_flag.m4 Normal file
View file

@ -0,0 +1,147 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's
# preprocessor/compiler/linker, or whether they give an error. (Warnings,
# however, are ignored.)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check us thus made
# with the following flags: "CFLAGS EXTRA-FLAGS FLAG". EXTRA-FLAGS can
# for example be used to force the compiler to issue an error when a bad
# flag is given.
#
# AX_APPEND_FLAG appends the FLAG to the FLAG-VARIABLE shell variable or
# the current language's flags if not specified. FLAG is not added to
# FLAG-VARIABLE if it is already in the shell variable.
#
# AX_APPEND_COMPILE_FLAGS checks for each FLAG1, FLAG2, etc. using
# AX_CHECK_COMPILE_FLAG and if the check is successful the flag is added
# to the appropriate FLAGS variable with AX_APPEND_FLAG. The
# FLAGS-VARIABLE and EXTRA-FLAGS arguments are the same as in the other
# macros. AX_APPEND_LINK_FLAGS does the same for linker flags.
#
# NOTE: Based on AX_CHECK_COMPILER_FLAGS and AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2009 Matteo Frigo
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 2
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
ax_check_save_flags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $4 $1"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
CPPFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_PREPROC_FLAGS
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS
AC_DEFUN([AX_APPEND_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_REQUIRE([AC_PROG_GREP])
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[]FLAGS)])dnl
AS_VAR_SET_IF([FLAGS],
[AS_IF([AS_ECHO(" $[]FLAGS ") | $GREP " $1 " 2>&1 >/dev/null],
[AC_RUN_LOG([: FLAGS already contains $1])],
[AC_RUN_LOG([: FLAGS="$FLAGS $1"])
AS_VAR_APPEND([FLAGS], [" $1"])])],
[AS_VAR_SET([FLAGS],[$1])])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
done
])dnl AX_APPEND_COMPILE_FLAGS
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
done
])dnl AX_APPEND_LINK_FLAGS

558
m4/ax_cxx_compile_stdcxx.m4 Normal file
View file

@ -0,0 +1,558 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXXFLAGS to
# enable support. VERSION may be '11' (for the C++11 standard) or '14'
# (for the C++14 standard).
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for switch in -std=gnu++$1 -std=gnu++0x; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
else
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
fi
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual void f() {}
};
struct Derived : public Base
{
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_seperators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])

View file

@ -0,0 +1,39 @@
# ============================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# ============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXXFLAGS to enable support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 14
include([ax_cxx_compile_stdcxx.m4])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])

49
m4/ax_define_dir.m4 Normal file
View file

@ -0,0 +1,49 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
#
# DESCRIPTION
#
# This macro sets VARNAME to the expansion of the DIR variable, taking
# care of fixing up ${prefix} and such.
#
# VARNAME is then offered as both an output variable and a C preprocessor
# symbol.
#
# Example:
#
# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
#
# LICENSE
#
# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
# Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Alexandre Oliva
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
AC_DEFUN([AX_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ax_define_dir="\"[$]$2\""
eval ax_define_dir="\"$ax_define_dir\""
AC_SUBST($1, "$ax_define_dir")
AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])

317
m4/ax_pthread.m4 Normal file
View file

@ -0,0 +1,317 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threads programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 20
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
AC_MSG_RESULT($ax_pthread_ok)
if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case ${host_os} in
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;;
esac
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
if test x"$ax_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
static void routine(void *a) { a = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($ax_pthread_ok)
if test "x$ax_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $attr; return attr /* ; */])],
[attr_name=$attr; break],
[])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case ${host_os} in
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
osf* | hpux*) flag="-D_REENTRANT";;
solaris*)
if test "$GCC" = "yes"; then
flag="-D_REENTRANT"
else
flag="-mt -D_REENTRANT"
fi
;;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
ax_cv_PTHREAD_PRIO_INHERIT, [
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != xyes; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD

76
m4/ax_tls.m4 Normal file
View file

@ -0,0 +1,76 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_tls.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_TLS([action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
# Provides a test for the compiler support of thread local storage (TLS)
# extensions. Defines TLS if it is found. Currently knows about GCC/ICC
# and MSVC. I think SunPro uses the same as GCC, and Borland apparently
# supports either.
#
# LICENSE
#
# Copyright (c) 2008 Alan Woodland <ajw05@aber.ac.uk>
# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 10
AC_DEFUN([AX_TLS], [
AC_MSG_CHECKING(for thread local storage (TLS) class)
AC_CACHE_VAL(ac_cv_tls, [
ax_tls_keywords="__thread __declspec(thread) none"
for ax_tls_keyword in $ax_tls_keywords; do
AS_CASE([$ax_tls_keyword],
[none], [ac_cv_tls=none ; break],
[AC_TRY_COMPILE(
[#include <stdlib.h>
static void
foo(void) {
static ] $ax_tls_keyword [ int bar;
exit(1);
}],
[],
[ac_cv_tls=$ax_tls_keyword ; break],
ac_cv_tls=none
)])
done
])
AC_MSG_RESULT($ac_cv_tls)
AS_IF([test "$ac_cv_tls" != "none"],
AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
m4_ifnblank([$1], [$1]),
m4_ifnblank([$2], [$2])
)
])

69
m4/orc.m4 Normal file
View file

@ -0,0 +1,69 @@
dnl pkg-config-based checks for Orc
dnl specific:
dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
ORC_REQ=ifelse([$1], , "0.4.6", [$1])
AC_ARG_ENABLE(orc,
AC_HELP_STRING([--enable-orc],[use Orc if installed]),
[case "${enableval}" in
auto) enable_orc=auto ;;
yes) enable_orc=yes ;;
no) enable_orc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
esac
],
[enable_orc=auto]) dnl Default value
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
HAVE_ORC=yes
if test "x$ORCC" = "x" ; then
AC_MSG_CHECKING(for usable orcc)
ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
dnl check whether the orcc found by pkg-config can be run from the build environment
dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH
AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`])
AC_MSG_RESULT($ORCC)
fi
AC_SUBST(ORCC)
ORCC_FLAGS="--compat $ORC_REQ"
AC_SUBST(ORCC_FLAGS)
AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes])
], [
if test "x$enable_orc" = "xyes" ; then
AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
fi
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
])
else
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
fi
AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
]))
AC_DEFUN([ORC_OUTPUT],
[
if test "$HAVE_ORC" = yes ; then
printf "configure: *** Orc acceleration enabled.\n"
else
if test "x$enable_orc" = "xno" ; then
printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n"
printf " will be used.\n"
else
printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n"
printf " not found. Slower code paths will be used.\n"
fi
fi
printf "\n"
])

102
man/Makefile.am Normal file
View file

@ -0,0 +1,102 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
DISTCLEANFILES = \
$(noinst_DATA)
noinst_DATA = \
pulseaudio.1.xml \
pax11publish.1.xml \
pacat.1.xml \
pacmd.1.xml \
pactl.1.xml \
pasuspender.1.xml \
padsp.1.xml \
pulse-daemon.conf.5.xml \
pulse-client.conf.5.xml \
default.pa.5.xml \
pulse-cli-syntax.5.xml \
start-pulseaudio-x11.1.xml
if HAVE_ESOUND
noinst_DATA += esdcompat.1.xml
endif
xmllint: $(noinst_DATA)
for f in $(noinst_DATA) ; do \
xmllint --noout --valid "$$f" || exit 1 ; \
done
if BUILD_MANPAGES
dist_man_MANS = \
pulseaudio.1 \
pax11publish.1 \
pacat.1 \
pacmd.1 \
pactl.1 \
pasuspender.1 \
padsp.1 \
pulse-daemon.conf.5 \
pulse-client.conf.5 \
default.pa.5 \
pulse-cli-syntax.5 \
start-pulseaudio-x11.1
if HAVE_ESOUND
dist_man_MANS += esdcompat.1
endif
CLEANFILES = \
$(dist_man_MANS)
%: %.xml Makefile
$(AM_V_GEN) perl $(srcdir)/xmltoman $< > $@ || rm -f $@
if OS_IS_WIN32
SYMLINK_PROGRAM=cd $(DESTDIR)$(man1dir) && cp
else
SYMLINK_PROGRAM=ln -sf
endif
install-data-hook:
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/paplay.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parec.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parecord.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/pamon.1
uninstall-hook:
rm -f $(DESTDIR)$(man1dir)/paplay.1
rm -f $(DESTDIR)$(man1dir)/parec.1
rm -f $(DESTDIR)$(man1dir)/parecord.1
rm -f $(DESTDIR)$(man1dir)/pamon.1
endif
EXTRA_DIST = \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
pacat.1.xml.in \
pacmd.1.xml.in \
pactl.1.xml.in \
pasuspender.1.xml.in \
padsp.1.xml.in \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
pulse-cli-syntax.5.xml.in \
start-pulseaudio-x11.1.xml.in \
xmltoman \
xmltoman.css \
xmltoman.xsl \
xmltoman.dtd

View file

@ -1,38 +1,19 @@
# man page name, section, [aliases] # man page name, section, [aliases]
manpages = [] manpages = [
if get_option('daemon')
manpages += [
['default.pa', '5'], ['default.pa', '5'],
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pacmd', '1'], ['pacmd', '1'],
['pactl', '1'],
['padsp', '1'],
['pasuspender', '1'], ['pasuspender', '1'],
['pax11publish', '1'],
['pulse-cli-syntax', '5'], ['pulse-cli-syntax', '5'],
['pulse-client.conf', '5'],
['pulse-daemon.conf', '5'], ['pulse-daemon.conf', '5'],
['pulseaudio', '1'], ['pulseaudio', '1'],
['start-pulseaudio-x11', '1'], ['start-pulseaudio-x11', '1'],
] ]
endif
if get_option('client')
manpages += [
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pactl', '1'],
['pulse-client.conf', '5'],
]
if cdata.has('HAVE_OSS_WRAPPER')
manpages += [
['padsp', '1'],
]
endif
if x11_dep.found()
manpages += [
['pax11publish', '1'],
]
endif
endif
# FIXME: Add esdcompat if HAVE_ESOUND # FIXME: Add esdcompat if HAVE_ESOUND
#manpages += ['esdcompat', '1'], #manpages += ['esdcompat', '1'],

View file

@ -79,7 +79,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option> <option>
<p><opt>-d | --device</opt><arg>=SINKORSOURCE</arg></p> <p><opt>-d | --device</opt><arg>=SINKORSOURCE</arg></p>
<optdesc><p>Specify the symbolic name of the sink/source to play/record this stream on/from. The special names @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@ can be used to specify the default sink, source and monitor respectively.</p></optdesc> <optdesc><p>Specify the symbolic name of the sink/source to play/record this stream on/from.</p></optdesc>
</option> </option>
<option> <option>
@ -202,7 +202,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option> <option>
<p><opt>--process-time-msec</opt><arg>=MSEC</arg></p> <p><opt>--process-time-msec</opt><arg>=MSEC</arg></p>
<optdesc><p>Explicitly configure the process time, with a time <optdesc><p>Explicitly configure the process time, with a time
specified in milliseconds. If left out the server will pick the specified in miliseconds. If left out the server will pick the
process time. Use either this option or <opt>--process-time</opt>, process time. Use either this option or <opt>--process-time</opt>,
but not both.</p></optdesc> but not both.</p></optdesc>
</option> </option>

View file

@ -53,12 +53,6 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Choose the server to connect to.</p></optdesc> <optdesc><p>Choose the server to connect to.</p></optdesc>
</option> </option>
<option>
<p><opt>-f | --format</opt><arg>=FORMAT</arg></p>
<optdesc><p>Choose output format, available options are "text" or "json".</p></optdesc>
</option>
<option> <option>
<p><opt>-n | --client-name</opt><arg>=NAME</arg></p> <p><opt>-n | --client-name</opt><arg>=NAME</arg></p>
@ -86,8 +80,8 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option> <option>
<p><opt>list</opt> [<arg>short</arg>] [<arg>TYPE</arg>]</p> <p><opt>list</opt> [<arg>short</arg>] [<arg>TYPE</arg>]</p>
<optdesc><p>Dump all currently loaded modules, available sinks, sources, streams, etc. <arg>TYPE</arg> must be one of: <optdesc><p>Dump all currently loaded modules, available sinks, sources, streams, etc. <arg>TYPE</arg> must be one of:
modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards, message-handlers. If not specified, all info is listed modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards. If not specified, all info is listed. If
with the exception of the message-handlers. If short is given, output is in a tabular format, for easy parsing by scripts.</p></optdesc> short is given, output is in a tabular format, for easy parsing by scripts.</p></optdesc>
</option> </option>
<option> <option>
@ -141,7 +135,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option> <option>
<p><opt>suspend-sink</opt> <arg>SINK</arg> <arg>true|false</arg></p> <p><opt>suspend-sink</opt> <arg>SINK</arg> <arg>true|false</arg></p>
<optdesc><p>Suspend or resume the specified sink (which may be <optdesc><p>Suspend or resume the specified sink (which may be
specified either by its symbolic name or numerical index), depending whether true specified either by its name or index), depending whether true
(suspend) or false (resume) is passed as last argument. Suspending (suspend) or false (resume) is passed as last argument. Suspending
a sink will pause all playback. Depending on the module implementing a sink will pause all playback. Depending on the module implementing
the sink this might have the effect that the underlying device is the sink this might have the effect that the underlying device is
@ -153,7 +147,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option> <option>
<p><opt>suspend-source</opt> <arg>SOURCE</arg> <arg>true|false</arg></p> <p><opt>suspend-source</opt> <arg>SOURCE</arg> <arg>true|false</arg></p>
<optdesc><p>Suspend or resume the specified source (which may be <optdesc><p>Suspend or resume the specified source (which may be
specified either by its symbolic name or numerical index), depending whether true specified either by its name or index), depending whether true
(suspend) or false (resume) is passed as last argument. Suspending (suspend) or false (resume) is passed as last argument. Suspending
a source will pause all capturing. Depending on the module implementing a source will pause all capturing. Depending on the module implementing
the source this might have the effect that the underlying device is the source this might have the effect that the underlying device is
@ -167,16 +161,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Set the specified card (identified by its symbolic name or numerical index) to the specified profile (identified by its symbolic name).</p></optdesc> <optdesc><p>Set the specified card (identified by its symbolic name or numerical index) to the specified profile (identified by its symbolic name).</p></optdesc>
</option> </option>
<option>
<p><opt>get-default-sink</opt></p>
<optdesc><p>Returns the symbolic name of the default sink.</p></optdesc>
</option>
<option> <option>
<p><opt>set-default-sink</opt> <arg>SINK</arg></p> <p><opt>set-default-sink</opt> <arg>SINK</arg></p>
<optdesc><p>Make the specified sink (identified by its symbolic name or numerical index) the default sink. <optdesc><p>Make the specified sink (identified by its symbolic name) the default sink.</p></optdesc>
Use the special name \@NONE@ to unset the user defined default sink. This will make pulseaudio return to the default
sink selection based on sink priority.</p></optdesc>
</option> </option>
<option> <option>
@ -184,16 +171,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Set the specified sink (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name).</p></optdesc> <optdesc><p>Set the specified sink (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name).</p></optdesc>
</option> </option>
<option>
<p><opt>get-default-source</opt></p>
<optdesc><p>Returns the symbolic name of the default source.</p></optdesc>
</option>
<option> <option>
<p><opt>set-default-source</opt> <arg>SOURCE</arg></p> <p><opt>set-default-source</opt> <arg>SOURCE</arg></p>
<optdesc><p>Make the specified source (identified by its symbolic name or numerical index) the default source. <optdesc><p>Make the specified source (identified by its symbolic name) the default source.</p></optdesc>
Use the special name \@NONE@ to unset the user defined default source. This will make pulseaudio return to the default
source selection based on source priority.</p></optdesc>
</option> </option>
<option> <option>
@ -207,11 +187,6 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<arg>OFFSET</arg> is a number which represents the latency offset in microseconds</p></optdesc> <arg>OFFSET</arg> is a number which represents the latency offset in microseconds</p></optdesc>
</option> </option>
<option>
<p><opt>get-sink-volume</opt> <arg>SINK</arg></p>
<optdesc><p>Get the volume of the specified sink (identified by its symbolic name or numerical index) displayed in the same format as the `info` command.</p></optdesc>
</option>
<option> <option>
<p><opt>set-sink-volume</opt> <arg>SINK</arg> <arg>VOLUME [VOLUME ...]</arg></p> <p><opt>set-sink-volume</opt> <arg>SINK</arg> <arg>VOLUME [VOLUME ...]</arg></p>
<optdesc><p>Set the volume of the specified sink (identified by its symbolic name or numerical index). <optdesc><p>Set the volume of the specified sink (identified by its symbolic name or numerical index).
@ -221,12 +196,6 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
volume values are given their number has to match the sink's number of channels.</p></optdesc> volume values are given their number has to match the sink's number of channels.</p></optdesc>
</option> </option>
<option>
<p><opt>get-source-volume</opt> <arg>SOURCE</arg></p>
```
<optdesc><p>Get the volume of the specified source (identified by its symbolic name or numerical index) displayed in the same format as the `info` command.</p></optdesc>
</option>
<option> <option>
<p><opt>set-source-volume</opt> <arg>SOURCE</arg> <arg>VOLUME [VOLUME ...]</arg></p> <p><opt>set-source-volume</opt> <arg>SOURCE</arg> <arg>VOLUME [VOLUME ...]</arg></p>
<optdesc><p>Set the volume of the specified source (identified by its symbolic name or numerical index). <optdesc><p>Set the volume of the specified source (identified by its symbolic name or numerical index).
@ -252,21 +221,11 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
volume values are given their number has to match the source output's number of channels.</p></optdesc> volume values are given their number has to match the source output's number of channels.</p></optdesc>
</option> </option>
<option>
<p><opt>get-sink-mute</opt> <arg>SINK</arg></p>
<optdesc><p>Get the mute status of the specified sink (identified by its symbolic name or numerical index).</p></optdesc>
</option>
<option> <option>
<p><opt>set-sink-mute</opt> <arg>SINK</arg> <arg>1|0|toggle</arg></p> <p><opt>set-sink-mute</opt> <arg>SINK</arg> <arg>1|0|toggle</arg></p>
<optdesc><p>Set the mute status of the specified sink (identified by its symbolic name or numerical index).</p></optdesc> <optdesc><p>Set the mute status of the specified sink (identified by its symbolic name or numerical index).</p></optdesc>
</option> </option>
<option>
<p><opt>get-source-mute</opt> <arg>SOURCE</arg></p>
<optdesc><p>Get the mute status of the specified source (identified by its symbolic name or numerical index).</p></optdesc>
</option>
<option> <option>
<p><opt>set-source-mute</opt> <arg>SOURCE</arg> <arg>1|0|toggle</arg></p> <p><opt>set-source-mute</opt> <arg>SOURCE</arg> <arg>1|0|toggle</arg></p>
<optdesc><p>Set the mute status of the specified source (identified by its symbolic name or numerical index).</p></optdesc> <optdesc><p>Set the mute status of the specified source (identified by its symbolic name or numerical index).</p></optdesc>
@ -294,13 +253,6 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
for possible encodings. </p></optdesc> for possible encodings. </p></optdesc>
</option> </option>
<option>
<p><opt>send-message</opt> <arg>RECIPIENT</arg> <arg>MESSAGE</arg> <arg>MESSAGE_PARAMETERS</arg></p>
<optdesc><p>Send a message to the specified recipient object. If applicable an additional string containing
message parameters can be specified. A string is returned as a response to the message. For available messages
see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt.</p></optdesc>
</option>
<option> <option>
<p><opt>subscribe</opt></p> <p><opt>subscribe</opt></p>
<optdesc><p>Subscribe to events, pactl does not exit by itself, but keeps waiting for new events.</p></optdesc> <optdesc><p>Subscribe to events, pactl does not exit by itself, but keeps waiting for new events.</p></optdesc>

View file

@ -143,10 +143,8 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<p><opt>set-default-sink|set-default-source</opt> <arg>index|name</arg></p> <p><opt>set-default-sink|set-default-source</opt> <arg>index|name</arg></p>
<optdesc><p>Make a sink (resp. source) the default. You may specify the <optdesc><p>Make a sink (resp. source) the default. You may specify the
sink (resp. source) by its index in the sink (resp. source) list or by its sink (resp. source) by its index in the sink (resp. source) list or by its
name. Use the special name \@NONE@ to unset the user defined default sink or name.</p><p>Note that defaults may be overridden by various policy modules
source. In this case, pulseaudio will return to the default sink or source or by specific stream configurations.</p></optdesc>
selection based on priority.</p><p>Note that defaults may be overridden by
various policy modules or by specific stream configurations.</p></optdesc>
</option> </option>
<option> <option>
@ -308,13 +306,6 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Debug: Show shared properties.</p></optdesc> <optdesc><p>Debug: Show shared properties.</p></optdesc>
</option> </option>
<option>
<p><opt>send-message</opt> <arg>recipient</arg> <arg>message</arg> <arg>message_parameters</arg></p>
<optdesc><p>Send a message to the specified recipient object. If applicable an additional string containing
message parameters can be specified. A string is returned as a response to the message. For available messages
see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt.</p></optdesc>
</option>
<option> <option>
<p><opt>exit</opt></p> <p><opt>exit</opt></p>
<optdesc><p>Terminate the daemon. If you want to terminate a CLI <optdesc><p>Terminate the daemon. If you want to terminate a CLI

View file

@ -71,7 +71,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</option> </option>
<option> <option>
<p><opt>default-server=</opt> The default server to connect <p><opt>default-server=</opt> The default sever to connect
to. The environment variable <opt>$PULSE_SERVER</opt> takes to. The environment variable <opt>$PULSE_SERVER</opt> takes
precedence.</p> precedence.</p>
</option> </option>

View file

@ -1,13 +1,9 @@
project('pulseaudio', 'c', project('pulseaudio', 'c', 'cpp',
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version'), check : false).stdout().strip(), version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version')).stdout().strip(),
meson_version : '>= 0.56.0', meson_version : '>= 0.50.0',
default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ] default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
) )
if not meson.is_subproject()
meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
endif
pa_version_str = meson.project_version() pa_version_str = meson.project_version()
# For tarballs, the first split will do nothing, but for builds in git, we # 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 # split out suffixes when there are commits since the last tag
@ -23,11 +19,11 @@ endif
pa_version_major_minor = pa_version_major + '.' + pa_version_minor pa_version_major_minor = pa_version_major + '.' + pa_version_minor
pa_api_version = 12 pa_api_version = 12
pa_protocol_version = 35 pa_protocol_version = 34
# The stable ABI for client applications, for the version info x:y:z # The stable ABI for client applications, for the version info x:y:z
# always will hold x=z # always will hold x=z
libpulse_version_info = [24, 3, 24] libpulse_version_info = [23, 0, 23]
# A simplified, synchronous, ABI-stable interface for client # A simplified, synchronous, ABI-stable interface for client
# applications, for the version info x:y:z always will hold x=z # applications, for the version info x:y:z always will hold x=z
@ -55,8 +51,6 @@ libpulse_mainloop_glib_version = '@0@.@1@.@2@'.format(
libpulse_mainloop_glib_version_info[1], libpulse_mainloop_glib_version_info[1],
) )
i18n = import('i18n')
# Paths # Paths
prefix = get_option('prefix') prefix = get_option('prefix')
@ -72,12 +66,6 @@ localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir')) localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir')) sysconfdir = join_paths(prefix, get_option('sysconfdir'))
privlibdir = join_paths(libdir, 'pulseaudio') privlibdir = join_paths(libdir, 'pulseaudio')
po_dir = join_paths(meson.current_source_dir(), 'po')
if host_machine.system() == 'windows'
# Windows only supports loading libraries from the same dir as the executable
privlibdir = bindir
endif
alsadatadir = get_option('alsadatadir') alsadatadir = get_option('alsadatadir')
if alsadatadir == '' if alsadatadir == ''
@ -90,12 +78,7 @@ pulsesysconfdir = join_paths(sysconfdir, 'pulse')
modlibexecdir = get_option('modlibexecdir') modlibexecdir = get_option('modlibexecdir')
if modlibexecdir == '' if modlibexecdir == ''
modlibexecdir = join_paths(libdir, 'pulseaudio', 'modules') modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules')
endif
if host_machine.system() == 'windows'
# Windows only supports loading libraries from the same dir as the executable
modlibexecdir = bindir
endif endif
padsplibdir = get_option('padsplibdir') padsplibdir = get_option('padsplibdir')
@ -123,7 +106,7 @@ bashcompletiondir = get_option('bashcompletiondir')
if bashcompletiondir == '' if bashcompletiondir == ''
bash_completion_dep = dependency('bash-completion', required : false) bash_completion_dep = dependency('bash-completion', required : false)
if bash_completion_dep.found() if bash_completion_dep.found()
bashcompletiondir = bash_completion_dep.get_variable(pkgconfig : 'completionsdir') bashcompletiondir = bash_completion_dep.get_pkgconfig_variable('completionsdir')
else else
bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions') bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions')
endif endif
@ -150,13 +133,8 @@ 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_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_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir()) cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
if host_machine.system() == 'windows' cdata.set_quoted('PA_SOEXT', '.so')
cdata.set_quoted('PA_SOEXT', '.dll')
else
cdata.set_quoted('PA_SOEXT', '.so')
endif
cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir) cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir)
cdata.set('PA_DEFAULT_CONFIG_DIR_UNQUOTED', pulsesysconfdir)
cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio')) cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio'))
cdata.set_quoted('PA_SYSTEM_RUNTIME_PATH', join_paths(localstatedir, 'run', 'pulse')) 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_CONFIG_PATH', join_paths(localstatedir, 'lib', 'pulse'))
@ -166,50 +144,26 @@ cdata.set_quoted('PA_SYSTEM_USER', get_option('system_user'))
cdata.set_quoted('PA_SYSTEM_GROUP', get_option('system_group')) cdata.set_quoted('PA_SYSTEM_GROUP', get_option('system_group'))
cdata.set_quoted('PA_ACCESS_GROUP', get_option('access_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_CFLAGS', 'Not yet supported on meson')
cdata.set_quoted('PA_ALSA_DATA_DIR', alsadatadir) cdata.set_quoted('PA_ALSA_PATHS_DIR', join_paths(alsadatadir, 'paths'))
cdata.set_quoted('PA_ALSA_PROFILE_SETS_DIR', join_paths(alsadatadir, 'profile-sets'))
cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications')) cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
cdata.set_quoted('PULSE_LOCALEDIR', localedir) cdata.set_quoted('PULSE_LOCALEDIR', localedir)
cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio') cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
cdata.set('ENABLE_NLS', 1) cdata.set('ENABLE_NLS', 1)
cdata.set('top_srcdir', meson.project_source_root()) cdata.set('top_srcdir', meson.source_root())
# Platform specifics # Platform specifics
# First some defaults to keep config file generation happy # First some defaults to keep config file generation happy
cdata.set('HAVE_COREAUDIO', 0) cdata.set('HAVE_COREAUDIO', 0)
cdata.set('HAVE_WAVEOUT', 0) cdata.set('HAVE_WAVEOUT', 0)
cdata.set('OS_IS_FREEBSD', 0)
platform_socket_dep = []
platform_dep = []
if host_machine.endian() == 'big'
cdata.set('WORDS_BIGENDIAN', 1)
endif
# FIXME: This was not tested. Maybe some flags should better be CFLAGS, # FIXME: This was not tested. Maybe some flags should better be CFLAGS,
# rather than ending up in the config.h file? # rather than ending up in the config.h file?
if host_machine.system() == 'darwin' if host_machine.system() == 'darwin'
cdata.set('OS_IS_DARWIN', 1) cdata.set('OS_IS_DARWIN', 1)
cdata.set('HAVE_COREAUDIO', 1)
cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
elif host_machine.system() == 'windows' elif host_machine.system() == 'windows'
cdata.set('OS_IS_WIN32', 1) cdata.set('OS_IS_WIN32', 1)
cdata.set('HAVE_WINDOWS_H', 1)
cdata.set('HAVE_WAVEOUT', 1)
cdata.set('HAVE_WINSOCK2_H', 1)
cdata.set('HAVE_WS2TCPIP_H', 1)
cdata.set('WIN32_LEAN_AND_MEAN', 1) # Needed to avoid including unnecessary headers on Windows cdata.set('WIN32_LEAN_AND_MEAN', 1) # Needed to avoid including unnecessary headers on Windows
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]
elif host_machine.system() == 'freebsd'
cdata.set('OS_IS_FREEBSD', 1)
#elif host_machine.system() == 'solaris' #elif host_machine.system() == 'solaris'
# # Apparently meson has no solaris support? # # Apparently meson has no solaris support?
# # Needed to get declarations for msg_control and msg_controllen on Solaris # # Needed to get declarations for msg_control and msg_controllen on Solaris
@ -230,6 +184,7 @@ endif
check_headers = [ check_headers = [
'arpa/inet.h', 'arpa/inet.h',
'byteswap.h', 'byteswap.h',
'cpuid.h',
'dlfcn.h', 'dlfcn.h',
'execinfo.h', 'execinfo.h',
'grp.h', 'grp.h',
@ -264,6 +219,7 @@ check_headers = [
'sys/un.h', 'sys/un.h',
'sys/wait.h', 'sys/wait.h',
'syslog.h', 'syslog.h',
'valgrind/memcheck.h',
'xlocale.h', 'xlocale.h',
] ]
@ -274,34 +230,15 @@ foreach h : check_headers
endif endif
endforeach endforeach
if cc.has_header('valgrind/memcheck.h', required: get_option('valgrind'))
cdata.set('HAVE_VALGRIND_MEMCHECK_H', 1)
endif
# FIXME: move this to the above set # FIXME: move this to the above set
if host_machine.system() != 'windows' if cc.has_header('pthread.h')
if cc.has_header('pthread.h')
cdata.set('HAVE_PTHREAD', 1) cdata.set('HAVE_PTHREAD', 1)
endif
endif endif
if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT') if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT')
cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1) cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1)
endif endif
# 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
# Functions # Functions
check_functions = [ check_functions = [
@ -355,30 +292,16 @@ check_functions = [
foreach f : check_functions foreach f : check_functions
if cc.has_function(f) if cc.has_function(f)
define = 'HAVE_' + f.underscorify().to_upper() define = 'HAVE_' + f.underscorify().to_upper()
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) cdata.set(define, 1)
endif endif
endif
endforeach endforeach
if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create') \ if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create')
or cc.has_function('memfd_create')
cdata.set('HAVE_MEMFD', 1) cdata.set('HAVE_MEMFD', 1)
endif endif
if cc.has_function('dgettext') if cc.has_function('dgettext')
if host_machine.system() != 'windows'
libintl_dep = [] libintl_dep = []
else
libintl_dep = cc.find_library('intl')
endif
else else
libintl_dep = cc.find_library('intl') libintl_dep = cc.find_library('intl')
endif endif
@ -429,17 +352,11 @@ cdata.set('MESON_BUILD', 1)
# On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly, # 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. # 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. # On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
# Windows doesn't support this flag. nodelete_link_args = ['-Wl,-z,nodelete']
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
nodelete_link_args = ['-Wl,-z,nodelete']
else
nodelete_link_args = []
endif
# Code coverage # Code coverage
if get_option('gcov') if get_option('gcov')
add_languages('cpp', native: false)
add_project_arguments('--coverage', language: ['c', 'cpp']) add_project_arguments('--coverage', language: ['c', 'cpp'])
add_project_link_arguments('--coverage', language: ['c', 'cpp']) add_project_link_arguments('--coverage', language: ['c', 'cpp'])
endif endif
@ -463,12 +380,12 @@ endforeach
cap_dep = cc.find_library('cap', required : false) cap_dep = cc.find_library('cap', required : false)
shm_dep = cc.find_library('rt', required : false) shm_dep = cc.find_library('rt', required : false)
if cc.has_function('shm_open', dependencies : shm_dep) if shm_dep.found()
cdata.set('HAVE_SHM_OPEN', 1) cdata.set('HAVE_SHM_OPEN', 1)
endif endif
dl_dep = cc.find_library('dl', required : false) dl_dep = cc.find_library('dl', required : false)
if cc.has_function('dladdr', dependencies : dl_dep) if dl_dep.found()
cdata.set('HAVE_DLADDR', 1) cdata.set('HAVE_DLADDR', 1)
endif endif
@ -476,8 +393,6 @@ have_iconv = false
if cc.has_function('iconv_open') if cc.has_function('iconv_open')
iconv_dep = dependency('', required : false) iconv_dep = dependency('', required : false)
have_iconv = true have_iconv = true
# tell the libiconv header to pretend to be libc iconv
cdata.set('LIBICONV_PLUG', 1)
else else
iconv_dep = cc.find_library('iconv', required : false) iconv_dep = cc.find_library('iconv', required : false)
have_iconv = iconv_dep.found() have_iconv = iconv_dep.found()
@ -494,9 +409,6 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
endif endif
endif endif
# Used for backtraces on BSD
execinfo_dep = cc.find_library('execinfo', required : false)
# Atomic operations # Atomic operations
if get_option('atomic-arm-memory-barrier') if get_option('atomic-arm-memory-barrier')
@ -505,24 +417,22 @@ endif
need_libatomic_ops = false need_libatomic_ops = false
atomictest = '''int main() { atomictest = '''void func() {
volatile int atomic = 2; volatile int atomic = 2;
__sync_bool_compare_and_swap (&atomic, 2, 3); __sync_bool_compare_and_swap (&atomic, 2, 3);
return 0;
} }
''' '''
if cc.links(atomictest) if cc.compiles(atomictest)
cdata.set('HAVE_ATOMIC_BUILTINS', 1) cdata.set('HAVE_ATOMIC_BUILTINS', 1)
newatomictest = '''int main() { newatomictest = '''void func() {
int c = 0; int c = 0;
__atomic_store_n(&c, 4, __ATOMIC_SEQ_CST); __atomic_store_n(&c, 4, __ATOMIC_SEQ_CST);
return 0;
} }
''' '''
if(cc.links(newatomictest)) if(cc.compiles(newatomictest))
cdata.set('HAVE_ATOMIC_BUILTINS_MEMORY_MODEL', 1) cdata.set('HAVE_ATOMIC_BUILTINS_MEMORY_MODEL', 1)
endif endif
@ -594,185 +504,131 @@ if host_machine.cpu_family() == 'arm'
endif endif
# NEON checks are automatically done by the unstable-simd module # NEON checks are automatically done by the unstable-simd module
# Dependencies common to client, daemon and modules # 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)
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
if get_option('ipv6') if get_option('ipv6')
cdata.set('HAVE_IPV6', 1) cdata.set('HAVE_IPV6', 1)
endif endif
if get_option('legacy-database-entry-format')
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
endif
if get_option('stream-restore-clear-old-devices')
cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
endif
if get_option('running-from-build-tree')
cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 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
dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus')) dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
if dbus_dep.found() if dbus_dep.found()
cdata.set('HAVE_DBUS', 1) cdata.set('HAVE_DBUS', 1)
endif endif
glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib')) gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
if gio_dep.found()
cdata.set('HAVE_GSETTINGS', 1)
endif
glib_dep = dependency('glib-2.0', version : '>= 2.4.0', required: get_option('glib'))
if glib_dep.found() if glib_dep.found()
cdata.set('HAVE_GLIB', 1) cdata.set('HAVE_GLIB', 1)
cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation endif
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
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
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
if samplerate_dep.found()
cdata.set('HAVE_LIBSAMPLERATE', 1)
endif endif
sndfile_dep = dependency('sndfile', version : '>= 1.0.20') sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
if soxr_dep.found()
cdata.set('HAVE_SOXR', 1)
endif
libsystemd_dep = dependency('libsystemd', required : get_option('systemd')) libsystemd_dep = dependency('libsystemd', required : get_option('systemd'))
if libsystemd_dep.found() if libsystemd_dep.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1) cdata.set('HAVE_SYSTEMD_DAEMON', 1)
cdata.set('HAVE_SYSTEMD_LOGIN', 1) cdata.set('HAVE_SYSTEMD_LOGIN', 1)
cdata.set('HAVE_SYSTEMD_JOURNAL', 1) cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
endif endif
systemd_dep = dependency('systemd', required : get_option('systemd'))
if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif
x11_dep = dependency('x11-xcb', required : get_option('x11')) x11_dep = dependency('x11-xcb', required : get_option('x11'))
if x11_dep.found()
# 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)
endif
fftw_dep = dependency('fftw3f', required : get_option('fftw'))
if fftw_dep.found()
cdata.set('HAVE_FFTW', 1)
endif
# Client library dependencies
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
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
endif
# Daemon and module dependencies
if get_option('daemon')
# 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)
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
if get_option('legacy-database-entry-format')
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
endif
if get_option('stream-restore-clear-old-devices')
cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
endif
if get_option('running-from-build-tree')
cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
endif
if get_option('enable-smoother-2')
cdata.set('USE_SMOOTHER_2', 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
gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : false)
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
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
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
if samplerate_dep.found()
cdata.set('HAVE_LIBSAMPLERATE', 1)
endif
speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
if speex_dep.found()
cdata.set('HAVE_SPEEX', 1)
endif
soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
if soxr_dep.found()
cdata.set('HAVE_SOXR', 1)
endif
webrtc_dep = dependency('webrtc-audio-processing-1', version : '>= 1.0', required : get_option('webrtc-aec'))
if webrtc_dep.found()
cdata.set('HAVE_WEBRTC', 1)
endif
systemd_dep = dependency('systemd', required : get_option('systemd'))
if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_variable(pkgconfig: 'systemduserunitdir')
endif
libelogind_dep = dependency('libelogind', required : get_option('elogind'))
if libelogind_dep.found()
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
endif
if get_option('consolekit').enabled()
assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
endif
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
if x11_dep.found()
xcb_dep = dependency('xcb', required : true, version : '>= 1.6') xcb_dep = dependency('xcb', required : true, version : '>= 1.6')
ice_dep = dependency('ice', required : true) ice_dep = dependency('ice', required : true)
sm_dep = dependency('sm', required : true) sm_dep = dependency('sm', required : true)
xtst_dep = dependency('xtst', required : true) xtst_dep = dependency('xtst', required : true)
cdata.set('HAVE_X11', 1) cdata.set('HAVE_X11', 1)
if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep) endif
cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
endif
endif
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true) # Module dependencies
if avahi_dep.found()
if cc.has_header('sys/soundcard.h')
cdata.set('HAVE_OSS_OUTPUT', 1)
cdata.set('HAVE_OSS_WRAPPER', 1)
cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
endif
if get_option('hal-compat')
cdata.set('HAVE_HAL_COMPAT', 1)
endif
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1) cdata.set('HAVE_AVAHI', 1)
else endif
cdata.set('HAVE_AVAHI', 0)
endif
sbc_dep = dependency('sbc', version : '>= 1.0', required : false) sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
if get_option('bluez5')
bluez_dep = dependency('bluez', required : get_option('bluez5'))
if bluez_dep.found()
assert(dbus_dep.found(), 'BlueZ requires D-Bus support') assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
assert(sbc_dep.found(), 'BlueZ requires SBC support') assert(sbc_dep.found(), 'BlueZ requires SBC support')
cdata.set('HAVE_SBC', 1) cdata.set('HAVE_SBC', 1)
@ -784,55 +640,58 @@ if get_option('daemon')
if get_option('bluez5-ofono-headset') if get_option('bluez5-ofono-headset')
cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1) cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
endif endif
endif endif
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack')) fftw_dep = dependency('fftw3f', required : get_option('fftw'))
if jack_dep.found() if fftw_dep.found()
cdata.set('HAVE_FFTW', 1)
endif
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
if jack_dep.found()
cdata.set('HAVE_JACK', 1) cdata.set('HAVE_JACK', 1)
endif endif
lirc_dep = dependency('lirc', required : get_option('lirc')) lirc_dep = dependency('lirc', required : get_option('lirc'))
if lirc_dep.found() if lirc_dep.found()
cdata.set('HAVE_LIRC', 1) cdata.set('HAVE_LIRC', 1)
endif endif
openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl')) openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
if openssl_dep.found() if openssl_dep.found()
cdata.set('HAVE_OPENSSL', 1) cdata.set('HAVE_OPENSSL', 1)
endif endif
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev')) speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
if udev_dep.found() if speex_dep.found()
cdata.set('HAVE_SPEEX', 1)
endif
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
if udev_dep.found()
cdata.set('HAVE_UDEV', 1) cdata.set('HAVE_UDEV', 1)
endif endif
if get_option('hal-compat') webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
cdata.set('HAVE_HAL_COMPAT', 1) if webrtc_dep.found()
endif cdata.set('HAVE_WEBRTC', 1)
endif
gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer')) gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
gstapp_dep = dependency('gstreamer-app-1.0', 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')) gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
have_gstreamer = false have_gstreamer = false
if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found() 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 have_gstreamer = true
endif
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
endif endif
# These are required for the CMake file generation # These are required for the CMake file generation
cdata.set('PA_LIBDIR', libdir) cdata.set('PA_LIBDIR', libdir)
cdata.set('PA_INCDIR', includedir) cdata.set('PA_INCDIR', includedir)
if glib_dep.found()
cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
endif
# Test dependencies # Test dependencies
@ -841,71 +700,65 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
# Subdirs # Subdirs
subdir('doxygen') subdir('doxygen')
if get_option('client') subdir('po')
subdir('po')
endif
if get_option('man') if get_option('man')
subdir('man') subdir('man')
endif endif
subdir('shell-completion/bash') subdir('shell-completion/bash')
subdir('shell-completion/zsh') subdir('shell-completion/zsh')
subdir('src') subdir('src')
if get_option('client') subdir('vala')
subdir('vala')
endif
# Now generate config.h from everything above # Now generate config.h from everything above
configure_file(output : 'config.h', configuration : cdata) configure_file(output : 'config.h', configuration : cdata)
if get_option('client') # pkg-config files
# pkg-config files pc_cdata = configuration_data()
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_cdata.set('prefix', prefix) pc_files = [
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.pc',
'libpulse-simple.pc', 'libpulse-simple.pc',
] ]
if glib_dep.found() if glib_dep.found()
pc_files += 'libpulse-mainloop-glib.pc' pc_files += 'libpulse-mainloop-glib.pc'
endif endif
foreach file : pc_files foreach file : pc_files
configure_file( configure_file(
input : file + '.in', input : file + '.in',
output : file, output : file,
configuration : pc_cdata, configuration : pc_cdata,
install_dir : pkgconfigdir) install_dir : pkgconfigdir)
endforeach endforeach
# CMake files # CMake files
m4 = find_program('m4', required: true) m4 = find_program('m4', required: true)
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio') cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
cmake_template_file = configure_file( cmake_template_file = configure_file(
input : 'PulseAudioConfig.cmake.in', input : 'PulseAudioConfig.cmake.in',
output : 'PulseAudioConfig.cmake.tmp', output : 'PulseAudioConfig.cmake.tmp',
configuration: cdata, configuration: cdata,
) )
custom_target('PulseAudioConfig.cmake', custom_target('PulseAudioConfig.cmake',
input : cmake_template_file, input : cmake_template_file,
output : 'PulseAudioConfig.cmake', output : 'PulseAudioConfig.cmake',
capture : true, capture : true,
@ -913,17 +766,15 @@ if get_option('client')
build_by_default : true, build_by_default : true,
install : true, install : true,
install_dir : cmakedir, install_dir : cmakedir,
) )
configure_file( configure_file(
input : 'PulseAudioConfigVersion.cmake.in', input : 'PulseAudioConfigVersion.cmake.in',
output : 'PulseAudioConfigVersion.cmake', output : 'PulseAudioConfigVersion.cmake',
configuration: cdata, configuration: cdata,
install : true, install : true,
install_dir : cmakedir, install_dir : cmakedir,
) )
endif # client
############################################################ ############################################################
@ -952,69 +803,46 @@ summary = [
# 'CFLAGS: @0@'.format(${CFLAGS}), # 'CFLAGS: @0@'.format(${CFLAGS}),
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}), # 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
# 'LIBS: @0@'.format(${LIBS}), # 'LIBS: @0@'.format(${LIBS}),
'',
'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
'Enable pulseaudio client: @0@'.format(get_option('client')),
'', '',
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')), 'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
'Enable X11: @0@'.format(x11_dep.found()), 'Enable X11: @0@'.format(x11_dep.found()),
'Enable D-Bus: @0@'.format(dbus_dep.found()), # 'Enable OSS Output: @0@'.format(${ENABLE_OSS_OUTPUT}),
'Enable GLib 2: @0@'.format(glib_dep.found()), # 'Enable OSS Wrapper: @0@'.format(${ENABLE_OSS_WRAPPER}),
'Enable systemd integration: @0@'.format(libsystemd_dep.found()),
'Enable FFTW: @0@'.format(fftw_dep.found()),
'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()),
'Enable OSS Wrapper: @0@'.format(cdata.has('HAVE_OSS_WRAPPER')),
]
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')),
# 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}), # 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}),
'Enable Alsa: @0@'.format(alsa_dep.found()), 'Enable Alsa: @0@'.format(alsa_dep.found()),
'Enable Jack: @0@'.format(jack_dep.found()),
'Enable LIRC: @0@'.format(lirc_dep.found()),
# 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}), # 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}),
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}), # 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}), # '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 GSettings: @0@'.format(gio_dep.found()),
'Enable BlueZ 5: @0@'.format(cdata.has('HAVE_BLUEZ_5')), 'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
' Enable native headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_NATIVE_HEADSET')), 'Enable Avahi: @0@'.format(avahi_dep.found()),
' Enable ofono headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_OFONO_HEADSET')), 'Enable Jack: @0@'.format(jack_dep.found()),
' Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer), 'Enable Async DNS: @0@'.format(asyncns_dep.found()),
'Enable GStreamer: @0@'.format(have_gstreamer), 'Enable LIRC: @0@'.format(lirc_dep.found()),
'Enable D-Bus: @0@'.format(dbus_dep.found()),
' Enable BlueZ 5: @0@'.format(get_option('bluez5')),
' 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(libsystemd_dep.found()),
# 'Enable TCP Wrappers: @0@'.format(${ENABLE_TCPWRAP}),
'Enable libsamplerate: @0@'.format(samplerate_dep.found()), '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(have_orcc), 'Enable ORC: @0@'.format(have_orcc),
'Enable GStreamer: @0@'.format(have_gstreamer),
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')), 'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()), 'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()), 'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()), 'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()),
'Enable Gcov coverage: @0@'.format(get_option('gcov')),
'Enable man pages: @0@'.format(get_option('man')),
'Enable unit tests: @0@'.format(get_option('tests')),
'', '',
'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()),
'Enable ConsoleKit: @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
'Database: @0@'.format(get_option('database')), 'Database: @0@'.format(get_option('database')),
'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')), 'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
'module-stream-restore:', 'module-stream-restore:',
@ -1027,21 +855,21 @@ summary += [
# 'Force preopen: @0@'.format(${FORCE_PREOPEN}), # 'Force preopen: @0@'.format(${FORCE_PREOPEN}),
# 'Preopened modules: @0@'.format(${PREOPEN_MODS}), # 'Preopened modules: @0@'.format(${PREOPEN_MODS}),
] ]
endif
message('\n '.join(summary)) message('\n '.join(summary))
# Sanity checks # Sanity checks
if get_option('daemon') and not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec') 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!') error('At least one echo canceller implementation must be available!')
endif endif
if get_option('daemon') and samplerate_dep.found() if samplerate_dep.found()
warning('Support for libsamplerate is DEPRECATED') warning('Support for libsamplerate is DEPRECATED')
endif endif
if host_machine.system() != 'windows' and not dbus_dep.found() if host_machine.system() != 'windows'
if not dbus_dep.found()
message = [ message = [
'You do not have D-Bus support enabled. It is strongly recommended', 'You do not have D-Bus support enabled. It is strongly recommended',
'that you enable D-Bus support if your platform supports it.', 'that you enable D-Bus support if your platform supports it.',
@ -1051,9 +879,8 @@ if host_machine.system() != 'windows' and not dbus_dep.found()
'controlling the PulseAudio daemon itself.', 'controlling the PulseAudio daemon itself.',
] ]
warning('\n' + '\n'.join(message)) warning('\n' + '\n'.join(message))
endif endif
if not udev_dep.found()
if get_option('daemon') and host_machine.system() == 'linux' and not udev_dep.found()
message = [ message = [
'You do not have udev support enabled. It is strongly recommended', 'You do not have udev support enabled. It is strongly recommended',
'that you enable udev support if your platform supports it as it is', 'that you enable udev support if your platform supports it as it is',
@ -1061,9 +888,8 @@ if get_option('daemon') and host_machine.system() == 'linux' and not udev_dep.fo
'and is thus a critical part of PulseAudio on that platform.', 'and is thus a critical part of PulseAudio on that platform.',
] ]
warning('\n' + '\n'.join(message)) warning('\n' + '\n'.join(message))
endif endif
if not speex_dep.found()
if get_option('daemon') and host_machine.system() != 'windows' and not speex_dep.found()
message = [ message = [
'You do not have speex support enabled. It is strongly recommended', 'You do not have speex support enabled. It is strongly recommended',
'that you enable speex support if your platform supports it as it is', 'that you enable speex support if your platform supports it as it is',
@ -1071,4 +897,5 @@ if get_option('daemon') and host_machine.system() != 'windows' and not speex_dep
'part of PulseAudio on that platform.', 'part of PulseAudio on that platform.',
] ]
warning('\n' + '\n'.join(message)) warning('\n' + '\n'.join(message))
endif
endif endif

View file

@ -1,12 +1,3 @@
option('daemon',
type : 'boolean', value : true,
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
option('client',
type : 'boolean', value : true,
description : 'Build and install pulseaudio client libraries and utilities')
option('doxygen',
type : 'feature',
description : 'Enable building and installation of documentation generated with doxygen')
option('gcov', option('gcov',
type : 'boolean', value : false, type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis') description : 'Enable optional gcov coverage analysis')
@ -14,7 +5,7 @@ option('man',
type : 'boolean', type : 'boolean',
description : 'Enable building and installation of man pages') description : 'Enable building and installation of man pages')
option('tests', option('tests',
type : 'feature', type : 'boolean',
description : 'Enable unit tests') description : 'Enable unit tests')
option('system_user', option('system_user',
@ -88,26 +79,17 @@ option('avahi',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional Avahi support') description : 'Optional Avahi support')
option('bluez5', option('bluez5',
type : 'feature', value : 'auto', type : 'boolean', value : 'true',
description : 'Optional BlueZ 5 support') description : 'Optional BlueZ 5 support')
option('bluez5-gstreamer',
type : 'feature', value: 'auto',
description : 'Optional BlueZ 5 GStreamer support')
option('bluez5-native-headset', option('bluez5-native-headset',
type : 'boolean', type : 'boolean',
description : 'Optional native headset backend support (BlueZ 5)') description : 'Optional native headset backend support (BlueZ 5)')
option('bluez5-ofono-headset', option('bluez5-ofono-headset',
type : 'boolean', type : 'boolean',
description : 'Optional oFono headset backend support (BlueZ 5)') description : 'Optional oFono headset backend support (BlueZ 5)')
option('consolekit',
type : 'feature', value : 'auto',
description : 'Optional ConsoleKit support')
option('dbus', option('dbus',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional D-Bus support') description : 'Optional D-Bus support')
option('elogind',
type : 'feature', value : 'auto',
description : 'Optional elogind support')
option('fftw', option('fftw',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional FFTW support') description : 'Optional FFTW support')
@ -118,7 +100,7 @@ option('gsettings',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional GSettings support') description : 'Optional GSettings support')
option('gstreamer', option('gstreamer',
type : 'feature', value : 'auto', type : 'feature', value : 'disabled',
description : 'Optional GStreamer dependency for media-related functionality') description : 'Optional GStreamer dependency for media-related functionality')
option('gtk', option('gtk',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
@ -141,9 +123,6 @@ option('openssl',
option('orc', option('orc',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optimized Inner Loop Runtime Compiler') description : 'Optimized Inner Loop Runtime Compiler')
option('oss-output',
type : 'feature', value : 'auto',
description : 'Optional OSS output support')
option('samplerate', option('samplerate',
type : 'feature', value : 'disabled', type : 'feature', value : 'disabled',
description : 'Optional libsamplerate support (DEPRECATED)') description : 'Optional libsamplerate support (DEPRECATED)')
@ -156,21 +135,12 @@ option('speex',
option('systemd', option('systemd',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional systemd support') description : 'Optional systemd support')
option('tcpwrap',
type : 'feature', value : 'auto',
description : 'Optional TCP wrappers support')
option('udev', option('udev',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional udev support') description : 'Optional udev support')
option('valgrind',
type : 'feature', value : 'auto',
description : 'Optional Valgrind support')
option('x11', option('x11',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional X11 support') description : 'Optional X11 support')
option('enable-smoother-2',
type : 'boolean', value : true,
description : 'Use alternative time smoother implementation')
# Echo cancellation # Echo cancellation

48
orc.mak Normal file
View file

@ -0,0 +1,48 @@
#
# This is a Makefile.am fragment to build Orc code. It is based
# on the orc.mak file distributed in the GStreamer common
# repository.
#
# Include this file like this:
#
# include $(top_srcdir)/orc.mak
#
# For each Orc source file, append its name (without the extension)
# to ORC_SOURCE:
#
# ORC_SOURCE += gstadderorc
#
# This will create gstadder-orc-gen.c and gstadder-orc-gen.h, which
# you need to add to your nodist_module_SOURCES.
#
# Note that this file appends to BUILT_SOURCES and CLEANFILES, so
# define them before including this file.
#
EXTRA_DIST += $(addsuffix .orc,$(ORC_SOURCE))
if HAVE_ORC
ORC_BUILT_SOURCE = $(addsuffix -orc-gen.c,$(ORC_SOURCE))
ORC_BUILT_HEADER = $(addsuffix -orc-gen.h,$(ORC_SOURCE))
BUILT_SOURCES += $(ORC_BUILT_SOURCE) $(ORC_BUILT_HEADER)
CLEANFILES += $(BUILT_SOURCES)
orcc_v_gen = $(orcc_v_gen_$(V))
orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
orcc_v_gen_0 = @echo " ORCC $@";
cp_v_gen = $(cp_v_gen_$(V))
cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
cp_v_gen_0 = @echo " CP $@";
%-orc-gen.c: %.orc
@mkdir -p $(@D)
$(orcc_v_gen)$(ORCC) --implementation -o $@ $<
%-orc-gen.h: %.orc
@mkdir -p $(@D)
$(orcc_v_gen)$(ORCC) --header -o $@ $<
endif

View file

@ -46,10 +46,3 @@ tr
uk uk
zh_CN zh_CN
zh_TW zh_TW
eo
si
ka
eu
ar
sl
ro

View file

@ -7,7 +7,6 @@ src/daemon/ltdl-bind-now.c
src/daemon/main.c src/daemon/main.c
src/daemon/pulseaudio.desktop.in src/daemon/pulseaudio.desktop.in
src/daemon/systemd/user/pulseaudio.service.in src/daemon/systemd/user/pulseaudio.service.in
src/daemon/systemd/user/pulseaudio-x11.service.in
src/modules/alsa/alsa-mixer.c src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-sink.c src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c src/modules/alsa/alsa-source.c
@ -17,6 +16,8 @@ src/modules/alsa/module-alsa-sink.c
src/modules/alsa/module-alsa-source.c src/modules/alsa/module-alsa-source.c
src/modules/bluetooth/module-bluez5-device.c src/modules/bluetooth/module-bluez5-device.c
src/modules/echo-cancel/module-echo-cancel.c src/modules/echo-cancel/module-echo-cancel.c
src/modules/gconf/gconf-helper.c
src/modules/gconf/module-gconf.c
src/modules/jack/module-jack-sink.c src/modules/jack/module-jack-sink.c
src/modules/jack/module-jack-source.c src/modules/jack/module-jack-source.c
src/modules/macosx/module-coreaudio-device.c src/modules/macosx/module-coreaudio-device.c
@ -95,6 +96,7 @@ src/pulsecore/core-subscribe.c
src/pulsecore/core-util.c src/pulsecore/core-util.c
src/pulsecore/core-util.h src/pulsecore/core-util.h
src/pulsecore/dbus-util.c src/pulsecore/dbus-util.c
src/pulsecore/dllmain.c
src/pulsecore/dynarray.c src/pulsecore/dynarray.c
src/pulsecore/fdsem.c src/pulsecore/fdsem.c
src/pulsecore/ffmpeg/resample2.c src/pulsecore/ffmpeg/resample2.c
@ -170,7 +172,6 @@ src/pulsecore/thread-mq.c
src/pulsecore/thread-posix.c src/pulsecore/thread-posix.c
src/pulsecore/thread-win32.c src/pulsecore/thread-win32.c
src/pulsecore/time-smoother.c src/pulsecore/time-smoother.c
src/pulsecore/time-smoother_2.c
src/pulsecore/tokenizer.c src/pulsecore/tokenizer.c
src/pulsecore/x11prop.c src/pulsecore/x11prop.c
src/pulsecore/x11wrap.c src/pulsecore/x11wrap.c

956
po/af.po

File diff suppressed because it is too large Load diff

2903
po/ar.po

File diff suppressed because it is too large Load diff

3525
po/as.po

File diff suppressed because it is too large Load diff

2216
po/be.po

File diff suppressed because it is too large Load diff

2056
po/bg.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

4921
po/ca.po

File diff suppressed because it is too large Load diff

1146
po/cs.po

File diff suppressed because it is too large Load diff

987
po/da.po

File diff suppressed because it is too large Load diff

1649
po/de.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2440
po/el.po

File diff suppressed because it is too large Load diff

2967
po/eo.po

File diff suppressed because it is too large Load diff

3135
po/es.po

File diff suppressed because it is too large Load diff

2902
po/eu.po

File diff suppressed because it is too large Load diff

3831
po/fi.po

File diff suppressed because it is too large Load diff

2761
po/fr.po

File diff suppressed because it is too large Load diff

1459
po/gl.po

File diff suppressed because it is too large Load diff

3536
po/gu.po

File diff suppressed because it is too large Load diff

3254
po/he.po

File diff suppressed because it is too large Load diff

4605
po/hi.po

File diff suppressed because it is too large Load diff

1472
po/hr.po

File diff suppressed because it is too large Load diff

1760
po/hu.po

File diff suppressed because it is too large Load diff

1701
po/id.po

File diff suppressed because it is too large Load diff

920
po/it.po

File diff suppressed because it is too large Load diff

2743
po/ja.po

File diff suppressed because it is too large Load diff

3046
po/ka.po

File diff suppressed because it is too large Load diff

828
po/kk.po

File diff suppressed because it is too large Load diff

3548
po/kn.po

File diff suppressed because it is too large Load diff

4001
po/ko.po

File diff suppressed because it is too large Load diff

924
po/lt.po

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,4 @@
i18n = import('i18n')
i18n.gettext( i18n.gettext(
meson.project_name(), meson.project_name(),
preset: 'glib', preset: 'glib',
@ -6,3 +7,5 @@ i18n.gettext(
args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new', args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new',
'--width=90'], '--width=90'],
) )
po_dir = meson.current_source_dir()

3516
po/ml.po

File diff suppressed because it is too large Load diff

3519
po/mr.po

File diff suppressed because it is too large Load diff

4169
po/nl.po

File diff suppressed because it is too large Load diff

2406
po/nn.po

File diff suppressed because it is too large Load diff

1694
po/oc.po

File diff suppressed because it is too large Load diff

3533
po/or.po

File diff suppressed because it is too large Load diff

3515
po/pa.po

File diff suppressed because it is too large Load diff

928
po/pl.po

File diff suppressed because it is too large Load diff

3653
po/pt.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

3412
po/ro.po

File diff suppressed because it is too large Load diff

1579
po/ru.po

File diff suppressed because it is too large Load diff

2963
po/si.po

File diff suppressed because it is too large Load diff

1925
po/sk.po

File diff suppressed because it is too large Load diff

3376
po/sl.po

File diff suppressed because it is too large Load diff

3569
po/sr.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1113
po/sv.po

File diff suppressed because it is too large Load diff

3540
po/ta.po

File diff suppressed because it is too large Load diff

3508
po/te.po

File diff suppressed because it is too large Load diff

1981
po/tr.po

File diff suppressed because it is too large Load diff

949
po/uk.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,30 +0,0 @@
#!/bin/bash
# Generator for linker version script.
# We use the same linker version script for all public .so files
#
# generate-map-file.sh where-is/map-file public_interface_1.h public_interface_2.h ... public_interface_N.h
#
CTAGS_IDENTIFIER_LIST="PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR"
print_map_file() {
echo "PULSE_0 {"
echo "global:"
ctags -I ${CTAGS_IDENTIFIER_LIST} -f - --c-kinds=p "$@" | awk '/^pa_/ { print $1 ";" }' | sort
echo "local:"
echo "*;"
echo "};"
}
print_def_file() {
echo "EXPORTS"
ctags -I ${CTAGS_IDENTIFIER_LIST} -f - --c-kinds=p "$@" | awk '/^pa_/ && !/(^pa_glib_|^pa_simple_)/ { print $1 }' | sort
}
MAP_FILE=$1
DEF_FILE=$2
shift 2
cd "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}" && print_map_file "$@" > ${MAP_FILE}
cd "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}" && print_def_file "$@" > ${DEF_FILE}

View file

@ -1,8 +0,0 @@
#!/bin/bash
if [ "x${1}" == "x" ]; then
echo "Package version must be specified to generate tarball version"
exit 1
fi
echo "${1}" > "$MESON_DIST_ROOT/.tarball-version"

View file

@ -1,35 +1,20 @@
if bashcompletiondir != 'no' if bashcompletiondir != 'no'
aliases = [] aliases = [
if get_option('daemon')
aliases += [
'pulseaudio',
'pacmd',
'pasuspender',
]
# Create target directory for symlinks
if meson.version().version_compare('>= 0.60.0')
install_emptydir(bashcompletiondir)
else
meson.add_install_script('sh', '-c', 'mkdir -p $DESTDIR@0@'.format(bashcompletiondir))
endif
endif
if get_option('client')
aliases += [
'pacat', 'pacat',
'pacmd',
'pactl',
'padsp', 'padsp',
'paplay', 'paplay',
'parec', 'parec',
'parecord', 'parecord',
'pasuspender',
] ]
install_data('pactl', install_dir : bashcompletiondir)
endif install_data('pulseaudio', install_dir : bashcompletiondir)
foreach alias : aliases foreach alias : aliases
dst = join_paths(bashcompletiondir, alias) dst = join_paths(bashcompletiondir, alias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pactl', dst) cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pulseaudio', dst)
meson.add_install_script('sh', '-c', cmd) meson.add_install_script('sh', '-c', cmd)
endforeach endforeach
endif endif

View file

@ -109,20 +109,19 @@ in_array() {
} }
_pactl() { _pactl() {
local cur prev words cword preprev word command local cur prev words cword preprev command
local comps local comps
local flags='-h --help --version -s --server= --client-name=' local flags='-h --help --version -s --server= --client-name='
local list_types='short sinks sources sink-inputs source-outputs cards local list_types='short sinks sources sink-inputs source-outputs cards
modules samples clients message-handlers' modules samples clients'
local commands=(stat info list exit upload-sample play-sample remove-sample local commands=(stat info list exit upload-sample play-sample remove-sample
load-module unload-module move-sink-input move-source-output load-module unload-module move-sink-input move-source-output
suspend-sink suspend-source set-card-profile get-default-sink suspend-sink suspend-source set-card-profile set-default-sink
set-default-sink set-sink-port get-default-source set-default-source set-sink-port set-default-source set-source-port set-sink-volume
set-source-port get-sink-volume set-sink-volume get-source-volume
set-source-volume set-sink-input-volume set-source-output-volume set-source-volume set-sink-input-volume set-source-output-volume
get-sink-mute set-sink-mute get-source-mute set-source-mute set-sink-mute set-source-mute set-sink-input-mute
set-sink-input-mute set-source-output-mute set-sink-formats set-source-output-mute set-sink-formats set-port-latency-offset
set-port-latency-offset subscribe send-message help) subscribe help)
_init_completion -n = || return _init_completion -n = || return
preprev=${words[$cword-2]} preprev=${words[$cword-2]}
@ -187,8 +186,6 @@ _pactl() {
remove-sample) ;; # TODO remove-sample) ;; # TODO
get-default*) ;;
load-module) load-module)
comps=$(__all_modules) comps=$(__all_modules)
COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))
@ -258,7 +255,7 @@ _pactl() {
complete -F _pactl pactl complete -F _pactl pactl
_pacmd() { _pacmd() {
local cur prev words cword preprev word command local cur prev words cword preprev command
local comps local comps
local flags='-h --help --version' local flags='-h --help --version'
local commands=(exit help list-modules list-cards list-sinks list-sources list-clients local commands=(exit help list-modules list-cards list-sinks list-sources list-clients
@ -274,7 +271,7 @@ _pacmd() {
move-sink-input move-source-output suspend-sink suspend-source move-sink-input move-source-output suspend-sink suspend-source
suspend set-card-profile set-sink-port set-source-port suspend set-card-profile set-sink-port set-source-port
set-port-latency-offset set-log-target set-log-level set-log-meta set-port-latency-offset set-log-target set-log-level set-log-meta
set-log-time set-log-backtrace send-message) set-log-time set-log-backtrace)
_init_completion -n = || return _init_completion -n = || return
preprev=${words[$cword-2]} preprev=${words[$cword-2]}
@ -503,7 +500,7 @@ _pulseaudio()
--start -k --kill --check --system= -D --daemonize= --fail= --high-priority= --start -k --kill --check --system= -D --daemonize= --fail= --high-priority=
--realtime= --disallow-module-loading= --disallow-exit= --exit-idle-time= --realtime= --disallow-module-loading= --disallow-exit= --exit-idle-time=
--scache-idle-time= --log-level= -v --log-target= --log-meta= --log-time= --scache-idle-time= --log-level= -v --log-target= --log-meta= --log-time=
--log-backtrace= -p --dl-search-path= --resample-method= --use-pid-file= --log-backtrace= -p --dl-search-path= --resample-method= --use-pit-file=
--no-cpu-limit= --disable-shm= --enable-memfd= -L --load= -F --file= -C -n' --no-cpu-limit= --disable-shm= --enable-memfd= -L --load= -F --file= -C -n'
_init_completion -n = || return _init_completion -n = || return

View file

@ -18,12 +18,10 @@ _devices() {
if [[ $service == pactl || $service == pacmd ]]; then if [[ $service == pactl || $service == pacmd ]]; then
case $words[$((CURRENT - 1))] in case $words[$((CURRENT - 1))] in
set-sink-input-*) cmd=('sink-inputs');; set-sink-input-*) cmd=('sink-inputs');;
get-sink-*) cmd=('sinks');;
set-sink-*) cmd=('sinks');; set-sink-*) cmd=('sinks');;
set-default-sink) cmd=('sinks');; set-default-sink) cmd=('sinks');;
set-default-source) cmd=('sources');; set-default-source) cmd=('sources');;
set-source-output-*) cmd=('source-outputs');; set-source-output-*) cmd=('source-outputs');;
get-source-*) cmd=('sources');;
set-source-*) cmd=('sources');; set-source-*) cmd=('sources');;
suspend-sink) cmd=('sinks');; suspend-sink) cmd=('sinks');;
suspend-source) cmd=('sources');; suspend-source) cmd=('sources');;
@ -36,7 +34,6 @@ _devices() {
case $words[$((CURRENT - 2))] in case $words[$((CURRENT - 2))] in
move-sink-input) cmd=('sinks');; move-sink-input) cmd=('sinks');;
move-source-output) cmd=('sources');; move-source-output) cmd=('sources');;
play-sample) cmd=('sinks');;
esac esac
elif [[ $service == (pacat|paplay|parec|parecord) ]]; then elif [[ $service == (pacat|paplay|parec|parecord) ]]; then
@ -150,7 +147,7 @@ _ports() {
if [[ $line != [[:blank:]] && if [[ $line != [[:blank:]] &&
$line != (*Part?of*|*Properties:*|*device.icon_name*) ]]; then $line != (*Part?of*|*Properties:*|*device.icon_name*) ]]; then
_port_name=${line%%: *} _port_name=${line%%: *}
_port_name=${_port_name##[[:blank:]]#} _port_name=${_port_name//[[:blank:]]/}
_port_description=${line#*: } _port_description=${line#*: }
_port_list+=($_port_name:$_port_description) _port_list+=($_port_name:$_port_description)
fi fi
@ -161,13 +158,6 @@ _ports() {
_describe 'port list' _port_list _describe 'port list' _port_list
} }
_sample_names() {
local -a _sample_names
sample_names=(${${${(f)"$(_call_program samples_tag "pactl $remote list samples short 2> /dev/null")"}##[[:digit:]]#[[:blank:]]#}%%[[:blank:]]*})
_wanted pactl-samples expl 'sample list' compadd $sample_names
}
_cards(){ _cards(){
local -a _card_list local -a _card_list
local _card _cad_name local _card _cad_name
@ -259,27 +249,20 @@ _pactl_completion() {
'suspend-sink: suspend or resume a sink' 'suspend-sink: suspend or resume a sink'
'suspend-source: suspend or resume a source' 'suspend-source: suspend or resume a source'
'set-card-profile: set a card profile' 'set-card-profile: set a card profile'
'get-default-sink: get the default sink'
'set-default-sink: set the default sink' 'set-default-sink: set the default sink'
'get-default-source: get the default source'
'set-default-source: set the default source' 'set-default-source: set the default source'
'set-sink-port: set the sink port of a sink' 'set-sink-port: set the sink port of a sink'
'set-source-port: set the source port of a source' 'set-source-port: set the source port of a source'
'set-port-latency-offset: set a latency offset on a port' 'set-port-latency-offset: set a latency offset on a port'
'get-sink-volume: get the volume of a sink'
'set-sink-volume: set the volume of a sink' 'set-sink-volume: set the volume of a sink'
'get-source-volume: get the volume of a source'
'set-source-volume: set the volume of a source' 'set-source-volume: set the volume of a source'
'set-sink-input-volume: set the volume of a stream' 'set-sink-input-volume: set the volume of a stream'
'set-source-output-volume: set the volume of a recording stream' 'set-source-output-volume: set the volume of a recording stream'
'get-sink-mute: get the mute status of a sink'
'set-sink-mute: mute a sink' 'set-sink-mute: mute a sink'
'get-source-mute: get the mute status of a source'
'set-source-mute: mute a source' 'set-source-mute: mute a source'
'set-sink-input-mute: mute a stream' 'set-sink-input-mute: mute a stream'
'set-source-output-mute: mute a recording stream' 'set-source-output-mute: mute a recording stream'
'set-sink-formats: set supported formats of a sink' 'set-sink-formats: set supported formats of a sink'
'send-message: send a message to a pulseaudio object'
'subscribe: subscribe to events' 'subscribe: subscribe to events'
) )
@ -301,7 +284,6 @@ _pactl_completion() {
'clients: list connected clients' 'clients: list connected clients'
'samples: list samples' 'samples: list samples'
'cards: list available cards' 'cards: list available cards'
'message-handlers: list available message-handlers'
) )
if ((CURRENT == 2)); then if ((CURRENT == 2)); then
@ -322,10 +304,10 @@ _pactl_completion() {
_play_sample_parameter() { _play_sample_parameter() {
if ((CURRENT == 2)); then if ((CURRENT == 2)); then
# We're completing the first parameter after "play-sample". # We're completing the first parameter after "play-sample".
_sample_names # TODO: Implement sample name completion.
elif ((CURRENT == 3)); then elif ((CURRENT == 3)); then
# We're completing the second parameter after "play-sample". # We're completing the second parameter after "play-sample".
_devices # TODO: Implement sink name completion.
fi fi
} }
@ -488,7 +470,7 @@ _pactl_completion() {
list) _list_parameter;; list) _list_parameter;;
upload-sample) if ((CURRENT == 2)); then _files; fi;; upload-sample) if ((CURRENT == 2)); then _files; fi;;
play-sample) _play_sample_parameter;; play-sample) _play_sample_parameter;;
remove-sample) if ((CURRENT == 2)); then _sample_names; fi;; remove-sample) ;; # TODO: Implement sample name completion.
load-module) _load_module_parameter;; load-module) _load_module_parameter;;
unload-module) if ((CURRENT == 2)); then _loaded_modules; fi;; unload-module) if ((CURRENT == 2)); then _loaded_modules; fi;;
move-sink-input) _move_sink_input_parameter;; move-sink-input) _move_sink_input_parameter;;
@ -500,15 +482,11 @@ _pactl_completion() {
set-default-source) if ((CURRENT == 2)); then _devices; fi;; set-default-source) if ((CURRENT == 2)); then _devices; fi;;
set-sink-port) _set_sink_port_parameter;; set-sink-port) _set_sink_port_parameter;;
set-source-port) _set_source_port_parameter;; set-source-port) _set_source_port_parameter;;
get-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-volume) if ((CURRENT == 2)); then _devices; fi;; set-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
get-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-volume) if ((CURRENT == 2)); then _devices; fi;; set-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-input-volume) if ((CURRENT == 2)); then _devices; fi;; set-sink-input-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-output-volume) if ((CURRENT == 2)); then _devices; fi;; set-source-output-volume) if ((CURRENT == 2)); then _devices; fi;;
get-sink-mute) if ((CURRENT == 2)); then _devices; fi;;
set-sink-mute) _set_sink_mute_parameter;; set-sink-mute) _set_sink_mute_parameter;;
get-source-mute) if ((CURRENT == 2)); then _devices; fi;;
set-source-mute) _set_source_mute_parameter;; set-source-mute) _set_source_mute_parameter;;
set-sink-input-mute) _set_sink_input_mute_parameter;; set-sink-input-mute) _set_sink_input_mute_parameter;;
set-source-output-mute) _set_source_output_mute_parameter;; set-source-output-mute) _set_source_output_mute_parameter;;
@ -583,7 +561,6 @@ _pacmd_completion() {
'dump: show daemon configuration' 'dump: show daemon configuration'
'dump-volumes: show the state of all volumes' 'dump-volumes: show the state of all volumes'
'shared: show shared properties' 'shared: show shared properties'
'send-message: send a message to a pulseaudio object'
'exit: ask the PulseAudio daemon to exit' 'exit: ask the PulseAudio daemon to exit'
) )
_describe 'pacmd commands' _pacmd_commands _describe 'pacmd commands' _pacmd_commands

View file

@ -1,5 +1,3 @@
if get_option('client') if zshcompletiondir != 'no'
if zshcompletiondir != 'no'
install_data('_pulseaudio', install_dir : zshcompletiondir) install_data('_pulseaudio', install_dir : zshcompletiondir)
endif
endif endif

Some files were not shown because too many files have changed in this diff Show more