Update copyright dates with scripts/update-copyrights.
[glibc.git] / sysdeps / unix / sysv / linux / mips / configure
blob83f8b13aab677c154f176acac7d60bb796e70a95
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=
110 if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then
111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
112 /* end confdefs.h.  */
114       #if !defined(__mips_fpr)
115       #error Missing FPR sizes
116       #endif
118 main ()
121   ;
122   return 0;
124 _ACEOF
125 if ac_fn_c_try_compile "$LINENO"; then :
126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
127 /* end confdefs.h.  */
129         #if (__mips_fpr != 32)
130         #error Not FP32
131         #endif
133 main ()
136   ;
137   return 0;
139 _ACEOF
140 if ac_fn_c_try_compile "$LINENO"; then :
141   libc_mips_o32_fp=32
142 else
143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
144 /* end confdefs.h.  */
146           #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
147           #error Not FPXX (without odd single-precision registers)
148           #endif
150 main ()
153   ;
154   return 0;
156 _ACEOF
157 if ac_fn_c_try_compile "$LINENO"; then :
158   libc_mips_o32_fp=xx
159 else
160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
161 /* end confdefs.h.  */
163             #if (__mips_fpr != 0)
164             #error Not FPXX (with odd single precision registers)
165             #endif
167 main ()
170   ;
171   return 0;
173 _ACEOF
174 if ac_fn_c_try_compile "$LINENO"; then :
175   libc_mips_o32_fp=xxo
176 else
177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
178 /* end confdefs.h.  */
180               #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
181               #error Not FP64A
182               #endif
184 main ()
187   ;
188   return 0;
190 _ACEOF
191 if ac_fn_c_try_compile "$LINENO"; then :
192   libc_mips_o32_fp=64a
193 else
194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
195 /* end confdefs.h.  */
197                 #if (__mips_fpr != 64)
198                 #error Not FP64
199                 #endif
201 main ()
204   ;
205   return 0;
207 _ACEOF
208 if ac_fn_c_try_compile "$LINENO"; then :
209   libc_mips_o32_fp=64
211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 config_vars="$config_vars
224 o32-fpabi = ${libc_mips_o32_fp}"
226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
227 /* end confdefs.h.  */
229     #include <linux/prctl.h>
230     #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE)
231     #error New prctl support for setting FP modes not found
232     #endif
234 main ()
237   ;
238   return 0;
240 _ACEOF
241 if ac_fn_c_try_compile "$LINENO"; then :
242   libc_mips_mode_switch=yes
243 else
244   libc_mips_mode_switch=no
246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
247 config_vars="$config_vars
248 mips-mode-switch = ${libc_mips_mode_switch}"
251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
252 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
253 if ${ac_cv_path_GREP+:} false; then :
254   $as_echo_n "(cached) " >&6
255 else
256   if test -z "$GREP"; then
257   ac_path_GREP_found=false
258   # Loop through the user's path and test for each of PROGNAME-LIST
259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
260 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
262   IFS=$as_save_IFS
263   test -z "$as_dir" && as_dir=.
264     for ac_prog in grep ggrep; do
265     for ac_exec_ext in '' $ac_executable_extensions; do
266       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
267       as_fn_executable_p "$ac_path_GREP" || continue
268 # Check for GNU ac_path_GREP and select it if it is found.
269   # Check for GNU $ac_path_GREP
270 case `"$ac_path_GREP" --version 2>&1` in
271 *GNU*)
272   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
274   ac_count=0
275   $as_echo_n 0123456789 >"conftest.in"
276   while :
277   do
278     cat "conftest.in" "conftest.in" >"conftest.tmp"
279     mv "conftest.tmp" "conftest.in"
280     cp "conftest.in" "conftest.nl"
281     $as_echo 'GREP' >> "conftest.nl"
282     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
283     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
284     as_fn_arith $ac_count + 1 && ac_count=$as_val
285     if test $ac_count -gt ${ac_path_GREP_max-0}; then
286       # Best one so far, save it but keep looking for a better one
287       ac_cv_path_GREP="$ac_path_GREP"
288       ac_path_GREP_max=$ac_count
289     fi
290     # 10*(2^10) chars as input seems more than enough
291     test $ac_count -gt 10 && break
292   done
293   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
294 esac
296       $ac_path_GREP_found && break 3
297     done
298   done
299   done
300 IFS=$as_save_IFS
301   if test -z "$ac_cv_path_GREP"; then
302     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
303   fi
304 else
305   ac_cv_path_GREP=$GREP
309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
310 $as_echo "$ac_cv_path_GREP" >&6; }
311  GREP="$ac_cv_path_GREP"
314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
315 $as_echo_n "checking for egrep... " >&6; }
316 if ${ac_cv_path_EGREP+:} false; then :
317   $as_echo_n "(cached) " >&6
318 else
319   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
320    then ac_cv_path_EGREP="$GREP -E"
321    else
322      if test -z "$EGREP"; then
323   ac_path_EGREP_found=false
324   # Loop through the user's path and test for each of PROGNAME-LIST
325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
326 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
328   IFS=$as_save_IFS
329   test -z "$as_dir" && as_dir=.
330     for ac_prog in egrep; do
331     for ac_exec_ext in '' $ac_executable_extensions; do
332       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
333       as_fn_executable_p "$ac_path_EGREP" || continue
334 # Check for GNU ac_path_EGREP and select it if it is found.
335   # Check for GNU $ac_path_EGREP
336 case `"$ac_path_EGREP" --version 2>&1` in
337 *GNU*)
338   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
340   ac_count=0
341   $as_echo_n 0123456789 >"conftest.in"
342   while :
343   do
344     cat "conftest.in" "conftest.in" >"conftest.tmp"
345     mv "conftest.tmp" "conftest.in"
346     cp "conftest.in" "conftest.nl"
347     $as_echo 'EGREP' >> "conftest.nl"
348     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
349     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
350     as_fn_arith $ac_count + 1 && ac_count=$as_val
351     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
352       # Best one so far, save it but keep looking for a better one
353       ac_cv_path_EGREP="$ac_path_EGREP"
354       ac_path_EGREP_max=$ac_count
355     fi
356     # 10*(2^10) chars as input seems more than enough
357     test $ac_count -gt 10 && break
358   done
359   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
360 esac
362       $ac_path_EGREP_found && break 3
363     done
364   done
365   done
366 IFS=$as_save_IFS
367   if test -z "$ac_cv_path_EGREP"; then
368     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
369   fi
370 else
371   ac_cv_path_EGREP=$EGREP
374    fi
376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
377 $as_echo "$ac_cv_path_EGREP" >&6; }
378  EGREP="$ac_cv_path_EGREP"
381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
382 $as_echo_n "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
383 if ${libc_cv_mips_nan2008+:} false; then :
384   $as_echo_n "(cached) " >&6
385 else
386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
387 /* end confdefs.h.  */
389 #ifdef __mips_nan2008
391 #endif
392 _ACEOF
393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
394   $EGREP "yes" >/dev/null 2>&1; then :
395   libc_cv_mips_nan2008=yes
396 else
397   libc_cv_mips_nan2008=no
399 rm -f conftest*
402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
403 $as_echo "$libc_cv_mips_nan2008" >&6; }
405 libc_mips_nan=
406 if test x"$libc_cv_mips_nan2008" = xyes; then
407   libc_mips_nan=_2008
410 config_vars="$config_vars
411 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
413 case $machine in
414 mips/mips64/n64/*)
415   test -n "$libc_cv_slibdir" ||
416 case "$prefix" in
417 /usr | /usr/)
418   libc_cv_slibdir=/lib64
419   libc_cv_rtlddir=/lib64
420   if test "$libdir" = '${exec_prefix}/lib'; then
421     libdir='${exec_prefix}/lib64';
422     # Locale data can be shared between 32-bit and 64-bit libraries.
423     libc_cv_localedir='${exec_prefix}/lib/locale'
424   fi
425   ;;
426 esac
427   ;;
428 mips/mips64/n32/*)
429   test -n "$libc_cv_slibdir" ||
430 case "$prefix" in
431 /usr | /usr/)
432   libc_cv_slibdir=/lib32
433   libc_cv_rtlddir=/lib32
434   if test "$libdir" = '${exec_prefix}/lib'; then
435     libdir='${exec_prefix}/lib32';
436     # Locale data can be shared between 32-bit and 64-bit libraries.
437     libc_cv_localedir='${exec_prefix}/lib/locale'
438   fi
439   ;;
440 esac
441   ;;
442 esac
444 libc_cv_gcc_unwind_find_fde=yes
446 if test -z "$arch_minimum_kernel"; then
447   if test x$libc_cv_mips_nan2008 = xyes; then
448     # FIXME: Adjust this setting to the actual first upstream kernel
449     # version to support the 2008 NaN encoding and then remove this
450     # comment.
451     arch_minimum_kernel=10.0.0
452   fi