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