diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 106 |
1 files changed, 36 insertions, 70 deletions
diff --git a/configure.ac b/configure.ac index bb8afa4f..18007357 100644 --- a/configure.ac +++ b/configure.ac @@ -27,11 +27,11 @@ AC_INIT([pulseaudio], m4_esyscmd([./git-version-gen .tarball-version]), AC_CONFIG_SRCDIR([src/daemon/main.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability]) +AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax]) -m4_define(pa_major, `echo $VERSION | cut -d. -f 1`) -m4_define(pa_minor, `echo $VERSION | cut -d. -f 2`) -m4_define(pa_micro, `echo $VERSION | cut -d. -f 3`) +m4_define(pa_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`) +m4_define(pa_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`) +m4_define(pa_micro, `echo $VERSION | cut -d. -f3 | cut -d- -f1`) AC_SUBST(PA_MAJOR, pa_major) AC_SUBST(PA_MINOR, pa_minor) @@ -74,8 +74,14 @@ 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]) + AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X]) + ;; esac +AM_SILENT_RULES([yes]) + #### Checks for programs. #### # mkdir -p @@ -98,11 +104,7 @@ if test "x$M4" = xno ; then fi dnl Compiler flags -DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option" - -for flag in $DESIRED_FLAGS ; do - CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"]) -done +CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option]) dnl Linker flags. dnl Check whether the linker supports the -version-script option. @@ -115,6 +117,26 @@ 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 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. +CC_NOUNDEFINED + dnl Check whether to build tests by default (as compile-test) or not AC_ARG_ENABLE([default-build-tests], AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check])) @@ -275,7 +297,7 @@ AC_CHECK_HEADER([ltdl.h], [LIBLTDL=]) AS_IF([test "x$LIBLTDL" = "x"], - [AC_MSG_ERROR([Unable to find libltdl.])]) + [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])]) AC_SUBST([LIBLTDL]) #### Determine build environment #### @@ -385,6 +407,7 @@ AC_SEARCH_LIBS([timer_create], [rt]) # BSD AC_SEARCH_LIBS([connect], [socket]) +AC_SEARCH_LIBS([backtrace], [execinfo]) # Non-standard @@ -1057,7 +1080,7 @@ AC_ARG_ENABLE([udev], ], [udev=auto]) if test "x${udev}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then - PKG_CHECK_MODULES(UDEV, [ libudev >= 137 ], + PKG_CHECK_MODULES(UDEV, [ libudev >= 143 ], [ HAVE_UDEV=1 AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.]) @@ -1152,44 +1175,6 @@ AC_SUBST(DBUS_LIBS) AC_SUBST(HAVE_DBUS) AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1]) -#### PolicyKit support (optional) #### - -AC_ARG_ENABLE([polkit], - AS_HELP_STRING([--disable-polkit],[Disable optional PolicyKit support]), - [ - case "${enableval}" in - yes) polkit=yes ;; - no) polkit=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-polkit) ;; - esac - ], - [polkit=auto]) - -if test "x${polkit}" != xno ; then - - PKG_CHECK_MODULES(POLKIT, [ polkit-dbus >= 0.7 ], - [ - HAVE_POLKIT=1 - AC_DEFINE([HAVE_POLKIT], 1, [Have PolicyKit]) - policydir=`pkg-config polkit-dbus --variable prefix`/share/PolicyKit/policy/ - AC_SUBST(policydir) - ], - [ - HAVE_POLKIT=0 - if test "x$polkit" = xyes ; then - AC_MSG_ERROR([*** PolicyKit support not found]) - fi - ]) -else - HAVE_POLKIT=0 -fi - -AC_SUBST(POLKIT_CFLAGS) -AC_SUBST(POLKIT_LIBS) -AC_SUBST(HAVE_POLKIT) -AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1]) - - ### IPv6 connection support (optional) ### AC_ARG_ENABLE([ipv6], @@ -1276,15 +1261,6 @@ fi AC_SUBST(PA_SYSTEM_GROUP) AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon]) -AC_ARG_WITH(realtime_group,AS_HELP_STRING([--with-realtime-group=<group>],[Group for users that are allowed to start the PulseAudio daemon with realtime scheduling (realtime)])) -if test -z "$with_realtime_group" ; then - PA_REALTIME_GROUP=pulse-rt -else - PA_REALTIME_GROUP=$with_realtime_group -fi -AC_SUBST(PA_REALTIME_GROUP) -AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group]) - AC_ARG_WITH(access_group,AS_HELP_STRING([--with-access-group=<group>],[Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)])) if test -z "$with_access_group" ; then PA_ACCESS_GROUP=pulse-access @@ -1350,8 +1326,8 @@ fi AC_ARG_WITH( [module-dir], - AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/]), - [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/"]) + AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules]), + [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules"]) AC_SUBST(modlibexecdir) @@ -1363,8 +1339,6 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"]) AC_CONFIG_FILES([ Makefile -shave -shave-libtool src/Makefile man/Makefile libpulse.pc @@ -1377,7 +1351,6 @@ src/pulse/version.h po/Makefile.in ]) -SHAVE_INIT AC_OUTPUT # ========================================================================== @@ -1461,11 +1434,6 @@ if test "x${HAVE_BLUEZ}" = "x1" ; then ENABLE_BLUEZ=yes fi -ENABLE_POLKIT=no -if test "x${HAVE_POLKIT}" = "x1" ; then - ENABLE_POLKIT=yes -fi - ENABLE_GDBM=no if test "x${HAVE_GDBM}" = "x1" ; then ENABLE_GDBM=yes @@ -1519,7 +1487,6 @@ echo " Enable BlueZ: ${ENABLE_BLUEZ} Enable TCP Wrappers: ${ENABLE_TCPWRAP} Enable libsamplerate: ${ENABLE_LIBSAMPLERATE} - Enable PolicyKit: ${ENABLE_POLKIT} Enable IPv6: ${ENABLE_IPV6} Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL} Enable tdb: ${ENABLE_TDB} @@ -1527,7 +1494,6 @@ echo " System User: ${PA_SYSTEM_USER} System Group: ${PA_SYSTEM_GROUP} - Realtime Group: ${PA_REALTIME_GROUP} Access Group: ${PA_ACCESS_GROUP} Enable per-user EsounD socket: ${ENABLE_PER_USER_ESOUND_SOCKET} Force preopen: ${FORCE_PREOPEN} |