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