OSDN Git Service

2012-01-30 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / libitm / configure
index 1512ad1..5fc8703 100644 (file)
@@ -607,6 +607,8 @@ ARCH_X86_AVX_FALSE
 ARCH_X86_AVX_TRUE
 ARCH_X86_FALSE
 ARCH_X86_TRUE
+ARCH_ARM_FALSE
+ARCH_ARM_TRUE
 link_itm
 XLDFLAGS
 XCFLAGS
@@ -619,6 +621,9 @@ LIBITM_BUILD_VERSIONED_SHLIB_FALSE
 LIBITM_BUILD_VERSIONED_SHLIB_TRUE
 OPT_LDFLAGS
 SECTION_LDFLAGS
+HAVE_HWCAP_FALSE
+HAVE_HWCAP_TRUE
+HWCAP_LDFLAGS
 libtool_VERSION
 MAINT
 MAINTAINER_MODE_FALSE
@@ -2223,6 +2228,51 @@ rm -f conftest.val
   return $ac_retval
 
 } # ac_fn_c_compute_int
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR
+# ------------------------------------
+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_decl
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -9955,7 +10005,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -10868,7 +10918,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -10886,7 +10936,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11720,7 +11770,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11723 "configure"
+#line 11773 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11826,7 +11876,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11829 "configure"
+#line 11879 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12752,7 +12802,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
        # switch to ELF
         ld_shlibs_CXX=no
@@ -14527,7 +14577,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -14545,7 +14595,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -16450,7 +16500,7 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
 
   fi
 
-# See what sort of export controls are availible.
+# See what sort of export controls are available.
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5
 $as_echo_n "checking whether the target supports hidden visibility... " >&6; }
@@ -16557,6 +16607,8 @@ $as_echo "#define HAVE_ATTRIBUTE_ALIAS 1" >>confdefs.h
 
   fi
 
+# Check linker hardware capability support.
+
 
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
@@ -16667,6 +16719,59 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
+  test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
+
+
+  ac_save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LFLAGS -Wl,-M,$srcdir/clearcap.map"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-M,mapfile" >&5
+$as_echo_n "checking for ld that supports -Wl,-M,mapfile... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_hwcap_ldflags=yes
+else
+  ac_hwcap_ldflags=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test "$ac_hwcap_ldflags" = "yes"; then
+    HWCAP_LDFLAGS="-Wl,-M,$srcdir/clearcap.map $HWCAP_LDFLAGS"
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_hwcap_ldflags" >&5
+$as_echo "$ac_hwcap_ldflags" >&6; }
+
+  LDFLAGS="$ac_save_LDFLAGS"
+
+
+
+   if test $ac_hwcap_ldflags != no; then
+  HAVE_HWCAP_TRUE=
+  HAVE_HWCAP_FALSE='#'
+else
+  HAVE_HWCAP_TRUE='#'
+  HAVE_HWCAP_FALSE=
+fi
+
+
+# If defaulting to -mavx, don't clear hwcaps.
+ac_fn_c_check_decl "$LINENO" "__AVX__" "ac_cv_have_decl___AVX__" "$ac_includes_default"
+if test "x$ac_cv_have_decl___AVX__" = x""yes; then :
+  HWCAP_LDFLAGS=''
+fi
+
+
+
   # If we're not using GNU ld, then there's no point in even trying these
   # tests.  Check for that first.  We should have already tested for gld
   # by now (in libtool), but require it now just to be safe...
@@ -16962,7 +17067,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: versioning on shared library symbols is $enable_symvers" >&5
 $as_echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
 
-
 if test $enable_symvers = gnu; then
 
 $as_echo "#define LIBITM_GNU_SYMBOL_VERSIONING 1" >>confdefs.h
@@ -17213,6 +17317,57 @@ $as_echo "#define HAVE_AS_AVX 1" >>confdefs.h
   ;;
 esac
 
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether weak refs work like ELF" >&5
+$as_echo_n "checking whether weak refs work like ELF... " >&6; }
+if test "${ac_cv_have_elf_style_weakref+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  weakref_m4_saved_CFLAGS="$CFLAGS"
+  case "${host}" in
+    *-apple-darwin*) CFLAGS="$CFLAGS -Wl,-undefined,dynamic_lookup" ;;
+    *) ;;
+  esac
+  if test "$cross_compiling" = yes; then :
+
+case "${host}" in
+  alpha*-dec-osf*) ac_cv_have_elf_style_weakref=no ;;
+  *-apple-darwin[89]*) ac_cv_have_elf_style_weakref=no ;;
+  *) ac_cv_have_elf_style_weakref=yes;;
+esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+extern void fNotToBeFound(void) __attribute__((weak));
+int main ()
+{
+  if (fNotToBeFound)
+    return 1;
+  else
+    return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_have_elf_style_weakref=yes
+else
+  ac_cv_have_elf_style_weakref=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+CFLAGS="$weakref_m4_saved_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_elf_style_weakref" >&5
+$as_echo "$ac_cv_have_elf_style_weakref" >&6; }
+if test x"$ac_cv_have_elf_style_weakref" = xyes; then
+
+$as_echo "#define HAVE_ELF_STYLE_WEAKREF 1" >>confdefs.h
+
+fi
+
 # Cleanup and exit.
 CFLAGS="$save_CFLAGS"
 cat >confcache <<\_ACEOF
@@ -17318,6 +17473,14 @@ else
 fi
 
 
+ if test "$ARCH" = arm; then
+  ARCH_ARM_TRUE=
+  ARCH_ARM_FALSE='#'
+else
+  ARCH_ARM_TRUE='#'
+  ARCH_ARM_FALSE=
+fi
+
  if test "$ARCH" = x86; then
   ARCH_X86_TRUE=
   ARCH_X86_FALSE='#'
@@ -17479,6 +17642,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
+if test -z "${HAVE_HWCAP_TRUE}" && test -z "${HAVE_HWCAP_FALSE}"; then
+  as_fn_error "conditional \"HAVE_HWCAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${LIBITM_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBITM_BUILD_VERSIONED_SHLIB_FALSE}"; then
   as_fn_error "conditional \"LIBITM_BUILD_VERSIONED_SHLIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -17491,6 +17658,10 @@ if test -z "${LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE}" && test -z "${LIBITM_BUILD
   as_fn_error "conditional \"LIBITM_BUILD_VERSIONED_SHLIB_SUN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ARCH_ARM_TRUE}" && test -z "${ARCH_ARM_FALSE}"; then
+  as_fn_error "conditional \"ARCH_ARM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then
   as_fn_error "conditional \"ARCH_X86\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5