* configure.ac: For --enable-gold, handle value `default' instead of
[deliverable/binutils-gdb.git] / gold / configure
index 30bd132d749f5344464dc62f912344f0405602ad..c759b77575f564119c25e7a64911906398a865b4 100755 (executable)
@@ -602,6 +602,8 @@ LFS_CFLAGS
 WARN_CXXFLAGS
 NO_WERROR
 WARN_CFLAGS
+IFUNC_FALSE
+IFUNC_TRUE
 RANDOM_SEED_CFLAGS
 CONSTRUCTOR_PRIORITY_FALSE
 CONSTRUCTOR_PRIORITY_TRUE
@@ -619,6 +621,8 @@ MCMODEL_MEDIUM_FALSE
 MCMODEL_MEDIUM_TRUE
 FN_PTRS_IN_SO_WITHOUT_PIC_FALSE
 FN_PTRS_IN_SO_WITHOUT_PIC_TRUE
+NATIVE_OR_CROSS_LINKER_FALSE
+NATIVE_OR_CROSS_LINKER_TRUE
 GCC_FALSE
 GCC_TRUE
 NATIVE_LINKER_FALSE
@@ -682,6 +686,8 @@ PLUGINS_FALSE
 PLUGINS_TRUE
 THREADS_FALSE
 THREADS_TRUE
+installed_linker
+install_as_default
 am__untar
 am__tar
 AMTAR
@@ -759,6 +765,8 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 with_sysroot
+enable_ld
+enable_gold
 enable_threads
 enable_plugins
 enable_targets
@@ -1403,6 +1411,8 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-ld[=ARG]     build ld [ARG={default,yes,no}]
+  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
   --enable-threads        multi-threaded linking
   --enable-plugins        linker plugins
   --enable-targets        alternative target configurations
@@ -1909,8 +1919,10 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
@@ -1920,8 +1932,12 @@ $4
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -2185,8 +2201,10 @@ $as_echo "$ac_res" >&6; }
 ac_fn_cxx_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
@@ -2196,8 +2214,12 @@ $4
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -3227,6 +3249,41 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+
+default_ld=
+# Check whether --enable-ld was given.
+if test "${enable_ld+set}" = set; then :
+  enableval=$enable_ld; case "${enableval}" in
+  default)
+    default_ld=ld.bfd
+    ;;
+esac
+fi
+
+
+# Check whether --enable-gold was given.
+if test "${enable_gold+set}" = set; then :
+  enableval=$enable_gold; case "${enableval}" in
+ yes|default)
+   if test x${default_ld} = x; then
+     install_as_default=yes
+   fi
+   installed_linker=ld.gold
+   ;;
+ no)
+   ;;
+ *)
+   as_fn_error "invalid --enable-gold argument" "$LINENO" 5
+   ;;
+ esac
+else
+  install_as_default=no
+ installed_linker=ld.gold
+fi
+
+
+
+
 # Check whether --enable-threads was given.
 if test "${enable_threads+set}" = set; then :
   enableval=$enable_threads; case "${enableval}" in
@@ -3410,6 +3467,16 @@ fi
   fi
 done
 
+# Remove any duplicates.
+to=""
+for t in $targetobjs; do
+  case " $to " in
+  *" $t "*) ;;
+  *) to="$to $t" ;;
+  esac
+done
+targetobjs=$to
+
 if test -n "$targ_32_little"; then
 
 $as_echo "#define HAVE_TARGET_32_LITTLE 1" >>confdefs.h
@@ -6030,6 +6097,15 @@ else
 fi
 
 
+ if test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias" -o "x$host_alias" = "x$build_alias"; then
+  NATIVE_OR_CROSS_LINKER_TRUE=
+  NATIVE_OR_CROSS_LINKER_FALSE='#'
+else
+  NATIVE_OR_CROSS_LINKER_TRUE='#'
+  NATIVE_OR_CROSS_LINKER_FALSE=
+fi
+
+
  if
   case $target_cpu in
     i?86) true;;
@@ -6045,7 +6121,32 @@ else
 fi
 
 
- if test "$target_cpu" = "x86_64"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.1" >&5
+$as_echo_n "checking for gcc >= 4.1... " >&6; }
+if test "${gold_cv_prog_gcc41+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if !defined __GNUC__
+error
+#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
+error
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gold_cv_prog_gcc41=yes
+else
+  gold_cv_prog_gcc41=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_prog_gcc41" >&5
+$as_echo "$gold_cv_prog_gcc41" >&6; }
+
+ if test "$target_cpu" = "x86_64" -a "$gold_cv_prog_gcc41" = "yes"; then
   MCMODEL_MEDIUM_TRUE=
   MCMODEL_MEDIUM_FALSE='#'
 else
@@ -6269,8 +6370,55 @@ if test "$gold_cv_c_random_seed" = "yes"; then
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc >= 2.11" >&5
+$as_echo_n "checking for glibc >= 2.11... " >&6; }
+if test "${gold_cv_lib_glibc2_11+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#if !defined __GLIBC__
+error
+#elif __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 11)
+error
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gold_cv_lib_glibc2_11=yes
+else
+  gold_cv_lib_glibc2_11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_lib_glibc2_11" >&5
+$as_echo "$gold_cv_lib_glibc2_11" >&6; }
+
+ if test "$gold_cv_lib_glibc2_11" = "yes"; then
+  IFUNC_TRUE=
+  IFUNC_FALSE='#'
+else
+  IFUNC_TRUE='#'
+  IFUNC_FALSE=
+fi
+
+
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
+fi
+rm -f conftest*
 
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow"
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
@@ -6282,7 +6430,7 @@ if test "${enable_werror+set}" = set; then :
 fi
 
 
-# Enable -Wno-format by default when using gcc on mingw
+# Disable -Wformat by default when using gcc on mingw
 case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
@@ -6701,7 +6849,7 @@ fi
 
 done
 
-for ac_func in mallinfo posix_fallocate readv
+for ac_func in mallinfo posix_fallocate readv sysconf times
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -7096,6 +7244,10 @@ if test -z "${GCC_TRUE}" && test -z "${GCC_FALSE}"; then
   as_fn_error "conditional \"GCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${NATIVE_OR_CROSS_LINKER_TRUE}" && test -z "${NATIVE_OR_CROSS_LINKER_FALSE}"; then
+  as_fn_error "conditional \"NATIVE_OR_CROSS_LINKER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_TRUE}" && test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_FALSE}"; then
   as_fn_error "conditional \"FN_PTRS_IN_SO_WITHOUT_PIC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -7128,6 +7280,10 @@ if test -z "${CONSTRUCTOR_PRIORITY_TRUE}" && test -z "${CONSTRUCTOR_PRIORITY_FAL
   as_fn_error "conditional \"CONSTRUCTOR_PRIORITY\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${IFUNC_TRUE}" && test -z "${IFUNC_FALSE}"; then
+  as_fn_error "conditional \"IFUNC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then
   as_fn_error "conditional \"HAVE_ZLIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -8431,7 +8587,7 @@ $as_echo X"$file" |
       case "$ac_file" in */Makefile.in)
         # Adjust a relative srcdir.
         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
         # In autoconf-2.13 it is called $ac_given_srcdir.
         # In autoconf-2.50 it is called $srcdir.
This page took 0.02797 seconds and 4 git commands to generate.