Debian Codegraph @

sysdeps/sparc/sparc32/configure

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