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