summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-09-06 22:49:24 +0200
committerLudovic Courtès <ludo@gnu.org>2010-09-06 22:49:24 +0200
commit18f2d5aa4dfe66469d4b109e5b56b931a057a3e0 (patch)
tree853fa764fac9b7795f25b859e95bddadf36c7039
parent2ee073587a28161dfb6b95f250be2d8a5df26cae (diff)
downloadguile-18f2d5aa4dfe66469d4b109e5b56b931a057a3e0.tar.gz
Use `have-lib' when checking for libltdl.
Suggested by primus <rprimus@gmail.com>. * configure.ac: Use `AC_LIB_HAVE_LINKFLAGS' when checking for libltdl. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD): Add $(LTLIBLTDL). * README: Update to make it clear that libgc and libffi don't have a `--with-XXX-prefix' option.
-rw-r--r--README12
-rw-r--r--configure.ac11
-rw-r--r--libguile/Makefile.am6
3 files changed, 17 insertions, 12 deletions
diff --git a/README b/README
index bc9f5df52..256e954a9 100644
--- a/README
+++ b/README
@@ -35,11 +35,13 @@ Guile depends on the following external libraries.
- libunistring
- libgc
- libffi
-It will also use the libreadline library if it is available. For each
-of these there is a corresponding --with-XXX-prefix option that you
-can use when invoking ./configure, if you have these libraries
-installed in a location other than the standard places (/usr and
-/usr/local).
+It will also use the libreadline library if it is available.
+
+There is a corresponding `--with-XXX-prefix' option for each of these
+libraries (except for libgc and libffi which use `pkg-config', see
+below) that you can use when invoking ./configure, if you have these
+libraries installed in a location other than the standard places (/usr
+and /usr/local).
These options are provided by the Gnulib `havelib' module, and details
of how they work are documented in `Searching for Libraries' in the
diff --git a/configure.ac b/configure.ac
index 18691c225..c9fc489d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,10 +74,13 @@ AM_PROG_CC_C_O
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
-AC_CHECK_LIB([ltdl], [lt_dlinit], ,
- [AC_MSG_ERROR([libltdl not found. See README.])])
-AC_CHECK_HEADER([ltdl.h], [],
- [AC_MSG_ERROR([<ltdl.h> not found. See README.])])
+
+dnl Check for libltdl.
+AC_LIB_HAVE_LINKFLAGS([ltdl], [], [#include <ltdl.h>],
+ [lt_dlopenext ("foo");])
+if text "x$HAVE_LIBLTDL" != "xyes"; then
+ AC_MSG_ERROR([GNU libltdl (Libtool) not found, see README.])
+fi
AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index d2f349bde..b8c4e6bb6 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -445,10 +445,10 @@ noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c \
noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@
-libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
- @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) \
+libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
+ @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBLTDL) \
$(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)
-libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
+libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
@LTLIBINTL@ $(LIBFFI_LIBS) $(INET_NTOP_LIB) $(INET_PTON_LIB) \
$(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB) \
-version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ \