]> code.delx.au - pulseaudio/blobdiff - configure.ac
fix copy'n'paste error
[pulseaudio] / configure.ac
index 2b91a0064008fd5dca29b5a6b619a6746d6cc1b3..411a14d68c1fdc3ca73f8d3e3a4fbe68378dd6d4 100644 (file)
 # along with PulseAudio; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
-AC_PREREQ(2.62)
+AC_PREREQ(2.63)
 
 m4_define(PA_MAJOR, [0])
 m4_define(PA_MINOR, [9])
-m4_define(PA_MICRO, [13])
+m4_define(PA_MICRO, [15])
 
 AC_INIT([pulseaudio],[PA_MAJOR.PA_MINOR.PA_MICRO],[mzchyfrnhqvb (at) 0pointer (dot) net])
 AC_CONFIG_SRCDIR([src/daemon/main.c])
@@ -32,15 +32,16 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
 
-AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR")
+AC_SUBST(PA_MAJORMINOR, PA_MAJOR.PA_MINOR)
+AC_SUBST(PA_MAJORMINORMICRO, PA_MAJOR.PA_MINOR.PA_MICRO)
 AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
 
 AC_SUBST(PA_API_VERSION, 12)
-AC_SUBST(PA_PROTOCOL_VERSION, 14)
+AC_SUBST(PA_PROTOCOL_VERSION, 15)
 
 # The stable ABI for client applications, for the version info x:y:z
 # always will hold y=z
-AC_SUBST(LIBPULSE_VERSION_INFO, [7:0:7])
+AC_SUBST(LIBPULSE_VERSION_INFO, [7:1:7])
 
 # A simplified, synchronous, ABI-stable interface for client
 # applications, for the version info x:y:z always will hold y=z
@@ -54,11 +55,6 @@ AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [1:1:1])
 # info x:y:z always will hold y=z
 AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:4:0])
 
-# An internally used, ABI-unstable library that contains the
-# PulseAudio core, SONAMEs are bumped on every release, version info
-# suffix will always be 0:0
-AC_SUBST(LIBPULSECORE_VERSION_INFO, [8:0:0])
-
 AC_CANONICAL_HOST
 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
 
@@ -99,12 +95,18 @@ if test "x$M4" = xno ; then
 fi
 
 dnl Compiler flags
-DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Wvla -Wno-overlength-strings -Wconversion -Wundef -Wformat -Wlogical-op -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -ffast-math"
+DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wpacked -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
 
+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]))
+
+AM_CONDITIONAL([BUILD_TESTS_DEFAULT], [test "x$enable_default_build_tests" = "xno"])
+
 # Native atomic operation support
 AC_ARG_ENABLE([atomic-arm-linux-helpers],
     AS_HELP_STRING([--disable-atomic-arm-linux-helpers],[use inline asm or libatomic_ops instead]),
@@ -213,29 +215,10 @@ AS_IF([test "$pulseaudio_cv__Bool" = "yes"], [
   ])
 
 #### libtool stuff ####
-
-AC_LTDL_ENABLE_INSTALL
-AC_LIBLTDL_INSTALLABLE
-AC_LIBTOOL_DLOPEN
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
-AC_SUBST(LTDLINCL)
-AC_SUBST(LIBLTDL)
-AC_CONFIG_SUBDIRS(libltdl)
-
-old_LIBS=$LIBS
-LIBS="$LIBS $LIBLTDL"
-AC_CHECK_FUNCS([lt_dlmutex_register])
-LIBS=$old_LIBS
-AC_CHECK_TYPES([struct lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
-
-if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
-    AC_MSG_ERROR([[
-
-        *** Cannot find the libltdl development files.
-        *** Maybe you need to install the libltdl-dev package.
-        ]])
-fi
+LT_PREREQ(2.2)
+LT_CONFIG_LTDL_DIR([libltdl])
+LT_INIT([dlopen win32-dll disable-static])
+LTDL_INIT([convenience recursive])
 
 #### Determine build environment ####
 
@@ -297,6 +280,7 @@ AC_CHECK_HEADERS([sys/ioctl.h])
 AC_CHECK_HEADERS([byteswap.h])
 AC_CHECK_HEADERS([sys/syscall.h])
 AC_CHECK_HEADERS([sys/eventfd.h])
+AC_CHECK_HEADERS([execinfo.h])
 
 #### Typdefs, structures, etc. ####
 
@@ -307,7 +291,7 @@ AC_TYPE_SIZE_T
 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
     [Define ssize_t if it is not done by the standard libs.])])
 AC_TYPE_OFF_T
-AC_TYPE_SIGNAL
+
 AC_TYPE_UID_T
 AC_CHECK_DECLS(environ)
 
@@ -433,22 +417,53 @@ AC_SUBST(pulselocaledir)
 #      External libraries         #
 ###################################
 
+#### pkg-config ####
+
+# Check for pkg-config manually first, as if its not installed the
+# PKG_PROG_PKG_CONFIG macro won't be defined.
+AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
+
+if test x"$have_pkg_config" = "xno"; then
+    AC_MSG_ERROR(pkg-config is required to install this program)
+fi
+
+PKG_PROG_PKG_CONFIG
+
 #### X11 (optional) ####
 
-HAVE_X11=0
+AC_ARG_ENABLE([x11],
+    AS_HELP_STRING([--disable-x11],[Disable optional X11 support]),
+        [
+            case "${enableval}" in
+                yes) x11=yes ;;
+                no) x11=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
+            esac
+        ],
+        [x11=auto])
 
-# The macro tests the host, not the build target
-if test "x$os_is_win32" != "x1" ; then
-    AC_PATH_XTRA
-    test "x$no_x" != "xyes" && HAVE_X11=1
+if test "x${x11}" != xno ; then
+    PKG_CHECK_MODULES(X11, [ x11 ice sm ],
+        HAVE_X11=1,
+        [
+            HAVE_X11=0
+            if test "x$x11" = xyes ; then
+                AC_MSG_ERROR([*** X11 not found])
+            fi
+        ])
+else
+    HAVE_X11=0
 fi
 
-AC_SUBST(HAVE_X11)
-AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "x1")
-if test "x$HAVE_X11" = "x1" ; then
-    AC_DEFINE([HAVE_X11], 1, [Have X11])
+if test "x${HAVE_X11}" = x1 ; then
+   AC_DEFINE([HAVE_X11], 1, [Have X11?])
 fi
 
+AC_SUBST(X11_CFLAGS)
+AC_SUBST(X11_LIBS)
+AC_SUBST(HAVE_X11)
+AM_CONDITIONAL([HAVE_X11], [test "x$HAVE_X11" = x1])
+
 #### Capabilities (optional) ####
 
 CAP_LIBS=''
@@ -472,18 +487,6 @@ fi
 
 AC_CHECK_HEADERS([valgrind/memcheck.h])
 
-#### pkg-config ####
-
-# Check for pkg-config manually first, as if its not installed the
-# PKG_PROG_PKG_CONFIG macro won't be defined.
-AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
-
-if test x"$have_pkg_config" = "xno"; then
-    AC_MSG_ERROR(pkg-config is required to install this program)
-fi
-
-PKG_PROG_PKG_CONFIG
-
 #### Sound file ####
 
 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
@@ -1000,6 +1003,41 @@ AC_SUBST(POLKIT_LIBS)
 AC_SUBST(HAVE_POLKIT)
 AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1])
 
+#### OpenSSL support (optional) ####
+
+AC_ARG_ENABLE([openssl],
+    AS_HELP_STRING([--disable-openssl],[Disable OpenSSL support (used for Airtunes/RAOP)]),
+        [
+            case "${enableval}" in
+                yes) openssl=yes ;;
+                no) openssl=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --disable-openssl) ;;
+            esac
+        ],
+        [openssl=auto])
+
+if test "x${openssl}" != xno ; then
+
+    PKG_CHECK_MODULES(OPENSSL, [ openssl > 0.9 ],
+        [
+            HAVE_OPENSSL=1
+            AC_DEFINE([HAVE_OPENSSL], 1, [Have OpenSSL])
+        ],
+        [
+            HAVE_OPENSSL=0
+            if test "x$openssl" = xyes ; then
+                AC_MSG_ERROR([*** OpenSSL support not found])
+            fi
+        ])
+else
+    HAVE_OPENSSL=0
+fi
+
+AC_SUBST(OPENSSL_CFLAGS)
+AC_SUBST(OPENSSL_LIBS)
+AC_SUBST(HAVE_OPENSSL)
+AM_CONDITIONAL([HAVE_OPENSSL], [test "x$HAVE_OPENSSL" = x1])
+
 ### Build and Install man pages ###
 AC_ARG_ENABLE(manpages,
         AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
@@ -1099,19 +1137,20 @@ fi
 
 AC_ARG_WITH(
         [module-dir],
-        AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
-        [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/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)
 
 AC_ARG_ENABLE(
         [force-preopen],
         AS_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
-        [FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
-AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
+        [FORCE_PREOPEN=$enableval], [FORCE_PREOPEN=no])
+AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"])
 
 AC_CONFIG_FILES([
 Makefile
+libltdl/Makefile
 src/Makefile
 man/Makefile
 libpulse.pc
@@ -1201,6 +1240,11 @@ if test "x${HAVE_POLKIT}" = "x1" ; then
    ENABLE_POLKIT=yes
 fi
 
+ENABLE_OPENSSL=no
+if test "x${HAVE_OPENSSL}" = "x1" ; then
+   ENABLE_OPENSSL=yes
+fi
+
 ENABLE_PER_USER_ESOUND_SOCKET=no
 if test "x$per_user_esound_socket" = "x1" ; then
    ENABLE_PER_USER_ESOUND_SOCKET=yes
@@ -1217,6 +1261,7 @@ echo "
     System Config Path:            ${PA_SYSTEM_CONFIG_PATH}
     Compiler:                      ${CC}
     CFLAGS:                        ${CFLAGS}
+
     Have X11:                      ${ENABLE_X11}
     Enable OSS:                    ${ENABLE_OSS}
     Enable Alsa:                   ${ENABLE_ALSA}
@@ -1232,9 +1277,13 @@ echo "
     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
     Enable PolicyKit:              ${ENABLE_POLKIT}
+    Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL}
+
     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}
+    Preopened modules:             ${PREOPEN_MODS}
 "