aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.in
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2010-10-15 16:21:41 +0000
committerDave Korn <dave.korn@artimi.com>2010-10-15 16:21:41 +0000
commit3917d5d5ca1bed255ee9bd0a0b38360505ce5b4c (patch)
tree2cd98ae08c668c0f8121c6421d40f1e68f3a6697 /ld/configure.in
parentd4cb7acdd8134607c321fc33c91696d672f49b1d (diff)
downloadfsf-binutils-gdb-3917d5d5ca1bed255ee9bd0a0b38360505ce5b4c.zip
fsf-binutils-gdb-3917d5d5ca1bed255ee9bd0a0b38360505ce5b4c.tar.gz
fsf-binutils-gdb-3917d5d5ca1bed255ee9bd0a0b38360505ce5b4c.tar.bz2
Provide win32-based dlapi replacements on windows platforms without dlfcn.h.
ld/ChangeLog: * configure.in: If <dlfcn.h> can't be found, try for <Windows.h> * configure: Regenerate. * config.in: Likewise. * plugin.c [!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlopen): Provide trival LoadLibrary-based replacement for Windows systems. [!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlsym): Likewise trivial replacement based on GetProcAddress. [!HAVE_DLFCN_H && HAVE_WINDOWS_H] (dlsym): Likewise FreeLibrary. * sysdep.h: Don't infer presence of <dlfcn.h> from ENABLE_PLUGINS anymore, use its own guard.
Diffstat (limited to 'ld/configure.in')
-rw-r--r--ld/configure.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/configure.in b/ld/configure.in
index 29d01cc..122f65e 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -169,6 +169,10 @@ enable_plugins=yes
AC_CHECK_HEADER([dlfcn.h],[],[enable_plugins=no],[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([dlopen],[dl],[],[enable_plugins=no],[])
AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no])
+# We also support plugins on Windows (MinGW).
+if test x$enable_plugins = xno ; then
+ AC_CHECK_HEADERS([Windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT])
+fi
AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes])
AC_MSG_CHECKING(for a known getopt prototype in unistd.h)