summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 21 insertions, 3 deletions
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