--- binutils-2.21.51.0.7/bfd/configure.in +++ binutils-2.21.51.0.7/bfd/configure.in @@ -31,7 +31,13 @@ AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") if test "$plugins" = "yes"; then - if test "$enable_dlopen" != "yes" ; then + # Check for dlopen support + has_dlopen=yes + AC_CHECK_HEADER([dlfcn.h],[],[has_dlopen=no],[AC_INCLUDES_DEFAULT]) + AC_SEARCH_LIBS([dlopen],[dl],[],[has_dlopen=no],[]) + AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[has_dlopen=no]) + + if test "$has_dlopen" != "yes" ; then AC_MSG_ERROR([ Building BFD with plugin support requires a host that supports -ldl.]) fi --- binutils-2.21.51.0.7/bfd/Makefile.in +++ binutils-2.21.51.0.7/bfd/Makefile.in @@ -336,7 +336,6 @@ @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -@PLUGINS_TRUE@LIBDL = -ldl # bfd.h goes here, for now BFD_H = bfd.h