summaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2013-01-11 14:36:36 +0000
committerIan Lance Taylor <ian@airs.com>2013-01-11 14:36:36 +0000
commitda48ba5cc9059a304834f2a9ceb0c5f33e4573c1 (patch)
tree56091730ef73c9d51d00451e329ae960bc0c4c71 /gold/configure.ac
parent8718041b073167c0a534dfbc9b32c19c03d89373 (diff)
downloadbinutils-redhat-da48ba5cc9059a304834f2a9ceb0c5f33e4573c1.tar.gz
Fix mingw gold build with plugins enabled
* Makefile.am: Replace -ldl with @DLOPEN_LIBS@. * configure.ac: Export DLOPEN_LIBS and add headers check. * plugin.cc: Handle non-dlfcn case. * Makefile.in: Regenerate. * config.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 804a474a9b..b03c09de0d 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -1,6 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright 2012 Free Software Foundation
+dnl Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+dnl Free Software Foundation, Inc.
dnl
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -505,6 +506,13 @@ AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map)
AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
AC_CHECK_HEADERS(byteswap.h)
+
+dnl When plugins enabled dynamic loader interface is required. Check headers
+dnl which may provide this interface. In case of dlfcn.h add libdl to link.
+AC_CHECK_HEADERS(windows.h)
+AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""])
+AC_SUBST(DLOPEN_LIBS)
+
AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)
AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem])