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