po: incorporate translations (cs, de, hr, ko, pl, ro, ru, sv, uk, zh_CN)
[glibc.git] / sysdeps / unix / sysv / linux / mips / configure
blob6e3402c1118753d05d78b2e75302b7ca3721b1a1
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 (void)
15   ;
16   return 0;
18 _ACEOF
19 if ac_fn_c_try_compile "$LINENO"
20 then :
21   libc_mips_abi=o32
22 else case e in #(
23   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24 /* end confdefs.h.  */
26       #if (_MIPS_SIM != _ABIN32)
27       #error Not N32 ABI
28       #endif
29 int
30 main (void)
33   ;
34   return 0;
36 _ACEOF
37 if ac_fn_c_try_compile "$LINENO"
38 then :
39   libc_mips_abi=n32
40 else case e in #(
41   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42 /* end confdefs.h.  */
44         #if (_MIPS_SIM != _ABI64)
45         #error Not 64 ABI
46         #endif
47 int
48 main (void)
51   ;
52   return 0;
54 _ACEOF
55 if ac_fn_c_try_compile "$LINENO"
56 then :
57   libc_mips_abi=n64
59 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
60 esac
62 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
63 esac
65 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
67 if test -z "$libc_mips_abi"; then
68   as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5
71 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72 /* end confdefs.h.  */
74     #if !defined(__mips_soft_float)
75     #error Not soft ABI
76     #endif
77 int
78 main (void)
81   ;
82   return 0;
84 _ACEOF
85 if ac_fn_c_try_compile "$LINENO"
86 then :
87   libc_mips_float=soft
88 else case e in #(
89   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
90 /* end confdefs.h.  */
92       #if !defined(__mips_hard_float)
93       #error Not hard ABI
94       #endif
95 int
96 main (void)
99   ;
100   return 0;
102 _ACEOF
103 if ac_fn_c_try_compile "$LINENO"
104 then :
105   libc_mips_float=hard
107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
108 esac
110 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
112 if test -z "$libc_mips_float"; then
113   as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5
116 libc_mips_o32_fp=
117 libc_cv_mips_fp64=
118 libc_cv_mips_modd_spreg=
120 if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then
121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
122 /* end confdefs.h.  */
124       #if !defined(__mips_fpr)
125       #error Missing FPR sizes
126       #endif
128 main (void)
131   ;
132   return 0;
134 _ACEOF
135 if ac_fn_c_try_compile "$LINENO"
136 then :
137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
138 /* end confdefs.h.  */
140         #if (__mips_fpr != 32)
141         #error Not FP32
142         #endif
144 main (void)
147   ;
148   return 0;
150 _ACEOF
151 if ac_fn_c_try_compile "$LINENO"
152 then :
153   libc_mips_o32_fp=32
154 else case e in #(
155   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
156 /* end confdefs.h.  */
158           #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
159           #error Not FPXX (without odd single-precision registers)
160           #endif
162 main (void)
165   ;
166   return 0;
168 _ACEOF
169 if ac_fn_c_try_compile "$LINENO"
170 then :
171   libc_mips_o32_fp=xx
172 else case e in #(
173   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
174 /* end confdefs.h.  */
176             #if (__mips_fpr != 0)
177             #error Not FPXX (with odd single precision registers)
178             #endif
180 main (void)
183   ;
184   return 0;
186 _ACEOF
187 if ac_fn_c_try_compile "$LINENO"
188 then :
189   libc_mips_o32_fp=xxo
190 else case e in #(
191   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
192 /* end confdefs.h.  */
194               #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
195               #error Not FP64A
196               #endif
198 main (void)
201   ;
202   return 0;
204 _ACEOF
205 if ac_fn_c_try_compile "$LINENO"
206 then :
207   libc_mips_o32_fp=64a
208 else case e in #(
209   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
210 /* end confdefs.h.  */
212                 #if (__mips_fpr != 64)
213                 #error Not FP64
214                 #endif
216 main (void)
219   ;
220   return 0;
222 _ACEOF
223 if ac_fn_c_try_compile "$LINENO"
224 then :
225   libc_mips_o32_fp=64
227 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
228 esac
230 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
231 esac
233 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
234 esac
236 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
237 esac
239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
241 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
243   if { ac_try='${CC-cc} -mfp64 -xc /dev/null -S -o /dev/null'
244   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
245   (eval $ac_try) 2>&5
246   ac_status=$?
247   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
248   test $ac_status = 0; }; }
249 then :
250   libc_cv_mips_fp64=yes
251 else case e in #(
252   e) libc_cv_mips_fp64=no ;;
253 esac
255   if { ac_try='${CC-cc} -Werror -modd-spreg -xc /dev/null -S -o /dev/null'
256   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
257   (eval $ac_try) 2>&5
258   ac_status=$?
259   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
260   test $ac_status = 0; }; }
261 then :
262   libc_cv_mips_modd_spreg=yes
263 else case e in #(
264   e) libc_cv_mips_modd_spreg=no ;;
265 esac
268 config_vars="$config_vars
269 o32-fpabi = ${libc_mips_o32_fp}"
270 config_vars="$config_vars
271 has-mpf64 = ${libc_cv_mips_fp64}"
272 config_vars="$config_vars
273 has-modd-spreg = ${libc_cv_mips_modd_spreg}"
275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
276 /* end confdefs.h.  */
278     #include <linux/prctl.h>
279     #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE)
280     #error New prctl support for setting FP modes not found
281     #endif
283 main (void)
286   ;
287   return 0;
289 _ACEOF
290 if ac_fn_c_try_compile "$LINENO"
291 then :
292   libc_mips_mode_switch=yes
293 else case e in #(
294   e) libc_mips_mode_switch=no ;;
295 esac
297 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
298 config_vars="$config_vars
299 mips-mode-switch = ${libc_mips_mode_switch}"
302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
303 printf %s "checking for egrep -e... " >&6; }
304 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
305 then :
306   printf %s "(cached) " >&6
307 else case e in #(
308   e) if test -z "$EGREP_TRADITIONAL"; then
309   ac_path_EGREP_TRADITIONAL_found=false
310   # Loop through the user's path and test for each of PROGNAME-LIST
311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
312 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
314   IFS=$as_save_IFS
315   case $as_dir in #(((
316     '') as_dir=./ ;;
317     */) ;;
318     *) as_dir=$as_dir/ ;;
319   esac
320     for ac_prog in grep ggrep
321    do
322     for ac_exec_ext in '' $ac_executable_extensions; do
323       ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
324       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
325 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
326   # Check for GNU $ac_path_EGREP_TRADITIONAL
327 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
328 *GNU*)
329   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
332   ac_count=0
333   printf %s 0123456789 >"conftest.in"
334   while :
335   do
336     cat "conftest.in" "conftest.in" >"conftest.tmp"
337     mv "conftest.tmp" "conftest.in"
338     cp "conftest.in" "conftest.nl"
339     printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
340     "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
341     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
342     as_fn_arith $ac_count + 1 && ac_count=$as_val
343     if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
344       # Best one so far, save it but keep looking for a better one
345       ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
346       ac_path_EGREP_TRADITIONAL_max=$ac_count
347     fi
348     # 10*(2^10) chars as input seems more than enough
349     test $ac_count -gt 10 && break
350   done
351   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
352 esac
354       $ac_path_EGREP_TRADITIONAL_found && break 3
355     done
356   done
357   done
358 IFS=$as_save_IFS
359   if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
360     :
361   fi
362 else
363   ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
366     if test "$ac_cv_path_EGREP_TRADITIONAL"
367 then :
368   ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
369 else case e in #(
370   e) if test -z "$EGREP_TRADITIONAL"; then
371   ac_path_EGREP_TRADITIONAL_found=false
372   # Loop through the user's path and test for each of PROGNAME-LIST
373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
374 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
376   IFS=$as_save_IFS
377   case $as_dir in #(((
378     '') as_dir=./ ;;
379     */) ;;
380     *) as_dir=$as_dir/ ;;
381   esac
382     for ac_prog in egrep
383    do
384     for ac_exec_ext in '' $ac_executable_extensions; do
385       ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
386       as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
387 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
388   # Check for GNU $ac_path_EGREP_TRADITIONAL
389 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
390 *GNU*)
391   ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
394   ac_count=0
395   printf %s 0123456789 >"conftest.in"
396   while :
397   do
398     cat "conftest.in" "conftest.in" >"conftest.tmp"
399     mv "conftest.tmp" "conftest.in"
400     cp "conftest.in" "conftest.nl"
401     printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
402     "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
403     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
404     as_fn_arith $ac_count + 1 && ac_count=$as_val
405     if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
406       # Best one so far, save it but keep looking for a better one
407       ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
408       ac_path_EGREP_TRADITIONAL_max=$ac_count
409     fi
410     # 10*(2^10) chars as input seems more than enough
411     test $ac_count -gt 10 && break
412   done
413   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
414 esac
416       $ac_path_EGREP_TRADITIONAL_found && break 3
417     done
418   done
419   done
420 IFS=$as_save_IFS
421   if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
422     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
423   fi
424 else
425   ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
427  ;;
428 esac
429 fi ;;
430 esac
432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
433 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
434  EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
437 printf %s "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
438 if test ${libc_cv_mips_nan2008+y}
439 then :
440   printf %s "(cached) " >&6
441 else case e in #(
442   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
443 /* end confdefs.h.  */
445 #ifdef __mips_nan2008
447 #endif
448 _ACEOF
449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
450   $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
451 then :
452   libc_cv_mips_nan2008=yes
453 else case e in #(
454   e) libc_cv_mips_nan2008=no ;;
455 esac
457 rm -rf conftest*
458  ;;
459 esac
461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
462 printf "%s\n" "$libc_cv_mips_nan2008" >&6; }
464 libc_mips_nan=
465 if test x"$libc_cv_mips_nan2008" = xyes; then
466   libc_mips_nan=_2008
469 config_vars="$config_vars
470 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
472 case $machine in
473 mips/mips64/n64/*)
474   test -n "$libc_cv_slibdir" ||
475 case "$prefix" in
476 /usr | /usr/)
477   libc_cv_slibdir='/lib64'
478   libc_cv_rtlddir='/lib64'
479   if test "$libdir" = '${exec_prefix}/lib'; then
480     libdir='${exec_prefix}/lib64';
481     # Locale data can be shared between 32-bit and 64-bit libraries.
482     libc_cv_complocaledir='${exec_prefix}/lib/locale'
483   fi
484   ;;
485 esac
486   ;;
487 mips/mips64/n32/*)
488   test -n "$libc_cv_slibdir" ||
489 case "$prefix" in
490 /usr | /usr/)
491   libc_cv_slibdir='/lib32'
492   libc_cv_rtlddir='/lib32'
493   if test "$libdir" = '${exec_prefix}/lib'; then
494     libdir='${exec_prefix}/lib32';
495     # Locale data can be shared between 32-bit and 64-bit libraries.
496     libc_cv_complocaledir='${exec_prefix}/lib/locale'
497   fi
498   ;;
499 esac
500   ;;
501 esac
503 libc_cv_gcc_unwind_find_fde=yes
505 if test -z "$arch_minimum_kernel"; then
506   if test x$libc_cv_mips_nan2008 = xyes; then
507     arch_minimum_kernel=4.5.0
508   fi
511 # Check if we are supposed to run on kernels older than 4.8.0. If so,
512 # force executable stack to avoid potential runtime problems with fpu
513 # emulation.
514 # NOTE: The check below assumes that in absence of user-provided minimum_kernel
515 # we will default to arch_minimum_kernel which is currently less than 4.8.0 for
516 # all known configurations. If this changes, the check must be updated.
517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler must use executable stack" >&5
518 printf %s "checking whether the compiler must use executable stack... " >&6; }
519 if test ${libc_cv_mips_force_execstack+y}
520 then :
521   printf %s "(cached) " >&6
522 else case e in #(
523   e) libc_cv_mips_force_execstack=no
524   if test $libc_mips_float = hard; then
525     if test -n "$minimum_kernel"; then
527        min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
529        if test $min_version -lt 264192; then
530          libc_cv_mips_force_execstack=yes
531        fi
532     else
533       libc_cv_mips_force_execstack=yes
534     fi
535   fi ;;
536 esac
538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_force_execstack" >&5
539 printf "%s\n" "$libc_cv_mips_force_execstack" >&6; }
541 libc_mips_has_gnustack=$libc_cv_as_noexecstack
543 if test $libc_cv_mips_force_execstack = yes; then
544   libc_mips_has_gnustack=no
545   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&5
546 printf "%s\n" "$as_me: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&2;}
549 config_vars="$config_vars
550 mips-force-execstack = ${libc_cv_mips_force_execstack}"
551 config_vars="$config_vars
552 mips-has-gnustack = ${libc_mips_has_gnustack}"