Move mips from ports to libc.
[jlayton/glibc.git] / sysdeps / unix / sysv / linux / mips / configure
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux/mips.
3
4
5 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6 /* end confdefs.h.  */
7
8     #if (_MIPS_SIM != _ABIO32)
9     #error Not O32 ABI
10     #endif
11 int
12 main ()
13 {
14
15   ;
16   return 0;
17 }
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.  */
24
25       #if (_MIPS_SIM != _ABIN32)
26       #error Not N32 ABI
27       #endif
28 int
29 main ()
30 {
31
32   ;
33   return 0;
34 }
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.  */
41
42         #if (_MIPS_SIM != _ABI64)
43         #error Not 64 ABI
44         #endif
45 int
46 main ()
47 {
48
49   ;
50   return 0;
51 }
52 _ACEOF
53 if ac_fn_c_try_compile "$LINENO"; then :
54   libc_mips_abi=n64
55 fi
56 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57 fi
58 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59 fi
60 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61
62 if test -z "$libc_mips_abi"; then
63   as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5
64 fi
65
66 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67 /* end confdefs.h.  */
68
69     #if !defined(__mips_soft_float)
70     #error Not soft ABI
71     #endif
72 int
73 main ()
74 {
75
76   ;
77   return 0;
78 }
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.  */
85
86       #if !defined(__mips_hard_float)
87       #error Not hard ABI
88       #endif
89 int
90 main ()
91 {
92
93   ;
94   return 0;
95 }
96 _ACEOF
97 if ac_fn_c_try_compile "$LINENO"; then :
98   libc_mips_float=hard
99 fi
100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
101 fi
102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
103
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
106 fi
107
108
109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
110 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
111 if ${ac_cv_path_GREP+:} false; then :
112   $as_echo_n "(cached) " >&6
113 else
114   if test -z "$GREP"; then
115   ac_path_GREP_found=false
116   # Loop through the user's path and test for each of PROGNAME-LIST
117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
118 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
119 do
120   IFS=$as_save_IFS
121   test -z "$as_dir" && as_dir=.
122     for ac_prog in grep ggrep; do
123     for ac_exec_ext in '' $ac_executable_extensions; do
124       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
125       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
126 # Check for GNU ac_path_GREP and select it if it is found.
127   # Check for GNU $ac_path_GREP
128 case `"$ac_path_GREP" --version 2>&1` in
129 *GNU*)
130   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
131 *)
132   ac_count=0
133   $as_echo_n 0123456789 >"conftest.in"
134   while :
135   do
136     cat "conftest.in" "conftest.in" >"conftest.tmp"
137     mv "conftest.tmp" "conftest.in"
138     cp "conftest.in" "conftest.nl"
139     $as_echo 'GREP' >> "conftest.nl"
140     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
141     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
142     as_fn_arith $ac_count + 1 && ac_count=$as_val
143     if test $ac_count -gt ${ac_path_GREP_max-0}; then
144       # Best one so far, save it but keep looking for a better one
145       ac_cv_path_GREP="$ac_path_GREP"
146       ac_path_GREP_max=$ac_count
147     fi
148     # 10*(2^10) chars as input seems more than enough
149     test $ac_count -gt 10 && break
150   done
151   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
152 esac
153
154       $ac_path_GREP_found && break 3
155     done
156   done
157   done
158 IFS=$as_save_IFS
159   if test -z "$ac_cv_path_GREP"; then
160     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
161   fi
162 else
163   ac_cv_path_GREP=$GREP
164 fi
165
166 fi
167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
168 $as_echo "$ac_cv_path_GREP" >&6; }
169  GREP="$ac_cv_path_GREP"
170
171
172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
173 $as_echo_n "checking for egrep... " >&6; }
174 if ${ac_cv_path_EGREP+:} false; then :
175   $as_echo_n "(cached) " >&6
176 else
177   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
178    then ac_cv_path_EGREP="$GREP -E"
179    else
180      if test -z "$EGREP"; then
181   ac_path_EGREP_found=false
182   # Loop through the user's path and test for each of PROGNAME-LIST
183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
185 do
186   IFS=$as_save_IFS
187   test -z "$as_dir" && as_dir=.
188     for ac_prog in egrep; do
189     for ac_exec_ext in '' $ac_executable_extensions; do
190       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
191       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
192 # Check for GNU ac_path_EGREP and select it if it is found.
193   # Check for GNU $ac_path_EGREP
194 case `"$ac_path_EGREP" --version 2>&1` in
195 *GNU*)
196   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
197 *)
198   ac_count=0
199   $as_echo_n 0123456789 >"conftest.in"
200   while :
201   do
202     cat "conftest.in" "conftest.in" >"conftest.tmp"
203     mv "conftest.tmp" "conftest.in"
204     cp "conftest.in" "conftest.nl"
205     $as_echo 'EGREP' >> "conftest.nl"
206     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
207     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
208     as_fn_arith $ac_count + 1 && ac_count=$as_val
209     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
210       # Best one so far, save it but keep looking for a better one
211       ac_cv_path_EGREP="$ac_path_EGREP"
212       ac_path_EGREP_max=$ac_count
213     fi
214     # 10*(2^10) chars as input seems more than enough
215     test $ac_count -gt 10 && break
216   done
217   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
218 esac
219
220       $ac_path_EGREP_found && break 3
221     done
222   done
223   done
224 IFS=$as_save_IFS
225   if test -z "$ac_cv_path_EGREP"; then
226     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
227   fi
228 else
229   ac_cv_path_EGREP=$EGREP
230 fi
231
232    fi
233 fi
234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
235 $as_echo "$ac_cv_path_EGREP" >&6; }
236  EGREP="$ac_cv_path_EGREP"
237
238
239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
240 $as_echo_n "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
241 if ${libc_cv_mips_nan2008+:} false; then :
242   $as_echo_n "(cached) " >&6
243 else
244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
245 /* end confdefs.h.  */
246 dnl
247 #ifdef __mips_nan2008
248 yes
249 #endif
250 _ACEOF
251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
252   $EGREP "yes" >/dev/null 2>&1; then :
253   libc_cv_mips_nan2008=yes
254 else
255   libc_cv_mips_nan2008=no
256 fi
257 rm -f conftest*
258
259 fi
260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
261 $as_echo "$libc_cv_mips_nan2008" >&6; }
262
263 libc_mips_nan=
264 if test x"$libc_cv_mips_nan2008" = xyes; then
265   libc_mips_nan=_2008
266 fi
267
268 config_vars="$config_vars
269 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
270
271 case "$prefix" in
272 /usr | /usr/)
273   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
274   # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
275   # and libc_cv_localedir.
276   test -n "$libc_cv_slibdir" || \
277   case $machine in
278   mips/mips64/n64/* )
279     libc_cv_slibdir="/lib64"
280     if test "$libdir" = '${exec_prefix}/lib'; then
281       libdir='${exec_prefix}/lib64';
282       # Locale data can be shared between 32bit and 64bit libraries
283       libc_cv_localedir='${exec_prefix}/lib/locale'
284     fi
285     ;;
286   mips/mips64/n32/* )
287     libc_cv_slibdir="/lib32"
288     if test "$libdir" = '${exec_prefix}/lib'; then
289       libdir='${exec_prefix}/lib32';
290       # Locale data can be shared between 32bit and 64bit libraries
291       libc_cv_localedir='${exec_prefix}/lib/locale'
292     fi
293     ;;
294   *)
295     libc_cv_slibdir="/lib"
296     ;;
297   esac
298 esac
299
300 libc_cv_gcc_unwind_find_fde=yes
301
302 if test -z "$arch_minimum_kernel"; then
303   if test x$libc_cv_mips_nan2008 = xyes; then
304     # FIXME: Adjust this setting to the actual first upstream kernel
305     # version to support the 2008 NaN encoding and then remove this
306     # comment.
307     arch_minimum_kernel=10.0.0
308   fi
309 fi