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