Commit graph

542 commits

Author SHA1 Message Date
Felipe Sateler
fd9e3452e2 i18n: Don't compile with -ffast-math
This flag results in calls to (at least) isfinite() and isnan() becoming
skipped, and a constant false returned. This caused volume-test to fail
on Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916504

Since PulseAudio deals with negative infinities with volume dB values,
this is not a problem only in volume-test. We shouldn't use -ffast-math
at all.
2019-05-28 19:16:49 +03:00
Takashi Iwai
b89d33bb18 alsa: Fix inclusion of use-case.h
The recent change in ALSA upstream stripped -I$include/alsa path from
pkgconfig.  We already fixed for this change in some places but still
the code for UCM was overlooked, and this resulted in the unresolved
symbols in alsa card module. Fix them as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-22 11:06:43 +03:00
Tanu Kaskinen
c235acd787 build-sys: Lower the minimum gettext version
The old minimum version was set in commit 57e3ccaf51 based on what the
commit author happened to have installed at the time. Russell Treleaven
now confirmed that Debian 8's gettext version, 0.19.3, works fine too,
or at least PulseAudio builds without errors. There might be room to
lower the required version even further, but that requires someone to
test older gettext versions.
2019-03-14 21:23:30 +02:00
Arun Raghavan
39bc380c12 build-sys: Add the ability to disable maintainer mode
This allows us to disable automatically updating build system files in
case things change. This is desirable in the common case, but not
necessarily for CI, where we want the ability to take a build directory
as an artifact from one stage to the next (i.e. into a fresh checkout).
2019-01-16 09:39:24 +05:30
Hongxu Jia
3d9deb1e56 build-sys: introduce a special build flag to explicitly disables running from build tree
It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.

[1] https://reproducible-builds.org/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-12-11 16:15:32 +02:00
Joseph Herlant
b5fd854e52
Fix typo: controling -> controlling 2018-09-17 09:49:13 -07:00
Arun Raghavan
f38485dc1a build-sys: Drop ancient check for dbus_watch_get_unix_fd()
This function was added shortly after dbus 1.1.0, and our minimum
required dbus version is greater than 1.4.
2018-07-23 19:38:37 +05:30
Arun Raghavan
651a3d108e PROTOCOL: Bump to version 33
Required for the addition of new pa_encoding_t values.
2018-06-21 06:29:32 +05:30
Javier Jardón
57e3ccaf51 Use upstream gettext instead intltool 2018-06-21 06:28:59 +05:30
Luiz Augusto von Dentz
3b1093c0ad bluetooth: Remove BlueZ 4 support
BlueZ 4 is no longer supported by BlueZ community for a long long time,
also by moving to BlueZ 5 it should make it even more clearer that
BlueZ 4 is no longer an option.
2018-06-21 06:24:36 +05:30
Tanu Kaskinen
0ee9d65467 build-sys: bump sonames
A few small internal changes in libpulse. No changes in libpulse-simple
and libpulse-mainloop-glib.
2018-05-11 13:53:31 +03:00
Tanu Kaskinen
5d66b44203 build-sys: enable GSettings by default
A new paprefs release is expected soon, and it will only support
GSettings. In order to have the default configuration work with the new
paprefs version, we need to enable GSettings by default.

If both module-gconf and module-gsettings are enabled when building
PulseAudio, both modules will be part of the default configuration. That
can cause trouble, because when the GConf database is migrated to
GSettings, the old configuration in GConf is not removed, so both
module-gconf and module-gsettings will try to load modules.

Generally it's not necessary to have both modules enabled even at build
time, so let's default to having only one of them enabled.
2018-04-19 14:45:31 +03:00
Tanu Kaskinen
f5ff5d8bf2 build-sys: remove a redundant enable_gsettings check
If HAVE_GSETTINGS is 1, then enable_gsettings must be yes, so checking
enable_gsettings isn't necessary.
2018-04-19 14:38:36 +03:00
Tanu Kaskinen
b43d47f005 default.pa: add module-gsettings
This also makes the module-gconf section conditional on HAVE_GCONF,
because if only gsettings support is built, the gconf section in the
configuration file would be redundant and confusing.
2018-04-19 14:31:18 +03:00
Sylvain Baubeau
785b660d8a module-gsettings: new module to store configuration using gsettings
GConf is deprecated, and distributions are removing it. paprefs depends
on GConf, so in order to avoid paprefs getting removed as well, paprefs
has to be changed to use something else than GConf. GSettings is the
easiest alternative to migrate to, although it has the same problems
that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts
it in stdin-util.[ch], which is then reused by module-gsettings.
module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update
PulseAudio and paprefs at the same time, or first PulseAudio and then
paprefs. paprefs depends on module-gsettings, and module-gsettings
conflicts with module-gconf. Therefore module-gconf gets automatically
removed during the paprefs update. After the update an old PulseAudio is
likely to be running with module-gconf loaded. If the user tries to use
paprefs during this period, whatever the user does in paprefs won't have
any effect until PulseAudio is restarted (probably by a reboot or
relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert
(implemented in a later patch). That will copy the settings from GConf
to GSettings. If gsettings-data-convert is not available (it's part of
GConf, so it may have already been uninstalled), then any previous
paprefs settings are lost.
2018-04-19 14:30:30 +03:00
Tanu Kaskinen
dfb0460fb4 memfd-wrappers: only define memfd_create() if not already defined
glibc 2.27 is to be released soon, and it will provide memfd_create().
If glibc provides the function, we must not define it ourselves,
otherwise building fails due to conflict between the two implementations
of the same function.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
2018-01-31 08:21:32 +02:00
Vivek Dasmohapatra
6d7e057b37 daemon: don't re-exec if the linker supports the -z,now option
Usually PulseAudio is built with a linker that supports the -z,now
option, and that option should have the same effect (i.e. the dynamic
linker resolves all symbols when the program is started) as re-execing
with the LD_BIND_NOW environment variable set, so usually the re-execing
is redundant.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104789
2018-01-26 04:05:38 +02:00
Felipe Sateler
f250341b80 build-sys: don't install esdcompat tool if building without esound support 2018-01-24 04:09:21 +02:00
Tanu Kaskinen
c8bd93c5a7 core-util, cpu-x86: use __get_cpuid() instead of homegrown assembly
The get_cpuid() function in cpu-x86.c was buggy on x86-64. When building
without optimizations, the homegrown assembly code overwrote the
beginning of the function argument list on the stack. That happened to
work fine on regular x86-64, but caused crashing with the x32 ABI.

At least GCC and clang provide cpuid.h, which has the __get_cpuid()
function that can be used instead of the homegrown assembly.

The PA_REG_* constants can be removed as well, because they're not used
any more.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=103656
2017-12-07 01:06:48 +02:00
Felipe Sateler
69fcfa60b5 build-sys: test for cxx-11 after AC_USE_SYSTEM_EXTENSIONS
This avoids the following autoconf warning:
configure.ac:89: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:89: the top level
2017-10-14 01:48:07 +03:00
Tanu Kaskinen
fff0b34347 build-sys: bump sonames 2017-07-25 01:47:58 +03:00
David Michael
e538e19664 solaris: Support building on GNU Hurd 2017-07-14 22:01:15 +03:00
Felipe Sateler
9ce55be610 padsp: allow overriding library install location
The current build script hardcodes the $pkglibdir in the padsp command.
This works and is a reasonable default. However, distributions that
know where they install, can override this path and thus make padsp
work for any architecture that has the library installed by using the
following configure argument:

   --with-pulsedsp-location='/usr/\\$$LIB/pulseaudio'

This works because ld.so considers $LIB a variable that will expand to
several location paths, depending on the architecture of the binary
being executed.

In debian, for example, this would work for libpulsedsp.so installed in
/usr/lib/x86_64-linux-gnu/ for amd64 and /usr/lib/i386-linux-gnu/ for
i386, with a single padsp command.
2017-01-19 03:00:45 +02:00
Philip Chimento
8405b1fb7f build-sys: Move TLS check after flags additions
Any compiler flags should be set before asking the compiler to check for
thread-local storage with AX_TLS, since compiler flags (in this case
-mmacosx-version-min=10.5) can influence the outcome of that check.
2017-01-19 03:00:45 +02:00
Tanu Kaskinen
72256f9302 build-sys: bump sonames
There are no changes in the ABI. libpulse has received bug fixes,
libpulse-simple and libpulse-mainloop-glib have no changes at all.
2017-01-03 17:13:59 +02:00
Tanu Kaskinen
c81f3da53b remove module-xenpv-sink
The module doesn't build any more[1], and when starting to investigate
the build failure, I asked the module author if he'd know something
about the breakage. He said that he didn't know about backward
compatibility problems with libxen, but more importantly, he said that
the module probably doesn't have any users[2]. It doesn't make sense to
keep maintaining a module that doesn't have users, so let's drop it.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=98793
[2] https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-November/027172.html
2016-12-09 13:09:26 +02:00
Ahmed S. Darwish
f665b2b10d protocol-native: Don't signal memfd support for 9.0 clients
Although such 9.0 clients support memfd transport, they have an
iochannel bug that would break memfd audio if they're run in 32
bit mode over a 64-bit kernel. Influence them to use the POSIX
shared memory model instead.

Also bump the protocol version to exclusively mark such v9.0
libraries. Check commit 451d1d6762 for further details.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=97769
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-11-19 15:11:59 +02:00
Peter Meerwald
f9985e1cbd build: Check version of check library, require >= 0.9.10
tests/core-util-test.c uses ck_assert_int_lt() which was introduced
in check 0.9.10

make this dependency (with --enable-tests) explicit in configure.ac

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
2016-08-10 17:05:01 +03:00
Romain Naour
a7231692e9 build-sys: C++11 is only required for WebRTC support
Make C++11 support optional and explicitly check for gnu++11.

Stop the build only if no C++11 support has been found and WebRTC
support has been requested.

Fixes:
http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-07-22 16:30:11 +05:30
Arun Raghavan
c692ec3afd format: Drop dependency on json-c
json-c has a symbol clash (json_object_get_type) with json-glib (which
at least a number of our GNOME clients use). This patch moves to our own
JSON parser so that we can avoid this kind of situation altogether.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95135

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-06-22 21:04:47 +05:30
Arun Raghavan
47a0171a95 build-sys: Bump sonames for release
Bumping libpulse' version since PA_RATE_MAX was changed.

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
2016-05-12 15:52:44 +05:30
Jeremy Huddleston Sequoia
4f7ade31a9 build-sys: Fix check for CoreServices.h
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
Signed-off-by: Arun Raghavan <git@arunraghavan.net>
2016-05-03 08:51:26 +05:30
Ahmed S. Darwish
d2a6afcab3 core: Support memfd transport; bump protocol version
Now that all layers in the stack support memfd blocks, add memfd
support for the daemon's global core mempool. Also introduce
"enable-memfd=" daemon argument and configuration option.

For now, memfd support is an opt-in feature to be activated only
when daemon's enable-memfd= is set to yes.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-27 18:37:08 +05:30
Ahmed S. Darwish
dcbe79bd63 build-sys: Set C language standard to gnu11
Per glibc feature_test_macros(7), setting compiler flags to
-std=c11 (or any c* variant like c99) enforces strict ANSI
mode.

Enforcing strict ANSI makes all declarations under _GNU_SOURCE
unavailable. This leads to build warnings in the form of:

    warning: implicit declaration of function ‘syscall’

Thus replace -std=c11 with -std=gnu11

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-23 12:53:17 +03:00
Ahmed S. Darwish
73e86b1cb1 pulsecore: Introduce memfd support
Memfd is a simple memory sharing mechanism, added by the systemd/kdbus
developers, to share pages between processes in an anonymous, no global
registry needed, no mount-point required, relatively secure, manner.

This patch introduces the necessary building blocks for using memfd
shared memory transfers in PulseAudio.

Memfd support shall also help us in laying out the necessary (but not
yet sufficient) groundwork for application sandboxing, protecting PA
from its clients, and protecting clients data from each other.

We plan to exclusively use memfds, instead of POSIX SHM, on the way
forward.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-02 05:47:47 +02:00
Arun Raghavan
aa02e1654b build-sys: Move to compiling with C11 support
This is needed for building with anonymous unions. A bunch of calls to
fail() that used to mysteriously work need fixing -- fail() is a macro
that takes a printf-style message as an argument. Not passing this
somehow worked with the previous compiler flags, but breaks with
-std=c11.
2016-02-25 09:09:13 +05:30
Arun Raghavan
f8beaae238 echo-cancel: Update webrtc-audio-processing usage to new API
The code now needs C++11 support to compile with the updated
webrtc-audio-processing library.
2016-02-24 18:43:58 +02:00
Arun Raghavan
3314dc72ea build-sys: Only use sysroot in OS X CFLAGS if specified
The default value doesn't make sense any more, so we'll only use this if
explicitly specified.
2016-02-12 19:25:00 +05:30
Kamil Rytarowski
a1191874fe solaris: Illumos does not ship with SOUND_PCM* functionality
Code reference:
https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h

Add autoconf checks for:
- SOUND_PCM_READ_RATE
- SOUND_PCM_READ_CHANNELS
- SOUND_PCM_READ_BITS

Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality

Thanks to Jonathan Perkin (Joyent) for Illumos code reference.
2016-01-22 13:25:29 +05:30
Kamil Rytarowski
7c1a5d6159 NetBSD: Stop depending upon nonstandard __WORDSIZE
There is no way to check CPU type in a portable way across ABIs.

Assume if pointers are 64-bit that CPU is capable to perform fast
64-bit operations. Add an extra check to handle x32-ABI.

PulseAudio by default builds with -Wundef. If we add -Werror=undef this
missing define is fatal. By default build log is full of entries like:

In file included from ./pulsecore/core.h:47:0,
                 from ./pulsecore/module.h:31,
                 from ./pulsecore/sink-input.h:31,
                 from pulsecore/sound-file-stream.c:36:
./pulsecore/sample-util.h: In function 'pa_mult_s16_volume':
./pulsecore/sample-util.h:58:5: warning: "__WORDSIZE" is not defined [-Wundef]
 #if __WORDSIZE == 64 || ((ULONG_MAX) > (UINT_MAX))
     ^

(NetBSD-7.99.21 with default GCC 4.8.5)

This change fixes build issues on NetBSD.

This also address a bug reported by Shawn Walker from Oracle (possibly Solaris):
Bug 90880 - builds can fail due to non-portable glibc-specific internal macro usage
2016-01-08 14:23:37 +01:00
Mihai Moldovan
51caceb770 configure.ac: add HAVE_COREAUDIO to automake and code.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
2016-01-04 12:39:20 +05:30
Tanu Kaskinen
175fc3ef13 build-sys: bump sonames
Bump 18 -> 19 due to the addition of the LFE balance API.
2015-12-27 14:42:35 +02:00
Kamil Rytarowski
7f4acbd1c0 netbsd: Revamp NetBSD platform checks 2015-12-08 08:56:47 +05:30
Tanu Kaskinen
74c9c41031 build-sys: fix PULSE_LOCALEDIR definition
On some systems (at least Arch) DATADIRNAME is not defined. This
caused PULSE_LOCALEDIR to point to a wrong directory. This seemed like
an issue introduced in 7.0, but probably something else was updated in
Arch at the same time, causing DATADIRNAME to become undefined,
because there were no changes between 6.0 and 7.0 that could have
caused this.

After noticing that localedir is a standard variable, my first idea
was to use pulselocaledir='${localedir}' in configure.ac, but Jan
Steffens pointed out that it causes the final PULSE_LOCALEDIR to
become "${prefix}/share/locale", that is, the variables weren't fully
expanded. I then found a FAQ item in Autoconf's manual[1], which
recommends not to define any absolute installation directories in
configure.ac, because the installation directories should be possible
to change when running make. The recommended solution is to define the
constant in AM_CPPFLAGS instead, so that's what this patch does.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Directories.html
2015-12-07 10:41:37 +01:00
Kamil Rytarowski
cda1a5e897 netbsd: Fix unportable test(1) construct 2015-12-07 09:09:32 +01:00
Kamil Rytarowski
2d555ba15c netbsd: Improve handling of <locale> and <xlocale.h> headers
NetBSD ships with strtod_l(3) in <stdlib.h>.
Having strtol_l(3) doesn't imply to have <xlocale.h>.
Generalize inclusion of <locale.h> and <xlocale.h>.
2015-12-07 09:01:21 +01:00
Kamil Rytarowski
3753f50755 netbsd: NetBSD ships with paccept(2) a superset of Linux-specific accept4()
[diwic: Moved paccept to #bsd line in configure.ac]
2015-11-27 09:52:10 +01:00
Tanu Kaskinen
772d655de6 build-sys: fix the default bash completion directory
If bashcompletiondir was empty, the check didn't catch that. As
a result, the symlinks that were supposed to be generated in the
completion directory were created in the root directory.
2015-09-27 17:02:17 +03:00
Shawn Walker
b727dd540b build-sys: don't use the nodelete linker flag on executables
The nodelete flag indicates that we don't want our libraries to be
unloaded. It's only relevant on libraries, so let's not use it for
executables. Trying to use it on executables breaks things on some
platforms.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90878
2015-09-25 17:29:02 +05:30
Tanu Kaskinen
4c964d8074 build-sys: bump sonames
There were a couple of bug fixes to libpulse since 6.99.1.
2015-09-12 16:23:03 +03:00