* ld-m68k/m68k.exp ("TLS indirect symbol use"): Pass
[deliverable/binutils-gdb.git] / ld / configure.in
index 29d01ccaa39e27e33f2088eaed4cc69e2d1df448..63936f2dffa282de640663d2294bce7cbbbf2a43 100644 (file)
@@ -5,6 +5,7 @@ AC_INIT
 AC_CONFIG_SRCDIR(ldmain.c)
 
 AC_CANONICAL_TARGET
+AC_CANONICAL_BUILD
 AC_ISC_POSIX
 
 changequote(,)dnl
@@ -73,13 +74,13 @@ dnl Use --enable-gold to decide if this linker should be the default.
 dnl "install_as_default" is set to false if gold is the default linker.
 dnl "installed_linker" is the installed BFD linker name.
 AC_ARG_ENABLE(gold,
-[[  --enable-gold[=ARG]     build gold [ARG={both}[/{gold,ld}]]]],
+[[  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]]],
 [case "${enableval}" in 
yes|both/gold)
default)
    install_as_default=no
    installed_linker=ld.bfd
    ;;
both|both/ld)
yes|no)
    install_as_default=yes
    installed_linker=ld.bfd
    ;;
@@ -87,8 +88,8 @@ AC_ARG_ENABLE(gold,
    AC_MSG_ERROR([invalid --enable-gold argument])
    ;;
  esac],
-[install_as_default=ld
- installed_linker=ld])
+[install_as_default=yes
+ installed_linker=ld.bfd])
 AC_SUBST(install_as_default)
 AC_SUBST(installed_linker)
 
@@ -131,6 +132,7 @@ fi
 # host-specific stuff:
 
 AC_PROG_CC
+AC_PROG_CXX
 AC_GNU_SOURCE
 AC_USE_SYSTEM_EXTENSIONS
 ACX_LARGEFILE
@@ -138,7 +140,7 @@ AC_PROG_INSTALL
 
 LT_INIT
 
-ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga fi id bg"
+ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga fi id bg it"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -169,8 +171,36 @@ 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_ARG_ENABLE(initfini-array,
+       [  --enable-initfini-array      use .init_array/.fini_array sections],
+       [], [
+AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
+                gcc_cv_initfini_array, [dnl
+  if test "x${build}" = "x${target}" ; then
+    AC_RUN_IFELSE([AC_LANG_SOURCE([
+static int x = -1;
+int main (void) { return x; }
+int foo (void) { x = 0; }
+int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;])],
+            [gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no],
+            [gcc_cv_initfini_array=no])
+   else
+     gcc_cv_initfini_array=no
+   fi])
+  enable_initfini_array=$gcc_cv_initfini_array
+])
+AC_SUBST(enable_initfini_array)
+if test $enable_initfini_array = yes; then
+  AC_DEFINE(HAVE_INITFINI_ARRAY, 1,
+    [Define .init_array/.fini_array sections are available and working.])
+fi
+
 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
 AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
@@ -187,7 +217,7 @@ AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
 
 # Link in zlib if we can.  This is needed only for the bootstrap tests
 # right now, since those tests use libbfd, which depends on zlib.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_ZLIB
 
 # When converting linker scripts into strings for use in emulation
 # files, use astring.sed if the compiler supports ANSI string
This page took 0.025621 seconds and 4 git commands to generate.