From c65d3a9fb04d2c598b5c7fec3a060ec97eb778b9 Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Thu, 22 Jan 2009 16:37:40 +0100 Subject: Remove support for internal distributing and bundling of libltdl. Standing to what the libtool documentation says, the LTDL_INIT macro and the related configure options are only useful when intending to distribute libltdl, and is superfluous if the system copy were always to be used. Which makes it very easy to just drop the internal copy and use the system library, just do it like any other library lacking pkg-config files to identify its presence. If this tries to build against an older libtool version it might fail at link time, so for now this is not an user-proof solution. But it at least should provide a working environment for packagers. --- configure.ac | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9912843f..f659d49e 100644 --- a/configure.ac +++ b/configure.ac @@ -237,9 +237,28 @@ AS_IF([test "$pulseaudio_cv__Bool" = "yes"], [ #### libtool stuff #### LT_PREREQ(2.2) -LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([dlopen win32-dll disable-static]) -LTDL_INIT([convenience recursive]) + +dnl Unfortunately, even up to libtool 2.2.6a there is no way to know +dnl exactly which version of libltdl is present in the system, so we +dnl just assume that it's a working version as long as we have the +dnl library and the header files. +dnl +dnl Check the header files first since the system may have a +dnl libltdl.so for runtime, but no headers, and we want to bail out as +dnl soon as possible. +dnl +dnl We don't need any special variable for this though, since the user +dnl can give the proper place to find libltdl through the standard +dnl variables like LDFLAGS and CPPFLAGS. + +AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_LIB([ltdl], [lt_dlopen], [LIBLTDL=-lltdl], [LIBLTDL=])], + [LIBLTDL=]) + +AS_IF([test "x$LIBLTDL" = "x"], + [AC_MSG_ERROR([Unable to find libltdl.])]) +AC_SUBST([LIBLTDL]) #### Determine build environment #### @@ -1174,7 +1193,6 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"]) AC_CONFIG_FILES([ Makefile -libltdl/Makefile src/Makefile man/Makefile libpulse.pc -- cgit From 1b20d287b9ff496a643c9256870c5cff0e3389f9 Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Thu, 22 Jan 2009 16:41:45 +0100 Subject: Fix logic thinko. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f659d49e..2b378c1b 100644 --- a/configure.ac +++ b/configure.ac @@ -105,7 +105,7 @@ 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"]) +AM_CONDITIONAL([BUILD_TESTS_DEFAULT], [test "x$enable_default_build_tests" != "xno"]) # Native atomic operation support AC_ARG_ENABLE([atomic-arm-linux-helpers], -- cgit From 3293251198effe635f4afa291b2f99219162db9d Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Thu, 22 Jan 2009 16:52:41 +0100 Subject: Move the safety check about pkg-config in bootstrap.sh. Don't check twice for pkg-config during configure, since the undefined macro would be possibly caused on a different system. --- configure.ac | 8 -------- 1 file changed, 8 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2b378c1b..11f98764 100644 --- a/configure.ac +++ b/configure.ac @@ -462,14 +462,6 @@ AC_SUBST(pulselocaledir) #### 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) #### -- cgit From a257448ceb6c763e05bfbcdbd3c45dd61df95155 Mon Sep 17 00:00:00 2001 From: "Diego E. 'Flameeyes' Pettenò" Date: Thu, 22 Jan 2009 20:02:42 +0100 Subject: Improve the ltdl discovery code by checking for libtool 2.x functions. The lt_dladvise_* interfaces are implemented only in the 2.x series and are not implemented in 1.4, so we can rely on their presence to know that the version is good enough. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 11f98764..bc6c1ce6 100644 --- a/configure.ac +++ b/configure.ac @@ -244,6 +244,10 @@ dnl exactly which version of libltdl is present in the system, so we dnl just assume that it's a working version as long as we have the dnl library and the header files. dnl +dnl As an extra safety device, check for lt_dladvise_init() which is +dnl only implemented in libtool 2.x, and refine as we go if we have +dnl refined requirements. +dnl dnl Check the header files first since the system may have a dnl libltdl.so for runtime, but no headers, and we want to bail out as dnl soon as possible. @@ -253,7 +257,7 @@ dnl can give the proper place to find libltdl through the standard dnl variables like LDFLAGS and CPPFLAGS. AC_CHECK_HEADER([ltdl.h], - [AC_CHECK_LIB([ltdl], [lt_dlopen], [LIBLTDL=-lltdl], [LIBLTDL=])], + [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])], [LIBLTDL=]) AS_IF([test "x$LIBLTDL" = "x"], -- cgit