1# This file is generated from configure.ac by Autoconf. DO NOT EDIT! 2 # Local configure fragment for sysdeps/sparc/sparc32 3 4# Test if compiler targets at least sparcv8. 5 6 7{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 8$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 9if ${ac_cv_path_GREP+:} false; then : 10 $as_echo_n "(cached) " >&6 11else 12 if test -z "$GREP"; then 13 ac_path_GREP_found=false 14 # Loop through the user's path and test for each of PROGNAME-LIST 15 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 17do 18 IFS=$as_save_IFS 19 test -z "$as_dir" && as_dir=. 20 for ac_prog in grep ggrep; do 21 for ac_exec_ext in '' $ac_executable_extensions; do 22 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 23 as_fn_executable_p "$ac_path_GREP" || continue 24# Check for GNU ac_path_GREP and select it if it is found. 25 # Check for GNU $ac_path_GREP 26case `"$ac_path_GREP" --version 2>&1` in 27*GNU*) 28 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 29*) 30 ac_count=0 31 $as_echo_n 0123456789 >"conftest.in" 32 while : 33 do 34 cat "conftest.in" "conftest.in" >"conftest.tmp" 35 mv "conftest.tmp" "conftest.in" 36 cp "conftest.in" "conftest.nl" 37 $as_echo 'GREP' >> "conftest.nl" 38 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 39 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 40 as_fn_arith $ac_count + 1 && ac_count=$as_val 41 if test $ac_count -gt ${ac_path_GREP_max-0}; then 42 # Best one so far, save it but keep looking for a better one 43 ac_cv_path_GREP="$ac_path_GREP" 44 ac_path_GREP_max=$ac_count 45 fi 46 # 10*(2^10) chars as input seems more than enough 47 test $ac_count -gt 10 && break 48 done 49 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 50esac 51 52 $ac_path_GREP_found && break 3 53 done 54 done 55 done 56IFS=$as_save_IFS 57 if test -z "$ac_cv_path_GREP"; then 58 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 59 fi 60else 61 ac_cv_path_GREP=$GREP 62fi 63 64fi 65{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 66$as_echo "$ac_cv_path_GREP" >&6; } 67 GREP="$ac_cv_path_GREP" 68 69 70{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 71$as_echo_n "checking for egrep... " >&6; } 72if ${ac_cv_path_EGREP+:} false; then : 73 $as_echo_n "(cached) " >&6 74else 75 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 76 then ac_cv_path_EGREP="$GREP -E" 77 else 78 if test -z "$EGREP"; then 79 ac_path_EGREP_found=false 80 # Loop through the user's path and test for each of PROGNAME-LIST 81 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 83do 84 IFS=$as_save_IFS 85 test -z "$as_dir" && as_dir=. 86 for ac_prog in egrep; do 87 for ac_exec_ext in '' $ac_executable_extensions; do 88 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 89 as_fn_executable_p "$ac_path_EGREP" || continue 90# Check for GNU ac_path_EGREP and select it if it is found. 91 # Check for GNU $ac_path_EGREP 92case `"$ac_path_EGREP" --version 2>&1` in 93*GNU*) 94 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 95*) 96 ac_count=0 97 $as_echo_n 0123456789 >"conftest.in" 98 while : 99 do 100 cat "conftest.in" "conftest.in" >"conftest.tmp" 101 mv "conftest.tmp" "conftest.in" 102 cp "conftest.in" "conftest.nl" 103 $as_echo 'EGREP' >> "conftest.nl" 104 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 105 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 106 as_fn_arith $ac_count + 1 && ac_count=$as_val 107 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 108 # Best one so far, save it but keep looking for a better one 109 ac_cv_path_EGREP="$ac_path_EGREP" 110 ac_path_EGREP_max=$ac_count 111 fi 112 # 10*(2^10) chars as input seems more than enough 113 test $ac_count -gt 10 && break 114 done 115 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 116esac 117 118 $ac_path_EGREP_found && break 3 119 done 120 done 121 done 122IFS=$as_save_IFS 123 if test -z "$ac_cv_path_EGREP"; then 124 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 125 fi 126else 127 ac_cv_path_EGREP=$EGREP 128fi 129 130 fi 131fi 132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 133$as_echo "$ac_cv_path_EGREP" >&6; } 134 EGREP="$ac_cv_path_EGREP" 135 136 137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for at least sparcv8 support" >&5 138$as_echo_n "checking for at least sparcv8 support... " >&6; } 139if ${libc_cv_sparcv8+:} false; then : 140 $as_echo_n "(cached) " >&6 141else 142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 143/* end confdefs.h. */ 144#if defined (__sparc_v8__) || defined (__sparc_v9__) 145 yes 146 #endif 147 148_ACEOF 149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 150 $EGREP "yes" >/dev/null 2>&1; then : 151 libc_cv_sparcv8=yes 152else 153 libc_cv_sparcv8=no 154fi 155rm -f conftest* 156 157fi 158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparcv8" >&5 159$as_echo "$libc_cv_sparcv8" >&6; } 160if test $libc_cv_sparcv8 = no; then 161 as_fn_error $? "no support for pre-v8 sparc" "$LINENO" 5 162fi 163 164# Test if compiler generates external calls to libatomic for CAS operation. 165# It is suffice to check for int only and the test is similar of C11 166# atomic_compare_exchange_strong using GCC builtins. 167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external libatomic calls" >&5 168$as_echo_n "checking for external libatomic calls... " >&6; } 169if ${libc_cv_cas_uses_libatomic+:} false; then : 170 $as_echo_n "(cached) " >&6 171else 172 cat > conftest.c <<EOF 173 _Bool foo (int *ptr, int *expected, int desired) 174 { 175 return __atomic_compare_exchange_n (ptr, expected, desired, 0, 176 __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); 177 } 178EOF 179 libc_cv_cas_uses_libatomic=no 180 if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' 181 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 182 (eval $ac_try) 2>&5 183 ac_status=$? 184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 185 test $ac_status = 0; }; }; then 186 if grep '__atomic_compare_exchange_4' conftest.s >/dev/null; then 187 libc_cv_cas_uses_libatomic=yes 188 fi 189 fi 190 rm -f conftest.c conftest.s 191 192fi 193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cas_uses_libatomic" >&5 194$as_echo "$libc_cv_cas_uses_libatomic" >&6; } 195if test $libc_cv_cas_uses_libatomic = yes; then 196 as_fn_error $? "external dependency of libatomic is not supported" "$LINENO" 5 197fi 198