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.
- 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
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)
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@ \