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