about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread/configure
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread/configure')
-rw-r--r--nptl/sysdeps/pthread/configure242
1 files changed, 150 insertions, 92 deletions
diff --git a/nptl/sysdeps/pthread/configure b/nptl/sysdeps/pthread/configure
index 7768c5c741..3f7dcd61f3 100644
--- a/nptl/sysdeps/pthread/configure
+++ b/nptl/sysdeps/pthread/configure
@@ -1,39 +1,157 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
 
 if test "x$libc_cv_gcc___thread" != xyes; then
-  { { $as_echo "$as_me:$LINENO: error: compiler support for __thread is required" >&5
-$as_echo "$as_me: error: compiler support for __thread is required" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "compiler support for __thread is required" "$LINENO" 5
 fi
 
 if test "x${libc_cv_visibility_attribute}" != xyes ||
    test "x${libc_cv_broken_visibility_attribute}" != xno; then
-  { { $as_echo "$as_me:$LINENO: error: working compiler support for visibility attribute is required" >&5
-$as_echo "$as_me: error: working compiler support for visibility attribute is required" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "working compiler support for visibility attribute is required" "$LINENO" 5
 fi
 
 if test "x$libc_cv_asm_cfi_directives" != xyes; then
     case "$base_machine" in
     i386 | x86_64 | powerpc | s390)
-      { { $as_echo "$as_me:$LINENO: error: CFI directive support in assembler is required" >&5
-$as_echo "$as_me: error: CFI directive support in assembler is required" >&2;}
-   { (exit 1); exit 1; }; } ;;
+      as_fn_error $? "CFI directive support in assembler is required" "$LINENO" 5 ;;
     *) ;;
   esac
 fi
 
 
-{ $as_echo "$as_me:$LINENO: checking for forced unwind support" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for forced unwind support" >&5
 $as_echo_n "checking for forced unwind support... " >&6; }
-if test "${libc_cv_forced_unwind+set}" = set; then
+if test "${libc_cv_forced_unwind+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unwind.h>
 int
@@ -47,58 +165,27 @@ _Unwind_GetCFA (context)
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_c_try_link "$LINENO"; then :
   libc_cv_forced_unwind=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	libc_cv_forced_unwind=no
+  libc_cv_forced_unwind=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5
 $as_echo "$libc_cv_forced_unwind" >&6; }
 if test $libc_cv_forced_unwind = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_FORCED_UNWIND 1
-_ACEOF
+  $as_echo "#define HAVE_FORCED_UNWIND 1" >>confdefs.h
 
   old_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -Werror -fexceptions"
-  { $as_echo "$as_me:$LINENO: checking for C cleanup handling" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C cleanup handling" >&5
 $as_echo_n "checking for C cleanup handling... " >&6; }
-if test "${libc_cv_c_cleanup+set}" = set; then
+if test "${libc_cv_c_cleanup+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <stdio.h>
@@ -113,49 +200,20 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_c_try_link "$LINENO"; then :
   libc_cv_c_cleanup=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	libc_cv_c_cleanup=no
+  libc_cv_c_cleanup=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_cleanup" >&5
 $as_echo "$libc_cv_c_cleanup" >&6; }
   CFLAGS="$old_CFLAGS"
   if test $libc_cv_c_cleanup = no; then
-    { { $as_echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
-$as_echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "the compiler must support C cleanup handling" "$LINENO" 5
   fi
 else
-  { { $as_echo "$as_me:$LINENO: error: forced unwind support is required" >&5
-$as_echo "$as_me: error: forced unwind support is required" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "forced unwind support is required" "$LINENO" 5
 fi