Commit | Line | Data |
---|---|---|
1e1e3b61 IC |
1 | #! /bin/sh |
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
278bda40 | 45 | sim_inline="-DDEFAULT_INLINE=0" |
1e1e3b61 IC |
46 | |
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
9a8e61f1 AC |
75 | |
76 | ||
77 | ||
1e1e3b61 | 78 | |
1e1e3b61 IC |
79 | |
80 | ||
81 | # Guess values for system-dependent variables and create Makefiles. | |
d89fa2d8 | 82 | # Generated automatically using autoconf version 2.12.1 |
1e1e3b61 IC |
83 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
84 | # | |
85 | # This configure script is free software; the Free Software Foundation | |
86 | # gives unlimited permission to copy, distribute and modify it. | |
87 | ||
88 | # Defaults: | |
89 | ac_help= | |
90 | ac_default_prefix=/usr/local | |
91 | # Any additions from configure.in: | |
9a8e61f1 AC |
92 | ac_help="$ac_help |
93 | --enable-maintainer-mode Enable developer functionality." | |
1e1e3b61 IC |
94 | ac_help="$ac_help |
95 | --enable-sim-bswap Use Host specific BSWAP instruction." | |
96 | ac_help="$ac_help | |
97 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" | |
98 | ac_help="$ac_help | |
99 | --enable-sim-debug=opts Enable debugging flags" | |
100 | ac_help="$ac_help | |
101 | --enable-sim-stdio Specify whether to use stdio for console input/output." | |
102 | ac_help="$ac_help | |
103 | --enable-sim-trace=opts Enable tracing flags" | |
104 | ac_help="$ac_help | |
105 | --enable-sim-profile=opts Enable profiling flags" | |
106 | ac_help="$ac_help | |
107 | --enable-sim-inline=inlines Specify which functions should be inlined." | |
108 | ac_help="$ac_help | |
109 | --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses." | |
110 | ac_help="$ac_help | |
111 | --enable-sim-hostendian=end Specify host byte endian orientation." | |
112 | ac_help="$ac_help | |
113 | --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings" | |
114 | ac_help="$ac_help | |
115 | --enable-sim-endian=endian Specify target byte endian orientation." | |
116 | ac_help="$ac_help | |
9a8e61f1 | 117 | --enable-sim-bitsize=N Specify target bitsize (32 or 64)." |
1e1e3b61 IC |
118 | ac_help="$ac_help |
119 | --enable-sim-float Specify that the target processor has floating point hardware." | |
120 | ac_help="$ac_help | |
121 | --enable-sim-igen=opts Enable IGEN simulator" | |
122 | ||
123 | # Initialize some variables set by options. | |
124 | # The variables have the same names as the options, with | |
125 | # dashes changed to underlines. | |
126 | build=NONE | |
127 | cache_file=./config.cache | |
128 | exec_prefix=NONE | |
129 | host=NONE | |
130 | no_create= | |
131 | nonopt=NONE | |
132 | no_recursion= | |
133 | prefix=NONE | |
134 | program_prefix=NONE | |
135 | program_suffix=NONE | |
136 | program_transform_name=s,x,x, | |
137 | silent= | |
138 | site= | |
139 | srcdir= | |
140 | target=NONE | |
141 | verbose= | |
142 | x_includes=NONE | |
143 | x_libraries=NONE | |
144 | bindir='${exec_prefix}/bin' | |
145 | sbindir='${exec_prefix}/sbin' | |
146 | libexecdir='${exec_prefix}/libexec' | |
147 | datadir='${prefix}/share' | |
148 | sysconfdir='${prefix}/etc' | |
149 | sharedstatedir='${prefix}/com' | |
150 | localstatedir='${prefix}/var' | |
151 | libdir='${exec_prefix}/lib' | |
152 | includedir='${prefix}/include' | |
153 | oldincludedir='/usr/include' | |
154 | infodir='${prefix}/info' | |
155 | mandir='${prefix}/man' | |
156 | ||
157 | # Initialize some other variables. | |
158 | subdirs= | |
159 | MFLAGS= MAKEFLAGS= | |
d89fa2d8 | 160 | SHELL=${CONFIG_SHELL-/bin/sh} |
1e1e3b61 IC |
161 | # Maximum number of lines to put in a shell here document. |
162 | ac_max_here_lines=12 | |
163 | ||
164 | ac_prev= | |
165 | for ac_option | |
166 | do | |
167 | ||
168 | # If the previous option needs an argument, assign it. | |
169 | if test -n "$ac_prev"; then | |
170 | eval "$ac_prev=\$ac_option" | |
171 | ac_prev= | |
172 | continue | |
173 | fi | |
174 | ||
175 | case "$ac_option" in | |
176 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
177 | *) ac_optarg= ;; | |
178 | esac | |
179 | ||
180 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
181 | ||
182 | case "$ac_option" in | |
183 | ||
184 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
185 | ac_prev=bindir ;; | |
186 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
187 | bindir="$ac_optarg" ;; | |
188 | ||
189 | -build | --build | --buil | --bui | --bu) | |
190 | ac_prev=build ;; | |
191 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
192 | build="$ac_optarg" ;; | |
193 | ||
194 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
195 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
196 | ac_prev=cache_file ;; | |
197 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
198 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
199 | cache_file="$ac_optarg" ;; | |
200 | ||
201 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
202 | ac_prev=datadir ;; | |
203 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
204 | | --da=*) | |
205 | datadir="$ac_optarg" ;; | |
206 | ||
207 | -disable-* | --disable-*) | |
208 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
209 | # Reject names that are not valid shell variable names. | |
210 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
211 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
212 | fi | |
213 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
214 | eval "enable_${ac_feature}=no" ;; | |
215 | ||
216 | -enable-* | --enable-*) | |
217 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
218 | # Reject names that are not valid shell variable names. | |
219 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
220 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
221 | fi | |
222 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
223 | case "$ac_option" in | |
224 | *=*) ;; | |
225 | *) ac_optarg=yes ;; | |
226 | esac | |
227 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
228 | ||
229 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
230 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
231 | | --exec | --exe | --ex) | |
232 | ac_prev=exec_prefix ;; | |
233 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
234 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
235 | | --exec=* | --exe=* | --ex=*) | |
236 | exec_prefix="$ac_optarg" ;; | |
237 | ||
238 | -gas | --gas | --ga | --g) | |
239 | # Obsolete; use --with-gas. | |
240 | with_gas=yes ;; | |
241 | ||
242 | -help | --help | --hel | --he) | |
243 | # Omit some internal or obsolete options to make the list less imposing. | |
244 | # This message is too long to be a string in the A/UX 3.1 sh. | |
245 | cat << EOF | |
246 | Usage: configure [options] [host] | |
247 | Options: [defaults in brackets after descriptions] | |
248 | Configuration: | |
249 | --cache-file=FILE cache test results in FILE | |
250 | --help print this message | |
251 | --no-create do not create output files | |
252 | --quiet, --silent do not print \`checking...' messages | |
253 | --version print the version of autoconf that created configure | |
254 | Directory and file names: | |
255 | --prefix=PREFIX install architecture-independent files in PREFIX | |
256 | [$ac_default_prefix] | |
257 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
258 | [same as prefix] | |
259 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
260 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
261 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
262 | --datadir=DIR read-only architecture-independent data in DIR | |
263 | [PREFIX/share] | |
264 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
265 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
266 | [PREFIX/com] | |
267 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
268 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
269 | --includedir=DIR C header files in DIR [PREFIX/include] | |
270 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
271 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
272 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
273 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
274 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
275 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
276 | --program-transform-name=PROGRAM | |
277 | run sed PROGRAM on installed program names | |
278 | EOF | |
279 | cat << EOF | |
280 | Host type: | |
281 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
282 | --host=HOST configure for HOST [guessed] | |
283 | --target=TARGET configure for TARGET [TARGET=HOST] | |
284 | Features and packages: | |
285 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
286 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
287 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
288 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
289 | --x-includes=DIR X include files are in DIR | |
290 | --x-libraries=DIR X library files are in DIR | |
291 | EOF | |
292 | if test -n "$ac_help"; then | |
293 | echo "--enable and --with options recognized:$ac_help" | |
294 | fi | |
295 | exit 0 ;; | |
296 | ||
297 | -host | --host | --hos | --ho) | |
298 | ac_prev=host ;; | |
299 | -host=* | --host=* | --hos=* | --ho=*) | |
300 | host="$ac_optarg" ;; | |
301 | ||
302 | -includedir | --includedir | --includedi | --included | --include \ | |
303 | | --includ | --inclu | --incl | --inc) | |
304 | ac_prev=includedir ;; | |
305 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
306 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
307 | includedir="$ac_optarg" ;; | |
308 | ||
309 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
310 | ac_prev=infodir ;; | |
311 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
312 | infodir="$ac_optarg" ;; | |
313 | ||
314 | -libdir | --libdir | --libdi | --libd) | |
315 | ac_prev=libdir ;; | |
316 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
317 | libdir="$ac_optarg" ;; | |
318 | ||
319 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
320 | | --libexe | --libex | --libe) | |
321 | ac_prev=libexecdir ;; | |
322 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
323 | | --libexe=* | --libex=* | --libe=*) | |
324 | libexecdir="$ac_optarg" ;; | |
325 | ||
326 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
327 | | --localstate | --localstat | --localsta | --localst \ | |
328 | | --locals | --local | --loca | --loc | --lo) | |
329 | ac_prev=localstatedir ;; | |
330 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
331 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
332 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
333 | localstatedir="$ac_optarg" ;; | |
334 | ||
335 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
336 | ac_prev=mandir ;; | |
337 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
338 | mandir="$ac_optarg" ;; | |
339 | ||
340 | -nfp | --nfp | --nf) | |
341 | # Obsolete; use --without-fp. | |
342 | with_fp=no ;; | |
343 | ||
344 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
345 | | --no-cr | --no-c) | |
346 | no_create=yes ;; | |
347 | ||
348 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
349 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
350 | no_recursion=yes ;; | |
351 | ||
352 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
353 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
354 | | --oldin | --oldi | --old | --ol | --o) | |
355 | ac_prev=oldincludedir ;; | |
356 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
357 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
358 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
359 | oldincludedir="$ac_optarg" ;; | |
360 | ||
361 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
362 | ac_prev=prefix ;; | |
363 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
364 | prefix="$ac_optarg" ;; | |
365 | ||
366 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
367 | | --program-pre | --program-pr | --program-p) | |
368 | ac_prev=program_prefix ;; | |
369 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
370 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
371 | program_prefix="$ac_optarg" ;; | |
372 | ||
373 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
374 | | --program-suf | --program-su | --program-s) | |
375 | ac_prev=program_suffix ;; | |
376 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
377 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
378 | program_suffix="$ac_optarg" ;; | |
379 | ||
380 | -program-transform-name | --program-transform-name \ | |
381 | | --program-transform-nam | --program-transform-na \ | |
382 | | --program-transform-n | --program-transform- \ | |
383 | | --program-transform | --program-transfor \ | |
384 | | --program-transfo | --program-transf \ | |
385 | | --program-trans | --program-tran \ | |
386 | | --progr-tra | --program-tr | --program-t) | |
387 | ac_prev=program_transform_name ;; | |
388 | -program-transform-name=* | --program-transform-name=* \ | |
389 | | --program-transform-nam=* | --program-transform-na=* \ | |
390 | | --program-transform-n=* | --program-transform-=* \ | |
391 | | --program-transform=* | --program-transfor=* \ | |
392 | | --program-transfo=* | --program-transf=* \ | |
393 | | --program-trans=* | --program-tran=* \ | |
394 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
395 | program_transform_name="$ac_optarg" ;; | |
396 | ||
397 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
398 | | -silent | --silent | --silen | --sile | --sil) | |
399 | silent=yes ;; | |
400 | ||
401 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
402 | ac_prev=sbindir ;; | |
403 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
404 | | --sbi=* | --sb=*) | |
405 | sbindir="$ac_optarg" ;; | |
406 | ||
407 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
408 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
409 | | --sharedst | --shareds | --shared | --share | --shar \ | |
410 | | --sha | --sh) | |
411 | ac_prev=sharedstatedir ;; | |
412 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
413 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
414 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
415 | | --sha=* | --sh=*) | |
416 | sharedstatedir="$ac_optarg" ;; | |
417 | ||
418 | -site | --site | --sit) | |
419 | ac_prev=site ;; | |
420 | -site=* | --site=* | --sit=*) | |
421 | site="$ac_optarg" ;; | |
422 | ||
423 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
424 | ac_prev=srcdir ;; | |
425 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
426 | srcdir="$ac_optarg" ;; | |
427 | ||
428 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
429 | | --syscon | --sysco | --sysc | --sys | --sy) | |
430 | ac_prev=sysconfdir ;; | |
431 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
432 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
433 | sysconfdir="$ac_optarg" ;; | |
434 | ||
435 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
436 | ac_prev=target ;; | |
437 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
438 | target="$ac_optarg" ;; | |
439 | ||
440 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
441 | verbose=yes ;; | |
442 | ||
443 | -version | --version | --versio | --versi | --vers) | |
d89fa2d8 | 444 | echo "configure generated by autoconf version 2.12.1" |
1e1e3b61 IC |
445 | exit 0 ;; |
446 | ||
447 | -with-* | --with-*) | |
448 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
449 | # Reject names that are not valid shell variable names. | |
450 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
451 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
452 | fi | |
453 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
454 | case "$ac_option" in | |
455 | *=*) ;; | |
456 | *) ac_optarg=yes ;; | |
457 | esac | |
458 | eval "with_${ac_package}='$ac_optarg'" ;; | |
459 | ||
460 | -without-* | --without-*) | |
461 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
462 | # Reject names that are not valid shell variable names. | |
463 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
464 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
465 | fi | |
466 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
467 | eval "with_${ac_package}=no" ;; | |
468 | ||
469 | --x) | |
470 | # Obsolete; use --with-x. | |
471 | with_x=yes ;; | |
472 | ||
473 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
474 | | --x-incl | --x-inc | --x-in | --x-i) | |
475 | ac_prev=x_includes ;; | |
476 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
477 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
478 | x_includes="$ac_optarg" ;; | |
479 | ||
480 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
481 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
482 | ac_prev=x_libraries ;; | |
483 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
484 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
485 | x_libraries="$ac_optarg" ;; | |
486 | ||
487 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
488 | ;; | |
489 | ||
490 | *) | |
491 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
492 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
493 | fi | |
494 | if test "x$nonopt" != xNONE; then | |
495 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
496 | fi | |
497 | nonopt="$ac_option" | |
498 | ;; | |
499 | ||
500 | esac | |
501 | done | |
502 | ||
503 | if test -n "$ac_prev"; then | |
504 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
505 | fi | |
506 | ||
507 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
508 | ||
509 | # File descriptor usage: | |
510 | # 0 standard input | |
511 | # 1 file creation | |
512 | # 2 errors and warnings | |
513 | # 3 some systems may open it to /dev/tty | |
514 | # 4 used on the Kubota Titan | |
515 | # 6 checking for... messages and results | |
516 | # 5 compiler messages saved in config.log | |
517 | if test "$silent" = yes; then | |
518 | exec 6>/dev/null | |
519 | else | |
520 | exec 6>&1 | |
521 | fi | |
522 | exec 5>./config.log | |
523 | ||
524 | echo "\ | |
525 | This file contains any messages produced by compilers while | |
526 | running configure, to aid debugging if configure makes a mistake. | |
527 | " 1>&5 | |
528 | ||
529 | # Strip out --no-create and --no-recursion so they do not pile up. | |
530 | # Also quote any args containing shell metacharacters. | |
531 | ac_configure_args= | |
532 | for ac_arg | |
533 | do | |
534 | case "$ac_arg" in | |
535 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
536 | | --no-cr | --no-c) ;; | |
537 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
538 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
539 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
540 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
541 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
542 | esac | |
543 | done | |
544 | ||
545 | # NLS nuisances. | |
546 | # Only set these to C if already set. These must not be set unconditionally | |
547 | # because not all systems understand e.g. LANG=C (notably SCO). | |
548 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
549 | # Non-C LC_CTYPE values break the ctype check. | |
550 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
551 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
552 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
553 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
554 | ||
555 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
556 | rm -rf conftest* confdefs.h | |
557 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
558 | echo > confdefs.h | |
559 | ||
560 | # A filename unique to this package, relative to the directory that | |
561 | # configure is in, which we can look for to find out if srcdir is correct. | |
562 | ac_unique_file=Makefile.in | |
563 | ||
564 | # Find the source files, if location was not specified. | |
565 | if test -z "$srcdir"; then | |
566 | ac_srcdir_defaulted=yes | |
567 | # Try the directory containing this script, then its parent. | |
568 | ac_prog=$0 | |
569 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
570 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
571 | srcdir=$ac_confdir | |
572 | if test ! -r $srcdir/$ac_unique_file; then | |
573 | srcdir=.. | |
574 | fi | |
575 | else | |
576 | ac_srcdir_defaulted=no | |
577 | fi | |
578 | if test ! -r $srcdir/$ac_unique_file; then | |
579 | if test "$ac_srcdir_defaulted" = yes; then | |
580 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
581 | else | |
582 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
583 | fi | |
584 | fi | |
585 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
586 | ||
587 | # Prefer explicitly selected file to automatically selected ones. | |
588 | if test -z "$CONFIG_SITE"; then | |
589 | if test "x$prefix" != xNONE; then | |
590 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
591 | else | |
592 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
593 | fi | |
594 | fi | |
595 | for ac_site_file in $CONFIG_SITE; do | |
596 | if test -r "$ac_site_file"; then | |
597 | echo "loading site script $ac_site_file" | |
598 | . "$ac_site_file" | |
599 | fi | |
600 | done | |
601 | ||
602 | if test -r "$cache_file"; then | |
603 | echo "loading cache $cache_file" | |
604 | . $cache_file | |
605 | else | |
606 | echo "creating cache $cache_file" | |
607 | > $cache_file | |
608 | fi | |
609 | ||
610 | ac_ext=c | |
611 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
612 | ac_cpp='$CPP $CPPFLAGS' | |
613 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
614 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
615 | cross_compiling=$ac_cv_prog_cc_cross | |
616 | ||
617 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
618 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
619 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
620 | ac_n= ac_c=' | |
621 | ' ac_t=' ' | |
622 | else | |
623 | ac_n=-n ac_c= ac_t= | |
624 | fi | |
625 | else | |
626 | ac_n= ac_c='\c' ac_t= | |
627 | fi | |
628 | ||
629 | ||
630 | ||
631 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
278bda40 | 632 | echo "configure:633: checking how to run the C preprocessor" >&5 |
1e1e3b61 IC |
633 | # On Suns, sometimes $CPP names a directory. |
634 | if test -n "$CPP" && test -d "$CPP"; then | |
635 | CPP= | |
636 | fi | |
637 | if test -z "$CPP"; then | |
638 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
640 | else | |
641 | # This must be in double quotes, not single quotes, because CPP may get | |
642 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
643 | CPP="${CC-cc} -E" | |
644 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
645 | # not just through cpp. | |
646 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 647 | #line 648 "configure" |
1e1e3b61 IC |
648 | #include "confdefs.h" |
649 | #include <assert.h> | |
650 | Syntax Error | |
651 | EOF | |
652 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
278bda40 | 653 | { (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1e1e3b61 IC |
654 | ac_err=`grep -v '^ *+' conftest.out` |
655 | if test -z "$ac_err"; then | |
656 | : | |
657 | else | |
658 | echo "$ac_err" >&5 | |
659 | echo "configure: failed program was:" >&5 | |
660 | cat conftest.$ac_ext >&5 | |
661 | rm -rf conftest* | |
662 | CPP="${CC-cc} -E -traditional-cpp" | |
663 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 664 | #line 665 "configure" |
1e1e3b61 IC |
665 | #include "confdefs.h" |
666 | #include <assert.h> | |
667 | Syntax Error | |
668 | EOF | |
669 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
278bda40 | 670 | { (eval echo configure:671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1e1e3b61 IC |
671 | ac_err=`grep -v '^ *+' conftest.out` |
672 | if test -z "$ac_err"; then | |
673 | : | |
674 | else | |
675 | echo "$ac_err" >&5 | |
676 | echo "configure: failed program was:" >&5 | |
677 | cat conftest.$ac_ext >&5 | |
678 | rm -rf conftest* | |
679 | CPP=/lib/cpp | |
680 | fi | |
681 | rm -f conftest* | |
682 | fi | |
683 | rm -f conftest* | |
684 | ac_cv_prog_CPP="$CPP" | |
685 | fi | |
686 | CPP="$ac_cv_prog_CPP" | |
687 | else | |
688 | ac_cv_prog_CPP="$CPP" | |
689 | fi | |
690 | echo "$ac_t""$CPP" 1>&6 | |
691 | ||
692 | ||
693 | # autoconf.info says this should be called right after AC_INIT. | |
694 | ||
695 | ||
696 | ac_aux_dir= | |
697 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
698 | if test -f $ac_dir/install-sh; then | |
699 | ac_aux_dir=$ac_dir | |
700 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
701 | break | |
702 | elif test -f $ac_dir/install.sh; then | |
703 | ac_aux_dir=$ac_dir | |
704 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
705 | break | |
706 | fi | |
707 | done | |
708 | if test -z "$ac_aux_dir"; then | |
709 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
710 | fi | |
711 | ac_config_guess=$ac_aux_dir/config.guess | |
712 | ac_config_sub=$ac_aux_dir/config.sub | |
713 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
714 | ||
715 | ||
716 | # Do some error checking and defaulting for the host and target type. | |
717 | # The inputs are: | |
718 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
719 | # | |
720 | # The rules are: | |
721 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
722 | # same time. | |
723 | # 2. Host defaults to nonopt. | |
724 | # 3. If nonopt is not specified, then host defaults to the current host, | |
725 | # as determined by config.guess. | |
726 | # 4. Target and build default to nonopt. | |
727 | # 5. If nonopt is not specified, then target and build default to host. | |
728 | ||
729 | # The aliases save the names the user supplied, while $host etc. | |
730 | # will get canonicalized. | |
731 | case $host---$target---$nonopt in | |
732 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
733 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
734 | esac | |
735 | ||
736 | ||
737 | # Make sure we can run config.sub. | |
d89fa2d8 | 738 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
1e1e3b61 IC |
739 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
740 | fi | |
741 | ||
742 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
278bda40 | 743 | echo "configure:744: checking host system type" >&5 |
1e1e3b61 IC |
744 | |
745 | host_alias=$host | |
746 | case "$host_alias" in | |
747 | NONE) | |
748 | case $nonopt in | |
749 | NONE) | |
d89fa2d8 | 750 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
1e1e3b61 IC |
751 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
752 | fi ;; | |
753 | *) host_alias=$nonopt ;; | |
754 | esac ;; | |
755 | esac | |
756 | ||
d89fa2d8 | 757 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
1e1e3b61 IC |
758 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
759 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
760 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
761 | echo "$ac_t""$host" 1>&6 | |
762 | ||
763 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
278bda40 | 764 | echo "configure:765: checking target system type" >&5 |
1e1e3b61 IC |
765 | |
766 | target_alias=$target | |
767 | case "$target_alias" in | |
768 | NONE) | |
769 | case $nonopt in | |
770 | NONE) target_alias=$host_alias ;; | |
771 | *) target_alias=$nonopt ;; | |
772 | esac ;; | |
773 | esac | |
774 | ||
d89fa2d8 | 775 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
1e1e3b61 IC |
776 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
777 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
778 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
779 | echo "$ac_t""$target" 1>&6 | |
780 | ||
781 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
278bda40 | 782 | echo "configure:783: checking build system type" >&5 |
1e1e3b61 IC |
783 | |
784 | build_alias=$build | |
785 | case "$build_alias" in | |
786 | NONE) | |
787 | case $nonopt in | |
788 | NONE) build_alias=$host_alias ;; | |
789 | *) build_alias=$nonopt ;; | |
790 | esac ;; | |
791 | esac | |
792 | ||
d89fa2d8 | 793 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
1e1e3b61 IC |
794 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
795 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
796 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
797 | echo "$ac_t""$build" 1>&6 | |
798 | ||
799 | test "$host_alias" != "$target_alias" && | |
800 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
801 | NONENONEs,x,x, && | |
802 | program_prefix=${target_alias}- | |
803 | ||
804 | if test "$program_transform_name" = s,x,x,; then | |
805 | program_transform_name= | |
806 | else | |
807 | # Double any \ or $. echo might interpret backslashes. | |
808 | cat <<\EOF_SED > conftestsed | |
809 | s,\\,\\\\,g; s,\$,$$,g | |
810 | EOF_SED | |
811 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
812 | rm -f conftestsed | |
813 | fi | |
814 | test "$program_prefix" != NONE && | |
815 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
816 | # Use a double $ so make ignores it. | |
817 | test "$program_suffix" != NONE && | |
818 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
819 | ||
820 | # sed with no file args requires a program. | |
821 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
822 | ||
823 | # Extract the first word of "gcc", so it can be a program name with args. | |
824 | set dummy gcc; ac_word=$2 | |
825 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
278bda40 | 826 | echo "configure:827: checking for $ac_word" >&5 |
1e1e3b61 IC |
827 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
828 | echo $ac_n "(cached) $ac_c" 1>&6 | |
829 | else | |
830 | if test -n "$CC"; then | |
831 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
832 | else | |
833 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
834 | for ac_dir in $PATH; do | |
835 | test -z "$ac_dir" && ac_dir=. | |
836 | if test -f $ac_dir/$ac_word; then | |
837 | ac_cv_prog_CC="gcc" | |
838 | break | |
839 | fi | |
840 | done | |
841 | IFS="$ac_save_ifs" | |
842 | fi | |
843 | fi | |
844 | CC="$ac_cv_prog_CC" | |
845 | if test -n "$CC"; then | |
846 | echo "$ac_t""$CC" 1>&6 | |
847 | else | |
848 | echo "$ac_t""no" 1>&6 | |
849 | fi | |
850 | ||
851 | if test -z "$CC"; then | |
852 | # Extract the first word of "cc", so it can be a program name with args. | |
853 | set dummy cc; ac_word=$2 | |
854 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
278bda40 | 855 | echo "configure:856: checking for $ac_word" >&5 |
1e1e3b61 IC |
856 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
857 | echo $ac_n "(cached) $ac_c" 1>&6 | |
858 | else | |
859 | if test -n "$CC"; then | |
860 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
861 | else | |
862 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
863 | ac_prog_rejected=no | |
864 | for ac_dir in $PATH; do | |
865 | test -z "$ac_dir" && ac_dir=. | |
866 | if test -f $ac_dir/$ac_word; then | |
867 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
868 | ac_prog_rejected=yes | |
869 | continue | |
870 | fi | |
871 | ac_cv_prog_CC="cc" | |
872 | break | |
873 | fi | |
874 | done | |
875 | IFS="$ac_save_ifs" | |
876 | if test $ac_prog_rejected = yes; then | |
877 | # We found a bogon in the path, so make sure we never use it. | |
878 | set dummy $ac_cv_prog_CC | |
879 | shift | |
880 | if test $# -gt 0; then | |
881 | # We chose a different compiler from the bogus one. | |
882 | # However, it has the same basename, so the bogon will be chosen | |
883 | # first if we set CC to just the basename; use the full file name. | |
884 | shift | |
885 | set dummy "$ac_dir/$ac_word" "$@" | |
886 | shift | |
887 | ac_cv_prog_CC="$@" | |
888 | fi | |
889 | fi | |
890 | fi | |
891 | fi | |
892 | CC="$ac_cv_prog_CC" | |
893 | if test -n "$CC"; then | |
894 | echo "$ac_t""$CC" 1>&6 | |
895 | else | |
896 | echo "$ac_t""no" 1>&6 | |
897 | fi | |
898 | ||
899 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
900 | fi | |
901 | ||
902 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
278bda40 | 903 | echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
1e1e3b61 IC |
904 | |
905 | ac_ext=c | |
906 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
907 | ac_cpp='$CPP $CPPFLAGS' | |
908 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
909 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
910 | cross_compiling=$ac_cv_prog_cc_cross | |
911 | ||
912 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 913 | #line 914 "configure" |
1e1e3b61 IC |
914 | #include "confdefs.h" |
915 | main(){return(0);} | |
916 | EOF | |
278bda40 | 917 | if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1e1e3b61 IC |
918 | ac_cv_prog_cc_works=yes |
919 | # If we can't run a trivial program, we are probably using a cross compiler. | |
920 | if (./conftest; exit) 2>/dev/null; then | |
921 | ac_cv_prog_cc_cross=no | |
922 | else | |
923 | ac_cv_prog_cc_cross=yes | |
924 | fi | |
925 | else | |
926 | echo "configure: failed program was:" >&5 | |
927 | cat conftest.$ac_ext >&5 | |
928 | ac_cv_prog_cc_works=no | |
929 | fi | |
930 | rm -fr conftest* | |
931 | ||
932 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
933 | if test $ac_cv_prog_cc_works = no; then | |
934 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
935 | fi | |
936 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
278bda40 | 937 | echo "configure:938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
1e1e3b61 IC |
938 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
939 | cross_compiling=$ac_cv_prog_cc_cross | |
940 | ||
941 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
278bda40 | 942 | echo "configure:943: checking whether we are using GNU C" >&5 |
1e1e3b61 IC |
943 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
944 | echo $ac_n "(cached) $ac_c" 1>&6 | |
945 | else | |
946 | cat > conftest.c <<EOF | |
947 | #ifdef __GNUC__ | |
948 | yes; | |
949 | #endif | |
950 | EOF | |
278bda40 | 951 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
1e1e3b61 IC |
952 | ac_cv_prog_gcc=yes |
953 | else | |
954 | ac_cv_prog_gcc=no | |
955 | fi | |
956 | fi | |
957 | ||
958 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
959 | ||
960 | if test $ac_cv_prog_gcc = yes; then | |
961 | GCC=yes | |
962 | ac_test_CFLAGS="${CFLAGS+set}" | |
963 | ac_save_CFLAGS="$CFLAGS" | |
964 | CFLAGS= | |
965 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
278bda40 | 966 | echo "configure:967: checking whether ${CC-cc} accepts -g" >&5 |
1e1e3b61 IC |
967 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
968 | echo $ac_n "(cached) $ac_c" 1>&6 | |
969 | else | |
970 | echo 'void f(){}' > conftest.c | |
971 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
972 | ac_cv_prog_cc_g=yes | |
973 | else | |
974 | ac_cv_prog_cc_g=no | |
975 | fi | |
976 | rm -f conftest* | |
977 | ||
978 | fi | |
979 | ||
980 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
981 | if test "$ac_test_CFLAGS" = set; then | |
982 | CFLAGS="$ac_save_CFLAGS" | |
983 | elif test $ac_cv_prog_cc_g = yes; then | |
984 | CFLAGS="-g -O2" | |
985 | else | |
986 | CFLAGS="-O2" | |
987 | fi | |
988 | else | |
989 | GCC= | |
990 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
991 | fi | |
992 | ||
993 | # Find a good install program. We prefer a C program (faster), | |
994 | # so one script is as good as another. But avoid the broken or | |
995 | # incompatible versions: | |
996 | # SysV /etc/install, /usr/sbin/install | |
997 | # SunOS /usr/etc/install | |
998 | # IRIX /sbin/install | |
999 | # AIX /bin/install | |
d89fa2d8 | 1000 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
1e1e3b61 IC |
1001 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
1002 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
1003 | # ./install, which can be erroneously created by make from ./install.sh. | |
1004 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
278bda40 | 1005 | echo "configure:1006: checking for a BSD compatible install" >&5 |
1e1e3b61 IC |
1006 | if test -z "$INSTALL"; then |
1007 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1008 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1009 | else | |
1010 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
1011 | for ac_dir in $PATH; do | |
1012 | # Account for people who put trailing slashes in PATH elements. | |
1013 | case "$ac_dir/" in | |
1014 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1015 | *) | |
1016 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
d89fa2d8 AC |
1017 | # Don't use installbsd from OSF since it installs stuff as root |
1018 | # by default. | |
1019 | for ac_prog in ginstall scoinst install; do | |
1e1e3b61 IC |
1020 | if test -f $ac_dir/$ac_prog; then |
1021 | if test $ac_prog = install && | |
1022 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1023 | # AIX install. It has an incompatible calling convention. | |
1024 | : | |
1025 | else | |
1026 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1027 | break 2 | |
1028 | fi | |
1029 | fi | |
1030 | done | |
1031 | ;; | |
1032 | esac | |
1033 | done | |
1034 | IFS="$ac_save_IFS" | |
1035 | ||
1036 | fi | |
1037 | if test "${ac_cv_path_install+set}" = set; then | |
1038 | INSTALL="$ac_cv_path_install" | |
1039 | else | |
1040 | # As a last resort, use the slow shell script. We don't cache a | |
1041 | # path for INSTALL within a source directory, because that will | |
1042 | # break other packages using the cache if that directory is | |
1043 | # removed, or if the path is relative. | |
1044 | INSTALL="$ac_install_sh" | |
1045 | fi | |
1046 | fi | |
1047 | echo "$ac_t""$INSTALL" 1>&6 | |
1048 | ||
1049 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1050 | # It thinks the first close brace ends the variable substitution. | |
1051 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1052 | ||
1053 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1054 | ||
1055 | ||
1056 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
1057 | if test "x$cross_compiling" = "xno"; then | |
1058 | CC_FOR_BUILD='$(CC)' | |
1059 | else | |
1060 | CC_FOR_BUILD=gcc | |
1061 | fi | |
1062 | ||
1063 | ||
1064 | ||
1065 | ||
1066 | AR=${AR-ar} | |
1067 | ||
1068 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1069 | set dummy ranlib; ac_word=$2 | |
1070 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
278bda40 | 1071 | echo "configure:1072: checking for $ac_word" >&5 |
1e1e3b61 IC |
1072 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1074 | else | |
1075 | if test -n "$RANLIB"; then | |
1076 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1077 | else | |
1078 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1079 | for ac_dir in $PATH; do | |
1080 | test -z "$ac_dir" && ac_dir=. | |
1081 | if test -f $ac_dir/$ac_word; then | |
1082 | ac_cv_prog_RANLIB="ranlib" | |
1083 | break | |
1084 | fi | |
1085 | done | |
1086 | IFS="$ac_save_ifs" | |
1087 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1088 | fi | |
1089 | fi | |
1090 | RANLIB="$ac_cv_prog_RANLIB" | |
1091 | if test -n "$RANLIB"; then | |
1092 | echo "$ac_t""$RANLIB" 1>&6 | |
1093 | else | |
1094 | echo "$ac_t""no" 1>&6 | |
1095 | fi | |
1096 | ||
1097 | ||
1098 | # Check for common headers. | |
1099 | # FIXME: Seems to me this can cause problems for i386-windows hosts. | |
1100 | # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. | |
9a8e61f1 | 1101 | for ac_hdr in stdlib.h string.h strings.h unistd.h time.h |
1e1e3b61 IC |
1102 | do |
1103 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1104 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
278bda40 | 1105 | echo "configure:1106: checking for $ac_hdr" >&5 |
1e1e3b61 IC |
1106 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1108 | else | |
1109 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 1110 | #line 1111 "configure" |
1e1e3b61 IC |
1111 | #include "confdefs.h" |
1112 | #include <$ac_hdr> | |
1113 | EOF | |
1114 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
278bda40 | 1115 | { (eval echo configure:1116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
9a8e61f1 AC |
1116 | ac_err=`grep -v '^ *+' conftest.out` |
1117 | if test -z "$ac_err"; then | |
1118 | rm -rf conftest* | |
1119 | eval "ac_cv_header_$ac_safe=yes" | |
1120 | else | |
1121 | echo "$ac_err" >&5 | |
1122 | echo "configure: failed program was:" >&5 | |
1123 | cat conftest.$ac_ext >&5 | |
1124 | rm -rf conftest* | |
1125 | eval "ac_cv_header_$ac_safe=no" | |
1126 | fi | |
1127 | rm -f conftest* | |
1128 | fi | |
1129 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1130 | echo "$ac_t""yes" 1>&6 | |
1131 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1132 | cat >> confdefs.h <<EOF | |
1133 | #define $ac_tr_hdr 1 | |
1134 | EOF | |
1135 | ||
1136 | else | |
1137 | echo "$ac_t""no" 1>&6 | |
1138 | fi | |
1139 | done | |
1140 | ||
1141 | for ac_hdr in sys/time.h sys/resource.h | |
1142 | do | |
1143 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1144 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
278bda40 | 1145 | echo "configure:1146: checking for $ac_hdr" >&5 |
9a8e61f1 AC |
1146 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1147 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1148 | else | |
1149 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 1150 | #line 1151 "configure" |
9a8e61f1 AC |
1151 | #include "confdefs.h" |
1152 | #include <$ac_hdr> | |
1153 | EOF | |
1154 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
278bda40 | 1155 | { (eval echo configure:1156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
9a8e61f1 AC |
1156 | ac_err=`grep -v '^ *+' conftest.out` |
1157 | if test -z "$ac_err"; then | |
1158 | rm -rf conftest* | |
1159 | eval "ac_cv_header_$ac_safe=yes" | |
1160 | else | |
1161 | echo "$ac_err" >&5 | |
1162 | echo "configure: failed program was:" >&5 | |
1163 | cat conftest.$ac_ext >&5 | |
1164 | rm -rf conftest* | |
1165 | eval "ac_cv_header_$ac_safe=no" | |
1166 | fi | |
1167 | rm -f conftest* | |
1168 | fi | |
1169 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1170 | echo "$ac_t""yes" 1>&6 | |
1171 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1172 | cat >> confdefs.h <<EOF | |
1173 | #define $ac_tr_hdr 1 | |
1174 | EOF | |
1175 | ||
1176 | else | |
1177 | echo "$ac_t""no" 1>&6 | |
1178 | fi | |
1179 | done | |
1180 | ||
d8f53049 | 1181 | for ac_hdr in fcntl.h fpu_control.h |
9a8e61f1 AC |
1182 | do |
1183 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1184 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
278bda40 | 1185 | echo "configure:1186: checking for $ac_hdr" >&5 |
9a8e61f1 AC |
1186 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1187 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1188 | else | |
1189 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 1190 | #line 1191 "configure" |
9a8e61f1 AC |
1191 | #include "confdefs.h" |
1192 | #include <$ac_hdr> | |
1193 | EOF | |
1194 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
278bda40 | 1195 | { (eval echo configure:1196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1e1e3b61 IC |
1196 | ac_err=`grep -v '^ *+' conftest.out` |
1197 | if test -z "$ac_err"; then | |
1198 | rm -rf conftest* | |
1199 | eval "ac_cv_header_$ac_safe=yes" | |
1200 | else | |
1201 | echo "$ac_err" >&5 | |
1202 | echo "configure: failed program was:" >&5 | |
1203 | cat conftest.$ac_ext >&5 | |
1204 | rm -rf conftest* | |
1205 | eval "ac_cv_header_$ac_safe=no" | |
1206 | fi | |
1207 | rm -f conftest* | |
1208 | fi | |
1209 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1210 | echo "$ac_t""yes" 1>&6 | |
1211 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1212 | cat >> confdefs.h <<EOF | |
1213 | #define $ac_tr_hdr 1 | |
1214 | EOF | |
1215 | ||
1216 | else | |
1217 | echo "$ac_t""no" 1>&6 | |
1218 | fi | |
1219 | done | |
1220 | ||
d8f53049 | 1221 | for ac_func in getrusage time sigaction __setfpucw |
1e1e3b61 IC |
1222 | do |
1223 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
278bda40 | 1224 | echo "configure:1225: checking for $ac_func" >&5 |
1e1e3b61 IC |
1225 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1227 | else | |
1228 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 1229 | #line 1230 "configure" |
1e1e3b61 IC |
1230 | #include "confdefs.h" |
1231 | /* System header to define __stub macros and hopefully few prototypes, | |
1232 | which can conflict with char $ac_func(); below. */ | |
1233 | #include <assert.h> | |
1234 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1235 | /* We use char because int might match the return type of a gcc2 | |
1236 | builtin and then its argument prototype would still apply. */ | |
1237 | char $ac_func(); | |
1238 | ||
1239 | int main() { | |
1240 | ||
1241 | /* The GNU C library defines this for functions which it implements | |
1242 | to always fail with ENOSYS. Some functions are actually named | |
1243 | something starting with __ and the normal name is an alias. */ | |
1244 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1245 | choke me | |
1246 | #else | |
1247 | $ac_func(); | |
1248 | #endif | |
1249 | ||
1250 | ; return 0; } | |
1251 | EOF | |
278bda40 | 1252 | if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1e1e3b61 IC |
1253 | rm -rf conftest* |
1254 | eval "ac_cv_func_$ac_func=yes" | |
1255 | else | |
1256 | echo "configure: failed program was:" >&5 | |
1257 | cat conftest.$ac_ext >&5 | |
1258 | rm -rf conftest* | |
1259 | eval "ac_cv_func_$ac_func=no" | |
1260 | fi | |
1261 | rm -f conftest* | |
1262 | fi | |
1263 | ||
1264 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1265 | echo "$ac_t""yes" 1>&6 | |
1266 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1267 | cat >> confdefs.h <<EOF | |
1268 | #define $ac_tr_func 1 | |
1269 | EOF | |
1270 | ||
1271 | else | |
1272 | echo "$ac_t""no" 1>&6 | |
1273 | fi | |
1274 | done | |
1275 | ||
1276 | ||
1277 | . ${srcdir}/../../bfd/configure.host | |
1278 | ||
1279 | ||
1280 | ||
9a8e61f1 AC |
1281 | USE_MAINTAINER_MODE=no |
1282 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | |
1283 | if test "${enable_maintainer_mode+set}" = set; then | |
1284 | enableval="$enable_maintainer_mode" | |
1285 | case "${enableval}" in | |
1286 | yes) MAINT="" USE_MAINTAINER_MODE=yes ;; | |
1287 | no) MAINT="#" ;; | |
1288 | *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;; | |
1289 | esac | |
1290 | if test x"$silent" != x"yes" && test x"$MAINT" = x""; then | |
1291 | echo "Setting maintainer mode" 6>&1 | |
1292 | fi | |
1293 | else | |
1294 | MAINT="#" | |
1295 | fi | |
1296 | ||
1297 | ||
1298 | ||
1e1e3b61 IC |
1299 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. |
1300 | if test "${enable_sim_bswap+set}" = set; then | |
1301 | enableval="$enable_sim_bswap" | |
1302 | case "${enableval}" in | |
1303 | yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; | |
1304 | no) sim_bswap="-DWITH_BSWAP=0";; | |
1305 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
1306 | esac | |
1307 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then | |
1308 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
1309 | fi | |
1310 | else | |
1311 | sim_bswap="" | |
1312 | fi | |
1313 | ||
1314 | ||
1315 | ||
1316 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. | |
1317 | if test "${enable_sim_cflags+set}" = set; then | |
1318 | enableval="$enable_sim_cflags" | |
1319 | case "${enableval}" in | |
278bda40 | 1320 | yes) sim_cflags="-O2 -fomit-frame-pointer";; |
1e1e3b61 IC |
1321 | trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";; |
1322 | no) sim_cflags="";; | |
1323 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
1324 | esac | |
1325 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then | |
1326 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
1327 | fi | |
1328 | else | |
1329 | sim_cflags="" | |
1330 | fi | |
1331 | ||
1332 | ||
1333 | ||
1334 | # Check whether --enable-sim-debug or --disable-sim-debug was given. | |
1335 | if test "${enable_sim_debug+set}" = set; then | |
1336 | enableval="$enable_sim_debug" | |
1337 | case "${enableval}" in | |
1338 | yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; | |
1339 | no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; | |
1340 | *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; | |
1341 | esac | |
1342 | if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then | |
1343 | echo "Setting sim debug = $sim_debug" 6>&1 | |
1344 | fi | |
1345 | else | |
1346 | sim_debug="" | |
1347 | fi | |
1348 | ||
1349 | ||
1350 | ||
1351 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. | |
1352 | if test "${enable_sim_stdio+set}" = set; then | |
1353 | enableval="$enable_sim_stdio" | |
1354 | case "${enableval}" in | |
1355 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; | |
1356 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
1357 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
1358 | esac | |
1359 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then | |
1360 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
1361 | fi | |
1362 | else | |
1363 | sim_stdio="" | |
1364 | fi | |
1365 | ||
1366 | ||
1367 | ||
1368 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
1369 | if test "${enable_sim_trace+set}" = set; then | |
1370 | enableval="$enable_sim_trace" | |
1371 | case "${enableval}" in | |
1372 | yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; | |
1373 | no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; | |
1374 | [-0-9]*) | |
1375 | sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; | |
1376 | [a-z]*) | |
1377 | sim_trace="" | |
1378 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1379 | if test x"$sim_trace" = x; then | |
1380 | sim_trace="-DWITH_TRACE='(TRACE_$x" | |
1381 | else | |
1382 | sim_trace="${sim_trace}|TRACE_$x" | |
1383 | fi | |
1384 | done | |
1385 | sim_trace="$sim_trace)'" ;; | |
1386 | esac | |
1387 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then | |
1388 | echo "Setting sim trace = $sim_trace" 6>&1 | |
1389 | fi | |
1390 | else | |
1391 | sim_trace="" | |
1392 | fi | |
1393 | ||
1394 | ||
1395 | ||
1396 | # Check whether --enable-sim-profile or --disable-sim-profile was given. | |
1397 | if test "${enable_sim_profile+set}" = set; then | |
1398 | enableval="$enable_sim_profile" | |
1399 | case "${enableval}" in | |
1400 | yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; | |
1401 | no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; | |
1402 | [-0-9]*) | |
1403 | sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; | |
1404 | [a-z]*) | |
1405 | sim_profile="" | |
1406 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1407 | if test x"$sim_profile" = x; then | |
1408 | sim_profile="-DWITH_PROFILE='(PROFILE_$x" | |
1409 | else | |
1410 | sim_profile="${sim_profile}|PROFILE_$x" | |
1411 | fi | |
1412 | done | |
1413 | sim_profile="$sim_profile)'" ;; | |
1414 | esac | |
1415 | if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then | |
1416 | echo "Setting sim profile = $sim_profile" 6>&1 | |
1417 | fi | |
1418 | else | |
1419 | sim_profile="" | |
1420 | fi | |
1421 | ||
1422 | ||
1423 | ||
1424 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
278bda40 | 1425 | echo "configure:1426: checking return type of signal handlers" >&5 |
1e1e3b61 IC |
1426 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
1427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1428 | else | |
1429 | cat > conftest.$ac_ext <<EOF | |
278bda40 | 1430 | #line 1431 "configure" |
1e1e3b61 IC |
1431 | #include "confdefs.h" |
1432 | #include <sys/types.h> | |
1433 | #include <signal.h> | |
1434 | #ifdef signal | |
1435 | #undef signal | |
1436 | #endif | |
1437 | #ifdef __cplusplus | |
1438 | extern "C" void (*signal (int, void (*)(int)))(int); | |
1439 | #else | |
1440 | void (*signal ()) (); | |
1441 | #endif | |
1442 | ||
1443 | int main() { | |
1444 | int i; | |
1445 | ; return 0; } | |
1446 | EOF | |
278bda40 | 1447 | if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1e1e3b61 IC |
1448 | rm -rf conftest* |
1449 | ac_cv_type_signal=void | |
1450 | else | |
1451 | echo "configure: failed program was:" >&5 | |
1452 | cat conftest.$ac_ext >&5 | |
1453 | rm -rf conftest* | |
1454 | ac_cv_type_signal=int | |
1455 | fi | |
1456 | rm -f conftest* | |
1457 | fi | |
1458 | ||
1459 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
1460 | cat >> confdefs.h <<EOF | |
1461 | #define RETSIGTYPE $ac_cv_type_signal | |
1462 | EOF | |
1463 | ||
1464 | ||
1465 | ||
1466 | ||
1467 | sim_link_files= | |
1468 | sim_link_links= | |
1469 | ||
1470 | sim_link_links=tconfig.h | |
1471 | if test -f ${srcdir}/tconfig.in | |
1472 | then | |
1473 | sim_link_files=tconfig.in | |
1474 | else | |
1475 | sim_link_files=../common/tconfig.in | |
1476 | fi | |
1477 | ||
1478 | # targ-vals.def points to the libc macro description file. | |
1479 | case "${target}" in | |
1480 | *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; | |
1481 | esac | |
1482 | sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" | |
1483 | sim_link_links="${sim_link_links} targ-vals.def" | |
1484 | ||
1485 | ||
1486 | ||
1487 | ||
1488 | default_sim_inline="-DDEFAULT_INLINE=0" | |
1489 | # Check whether --enable-sim-inline or --disable-sim-inline was given. | |
1490 | if test "${enable_sim_inline+set}" = set; then | |
1491 | enableval="$enable_sim_inline" | |
1492 | sim_inline="" | |
1493 | case "$enableval" in | |
1494 | no) sim_inline="-DDEFAULT_INLINE=0";; | |
1495 | 0) sim_inline="-DDEFAULT_INLINE=0";; | |
278bda40 | 1496 | yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";; |
1e1e3b61 IC |
1497 | 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; |
1498 | *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1499 | new_flag="" | |
1500 | case "$x" in | |
1501 | *_INLINE=*) new_flag="-D$x";; | |
1502 | *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; | |
278bda40 AC |
1503 | *_INLINE) new_flag="-D$x=ALL_C_INLINE";; |
1504 | *) new_flag="-D$x""_INLINE=ALL_C_INLINE";; | |
1e1e3b61 IC |
1505 | esac |
1506 | if test x"$sim_inline" = x""; then | |
1507 | sim_inline="$new_flag" | |
1508 | else | |
1509 | sim_inline="$sim_inline $new_flag" | |
1510 | fi | |
1511 | done;; | |
1512 | esac | |
1513 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then | |
1514 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1515 | fi | |
1516 | else | |
64ed8b6a AC |
1517 | |
1518 | if test "x$cross_compiling" = "xno"; then | |
1e1e3b61 | 1519 | if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then |
64ed8b6a AC |
1520 | sim_inline="${default_sim_inline}" |
1521 | if test x"$silent" != x"yes"; then | |
1522 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1523 | fi | |
1524 | else | |
1525 | sim_inline="" | |
1e1e3b61 IC |
1526 | fi |
1527 | else | |
64ed8b6a | 1528 | sim_inline="-DDEFAULT_INLINE=0" |
1e1e3b61 IC |
1529 | fi |
1530 | fi | |
1531 | ||
1532 | wire_alignment="NONSTRICT_ALIGNMENT" | |
1533 | default_alignment="" | |
1534 | ||
1535 | # Check whether --enable-sim-alignment or --disable-sim-alignment was given. | |
1536 | if test "${enable_sim_alignment+set}" = set; then | |
1537 | enableval="$enable_sim_alignment" | |
1538 | case "${enableval}" in | |
1539 | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; | |
1540 | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; | |
1541 | forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; | |
1542 | yes) if test x"$wire_alignment" != x; then | |
1543 | sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" | |
1544 | else | |
1545 | if test x"$default_alignment" != x; then | |
1546 | sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" | |
1547 | else | |
1548 | echo "No hard-wired alignment for target $target" 1>&6 | |
1549 | sim_alignment="-DWITH_ALIGNMENT=0" | |
1550 | fi | |
1551 | fi;; | |
1552 | no) if test x"$default_alignment" != x; then | |
1553 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" | |
1554 | else | |
1555 | if test x"$wire_alignment" != x; then | |
1556 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" | |
1557 | else | |
1558 | echo "No default alignment for target $target" 1>&6 | |
1559 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" | |
1560 | fi | |
1561 | fi;; | |
1562 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; | |
1563 | esac | |
1564 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then | |
1565 | echo "Setting alignment flags = $sim_alignment" 6>&1 | |
1566 | fi | |
1567 | else | |
1568 | if test x"$default_alignment" != x; then | |
1569 | sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" | |
1570 | else | |
1571 | if test x"$wire_alignment" != x; then | |
1572 | sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" | |
1573 | else | |
1574 | sim_alignment= | |
1575 | fi | |
1576 | fi | |
1577 | fi | |
1578 | ||
1579 | ||
1580 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. | |
1581 | if test "${enable_sim_hostendian+set}" = set; then | |
1582 | enableval="$enable_sim_hostendian" | |
1583 | case "${enableval}" in | |
1584 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
1585 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
1586 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
1587 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; | |
1588 | esac | |
1589 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then | |
1590 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 | |
1591 | fi | |
1592 | else | |
1593 | ||
1594 | if test "x$cross_compiling" = "xno"; then | |
1595 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 | |
64ed8b6a | 1596 | echo "configure:1597: checking whether byte ordering is bigendian" >&5 |
1e1e3b61 IC |
1597 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
1598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1599 | else | |
1600 | ac_cv_c_bigendian=unknown | |
1601 | # See if sys/param.h defines the BYTE_ORDER macro. | |
1602 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 1603 | #line 1604 "configure" |
1e1e3b61 IC |
1604 | #include "confdefs.h" |
1605 | #include <sys/types.h> | |
1606 | #include <sys/param.h> | |
1607 | int main() { | |
1608 | ||
1609 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
1610 | bogus endian macros | |
1611 | #endif | |
1612 | ; return 0; } | |
1613 | EOF | |
64ed8b6a | 1614 | if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1e1e3b61 IC |
1615 | rm -rf conftest* |
1616 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
1617 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 1618 | #line 1619 "configure" |
1e1e3b61 IC |
1619 | #include "confdefs.h" |
1620 | #include <sys/types.h> | |
1621 | #include <sys/param.h> | |
1622 | int main() { | |
1623 | ||
1624 | #if BYTE_ORDER != BIG_ENDIAN | |
1625 | not big endian | |
1626 | #endif | |
1627 | ; return 0; } | |
1628 | EOF | |
64ed8b6a | 1629 | if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1e1e3b61 IC |
1630 | rm -rf conftest* |
1631 | ac_cv_c_bigendian=yes | |
1632 | else | |
1633 | echo "configure: failed program was:" >&5 | |
1634 | cat conftest.$ac_ext >&5 | |
1635 | rm -rf conftest* | |
1636 | ac_cv_c_bigendian=no | |
1637 | fi | |
1638 | rm -f conftest* | |
1639 | else | |
1640 | echo "configure: failed program was:" >&5 | |
1641 | cat conftest.$ac_ext >&5 | |
1642 | fi | |
1643 | rm -f conftest* | |
1644 | if test $ac_cv_c_bigendian = unknown; then | |
1645 | if test "$cross_compiling" = yes; then | |
1646 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } | |
1647 | else | |
1648 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 1649 | #line 1650 "configure" |
1e1e3b61 IC |
1650 | #include "confdefs.h" |
1651 | main () { | |
1652 | /* Are we little or big endian? From Harbison&Steele. */ | |
1653 | union | |
1654 | { | |
1655 | long l; | |
1656 | char c[sizeof (long)]; | |
1657 | } u; | |
1658 | u.l = 1; | |
1659 | exit (u.c[sizeof (long) - 1] == 1); | |
1660 | } | |
1661 | EOF | |
64ed8b6a | 1662 | if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
1e1e3b61 IC |
1663 | then |
1664 | ac_cv_c_bigendian=no | |
1665 | else | |
1666 | echo "configure: failed program was:" >&5 | |
1667 | cat conftest.$ac_ext >&5 | |
1668 | rm -fr conftest* | |
1669 | ac_cv_c_bigendian=yes | |
1670 | fi | |
1671 | rm -fr conftest* | |
1672 | fi | |
1673 | ||
1674 | fi | |
1675 | fi | |
1676 | ||
1677 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
1678 | if test $ac_cv_c_bigendian = yes; then | |
1679 | cat >> confdefs.h <<\EOF | |
1680 | #define WORDS_BIGENDIAN 1 | |
1681 | EOF | |
1682 | ||
1683 | fi | |
1684 | ||
1685 | if test $ac_cv_c_bigendian = yes; then | |
1686 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" | |
1687 | else | |
1688 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" | |
1689 | fi | |
1690 | else | |
1691 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" | |
1692 | fi | |
1693 | fi | |
1694 | ||
1695 | ||
1696 | # Check whether --enable-sim-warnings or --disable-sim-warnings was given. | |
1697 | if test "${enable_sim_warnings+set}" = set; then | |
1698 | enableval="$enable_sim_warnings" | |
1699 | case "${enableval}" in | |
1700 | yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";; | |
1701 | no) sim_warnings="-w";; | |
1702 | *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
1703 | esac | |
1704 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then | |
1705 | echo "Setting warning flags = $sim_warnings" 6>&1 | |
1706 | fi | |
1707 | else | |
1708 | sim_warnings="" | |
1709 | fi | |
1710 | ||
1711 | ||
1712 | ||
1713 | # Ensure a reasonable default simulator is constructed: | |
1714 | case "${target}" in | |
1715 | # start-sanitize-tx19 | |
1716 | mipstx19*-*-*) SIMCONF="-mips1 -mcpu=r1900 -mno-fp --warnings";; | |
1717 | # end-sanitize-tx19 | |
1718 | # start-sanitize-tx49 | |
1719 | mips64tx49*-*-*) SIMCONF="-mips3 --warnings -mcpu=r4900";; | |
1720 | # end-sanitize-tx49 | |
1721 | # start-sanitize-r5900 | |
1722 | mips64r59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";; | |
1723 | # end-sanitize-r5900 | |
1724 | # start-sanitize-sky | |
1725 | txvu-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";; | |
1726 | # end-sanitize-sky | |
1727 | mips64*-*-*) SIMCONF="-mips0 --warnings";; | |
1728 | mips16*-*-*) SIMCONF="-mips0 --warnings";; | |
1729 | mips*-*-*) SIMCONF="-mips2 --warnings";; | |
1730 | *) SIMCONF="-mips0 --warnings";; | |
1731 | esac | |
1732 | ||
1733 | ||
1734 | case "${target}" in | |
1735 | # start-sanitize-tx19 | |
1736 | mipstx19*-*-*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";; | |
1737 | # end-sanitize-tx19 | |
1738 | *) SIM_SUBTARGET="";; | |
1739 | esac | |
1740 | ||
1741 | ||
1742 | ||
1743 | # | |
1744 | # Select the byte order of the target | |
1745 | # | |
1746 | case "${target}" in | |
1747 | # start-sanitize-tx19 | |
1748 | mipstx19*-*-*) mips_endian=0 ;; | |
1749 | # end-sanitize-tx19 | |
1750 | # start-sanitize-r5900 | |
1751 | mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;; | |
1752 | # end-sanitize-r5900 | |
1753 | # start-sanitize-sky | |
1754 | txvu-*-*) mips_endian=LITTLE_ENDIAN ;; | |
1755 | # end-sanitize-sky | |
1756 | mips64*-*-*) mips_endian=0 ;; | |
1757 | mips16*-*-*) mips_endian=0 ;; | |
1758 | mips*-*-*) mips_endian=0 ;; | |
1759 | *) mips_endian=0 ;; | |
1760 | esac | |
1761 | ||
1762 | wire_endian="$mips_endian" | |
1763 | default_endian="" | |
1764 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
1765 | if test "${enable_sim_endian+set}" = set; then | |
1766 | enableval="$enable_sim_endian" | |
1767 | case "${enableval}" in | |
1768 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
1769 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
1770 | yes) if test x"$wire_endian" != x; then | |
1771 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" | |
1772 | else | |
1773 | if test x"$default_endian" != x; then | |
1774 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" | |
1775 | else | |
1776 | echo "No hard-wired endian for target $target" 1>&6 | |
1777 | sim_endian="-DWITH_TARGET_BYTE_ORDER=0" | |
1778 | fi | |
1779 | fi;; | |
1780 | no) if test x"$default_endian" != x; then | |
1781 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" | |
1782 | else | |
1783 | if test x"$wire_endian" != x; then | |
1784 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" | |
1785 | else | |
1786 | echo "No default endian for target $target" 1>&6 | |
1787 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" | |
1788 | fi | |
1789 | fi;; | |
1790 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; | |
1791 | esac | |
1792 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then | |
1793 | echo "Setting endian flags = $sim_endian" 6>&1 | |
1794 | fi | |
1795 | else | |
1796 | if test x"$default_endian" != x; then | |
1797 | sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" | |
1798 | else | |
1799 | if test x"$wire_endian" != x; then | |
1800 | sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" | |
1801 | else | |
1802 | sim_endian= | |
1803 | fi | |
1804 | fi | |
1805 | fi | |
1806 | ||
1807 | ||
1808 | ||
1809 | # | |
1810 | # Select the bitsize of the target | |
1811 | # | |
1812 | case "${target}" in | |
1813 | # start-sanitize-tx19 | |
1814 | mipstx19*-*-*) mips_bitsize=32 ; mips_msb=31 ;; | |
1815 | # end-sanitize-tx19 | |
1816 | # start-sanitize-r5900 | |
1817 | mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
1818 | # end-sanitize-r5900 | |
1819 | # start-sanitize-sky | |
1820 | txvu-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
1821 | # end-sanitize-sky | |
1822 | mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
1823 | mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
1824 | mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;; | |
1825 | *) mips_bitsize=64 ; mips_msb=63 ;; | |
1826 | esac | |
9a8e61f1 AC |
1827 | wire_word_bitsize="$mips_bitsize" |
1828 | wire_word_msb="$mips_msb" | |
1829 | wire_address_bitsize="" | |
1830 | wire_cell_bitsize="" | |
1e1e3b61 IC |
1831 | # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given. |
1832 | if test "${enable_sim_bitsize+set}" = set; then | |
1833 | enableval="$enable_sim_bitsize" | |
9a8e61f1 AC |
1834 | sim_bitsize= |
1835 | case "${enableval}" in | |
1836 | 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";; | |
1837 | 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";; | |
1838 | 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; | |
1839 | 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";; | |
1840 | 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then | |
1e1e3b61 IC |
1841 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31" |
1842 | else | |
1843 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0" | |
1844 | fi ;; | |
9a8e61f1 | 1845 | 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then |
1e1e3b61 IC |
1846 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63" |
1847 | else | |
1848 | sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0" | |
1849 | fi ;; | |
9a8e61f1 AC |
1850 | *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; |
1851 | esac | |
1852 | # address bitsize | |
1853 | tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"` | |
1854 | case x"${tmp}" in | |
1855 | x ) ;; | |
1856 | x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;; | |
1857 | x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;; | |
1858 | * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; | |
1859 | esac | |
1860 | # cell bitsize | |
1861 | tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"` | |
1862 | case x"${tmp}" in | |
1863 | x ) ;; | |
1864 | x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;; | |
1865 | x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;; | |
1866 | * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;; | |
1e1e3b61 IC |
1867 | esac |
1868 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then | |
1869 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 | |
1870 | fi | |
1871 | else | |
1872 | sim_bitsize="" | |
9a8e61f1 AC |
1873 | if test x"$wire_word_bitsize" != x; then |
1874 | sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize" | |
1875 | fi | |
1876 | if test x"$wire_word_msb" != x; then | |
1877 | sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb" | |
1e1e3b61 | 1878 | fi |
9a8e61f1 AC |
1879 | if test x"$wire_address_bitsize" != x; then |
1880 | sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize" | |
1881 | fi | |
1882 | if test x"$wire_cell_bitsize" != x; then | |
1883 | sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize" | |
1e1e3b61 IC |
1884 | fi |
1885 | fi | |
1886 | ||
1887 | ||
1888 | ||
1889 | # | |
1890 | # Select the floating hardware support of the target | |
1891 | # | |
1892 | mips_fpu=HARDWARE_FLOATING_POINT | |
1893 | case "${target}" in | |
1894 | # start-sanitize-tx19 | |
1895 | mipstx19*-*-*) mips_fpu=SOFT_FLOATING_POINT ;; | |
1896 | # end-sanitize-tx19 | |
1897 | # start-sanitize-r5900 | |
1898 | mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
1899 | # end-sanitize-r5900 | |
1900 | # start-sanitize-sky | |
1901 | txvu-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
1902 | # end-sanitize-sky | |
1903 | mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
1904 | mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
1905 | mips*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
1906 | *) mips_fpu=HARD_FLOATING_POINT ;; | |
1907 | esac | |
1908 | ||
9a8e61f1 AC |
1909 | default_sim_float="$mips_fpu" |
1910 | default_sim_float_bitsize="" | |
1e1e3b61 IC |
1911 | # Check whether --enable-sim-float or --disable-sim-float was given. |
1912 | if test "${enable_sim_float+set}" = set; then | |
1913 | enableval="$enable_sim_float" | |
1914 | case "${enableval}" in | |
1915 | yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; | |
1916 | no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; | |
9a8e61f1 AC |
1917 | 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";; |
1918 | 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";; | |
1e1e3b61 IC |
1919 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";; |
1920 | esac | |
1921 | if test x"$silent" != x"yes" && test x"$sim_float" != x""; then | |
1922 | echo "Setting float flags = $sim_float" 6>&1 | |
1923 | fi | |
1924 | else | |
9a8e61f1 AC |
1925 | |
1926 | sim_float= | |
1927 | if test x"${default_sim_float}" != x""; then | |
1928 | sim_float="-DWITH_FLOATING_POINT=${default_sim_float}" | |
1929 | fi | |
1930 | if test x"${default_sim_float_bitsize}" != x""; then | |
1931 | sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}" | |
1932 | fi | |
1933 | ||
1e1e3b61 IC |
1934 | fi |
1935 | ||
1936 | ||
1937 | ||
1938 | # | |
1939 | # Select the IGEN architecture | |
1940 | # | |
1941 | sim_use_gen=NO | |
1942 | sim_igen_machine="-M mipsIV" | |
1943 | sim_m16_machine="-M mips16" | |
1944 | sim_igen_filter="32,64,f" | |
1945 | sim_m16_filter="16" | |
1946 | ||
1947 | case "${target}" in | |
1948 | # start-sanitize-tx19 | |
1949 | mipstx19*-*-*) sim_default_gen=M16 | |
1950 | sim_igen_machine="-M tx19" | |
1951 | sim_m16_machine="-M tx19" | |
1952 | sim_igen_filter="32" | |
1953 | sim_m16_filter="16" | |
1954 | ;; | |
1955 | # end-sanitize-tx19 | |
1956 | # start-sanitize-r5900 | |
1957 | mips64r59*-*-*) sim_default_gen=IGEN | |
1958 | sim_igen_machine="-M r5900" | |
1959 | ;; | |
1960 | # end-sanitize-r5900 | |
1961 | # start-sanitize-sky | |
1962 | txvu-*-*) sim_default_gen=IGEN | |
1963 | sim_igen_machine="-M r5900" | |
1964 | ;; | |
1965 | # end-sanitize-sky | |
1966 | # start-sanitize-vr5400 | |
1967 | mips64vr54*-*-*) sim_default_gen=IGEN | |
1968 | sim_use_gen=IGEN | |
1969 | sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400" | |
1970 | ;; | |
1971 | # end-sanitize-vr5400 | |
1972 | mips64vr5*-*-*) sim_default_gen=IGEN | |
1973 | sim_use_gen=IGEN | |
1974 | sim_igen_machine="-M vr5000" | |
1975 | # start-sanitize-vr5400 | |
1976 | sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000" | |
1977 | # end-sanitize-vr5400 | |
1978 | ;; | |
1979 | mips16*-*-*) sim_default_gen=M16 | |
1980 | ;; | |
1981 | mips32*-*-*) sim_default_gen=IGEN | |
1982 | sim_igen_filter="32,f" | |
1983 | ;; | |
1984 | *) sim_default_gen=IGEN | |
1985 | ;; | |
1986 | esac | |
1987 | sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine}" | |
1988 | sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine}" | |
1989 | ||
1990 | ||
1991 | ||
1992 | # | |
1993 | # Enable igen | |
1994 | # | |
1995 | # Check whether --enable-sim-igen or --disable-sim-igen was given. | |
1996 | if test "${enable_sim_igen+set}" = set; then | |
1997 | enableval="$enable_sim_igen" | |
1998 | case "${enableval}" in | |
1999 | yes) sim_gen="${sim_default_gen}";; | |
2000 | no) sim_gen=NO;; | |
2001 | 16) sim_gen=M16;; | |
2002 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_gen="";; | |
2003 | esac | |
2004 | if test x"$silent" != x"yes" && test x"$sim_gen" != x""; then | |
2005 | echo "Setting sim_igen = $sim_gen" 6>&1 | |
2006 | fi | |
2007 | else | |
2008 | sim_gen="${sim_use_gen}" | |
2009 | fi | |
2010 | ||
2011 | ||
2012 | ||
2013 | ||
2014 | for ac_hdr in string.h strings.h stdlib.h stdlib.h | |
2015 | do | |
2016 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2017 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
64ed8b6a | 2018 | echo "configure:2019: checking for $ac_hdr" >&5 |
1e1e3b61 IC |
2019 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2020 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2021 | else | |
2022 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 2023 | #line 2024 "configure" |
1e1e3b61 IC |
2024 | #include "confdefs.h" |
2025 | #include <$ac_hdr> | |
2026 | EOF | |
2027 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
64ed8b6a | 2028 | { (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1e1e3b61 IC |
2029 | ac_err=`grep -v '^ *+' conftest.out` |
2030 | if test -z "$ac_err"; then | |
2031 | rm -rf conftest* | |
2032 | eval "ac_cv_header_$ac_safe=yes" | |
2033 | else | |
2034 | echo "$ac_err" >&5 | |
2035 | echo "configure: failed program was:" >&5 | |
2036 | cat conftest.$ac_ext >&5 | |
2037 | rm -rf conftest* | |
2038 | eval "ac_cv_header_$ac_safe=no" | |
2039 | fi | |
2040 | rm -f conftest* | |
2041 | fi | |
2042 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2043 | echo "$ac_t""yes" 1>&6 | |
2044 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2045 | cat >> confdefs.h <<EOF | |
2046 | #define $ac_tr_hdr 1 | |
2047 | EOF | |
2048 | ||
2049 | else | |
2050 | echo "$ac_t""no" 1>&6 | |
2051 | fi | |
2052 | done | |
2053 | ||
2054 | echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6 | |
64ed8b6a | 2055 | echo "configure:2056: checking for fabs in -lm" >&5 |
1e1e3b61 IC |
2056 | ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'` |
2057 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2058 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2059 | else | |
2060 | ac_save_LIBS="$LIBS" | |
2061 | LIBS="-lm $LIBS" | |
2062 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 2063 | #line 2064 "configure" |
1e1e3b61 IC |
2064 | #include "confdefs.h" |
2065 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2066 | /* We use char because int might match the return type of a gcc2 | |
2067 | builtin and then its argument prototype would still apply. */ | |
2068 | char fabs(); | |
2069 | ||
2070 | int main() { | |
2071 | fabs() | |
2072 | ; return 0; } | |
2073 | EOF | |
64ed8b6a | 2074 | if { (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1e1e3b61 IC |
2075 | rm -rf conftest* |
2076 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2077 | else | |
2078 | echo "configure: failed program was:" >&5 | |
2079 | cat conftest.$ac_ext >&5 | |
2080 | rm -rf conftest* | |
2081 | eval "ac_cv_lib_$ac_lib_var=no" | |
2082 | fi | |
2083 | rm -f conftest* | |
2084 | LIBS="$ac_save_LIBS" | |
2085 | ||
2086 | fi | |
2087 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2088 | echo "$ac_t""yes" 1>&6 | |
2089 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
2090 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
2091 | cat >> confdefs.h <<EOF | |
2092 | #define $ac_tr_lib 1 | |
2093 | EOF | |
2094 | ||
2095 | LIBS="-lm $LIBS" | |
2096 | ||
2097 | else | |
2098 | echo "$ac_t""no" 1>&6 | |
2099 | fi | |
2100 | ||
2101 | for ac_func in aint anint sqrt | |
2102 | do | |
2103 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
64ed8b6a | 2104 | echo "configure:2105: checking for $ac_func" >&5 |
1e1e3b61 IC |
2105 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2106 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2107 | else | |
2108 | cat > conftest.$ac_ext <<EOF | |
64ed8b6a | 2109 | #line 2110 "configure" |
1e1e3b61 IC |
2110 | #include "confdefs.h" |
2111 | /* System header to define __stub macros and hopefully few prototypes, | |
2112 | which can conflict with char $ac_func(); below. */ | |
2113 | #include <assert.h> | |
2114 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2115 | /* We use char because int might match the return type of a gcc2 | |
2116 | builtin and then its argument prototype would still apply. */ | |
2117 | char $ac_func(); | |
2118 | ||
2119 | int main() { | |
2120 | ||
2121 | /* The GNU C library defines this for functions which it implements | |
2122 | to always fail with ENOSYS. Some functions are actually named | |
2123 | something starting with __ and the normal name is an alias. */ | |
2124 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2125 | choke me | |
2126 | #else | |
2127 | $ac_func(); | |
2128 | #endif | |
2129 | ||
2130 | ; return 0; } | |
2131 | EOF | |
64ed8b6a | 2132 | if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1e1e3b61 IC |
2133 | rm -rf conftest* |
2134 | eval "ac_cv_func_$ac_func=yes" | |
2135 | else | |
2136 | echo "configure: failed program was:" >&5 | |
2137 | cat conftest.$ac_ext >&5 | |
2138 | rm -rf conftest* | |
2139 | eval "ac_cv_func_$ac_func=no" | |
2140 | fi | |
2141 | rm -f conftest* | |
2142 | fi | |
2143 | ||
2144 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2145 | echo "$ac_t""yes" 1>&6 | |
2146 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2147 | cat >> confdefs.h <<EOF | |
2148 | #define $ac_tr_func 1 | |
2149 | EOF | |
2150 | ||
2151 | else | |
2152 | echo "$ac_t""no" 1>&6 | |
2153 | fi | |
2154 | done | |
2155 | ||
2156 | ||
2157 | ||
2158 | ||
2159 | trap '' 1 2 15 | |
2160 | cat > confcache <<\EOF | |
2161 | # This file is a shell script that caches the results of configure | |
2162 | # tests run on this system so they can be shared between configure | |
2163 | # scripts and configure runs. It is not useful on other systems. | |
2164 | # If it contains results you don't want to keep, you may remove or edit it. | |
2165 | # | |
2166 | # By default, configure uses ./config.cache as the cache file, | |
2167 | # creating it if it does not exist already. You can give configure | |
2168 | # the --cache-file=FILE option to use a different cache file; that is | |
2169 | # what configure does when it calls configure scripts in | |
2170 | # subdirectories, so they share the cache. | |
2171 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2172 | # config.status only pays attention to the cache file if you give it the | |
2173 | # --recheck option to rerun configure. | |
2174 | # | |
2175 | EOF | |
2176 | # The following way of writing the cache mishandles newlines in values, | |
2177 | # but we know of no workaround that is simple, portable, and efficient. | |
2178 | # So, don't put newlines in cache variables' values. | |
2179 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
2180 | # and sets the high bit in the cache file unless we assign to the vars. | |
2181 | (set) 2>&1 | | |
d89fa2d8 | 2182 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
1e1e3b61 IC |
2183 | *ac_space=\ *) |
2184 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2185 | # turns \\\\ into \\, and sed turns \\ into \). | |
2186 | sed -n \ | |
2187 | -e "s/'/'\\\\''/g" \ | |
2188 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2189 | ;; | |
2190 | *) | |
2191 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2192 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2193 | ;; | |
2194 | esac >> confcache | |
2195 | if cmp -s $cache_file confcache; then | |
2196 | : | |
2197 | else | |
2198 | if test -w $cache_file; then | |
2199 | echo "updating cache $cache_file" | |
2200 | cat confcache > $cache_file | |
2201 | else | |
2202 | echo "not updating unwritable cache $cache_file" | |
2203 | fi | |
2204 | fi | |
2205 | rm -f confcache | |
2206 | ||
2207 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
2208 | ||
2209 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
2210 | # Let make expand exec_prefix. | |
2211 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2212 | ||
2213 | # Any assignment to VPATH causes Sun make to only execute | |
2214 | # the first set of double-colon rules, so remove it if not needed. | |
2215 | # If there is a colon in the path, we need to keep it. | |
2216 | if test "x$srcdir" = x.; then | |
2217 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
2218 | fi | |
2219 | ||
2220 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
2221 | ||
2222 | DEFS=-DHAVE_CONFIG_H | |
2223 | ||
2224 | # Without the "./", some shells look in PATH for config.status. | |
2225 | : ${CONFIG_STATUS=./config.status} | |
2226 | ||
2227 | echo creating $CONFIG_STATUS | |
2228 | rm -f $CONFIG_STATUS | |
2229 | cat > $CONFIG_STATUS <<EOF | |
2230 | #! /bin/sh | |
2231 | # Generated automatically by configure. | |
2232 | # Run this file to recreate the current configuration. | |
2233 | # This directory was configured as follows, | |
2234 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2235 | # | |
2236 | # $0 $ac_configure_args | |
2237 | # | |
2238 | # Compiler output produced by configure, useful for debugging | |
2239 | # configure, is in ./config.log if it exists. | |
2240 | ||
2241 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
2242 | for ac_option | |
2243 | do | |
2244 | case "\$ac_option" in | |
2245 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
2246 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
2247 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
2248 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
d89fa2d8 | 2249 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
1e1e3b61 IC |
2250 | exit 0 ;; |
2251 | -help | --help | --hel | --he | --h) | |
2252 | echo "\$ac_cs_usage"; exit 0 ;; | |
2253 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
2254 | esac | |
2255 | done | |
2256 | ||
2257 | ac_given_srcdir=$srcdir | |
2258 | ac_given_INSTALL="$INSTALL" | |
2259 | ||
2260 | trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
2261 | EOF | |
2262 | cat >> $CONFIG_STATUS <<EOF | |
2263 | ||
2264 | # Protect against being on the right side of a sed subst in config.status. | |
2265 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
2266 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
2267 | $ac_vpsub | |
2268 | $extrasub | |
2269 | s%@sim_environment@%$sim_environment%g | |
2270 | s%@sim_alignment@%$sim_alignment%g | |
2271 | s%@sim_assert@%$sim_assert%g | |
2272 | s%@sim_bitsize@%$sim_bitsize%g | |
2273 | s%@sim_endian@%$sim_endian%g | |
2274 | s%@sim_hostendian@%$sim_hostendian%g | |
2275 | s%@sim_float@%$sim_float%g | |
2276 | s%@sim_scache@%$sim_scache%g | |
2277 | s%@sim_default_model@%$sim_default_model%g | |
2278 | s%@sim_hardware@%$sim_hardware%g | |
9a8e61f1 | 2279 | s%@sim_hw_obj@%$sim_hw_obj%g |
d89fa2d8 | 2280 | s%@sim_hw@%$sim_hw%g |
1e1e3b61 IC |
2281 | s%@sim_inline@%$sim_inline%g |
2282 | s%@sim_packages@%$sim_packages%g | |
2283 | s%@sim_regparm@%$sim_regparm%g | |
2284 | s%@sim_reserved_bits@%$sim_reserved_bits%g | |
2285 | s%@sim_smp@%$sim_smp%g | |
2286 | s%@sim_stdcall@%$sim_stdcall%g | |
2287 | s%@sim_xor_endian@%$sim_xor_endian%g | |
2288 | s%@sim_warnings@%$sim_warnings%g | |
d89fa2d8 | 2289 | s%@SHELL@%$SHELL%g |
1e1e3b61 IC |
2290 | s%@CFLAGS@%$CFLAGS%g |
2291 | s%@CPPFLAGS@%$CPPFLAGS%g | |
2292 | s%@CXXFLAGS@%$CXXFLAGS%g | |
2293 | s%@DEFS@%$DEFS%g | |
2294 | s%@LDFLAGS@%$LDFLAGS%g | |
2295 | s%@LIBS@%$LIBS%g | |
2296 | s%@exec_prefix@%$exec_prefix%g | |
2297 | s%@prefix@%$prefix%g | |
2298 | s%@program_transform_name@%$program_transform_name%g | |
2299 | s%@bindir@%$bindir%g | |
2300 | s%@sbindir@%$sbindir%g | |
2301 | s%@libexecdir@%$libexecdir%g | |
2302 | s%@datadir@%$datadir%g | |
2303 | s%@sysconfdir@%$sysconfdir%g | |
2304 | s%@sharedstatedir@%$sharedstatedir%g | |
2305 | s%@localstatedir@%$localstatedir%g | |
2306 | s%@libdir@%$libdir%g | |
2307 | s%@includedir@%$includedir%g | |
2308 | s%@oldincludedir@%$oldincludedir%g | |
2309 | s%@infodir@%$infodir%g | |
2310 | s%@mandir@%$mandir%g | |
2311 | s%@host@%$host%g | |
2312 | s%@host_alias@%$host_alias%g | |
2313 | s%@host_cpu@%$host_cpu%g | |
2314 | s%@host_vendor@%$host_vendor%g | |
2315 | s%@host_os@%$host_os%g | |
2316 | s%@target@%$target%g | |
2317 | s%@target_alias@%$target_alias%g | |
2318 | s%@target_cpu@%$target_cpu%g | |
2319 | s%@target_vendor@%$target_vendor%g | |
2320 | s%@target_os@%$target_os%g | |
2321 | s%@build@%$build%g | |
2322 | s%@build_alias@%$build_alias%g | |
2323 | s%@build_cpu@%$build_cpu%g | |
2324 | s%@build_vendor@%$build_vendor%g | |
2325 | s%@build_os@%$build_os%g | |
2326 | s%@CC@%$CC%g | |
2327 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
2328 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
2329 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
2330 | s%@HDEFINES@%$HDEFINES%g | |
2331 | s%@AR@%$AR%g | |
2332 | s%@RANLIB@%$RANLIB%g | |
2333 | s%@CPP@%$CPP%g | |
9a8e61f1 | 2334 | s%@MAINT@%$MAINT%g |
1e1e3b61 IC |
2335 | s%@sim_bswap@%$sim_bswap%g |
2336 | s%@sim_cflags@%$sim_cflags%g | |
2337 | s%@sim_debug@%$sim_debug%g | |
2338 | s%@sim_stdio@%$sim_stdio%g | |
2339 | s%@sim_trace@%$sim_trace%g | |
2340 | s%@sim_profile@%$sim_profile%g | |
2341 | s%@SIMCONF@%$SIMCONF%g | |
2342 | s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g | |
2343 | s%@sim_igen_flags@%$sim_igen_flags%g | |
2344 | s%@sim_m16_flags@%$sim_m16_flags%g | |
2345 | s%@sim_gen@%$sim_gen%g | |
2346 | ||
2347 | CEOF | |
2348 | EOF | |
2349 | ||
2350 | cat >> $CONFIG_STATUS <<\EOF | |
2351 | ||
2352 | # Split the substitutions into bite-sized pieces for seds with | |
2353 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
2354 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
2355 | ac_file=1 # Number of current file. | |
2356 | ac_beg=1 # First line for current file. | |
2357 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
2358 | ac_more_lines=: | |
2359 | ac_sed_cmds="" | |
2360 | while $ac_more_lines; do | |
2361 | if test $ac_beg -gt 1; then | |
2362 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
2363 | else | |
2364 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
2365 | fi | |
2366 | if test ! -s conftest.s$ac_file; then | |
2367 | ac_more_lines=false | |
2368 | rm -f conftest.s$ac_file | |
2369 | else | |
2370 | if test -z "$ac_sed_cmds"; then | |
2371 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
2372 | else | |
2373 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
2374 | fi | |
2375 | ac_file=`expr $ac_file + 1` | |
2376 | ac_beg=$ac_end | |
2377 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
2378 | fi | |
2379 | done | |
2380 | if test -z "$ac_sed_cmds"; then | |
2381 | ac_sed_cmds=cat | |
2382 | fi | |
2383 | EOF | |
2384 | ||
2385 | cat >> $CONFIG_STATUS <<EOF | |
2386 | ||
2387 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"} | |
2388 | EOF | |
2389 | cat >> $CONFIG_STATUS <<\EOF | |
2390 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
2391 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
2392 | case "$ac_file" in | |
2393 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
2394 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2395 | *) ac_file_in="${ac_file}.in" ;; | |
2396 | esac | |
2397 | ||
2398 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
2399 | ||
2400 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2401 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2402 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2403 | # The file is in a subdirectory. | |
2404 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2405 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
2406 | # A "../" for each directory in $ac_dir_suffix. | |
2407 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
2408 | else | |
2409 | ac_dir_suffix= ac_dots= | |
2410 | fi | |
2411 | ||
2412 | case "$ac_given_srcdir" in | |
2413 | .) srcdir=. | |
2414 | if test -z "$ac_dots"; then top_srcdir=. | |
2415 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
2416 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
2417 | *) # Relative path. | |
2418 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
2419 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
2420 | esac | |
2421 | ||
2422 | case "$ac_given_INSTALL" in | |
2423 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
2424 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
2425 | esac | |
2426 | ||
2427 | echo creating "$ac_file" | |
2428 | rm -f "$ac_file" | |
2429 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
2430 | case "$ac_file" in | |
2431 | *Makefile*) ac_comsub="1i\\ | |
2432 | # $configure_input" ;; | |
2433 | *) ac_comsub= ;; | |
2434 | esac | |
2435 | ||
2436 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
2437 | sed -e "$ac_comsub | |
2438 | s%@configure_input@%$configure_input%g | |
2439 | s%@srcdir@%$srcdir%g | |
2440 | s%@top_srcdir@%$top_srcdir%g | |
2441 | s%@INSTALL@%$INSTALL%g | |
2442 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
2443 | fi; done | |
2444 | rm -f conftest.s* | |
2445 | ||
2446 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
2447 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
2448 | # | |
2449 | # ac_d sets the value in "#define NAME VALUE" lines. | |
2450 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
2451 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
2452 | ac_dC='\3' | |
2453 | ac_dD='%g' | |
2454 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
2455 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2456 | ac_uB='\([ ]\)%\1#\2define\3' | |
2457 | ac_uC=' ' | |
2458 | ac_uD='\4%g' | |
2459 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
2460 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2461 | ac_eB='$%\1#\2define\3' | |
2462 | ac_eC=' ' | |
2463 | ac_eD='%g' | |
2464 | ||
2465 | if test "${CONFIG_HEADERS+set}" != set; then | |
2466 | EOF | |
2467 | cat >> $CONFIG_STATUS <<EOF | |
2468 | CONFIG_HEADERS="config.h:config.in" | |
2469 | EOF | |
2470 | cat >> $CONFIG_STATUS <<\EOF | |
2471 | fi | |
2472 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
2473 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
2474 | case "$ac_file" in | |
2475 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
2476 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2477 | *) ac_file_in="${ac_file}.in" ;; | |
2478 | esac | |
2479 | ||
2480 | echo creating $ac_file | |
2481 | ||
2482 | rm -f conftest.frag conftest.in conftest.out | |
2483 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
2484 | cat $ac_file_inputs > conftest.in | |
2485 | ||
2486 | EOF | |
2487 | ||
2488 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
2489 | # the proper values into config.h.in to produce config.h. And first: | |
2490 | # Protect against being on the right side of a sed subst in config.status. | |
2491 | # Protect against being in an unquoted here document in config.status. | |
2492 | rm -f conftest.vals | |
2493 | cat > conftest.hdr <<\EOF | |
2494 | s/[\\&%]/\\&/g | |
2495 | s%[\\$`]%\\&%g | |
2496 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
2497 | s%ac_d%ac_u%gp | |
2498 | s%ac_u%ac_e%gp | |
2499 | EOF | |
2500 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
2501 | rm -f conftest.hdr | |
2502 | ||
2503 | # This sed command replaces #undef with comments. This is necessary, for | |
2504 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
2505 | # on some systems where configure will not decide to define it. | |
2506 | cat >> conftest.vals <<\EOF | |
2507 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
2508 | EOF | |
2509 | ||
2510 | # Break up conftest.vals because some shells have a limit on | |
2511 | # the size of here documents, and old seds have small limits too. | |
2512 | ||
2513 | rm -f conftest.tail | |
2514 | while : | |
2515 | do | |
2516 | ac_lines=`grep -c . conftest.vals` | |
2517 | # grep -c gives empty output for an empty file on some AIX systems. | |
2518 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
2519 | # Write a limited-size here document to conftest.frag. | |
2520 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
2521 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
2522 | echo 'CEOF | |
2523 | sed -f conftest.frag conftest.in > conftest.out | |
2524 | rm -f conftest.in | |
2525 | mv conftest.out conftest.in | |
2526 | ' >> $CONFIG_STATUS | |
2527 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
2528 | rm -f conftest.vals | |
2529 | mv conftest.tail conftest.vals | |
2530 | done | |
2531 | rm -f conftest.vals | |
2532 | ||
2533 | cat >> $CONFIG_STATUS <<\EOF | |
2534 | rm -f conftest.frag conftest.h | |
2535 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
2536 | cat conftest.in >> conftest.h | |
2537 | rm -f conftest.in | |
2538 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
2539 | echo "$ac_file is unchanged" | |
2540 | rm -f conftest.h | |
2541 | else | |
2542 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2543 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2544 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2545 | # The file is in a subdirectory. | |
2546 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2547 | fi | |
2548 | rm -f $ac_file | |
2549 | mv conftest.h $ac_file | |
2550 | fi | |
2551 | fi; done | |
2552 | ||
2553 | EOF | |
2554 | ||
2555 | cat >> $CONFIG_STATUS <<EOF | |
2556 | ac_sources="$sim_link_files" | |
2557 | ac_dests="$sim_link_links" | |
2558 | EOF | |
2559 | ||
2560 | cat >> $CONFIG_STATUS <<\EOF | |
2561 | srcdir=$ac_given_srcdir | |
2562 | while test -n "$ac_sources"; do | |
2563 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
2564 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
2565 | ||
2566 | echo "linking $srcdir/$ac_source to $ac_dest" | |
2567 | ||
2568 | if test ! -r $srcdir/$ac_source; then | |
2569 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
2570 | fi | |
2571 | rm -f $ac_dest | |
2572 | ||
2573 | # Make relative symlinks. | |
2574 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2575 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
2576 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
2577 | # The dest file is in a subdirectory. | |
2578 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
2579 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
2580 | # A "../" for each directory in $ac_dest_dir_suffix. | |
2581 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
2582 | else | |
2583 | ac_dest_dir_suffix= ac_dots= | |
2584 | fi | |
2585 | ||
2586 | case "$srcdir" in | |
2587 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
2588 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
2589 | esac | |
2590 | ||
2591 | # Make a symlink if possible; otherwise try a hard link. | |
2592 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
2593 | ln $srcdir/$ac_source $ac_dest; then : | |
2594 | else | |
2595 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
2596 | fi | |
2597 | done | |
2598 | EOF | |
2599 | cat >> $CONFIG_STATUS <<EOF | |
2600 | ||
2601 | EOF | |
2602 | cat >> $CONFIG_STATUS <<\EOF | |
2603 | case "x$CONFIG_FILES" in | |
2604 | xMakefile*) | |
2605 | echo "Merging Makefile.sim+Make-common.sim into Makefile ..." | |
2606 | rm -f Makesim1.tmp Makesim2.tmp Makefile | |
2607 | sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp | |
2608 | sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp | |
2609 | sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ | |
2610 | -e '/^## COMMON_POST_/ r Makesim2.tmp' \ | |
2611 | <Makefile.sim >Makefile | |
2612 | rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp | |
2613 | ;; | |
2614 | esac | |
2615 | case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac | |
2616 | ||
2617 | exit 0 | |
2618 | EOF | |
2619 | chmod +x $CONFIG_STATUS | |
2620 | rm -fr confdefs* $ac_clean_files | |
2621 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
2622 | ||
2623 |