summaryrefslogtreecommitdiff
path: root/ld/configure
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2010-10-15 16:21:40 +0000
committerDave Korn <dave.korn@artimi.com>2010-10-15 16:21:40 +0000
commitaebd3a7c76a81e3c88d497f94bf0616545abdf5f (patch)
tree487d999456d8f309a0f553e358185df212bf27b4 /ld/configure
parentdc814f0f09ac2da6273b77183fbc66ceb3c9218f (diff)
downloadbinutils-redhat-aebd3a7c76a81e3c88d497f94bf0616545abdf5f.tar.gz
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')
-rwxr-xr-xld/configure16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/configure b/ld/configure
index 9ff8529c98..3367a88a32 100755
--- a/ld/configure
+++ b/ld/configure
@@ -12919,6 +12919,22 @@ else
fi
done
+# We also support plugins on Windows (MinGW).
+if test x$enable_plugins = xno ; then
+ for ac_header in Windows.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "Windows.h" "ac_cv_header_Windows_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_Windows_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_WINDOWS_H 1
+_ACEOF
+ enable_plugins=yes
+fi
+
+done
+
+fi
if test x$enable_plugins = xyes; then
ENABLE_PLUGINS_TRUE=
ENABLE_PLUGINS_FALSE='#'