From ff252cb48d9bd827d262eb2633fecaff47c6fe5c Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Sat, 4 Jul 2009 13:12:32 +0200 Subject: Check for the library containing the backtrace() function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On FreeBSD the backtrace() function as well as the execinfo.h headers are provided by libexecinfo (an optional package). PulseAudio “automagically” identifies execinfo.h and proceeds to use it, but then will fail to link against the library. Thanks to Alexis Ballier for reporting. --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 00121f82..9c96d1c5 100644 --- a/configure.ac +++ b/configure.ac @@ -388,6 +388,7 @@ AC_SEARCH_LIBS([timer_create], [rt]) # BSD AC_SEARCH_LIBS([connect], [socket]) +AC_SEARCH_LIBS([backtrace], [execinfo]) # Non-standard -- cgit From 84200b423ebfa7e2dad9b1b65f64eac7bf3d2114 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Tue, 7 Jul 2009 20:51:53 +0200 Subject: Remove exploitable LD_BIND_NOW hack (CVE-2009-1894). Instead of trying to re-execute pulseaudio itself with LD_BIND_NOW set, just find the correct flag for the linker to request immediate bindings (all ELF files support that option), and use that when linking the daemon. Reduce the amount of compiled and executed code as well. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9c96d1c5..cc7f674a 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,12 @@ CC_CHECK_LDFLAGS([${tmp_ldflag}], [VERSIONING_LDFLAGS='-Wl,-version-script=$(srcdir)/map-file']) AC_SUBST([VERSIONING_LDFLAGS]) +dnl Use immediate (now) bindings; avoids the funky re-call in itself +dnl the -z now syntax is lifted from Sun's linker and works with GNU's too +dnl other linkes might be added later +CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"]) +AC_SUBST([IMMEDIATE_LDFLAGS]) + dnl Check for the proper way to build libraries that have no undefined dnl symbols; on some hosts this needs to be avoided but the macro dnl takes care of it. -- cgit From 673112b192a9494ea96f7daca061b080db5d3977 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 14:18:07 +0200 Subject: Check for support of -z nodelete LD flag, don't use it unconditionally. On non-GNU, non-Sun linkers, the -z option is often not understood; make sure that the -z nodelete option is usable before making use of it. Unbreaks build on Mac OS X. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cc7f674a..112a1a8f 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,15 @@ dnl other linkes might be added later CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"]) AC_SUBST([IMMEDIATE_LDFLAGS]) +dnl On ELF systems we don't want the libraries to be unloaded since we +dnl don't clean them up properly, so we request the nodelete flag to be +dnl enabled. +dnl +dnl On other systems, we don't really know how to do that, but it's +dnl welcome if somebody can tell. +CC_CHECK_LDFLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS="-Wl,-z,nodelete"]) +AC_SUBST([NODELETE_LDFLAGS]) + dnl Check for the proper way to build libraries that have no undefined dnl symbols; on some hosts this needs to be avoided but the macro dnl takes care of it. -- cgit From a6d67187126ef37b69b0d8d94dfeebeb364a8444 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 14:33:33 +0200 Subject: Request explicitly POSIX.1-2001 for clock_gettime. This might actually call for a rewrite of system extensions handling. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 112a1a8f..9b49f23e 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,9 @@ case $host in AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris) AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) ;; + *-*-darwin* ) + AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X]) + ;; esac AM_SILENT_RULES([yes]) -- cgit From 0a5257b520ae540775367eb20a4db3e76436cdf9 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 20:41:58 +0200 Subject: Also request Darwin extensions, as they are needed for stuff like NSIG. Without this definition, non-POSIX interfaces (which are needed) are hidden by the _POSIX_C_SOURCE request (for clock_gettime). --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9b49f23e..18007357 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,7 @@ case $host in ;; *-*-darwin* ) AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X]) + AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X]) ;; esac -- cgit From f8873ab82bee230ec7d0c3a858f8a8b07bc6dddd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jul 2009 01:43:33 +0200 Subject: build-sys: bump binary version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 18007357..08c1ef3a 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ AC_SUBST(PA_PROTOCOL_VERSION, 16) # The stable ABI for client applications, for the version info x:y:z # always will hold y=z -AC_SUBST(LIBPULSE_VERSION_INFO, [8:0:8]) +AC_SUBST(LIBPULSE_VERSION_INFO, [9:0:9]) # A simplified, synchronous, ABI-stable interface for client # applications, for the version info x:y:z always will hold y=z -- cgit From 8483de4f2be22338eaa42d3b9bad6bf554644b61 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 5 Aug 2009 03:53:41 +0200 Subject: simple: bump libpulse-simple library revision --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 08c1ef3a..179aeb36 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ AC_SUBST(LIBPULSE_VERSION_INFO, [9:0:9]) # A simplified, synchronous, ABI-stable interface for client # applications, for the version info x:y:z always will hold y=z -AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:2:0]) +AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:3:0]) # The ABI-stable network browsing interface for client applications, # for the version info x:y:z always will hold y=z -- cgit From 9ade13604e98378e68a82b82ba260869714474b4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 8 Aug 2009 01:37:32 +0200 Subject: build-sys: drop libcap checks, since we don't use caps anymore --- configure.ac | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 179aeb36..40792130 100644 --- a/configure.ac +++ b/configure.ac @@ -537,25 +537,6 @@ AC_SUBST(X11_LIBS) AC_SUBST(HAVE_X11) AM_CONDITIONAL([HAVE_X11], [test "x$HAVE_X11" = x1]) -#### Capabilities (optional) #### - -CAP_LIBS='' - -AC_ARG_WITH( - [caps], - AS_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.])) - -if test "x${with_caps}" != "xno"; then - AC_SEARCH_LIBS([cap_init], [cap], [], [ - if test "x${with_caps}" = "xyes" ; then - AC_MSG_ERROR([*** POSIX caps libraries not found]) - fi]) - AC_CHECK_HEADERS([sys/capability.h], [], [ - if test "x${with_caps}" = "xyes" ; then - AC_MSG_ERROR([*** POSIX caps headers not found]) - fi]) -fi - #### Valgrind (optional) #### AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h]) -- cgit From 4c1511500759c7701b407227e907c0e5c8e38763 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Sat, 8 Aug 2009 01:53:15 +0200 Subject: Split OSS support in output and wrapper. Since Fedora does not enable OSS output support at all, but still uses padsp, and in Gentoo we could also make use of padsp without OSS output support, split the two things in two parameters, although they both check for sys/soundcard.h once. --- configure.ac | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 40792130..f7034792 100644 --- a/configure.ac +++ b/configure.ac @@ -664,26 +664,42 @@ AM_CONDITIONAL([HAVE_GDBM], [test "x$HAVE_GDBM" = x1]) #### OSS support (optional) #### -AC_ARG_ENABLE([oss], - AS_HELP_STRING([--disable-oss],[Disable optional OSS support]), +AC_ARG_ENABLE([oss-output], + AS_HELP_STRING([--disable-oss-output],[Disable optional OSS output support]), [ case "${enableval}" in - yes) oss=yes ;; - no) oss=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;; + yes) oss_output=yes ;; + no) oss_output=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss-output) ;; esac ], - [oss=auto]) + [oss_output=auto]) -if test "x${oss}" != xno ; then +AC_ARG_ENABLE([oss-wrapper], + AS_HELP_STRING([--disable-oss-wrapper],[Disable optional OSS wrapper support]), + [ + case "${enableval}" in + yes) oss_wrapper=yes ;; + no) oss_wrapper=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss-wrapper) ;; + esac + ], + [oss_wrapper=auto]) + +if test "x${oss_output}" != xno || test "x${oss_wrapper}" != "xno"; then AC_CHECK_HEADERS([sys/soundcard.h], [ + if test "x${oss_output}" != "xno"; then + AC_DEFINE([HAVE_OSS_OUTPUT], 1, [Have OSS output?]) + fi + if test "x${oss_wrapper}" != "xno"; then + AC_DEFINE([HAVE_OSS_WRAPPER], 1, [Have OSS wrapper (padsp)?]) + fi HAVE_OSS=1 - AC_DEFINE([HAVE_OSS], 1, [Have OSS?]) ], [ HAVE_OSS=0 - if test "x$oss" = xyes ; then + if test "x$oss_output" = xyes || test "x$oss_wrapper" = "xyes"; then AC_MSG_ERROR([*** OSS support not found]) fi ]) @@ -692,8 +708,8 @@ else fi AC_SUBST(HAVE_OSS) -AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1]) - +AM_CONDITIONAL([HAVE_OSS_OUTPUT], [test "x$HAVE_OSS" = x1 && test "x${oss_output}" != "xno"]) +AM_CONDITIONAL([HAVE_OSS_WRAPPER], [test "x$HAVE_OSS" = x1 && test "x${oss_wrapper}" != "xno"]) #### ALSA support (optional) #### -- cgit From 10e4171265381f250c7f243d566b4c0b937b86e1 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Sat, 8 Aug 2009 02:09:26 +0200 Subject: Update the end-of-configuration summary for OSS output/wrapper split. --- configure.ac | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f7034792..db73d91c 100644 --- a/configure.ac +++ b/configure.ac @@ -1356,9 +1356,15 @@ if test "x$HAVE_X11" = "x1" ; then ENABLE_X11=yes fi -ENABLE_OSS=no +ENABLE_OSS_OUTPUT=no +ENABLE_OSS_WRAPPER=no if test "x$HAVE_OSS" = "x1" ; then - ENABLE_OSS=yes + if test "x$enable_oss_output" != "xno"; then + ENABLE_OSS_OUTPUT=yes + fi + if test "x$enable_oss_wrapper" != "xno"; then + ENABLE_OSS_WRAPPER=yes + fi fi ENABLE_ALSA=no @@ -1469,7 +1475,8 @@ echo " CFLAGS: ${CFLAGS} Have X11: ${ENABLE_X11} - Enable OSS: ${ENABLE_OSS} + Enable OSS Output: ${ENABLE_OSS_OUTPUT} + Enable OSS Wrapper: ${ENABLE_OSS_WRAPPER} Enable Alsa: ${ENABLE_ALSA} Enable Solaris: ${ENABLE_SOLARIS} Enable GLib 2.0: ${ENABLE_GLIB20} -- cgit From ebe35968d7a64d711d0fc53a5ea7fe1b2b1a0aa7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 10 Aug 2009 21:43:03 +0200 Subject: Revert "build-sys: drop libcap checks, since we don't use caps anymore" This reverts commit 9ade13604e98378e68a82b82ba260869714474b4. --- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index db73d91c..a35bef83 100644 --- a/configure.ac +++ b/configure.ac @@ -537,6 +537,25 @@ AC_SUBST(X11_LIBS) AC_SUBST(HAVE_X11) AM_CONDITIONAL([HAVE_X11], [test "x$HAVE_X11" = x1]) +#### Capabilities (optional) #### + +CAP_LIBS='' + +AC_ARG_WITH( + [caps], + AS_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.])) + +if test "x${with_caps}" != "xno"; then + AC_SEARCH_LIBS([cap_init], [cap], [], [ + if test "x${with_caps}" = "xyes" ; then + AC_MSG_ERROR([*** POSIX caps libraries not found]) + fi]) + AC_CHECK_HEADERS([sys/capability.h], [], [ + if test "x${with_caps}" = "xyes" ; then + AC_MSG_ERROR([*** POSIX caps headers not found]) + fi]) +fi + #### Valgrind (optional) #### AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h]) -- cgit From c904f97e2d77bac298130de55621fa2498b5aa51 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Aug 2009 23:04:35 +0200 Subject: hal: add stub module that loads module-udev-detect instead of module-hal-detect This adds module-hal-detect-compat.c which when enabled will be compiled into a module module-hal-detect which simply loads module-udev-detect. The purpose of this is to allow easy upgrading without breaking default.pa. Distributions are recommended to enable this to easy upgrades from HAL versions of PA to udev versions. --- configure.ac | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a35bef83..3b91bc06 100644 --- a/configure.ac +++ b/configure.ac @@ -1118,6 +1118,28 @@ AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1]) AC_DEFINE([LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE], 1, [I know the API is subject to change.]) +#### HAL compat support (optional) #### + +AC_ARG_ENABLE([hal-compat], + AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]), + [ + case "${enableval}" in + yes) halcompat=yes ;; + no) halcompat=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal-compat) ;; + esac + ], + [halcompat=auto]) +if test "x${halcompat}" != xno -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1" ; then + HAVE_HAL_COMPAT=1 + AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.]) +else + HAVE_HAL_COMPAT=0 +fi + +AC_SUBST(HAVE_HAL_COMPAT) +AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1]) + #### BlueZ support (optional) #### AC_ARG_ENABLE([bluez], @@ -1441,6 +1463,11 @@ if test "x$HAVE_UDEV" = "x1" ; then ENABLE_UDEV=yes fi +ENABLE_HAL_COMPAT=no +if test "x$HAVE_HAL_COMPAT" = "x1" ; then + ENABLE_HAL_COMPAT=yes +fi + ENABLE_TCPWRAP=no if test "x${LIBWRAP_LIBS}" != x ; then ENABLE_TCPWRAP=yes @@ -1507,6 +1534,7 @@ echo " Enable LIRC: ${ENABLE_LIRC} Enable HAL: ${ENABLE_HAL} Enable udev: ${ENABLE_UDEV} + Enable HAL->udev compat: ${ENABLE_HAL_COMPAT} Enable BlueZ: ${ENABLE_BLUEZ} Enable TCP Wrappers: ${ENABLE_TCPWRAP} Enable libsamplerate: ${ENABLE_LIBSAMPLERATE} -- cgit From c1039c94fbae193aad149339124e8e62f0233eaa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Aug 2009 23:06:44 +0200 Subject: udev: drop definition of LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE We depend on udev 143 anyway, where this definition is not necessary anymore. --- configure.ac | 2 -- 1 file changed, 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3b91bc06..a38d8a15 100644 --- a/configure.ac +++ b/configure.ac @@ -1116,8 +1116,6 @@ AC_SUBST(UDEV_LIBS) AC_SUBST(HAVE_UDEV) AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1]) -AC_DEFINE([LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE], 1, [I know the API is subject to change.]) - #### HAL compat support (optional) #### AC_ARG_ENABLE([hal-compat], -- cgit From ea5cdcbe52e3e1ac6189fb6472fafe61fbfdd73c Mon Sep 17 00:00:00 2001 From: Juho Hämäläinen Date: Wed, 12 Aug 2009 18:30:14 +0300 Subject: database: simple hashmap based database implementation --- configure.ac | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a38d8a15..05312d39 100644 --- a/configure.ac +++ b/configure.ac @@ -626,10 +626,11 @@ AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1]) HAVE_TDB=0 HAVE_GDBM=0 +HAVE_SIMPLEDB=0 AC_ARG_WITH( [database], - AS_HELP_STRING([--with-database=auto|tdb|gdbm],[Choose database backend.]),[],[with_database=auto]) + AS_HELP_STRING([--with-database=auto|tdb|gdbm|simple],[Choose database backend.]),[],[with_database=auto]) if test "x${with_database}" = "xauto" -o "x${with_database}" = "xtdb" ; then PKG_CHECK_MODULES(TDB, [ tdb ], @@ -659,7 +660,12 @@ if test "x${with_database}" = "xauto" -o "x${with_database}" = "xgdbm" ; then fi fi -if test "x${HAVE_TDB}" != x1 -a "x${HAVE_GDBM}" != x1; then +if test "x${with_database}" = "xauto" -o "x${with_database}" = "xsimple" ; then + HAVE_SIMPLEDB=1 + with_database=simple +fi + +if test "x${HAVE_TDB}" != x1 -a "x${HAVE_GDBM}" != x1 -a "x${HAVE_SIMPLEDB}" != x1; then AC_MSG_ERROR([*** missing database backend]) fi @@ -671,6 +677,10 @@ if test "x${HAVE_GDBM}" = x1 ; then AC_DEFINE([HAVE_GDBM], 1, [Have gdbm?]) fi +if test "x${HAVE_SIMPLEDB}" = x1 ; then + AC_DEFINE([HAVE_SIMPLEDB], 1, [Have simple?]) +fi + AC_SUBST(TDB_CFLAGS) AC_SUBST(TDB_LIBS) AC_SUBST(HAVE_TDB) @@ -681,6 +691,9 @@ AC_SUBST(GDBM_LIBS) AC_SUBST(HAVE_GDBM) AM_CONDITIONAL([HAVE_GDBM], [test "x$HAVE_GDBM" = x1]) +AC_SUBST(HAVE_SIMPLEDB) +AM_CONDITIONAL([HAVE_SIMPLEDB], [test "x$HAVE_SIMPLEDB" = x1]) + #### OSS support (optional) #### AC_ARG_ENABLE([oss-output], @@ -1491,6 +1504,11 @@ if test "x${HAVE_TDB}" = "x1" ; then ENABLE_TDB=yes fi +ENABLE_SIMPLEDB=no +if test "x${HAVE_SIMPLEDB}" = "x1" ; then + ENABLE_SIMPLEDB=yes +fi + ENABLE_OPENSSL=no if test "x${HAVE_OPENSSL}" = "x1" ; then ENABLE_OPENSSL=yes @@ -1540,6 +1558,7 @@ echo " Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL} Enable tdb: ${ENABLE_TDB} Enable gdbm: ${ENABLE_GDBM} + Enable simple database: ${ENABLE_SIMPLEDB} System User: ${PA_SYSTEM_USER} System Group: ${PA_SYSTEM_GROUP} -- cgit