diff options
author | Alan Modra <amodra@gmail.com> | 2014-08-14 13:46:09 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-08-14 13:46:09 +0930 |
commit | b879806f2fdd2eca7092d7b854d6cbbbbbd0493b (patch) | |
tree | a59c6a936d98145ac0def25de34aafef89675366 /bfd/configure | |
parent | 23ebe1a0bd86fdae83ca738cf75be67b58703756 (diff) | |
download | gdb-b879806f2fdd2eca7092d7b854d6cbbbbbd0493b.zip gdb-b879806f2fdd2eca7092d7b854d6cbbbbbd0493b.tar.gz gdb-b879806f2fdd2eca7092d7b854d6cbbbbbd0493b.tar.bz2 |
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 'bfd/configure')
-rwxr-xr-x | bfd/configure | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/bfd/configure b/bfd/configure index f3df01c..592cec4 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1435,7 +1435,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-plugins Enable support for plugins (defaults no) + --enable-plugins Enable support for plugins --disable-largefile omit support for large files --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) --enable-targets alternative target configurations @@ -11776,15 +11776,46 @@ CC="$lt_save_CC" # even in directories otherwise not depending on the $plugins option. -# Check whether --enable-plugins was given. + maybe_plugins=no + for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + maybe_plugins=yes +fi + +done + + 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 + maybe_plugins=yes +fi + +done + + + # Check whether --enable-plugins was given. if test "${enable_plugins+set}" = set; then : enableval=$enable_plugins; case "${enableval}" in - yes | "") plugins=yes ;; - no) plugins=no ;; - *) plugins=yes ;; - esac + no) plugins=no ;; + *) plugins=yes + if test "$maybe_plugins" != "yes" ; then + as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 + fi ;; + esac else - plugins=no + plugins=$maybe_plugins + fi @@ -12012,10 +12043,6 @@ fi if test "$plugins" = "yes"; then - if test "$enable_dlopen" != "yes" ; then - as_fn_error " - Building BFD with plugin support requires a host that supports -ldl." "$LINENO" 5 - fi enable_targets="$enable_targets plugin" fi @@ -13532,21 +13559,6 @@ fi fi -for ac_header in windows.h dlfcn.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5 $as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } if test "${gcc_cv_header_string+set}" = set; then : |