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