1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/sparc/sparc32
4 # Test if compiler targets at least sparcv8.
7 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8 printf %s "checking for grep that handles long lines and -e... " >&6; }
9 if test ${ac_cv_path_GREP+y}
11 printf %s "(cached) " >&6
13 if test -z "$GREP"; then
14 ac_path_GREP_found=false
15 # Loop through the user's path and test for each of PROGNAME-LIST
16 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
25 for ac_prog in grep ggrep
27 for ac_exec_ext in '' $ac_executable_extensions; do
28 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
29 as_fn_executable_p "$ac_path_GREP" || continue
30 # Check for GNU ac_path_GREP and select it if it is found.
31 # Check for GNU $ac_path_GREP
32 case `"$ac_path_GREP" --version 2>&1` in
34 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
37 printf %s 0123456789 >"conftest.in"
40 cat "conftest.in" "conftest.in" >"conftest.tmp"
41 mv "conftest.tmp" "conftest.in"
42 cp "conftest.in" "conftest.nl"
43 printf "%s\n" 'GREP' >> "conftest.nl"
44 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
45 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
46 as_fn_arith $ac_count + 1 && ac_count=$as_val
47 if test $ac_count -gt ${ac_path_GREP_max-0}; then
48 # Best one so far, save it but keep looking for a better one
49 ac_cv_path_GREP="$ac_path_GREP"
50 ac_path_GREP_max=$ac_count
52 # 10*(2^10) chars as input seems more than enough
53 test $ac_count -gt 10 && break
55 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
58 $ac_path_GREP_found && break 3
63 if test -z "$ac_cv_path_GREP"; then
64 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
71 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
72 printf "%s\n" "$ac_cv_path_GREP" >&6; }
73 GREP="$ac_cv_path_GREP"
76 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
77 printf %s "checking for egrep... " >&6; }
78 if test ${ac_cv_path_EGREP+y}
80 printf %s "(cached) " >&6
82 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
83 then ac_cv_path_EGREP="$GREP -E"
85 if test -z "$EGREP"; then
86 ac_path_EGREP_found=false
87 # Loop through the user's path and test for each of PROGNAME-LIST
88 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
89 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
99 for ac_exec_ext in '' $ac_executable_extensions; do
100 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
101 as_fn_executable_p "$ac_path_EGREP" || continue
102 # Check for GNU ac_path_EGREP and select it if it is found.
103 # Check for GNU $ac_path_EGREP
104 case `"$ac_path_EGREP" --version 2>&1` in
106 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
109 printf %s 0123456789 >"conftest.in"
112 cat "conftest.in" "conftest.in" >"conftest.tmp"
113 mv "conftest.tmp" "conftest.in"
114 cp "conftest.in" "conftest.nl"
115 printf "%s\n" 'EGREP' >> "conftest.nl"
116 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
117 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
118 as_fn_arith $ac_count + 1 && ac_count=$as_val
119 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
120 # Best one so far, save it but keep looking for a better one
121 ac_cv_path_EGREP="$ac_path_EGREP"
122 ac_path_EGREP_max=$ac_count
124 # 10*(2^10) chars as input seems more than enough
125 test $ac_count -gt 10 && break
127 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
130 $ac_path_EGREP_found && break 3
135 if test -z "$ac_cv_path_EGREP"; then
136 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
139 ac_cv_path_EGREP=$EGREP
144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
145 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
146 EGREP="$ac_cv_path_EGREP"
149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for at least sparcv8 support" >&5
150 printf %s "checking for at least sparcv8 support... " >&6; }
151 if test ${libc_cv_sparcv8+y}
153 printf %s "(cached) " >&6
155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
156 /* end confdefs.h. */
157 #if defined (__sparc_v8__) || defined (__sparc_v9__)
162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
163 $EGREP "yes" >/dev/null 2>&1
172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparcv8" >&5
173 printf "%s\n" "$libc_cv_sparcv8" >&6; }
174 if test $libc_cv_sparcv8 = no; then
175 as_fn_error $? "no support for pre-v8 sparc" "$LINENO" 5
178 # Test if compiler generates external calls to libatomic for CAS operation.
179 # It is suffice to check for int only and the test is similar of C11
180 # atomic_compare_exchange_strong using GCC builtins.
181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external libatomic calls" >&5
182 printf %s "checking for external libatomic calls... " >&6; }
183 if test ${libc_cv_cas_uses_libatomic+y}
185 printf %s "(cached) " >&6
187 cat > conftest.c <<EOF
188 _Bool foo (int *ptr, int *expected, int desired)
190 return __atomic_compare_exchange_n (ptr, expected, desired, 0,
191 __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
194 libc_cv_cas_uses_libatomic=no
195 if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
196 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
199 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
200 test $ac_status = 0; }; }; then
201 if grep '__atomic_compare_exchange_4' conftest.s >/dev/null; then
202 libc_cv_cas_uses_libatomic=yes
205 rm -f conftest.c conftest.s
208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cas_uses_libatomic" >&5
209 printf "%s\n" "$libc_cv_cas_uses_libatomic" >&6; }
210 if test $libc_cv_cas_uses_libatomic = yes; then
211 as_fn_error $? "external dependency of libatomic is not supported" "$LINENO" 5