]> code.delx.au - pulseaudio/commitdiff
Remove support for internal distributing and bundling of libltdl.
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Thu, 22 Jan 2009 15:37:40 +0000 (16:37 +0100)
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Thu, 22 Jan 2009 15:37:40 +0000 (16:37 +0100)
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.

Makefile.am
configure.ac
src/Makefile.am

index f4dd998904dc683a48021aced64c3005b2d0ee8d..8735d312be5cb4cda822b9d5203609c1fb6e72dd 100644 (file)
@@ -18,7 +18,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
-SUBDIRS = libltdl src doxygen man po
+SUBDIRS = src doxygen man po
 
 MAINTAINERCLEANFILES =
 noinst_DATA =
index 9912843fdef6f8a18012e59559c4fa0165af63f9..f659d49e07832df44d0aa2a827a4292a1a483f40 100644 (file)
@@ -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
index 8d1271c3162961bc01b7390e5c77c5f9a9b6fb84..d77f4dc1009a9366e2bab96131e5c298f220d9f4 100644 (file)
@@ -60,7 +60,6 @@ AM_CFLAGS = \
        -I$(top_builddir)/src/modules/alsa \
        -I$(top_srcdir)/src/modules/raop \
        $(PTHREAD_CFLAGS) -D_POSIX_PTHREAD_SEMANTICS \
-       $(LTDLINCL) \
        $(LIBSAMPLERATE_CFLAGS) \
        $(LIBSNDFILE_CFLAGS) \
        $(LIBSPEEX_CFLAGS) \