summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-01-22 20:02:42 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-01-22 20:02:42 +0100
commita257448ceb6c763e05bfbcdbd3c45dd61df95155 (patch)
treec101798636b8f94e3decae87eee6d81aa3072400 /configure.ac
parent3293251198effe635f4afa291b2f99219162db9d (diff)
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
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"],