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