initial commit
[glibc.git] / sysdeps / unix / sysv / linux / riscv / configure
1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/riscv.
3
4 arch_minimum_kernel=4.15.0
5
6 libc_cv_riscv_int_abi=no
7
8
9 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11 if ${ac_cv_path_GREP+:} false; then :
12 $as_echo_n "(cached) " >&6
13 else
14 if test -z "$GREP"; then
15 ac_path_GREP_found=false
16 # Loop through the user's path and test for each of PROGNAME-LIST
17 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
19 do
20 IFS=$as_save_IFS
21 test -z "$as_dir" && as_dir=.
22 for ac_prog in grep ggrep; do
23 for ac_exec_ext in '' $ac_executable_extensions; do
24 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
25 as_fn_executable_p "$ac_path_GREP" || continue
26 # Check for GNU ac_path_GREP and select it if it is found.
27 # Check for GNU $ac_path_GREP
28 case `"$ac_path_GREP" --version 2>&1` in
29 *GNU*)
30 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
31 *)
32 ac_count=0
33 $as_echo_n 0123456789 >"conftest.in"
34 while :
35 do
36 cat "conftest.in" "conftest.in" >"conftest.tmp"
37 mv "conftest.tmp" "conftest.in"
38 cp "conftest.in" "conftest.nl"
39 $as_echo 'GREP' >> "conftest.nl"
40 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
41 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
42 as_fn_arith $ac_count + 1 && ac_count=$as_val
43 if test $ac_count -gt ${ac_path_GREP_max-0}; then
44 # Best one so far, save it but keep looking for a better one
45 ac_cv_path_GREP="$ac_path_GREP"
46 ac_path_GREP_max=$ac_count
47 fi
48 # 10*(2^10) chars as input seems more than enough
49 test $ac_count -gt 10 && break
50 done
51 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
52 esac
53
54 $ac_path_GREP_found && break 3
55 done
56 done
57 done
58 IFS=$as_save_IFS
59 if test -z "$ac_cv_path_GREP"; then
60 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
61 fi
62 else
63 ac_cv_path_GREP=$GREP
64 fi
65
66 fi
67 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
68 $as_echo "$ac_cv_path_GREP" >&6; }
69 GREP="$ac_cv_path_GREP"
70
71
72 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
73 $as_echo_n "checking for egrep... " >&6; }
74 if ${ac_cv_path_EGREP+:} false; then :
75 $as_echo_n "(cached) " >&6
76 else
77 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
78 then ac_cv_path_EGREP="$GREP -E"
79 else
80 if test -z "$EGREP"; then
81 ac_path_EGREP_found=false
82 # Loop through the user's path and test for each of PROGNAME-LIST
83 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
84 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
85 do
86 IFS=$as_save_IFS
87 test -z "$as_dir" && as_dir=.
88 for ac_prog in egrep; do
89 for ac_exec_ext in '' $ac_executable_extensions; do
90 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
91 as_fn_executable_p "$ac_path_EGREP" || continue
92 # Check for GNU ac_path_EGREP and select it if it is found.
93 # Check for GNU $ac_path_EGREP
94 case `"$ac_path_EGREP" --version 2>&1` in
95 *GNU*)
96 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
97 *)
98 ac_count=0
99 $as_echo_n 0123456789 >"conftest.in"
100 while :
101 do
102 cat "conftest.in" "conftest.in" >"conftest.tmp"
103 mv "conftest.tmp" "conftest.in"
104 cp "conftest.in" "conftest.nl"
105 $as_echo 'EGREP' >> "conftest.nl"
106 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
107 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
108 as_fn_arith $ac_count + 1 && ac_count=$as_val
109 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
110 # Best one so far, save it but keep looking for a better one
111 ac_cv_path_EGREP="$ac_path_EGREP"
112 ac_path_EGREP_max=$ac_count
113 fi
114 # 10*(2^10) chars as input seems more than enough
115 test $ac_count -gt 10 && break
116 done
117 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
118 esac
119
120 $ac_path_EGREP_found && break 3
121 done
122 done
123 done
124 IFS=$as_save_IFS
125 if test -z "$ac_cv_path_EGREP"; then
126 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
127 fi
128 else
129 ac_cv_path_EGREP=$EGREP
130 fi
131
132 fi
133 fi
134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
135 $as_echo "$ac_cv_path_EGREP" >&6; }
136 EGREP="$ac_cv_path_EGREP"
137
138
139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
140 /* end confdefs.h. */
141 __SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
142
143 _ACEOF
144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
145 $EGREP "4 8 8" >/dev/null 2>&1; then :
146 libc_cv_riscv_int_abi=lp64
147 fi
148 rm -f conftest*
149
150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
151 /* end confdefs.h. */
152 __SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
153
154 _ACEOF
155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
156 $EGREP "4 4 4" >/dev/null 2>&1; then :
157 libc_cv_riscv_int_abi=ilp32
158 fi
159 rm -f conftest*
160
161 if test $libc_cv_riscv_int_abi = no; then
162 as_fn_error $? "Unable to determine integer ABI" "$LINENO" 5
163 fi
164
165 if test $libc_cv_riscv_int_abi = ilp32; then
166 arch_minimum_kernel=5.4.0
167 fi
168
169 libc_cv_riscv_float_abi=no
170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
171 /* end confdefs.h. */
172 #ifdef __riscv_float_abi_double
173 yes
174 #endif
175
176 _ACEOF
177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
178 $EGREP "yes" >/dev/null 2>&1; then :
179 libc_cv_riscv_float_abi=d
180 fi
181 rm -f conftest*
182
183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
184 /* end confdefs.h. */
185 #ifdef __riscv_float_abi_soft
186 yes
187 #endif
188
189 _ACEOF
190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
191 $EGREP "yes" >/dev/null 2>&1; then :
192 libc_cv_riscv_float_abi=
193 fi
194 rm -f conftest*
195
196 if test "$libc_cv_riscv_float_abi" = no; then
197 as_fn_error $? "Unable to determine floating-point ABI" "$LINENO" 5
198 fi
199
200 config_vars="$config_vars
201 default-abi = $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi"
202
203 case $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi-$machine in
204 lp64-riscv/rv64/*)
205 test -n "$libc_cv_slibdir" ||
206 case "$prefix" in
207 /usr | /usr/)
208 libc_cv_slibdir='/lib64/lp64'
209 libc_cv_rtlddir='/lib'
210 if test "$libdir" = '${exec_prefix}/lib'; then
211 libdir='${exec_prefix}/lib64/lp64';
212 # Locale data can be shared between 32-bit and 64-bit libraries.
213 libc_cv_complocaledir='${exec_prefix}/lib/locale'
214 fi
215 ;;
216 esac
217 ;;
218 lp64d-riscv/rv64/*)
219 test -n "$libc_cv_slibdir" ||
220 case "$prefix" in
221 /usr | /usr/)
222 libc_cv_slibdir='/lib64/lp64d'
223 libc_cv_rtlddir='/lib'
224 if test "$libdir" = '${exec_prefix}/lib'; then
225 libdir='${exec_prefix}/lib64/lp64d';
226 # Locale data can be shared between 32-bit and 64-bit libraries.
227 libc_cv_complocaledir='${exec_prefix}/lib/locale'
228 fi
229 ;;
230 esac
231 ;;
232 ilp32-riscv/rv32/*)
233 test -n "$libc_cv_slibdir" ||
234 case "$prefix" in
235 /usr | /usr/)
236 libc_cv_slibdir='/lib32/ilp32'
237 libc_cv_rtlddir='/lib'
238 if test "$libdir" = '${exec_prefix}/lib'; then
239 libdir='${exec_prefix}/lib32/ilp32';
240 # Locale data can be shared between 32-bit and 64-bit libraries.
241 libc_cv_complocaledir='${exec_prefix}/lib/locale'
242 fi
243 ;;
244 esac
245 ;;
246 ilp32d-riscv/rv32/*)
247 test -n "$libc_cv_slibdir" ||
248 case "$prefix" in
249 /usr | /usr/)
250 libc_cv_slibdir='/lib32/ilp32d'
251 libc_cv_rtlddir='/lib'
252 if test "$libdir" = '${exec_prefix}/lib'; then
253 libdir='${exec_prefix}/lib32/ilp32d';
254 # Locale data can be shared between 32-bit and 64-bit libraries.
255 libc_cv_complocaledir='${exec_prefix}/lib/locale'
256 fi
257 ;;
258 esac
259 ;;
260 esac
261
262 ldd_rewrite_script=sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed