LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotes
[glibc.git] / sysdeps / unix / sysv / linux / mips / configure
blob1ee7f41a363d2e09ddfe5e207725732985478ac7
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux/mips.
5 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6 /* end confdefs.h.  */
8     #if (_MIPS_SIM != _ABIO32)
9     #error Not O32 ABI
10     #endif
11 int
12 main ()
15   ;
16   return 0;
18 _ACEOF
19 if ac_fn_c_try_compile "$LINENO"; then :
20   libc_mips_abi=o32
21 else
22   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23 /* end confdefs.h.  */
25       #if (_MIPS_SIM != _ABIN32)
26       #error Not N32 ABI
27       #endif
28 int
29 main ()
32   ;
33   return 0;
35 _ACEOF
36 if ac_fn_c_try_compile "$LINENO"; then :
37   libc_mips_abi=n32
38 else
39   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40 /* end confdefs.h.  */
42         #if (_MIPS_SIM != _ABI64)
43         #error Not 64 ABI
44         #endif
45 int
46 main ()
49   ;
50   return 0;
52 _ACEOF
53 if ac_fn_c_try_compile "$LINENO"; then :
54   libc_mips_abi=n64
56 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62 if test -z "$libc_mips_abi"; then
63   as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5
66 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67 /* end confdefs.h.  */
69     #if !defined(__mips_soft_float)
70     #error Not soft ABI
71     #endif
72 int
73 main ()
76   ;
77   return 0;
79 _ACEOF
80 if ac_fn_c_try_compile "$LINENO"; then :
81   libc_mips_float=soft
82 else
83   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84 /* end confdefs.h.  */
86       #if !defined(__mips_hard_float)
87       #error Not hard ABI
88       #endif
89 int
90 main ()
93   ;
94   return 0;
96 _ACEOF
97 if ac_fn_c_try_compile "$LINENO"; then :
98   libc_mips_float=hard
100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
104 if test -z "$libc_mips_float"; then
105   as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5
108 libc_mips_o32_fp=
109 libc_cv_mips_fp64=
110 libc_cv_mips_modd_spreg=
112 if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then
113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
114 /* end confdefs.h.  */
116       #if !defined(__mips_fpr)
117       #error Missing FPR sizes
118       #endif
120 main ()
123   ;
124   return 0;
126 _ACEOF
127 if ac_fn_c_try_compile "$LINENO"; then :
128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
129 /* end confdefs.h.  */
131         #if (__mips_fpr != 32)
132         #error Not FP32
133         #endif
135 main ()
138   ;
139   return 0;
141 _ACEOF
142 if ac_fn_c_try_compile "$LINENO"; then :
143   libc_mips_o32_fp=32
144 else
145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
146 /* end confdefs.h.  */
148           #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
149           #error Not FPXX (without odd single-precision registers)
150           #endif
152 main ()
155   ;
156   return 0;
158 _ACEOF
159 if ac_fn_c_try_compile "$LINENO"; then :
160   libc_mips_o32_fp=xx
161 else
162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
163 /* end confdefs.h.  */
165             #if (__mips_fpr != 0)
166             #error Not FPXX (with odd single precision registers)
167             #endif
169 main ()
172   ;
173   return 0;
175 _ACEOF
176 if ac_fn_c_try_compile "$LINENO"; then :
177   libc_mips_o32_fp=xxo
178 else
179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
180 /* end confdefs.h.  */
182               #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
183               #error Not FP64A
184               #endif
186 main ()
189   ;
190   return 0;
192 _ACEOF
193 if ac_fn_c_try_compile "$LINENO"; then :
194   libc_mips_o32_fp=64a
195 else
196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
197 /* end confdefs.h.  */
199                 #if (__mips_fpr != 64)
200                 #error Not FP64
201                 #endif
203 main ()
206   ;
207   return 0;
209 _ACEOF
210 if ac_fn_c_try_compile "$LINENO"; then :
211   libc_mips_o32_fp=64
213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
225   if { ac_try='${CC-cc} -mfp64 -xc /dev/null -S -o /dev/null'
226   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
227   (eval $ac_try) 2>&5
228   ac_status=$?
229   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
230   test $ac_status = 0; }; }; then :
231   libc_cv_mips_fp64=yes
232 else
233   libc_cv_mips_fp64=no
235   if { ac_try='${CC-cc} -Werror -modd-spreg -xc /dev/null -S -o /dev/null'
236   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
237   (eval $ac_try) 2>&5
238   ac_status=$?
239   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
240   test $ac_status = 0; }; }; then :
241   libc_cv_mips_modd_spreg=yes
242 else
243   libc_cv_mips_modd_spreg=no
246 config_vars="$config_vars
247 o32-fpabi = ${libc_mips_o32_fp}"
248 config_vars="$config_vars
249 has-mpf64 = ${libc_cv_mips_fp64}"
250 config_vars="$config_vars
251 has-modd-spreg = ${libc_cv_mips_modd_spreg}"
253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
254 /* end confdefs.h.  */
256     #include <linux/prctl.h>
257     #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE)
258     #error New prctl support for setting FP modes not found
259     #endif
261 main ()
264   ;
265   return 0;
267 _ACEOF
268 if ac_fn_c_try_compile "$LINENO"; then :
269   libc_mips_mode_switch=yes
270 else
271   libc_mips_mode_switch=no
273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
274 config_vars="$config_vars
275 mips-mode-switch = ${libc_mips_mode_switch}"
278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
279 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
280 if ${ac_cv_path_GREP+:} false; then :
281   $as_echo_n "(cached) " >&6
282 else
283   if test -z "$GREP"; then
284   ac_path_GREP_found=false
285   # Loop through the user's path and test for each of PROGNAME-LIST
286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
287 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
289   IFS=$as_save_IFS
290   test -z "$as_dir" && as_dir=.
291     for ac_prog in grep ggrep; do
292     for ac_exec_ext in '' $ac_executable_extensions; do
293       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
294       as_fn_executable_p "$ac_path_GREP" || continue
295 # Check for GNU ac_path_GREP and select it if it is found.
296   # Check for GNU $ac_path_GREP
297 case `"$ac_path_GREP" --version 2>&1` in
298 *GNU*)
299   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
301   ac_count=0
302   $as_echo_n 0123456789 >"conftest.in"
303   while :
304   do
305     cat "conftest.in" "conftest.in" >"conftest.tmp"
306     mv "conftest.tmp" "conftest.in"
307     cp "conftest.in" "conftest.nl"
308     $as_echo 'GREP' >> "conftest.nl"
309     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
310     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
311     as_fn_arith $ac_count + 1 && ac_count=$as_val
312     if test $ac_count -gt ${ac_path_GREP_max-0}; then
313       # Best one so far, save it but keep looking for a better one
314       ac_cv_path_GREP="$ac_path_GREP"
315       ac_path_GREP_max=$ac_count
316     fi
317     # 10*(2^10) chars as input seems more than enough
318     test $ac_count -gt 10 && break
319   done
320   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
321 esac
323       $ac_path_GREP_found && break 3
324     done
325   done
326   done
327 IFS=$as_save_IFS
328   if test -z "$ac_cv_path_GREP"; then
329     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
330   fi
331 else
332   ac_cv_path_GREP=$GREP
336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
337 $as_echo "$ac_cv_path_GREP" >&6; }
338  GREP="$ac_cv_path_GREP"
341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
342 $as_echo_n "checking for egrep... " >&6; }
343 if ${ac_cv_path_EGREP+:} false; then :
344   $as_echo_n "(cached) " >&6
345 else
346   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
347    then ac_cv_path_EGREP="$GREP -E"
348    else
349      if test -z "$EGREP"; then
350   ac_path_EGREP_found=false
351   # Loop through the user's path and test for each of PROGNAME-LIST
352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
353 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
355   IFS=$as_save_IFS
356   test -z "$as_dir" && as_dir=.
357     for ac_prog in egrep; do
358     for ac_exec_ext in '' $ac_executable_extensions; do
359       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
360       as_fn_executable_p "$ac_path_EGREP" || continue
361 # Check for GNU ac_path_EGREP and select it if it is found.
362   # Check for GNU $ac_path_EGREP
363 case `"$ac_path_EGREP" --version 2>&1` in
364 *GNU*)
365   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
367   ac_count=0
368   $as_echo_n 0123456789 >"conftest.in"
369   while :
370   do
371     cat "conftest.in" "conftest.in" >"conftest.tmp"
372     mv "conftest.tmp" "conftest.in"
373     cp "conftest.in" "conftest.nl"
374     $as_echo 'EGREP' >> "conftest.nl"
375     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
376     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
377     as_fn_arith $ac_count + 1 && ac_count=$as_val
378     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
379       # Best one so far, save it but keep looking for a better one
380       ac_cv_path_EGREP="$ac_path_EGREP"
381       ac_path_EGREP_max=$ac_count
382     fi
383     # 10*(2^10) chars as input seems more than enough
384     test $ac_count -gt 10 && break
385   done
386   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
387 esac
389       $ac_path_EGREP_found && break 3
390     done
391   done
392   done
393 IFS=$as_save_IFS
394   if test -z "$ac_cv_path_EGREP"; then
395     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
396   fi
397 else
398   ac_cv_path_EGREP=$EGREP
401    fi
403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
404 $as_echo "$ac_cv_path_EGREP" >&6; }
405  EGREP="$ac_cv_path_EGREP"
408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
409 $as_echo_n "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
410 if ${libc_cv_mips_nan2008+:} false; then :
411   $as_echo_n "(cached) " >&6
412 else
413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
414 /* end confdefs.h.  */
416 #ifdef __mips_nan2008
418 #endif
419 _ACEOF
420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
421   $EGREP "yes" >/dev/null 2>&1; then :
422   libc_cv_mips_nan2008=yes
423 else
424   libc_cv_mips_nan2008=no
426 rm -f conftest*
429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
430 $as_echo "$libc_cv_mips_nan2008" >&6; }
432 libc_mips_nan=
433 if test x"$libc_cv_mips_nan2008" = xyes; then
434   libc_mips_nan=_2008
437 config_vars="$config_vars
438 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
440 case $machine in
441 mips/mips64/n64/*)
442   test -n "$libc_cv_slibdir" ||
443 case "$prefix" in
444 /usr | /usr/)
445   libc_cv_slibdir='/lib64'
446   libc_cv_rtlddir='/lib64'
447   if test "$libdir" = '${exec_prefix}/lib'; then
448     libdir='${exec_prefix}/lib64';
449     # Locale data can be shared between 32-bit and 64-bit libraries.
450     libc_cv_complocaledir='${exec_prefix}/lib/locale'
451   fi
452   ;;
453 esac
454   ;;
455 mips/mips64/n32/*)
456   test -n "$libc_cv_slibdir" ||
457 case "$prefix" in
458 /usr | /usr/)
459   libc_cv_slibdir='/lib32'
460   libc_cv_rtlddir='/lib32'
461   if test "$libdir" = '${exec_prefix}/lib'; then
462     libdir='${exec_prefix}/lib32';
463     # Locale data can be shared between 32-bit and 64-bit libraries.
464     libc_cv_complocaledir='${exec_prefix}/lib/locale'
465   fi
466   ;;
467 esac
468   ;;
469 esac
471 libc_cv_gcc_unwind_find_fde=yes
473 if test -z "$arch_minimum_kernel"; then
474   if test x$libc_cv_mips_nan2008 = xyes; then
475     arch_minimum_kernel=4.5.0
476   fi