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