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