summaryrefslogtreecommitdiff
path: root/ld/configure.ac
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-08-14 13:46:09 +0930
committerAlan Modra <amodra@gmail.com>2014-08-14 13:46:09 +0930
commitb879806f2fdd2eca7092d7b854d6cbbbbbd0493b (patch)
treea59c6a936d98145ac0def25de34aafef89675366 /ld/configure.ac
parent23ebe1a0bd86fdae83ca738cf75be67b58703756 (diff)
configury changes to make ld plugin support controlled by --enable-plugins
This also makes --enable-plugins default to on for hosts that can support plugins, so we have consistent lto toolchain support. The ACX_LARGEFILE moves aren't strictly necessary, but are harmless and will be necessary if plugin support is extended to more hosts via libtool's dlopen support. I started down that path then decided it was more work than I was interested in doing. (ACX_LARGEFILE invokes AC_PLUGINS.) config/ * plugins.m4: Test for dlfcn.h or windows.h here to set default for --enable-plugins. Report error if someone tries to enable plugins on a host we don't support. bfd/ * configure.ac: Delete redundant plugin related checks. * configure: Regenerate. binutils/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gas/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * config.in: Regenerate. * configure: Regenerate. gprof/ * configure.ac: Move ACX_LARGEFILE after LT_INIT. * configure: Regenerate. * gconfig.in: Regenerate. ld/ * configure.ac: Move AC_PROG_CC and other macros earlier. Delete plugin checks now done in config/plugins.m4. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'ld/configure.ac')
-rw-r--r--ld/configure.ac30
1 files changed, 11 insertions, 19 deletions
diff --git a/ld/configure.ac b/ld/configure.ac
index c81ccfe014..1bddfc9fce 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -29,6 +29,15 @@ AC_ISC_POSIX
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_PROG_CXX
+AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
+AC_PROG_INSTALL
+
+LT_INIT
+ACX_LARGEFILE
+
AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval)
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
@@ -157,15 +166,6 @@ fi
# host-specific stuff:
-AC_PROG_CC
-AC_PROG_CXX
-AC_GNU_SOURCE
-AC_USE_SYSTEM_EXTENSIONS
-ACX_LARGEFILE
-AC_PROG_INSTALL
-
-LT_INIT
-
ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga fi id bg it uk"
ZW_GNU_GETTEXT_SISTER_DIR
AM_PO_SUBDIRS
@@ -195,16 +195,8 @@ AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid)
AC_CHECK_FUNCS(open lseek close)
AC_HEADER_DIRENT
-# Check for dlopen support and enable plugins if possible.
-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_SEARCH_LIBS([dlopen], [dl])
+AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])
AC_ARG_ENABLE(initfini-array,
[ --enable-initfini-array use .init_array/.fini_array sections],