]>
Commit | Line | Data |
---|---|---|
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: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
c494cadd | 14 | ac_help="$ac_help |
73c4941b | 15 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" |
c494cadd | 16 | ac_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 | 18 | ac_help="$ac_help |
73c4941b | 19 | --enable-sim-config=file Override default config file" |
c494cadd | 20 | ac_help="$ac_help |
73c4941b | 21 | --enable-sim-opcode=which Override default opcode lookup." |
c494cadd | 22 | ac_help="$ac_help |
73c4941b | 23 | --enable-sim-switch Use a switch instead of a table for instruction call." |
c494cadd | 24 | ac_help="$ac_help |
73c4941b | 25 | --enable-sim-duplicate Expand (duplicate) semantic functions." |
c494cadd | 26 | ac_help="$ac_help |
73c4941b | 27 | --enable-sim-filter=rule Specify filter rules." |
c494cadd | 28 | ac_help="$ac_help |
73c4941b | 29 | --enable-sim-icache=size Specify instruction cache size." |
c494cadd | 30 | ac_help="$ac_help |
73c4941b | 31 | --enable-sim-inline=inlines Specify which functions should be inlined." |
c494cadd | 32 | ac_help="$ac_help |
73c4941b | 33 | --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums." |
c494cadd | 34 | ac_help="$ac_help |
73c4941b | 35 | --enable-sim-endian=endian Specify target byte endian orientation." |
c494cadd | 36 | ac_help="$ac_help |
73c4941b | 37 | --enable-sim-hostendain=end Specify host byte endian orientation." |
c494cadd | 38 | ac_help="$ac_help |
73c4941b | 39 | --enable-sim-smp=n Specify number of processors to configure for." |
c494cadd | 40 | ac_help="$ac_help |
73c4941b | 41 | --enable-sim-bitsize=n Specify target bitsize (32 or 64)." |
c494cadd | 42 | ac_help="$ac_help |
73c4941b | 43 | --enable-sim-hostbitsize=n Specify host bitsize (32 or 64)." |
c494cadd | 44 | ac_help="$ac_help |
73c4941b | 45 | --enable-sim-env=env Specify target environment (operating, virtual, user)." |
c494cadd | 46 | ac_help="$ac_help |
73c4941b MM |
47 | --enable-sim-timebase Specify whether the PPC timebase is supported." |
48 | ac_help="$ac_help | |
49 | --enable-sim-alignment=align Specify strict or nonstrict alignment." | |
50 | ac_help="$ac_help | |
51 | --enable-sim-trace Specify whether tracing is supported." | |
52 | ac_help="$ac_help | |
53 | --enable-sim-assert Specify whether to perform random assertions." | |
c494cadd | 54 | ac_help="$ac_help |
73c4941b | 55 | --enable-sim-float Specify whether to use host floating point or simulate." |
c494cadd | 56 | ac_help="$ac_help |
73c4941b | 57 | --enable-sim-monitor=mon Specify whether to enable monitoring events." |
c494cadd | 58 | ac_help="$ac_help |
73c4941b | 59 | --enable-sim-function-unit Specify whether detailed functional unit support is built." |
c494cadd | 60 | ac_help="$ac_help |
73c4941b MM |
61 | --enable-sim-model=which Specify PowerPC to model." |
62 | ac_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. | |
68 | build=NONE | |
69 | cache_file=./config.cache | |
70 | exec_prefix=NONE | |
71 | host=NONE | |
72 | no_create= | |
73 | nonopt=NONE | |
74 | no_recursion= | |
75 | prefix=NONE | |
76 | program_prefix=NONE | |
77 | program_suffix=NONE | |
78 | program_transform_name=s,x,x, | |
79 | silent= | |
80 | site= | |
81 | srcdir= | |
82 | target=NONE | |
83 | verbose= | |
84 | x_includes=NONE | |
85 | x_libraries=NONE | |
86 | ||
87 | # Initialize some other variables. | |
88 | subdirs= | |
89 | ||
90 | ac_prev= | |
91 | for ac_option | |
92 | do | |
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 | |
161 | Usage: configure [options] [host] | |
162 | Options: [defaults in brackets after descriptions] | |
163 | Configuration: | |
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 | |
169 | Directory 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 | |
178 | Host 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] | |
182 | Features 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 | |
190 | EOF | |
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 | |
326 | done | |
327 | ||
328 | if test -n "$ac_prev"; then | |
329 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
330 | fi | |
331 | ||
332 | trap '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 | |
342 | if test "$silent" = yes; then | |
343 | exec 6>/dev/null | |
344 | else | |
345 | exec 6>&1 | |
346 | fi | |
347 | exec 5>./config.log | |
348 | ||
349 | echo "\ | |
350 | This file contains any messages produced by compilers while | |
351 | running 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. | |
356 | ac_configure_args= | |
357 | for ac_arg | |
358 | do | |
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 | |
368 | done | |
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). | |
374 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
375 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
376 | ||
377 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
378 | rm -rf conftest* confdefs.h | |
379 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
380 | echo > 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. | |
384 | ac_unique_file=Makefile.in | |
385 | ||
386 | # Find the source files, if location was not specified. | |
387 | if 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 | |
397 | else | |
398 | ac_srcdir_defaulted=no | |
399 | fi | |
400 | if 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 | |
406 | fi | |
407 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
408 | ||
409 | # Prefer explicitly selected file to automatically selected ones. | |
410 | if 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 | |
416 | fi | |
417 | for 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 | |
422 | done | |
423 | ||
424 | if test -r "$cache_file"; then | |
425 | echo "loading cache $cache_file" | |
426 | . $cache_file | |
427 | else | |
428 | echo "creating cache $cache_file" | |
429 | > $cache_file | |
430 | fi | |
431 | ||
432 | ac_ext=c | |
433 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
434 | ac_cpp='$CPP $CPPFLAGS' | |
435 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' | |
436 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' | |
437 | ||
438 | if (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 | |
446 | else | |
447 | ac_n= ac_c='\c' ac_t= | |
448 | fi | |
449 | ||
450 | ||
451 | ||
c494cadd MM |
452 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. |
453 | enableval="$enable_sim_cflags" | |
454 | if 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 | 459 | esac |
2bc7869d | 460 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then |
ba62bb1c MM |
461 | echo "Setting sim cflags = $sim_cflags" 6>&1 |
462 | fi | |
c494cadd MM |
463 | else |
464 | sim_cflags="" | |
465 | fi | |
466 | ||
73c4941b MM |
467 | # Check whether --enable-sim-warnings or --disable-sim-warnings was given. |
468 | enableval="$enable_sim_warnings" | |
469 | if 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"`;; | |
474 | esac | |
2bc7869d | 475 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then |
ba62bb1c MM |
476 | echo "Setting warning flags = $sim_warnings" 6>&1 |
477 | fi | |
73c4941b MM |
478 | else |
479 | sim_warnings="" | |
480 | fi | |
481 | ||
c494cadd MM |
482 | # Check whether --enable-sim-config or --disable-sim-config was given. |
483 | enableval="$enable_sim_config" | |
484 | if 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}";; | |
489 | esac | |
2bc7869d | 490 | if test x"$silent" != x"yes" && test x"$sim_config" != x""; then |
ba62bb1c MM |
491 | echo "Setting config flags = $sim_config" 6>&1 |
492 | fi | |
c494cadd | 493 | else |
ba62bb1c | 494 | sim_config="std-config.h"; echo "Setting config flags = $sim_config" 6>&1 |
c494cadd MM |
495 | fi |
496 | ||
497 | # Check whether --enable-sim-opcode or --disable-sim-opcode was given. | |
498 | enableval="$enable_sim_opcode" | |
499 | if 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}";; | |
504 | esac | |
2bc7869d | 505 | if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then |
ba62bb1c MM |
506 | echo "Setting opcode flags = $sim_opcode" 6>&1 |
507 | fi | |
c494cadd | 508 | else |
ba62bb1c | 509 | sim_opcode="ppc-opcode-simple"; echo "Setting opcode flags = $sim_opcode" |
c494cadd MM |
510 | fi |
511 | ||
512 | # Check whether --enable-sim-switch or --disable-sim-switch was given. | |
513 | enableval="$enable_sim_switch" | |
514 | if test -n "$enableval"; then | |
515 | case "${enableval}" in | |
516 | yes) sim_switch="-s";; | |
517 | *) sim_switch="";; | |
518 | esac | |
2bc7869d | 519 | if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then |
ba62bb1c MM |
520 | echo "Setting switch flags = $sim_switch" 6>&1 |
521 | fi | |
c494cadd | 522 | else |
2bc7869d MM |
523 | sim_switch="-s"; |
524 | if test x"$silent" != x"yes"; then | |
525 | echo "Setting switch flags = $sim_switch" 6>&1 | |
526 | fi | |
c494cadd MM |
527 | fi |
528 | ||
529 | # Check whether --enable-sim-duplicate or --disable-sim-duplicate was given. | |
530 | enableval="$enable_sim_duplicate" | |
531 | if test -n "$enableval"; then | |
532 | case "${enableval}" in | |
533 | yes) sim_dup="-e";; | |
534 | *) sim_dup="";; | |
535 | esac | |
2bc7869d | 536 | if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then |
ba62bb1c MM |
537 | echo "Setting duplicate flags = $sim_dup" 6>&1 |
538 | fi | |
c494cadd | 539 | else |
2bc7869d MM |
540 | sim_dup="-e" |
541 | if test x"$silent" != x"yes"; then | |
542 | echo "Setting duplicate flags = $sim_dup" 6>&1 | |
543 | fi | |
c494cadd MM |
544 | fi |
545 | ||
546 | # Check whether --enable-sim-filter or --disable-sim-filter was given. | |
547 | enableval="$enable_sim_filter" | |
548 | if test -n "$enableval"; then | |
549 | case "${enableval}" in | |
550 | yes) sim_filter="";; | |
551 | *) sim_filter="-f $enableval";; | |
552 | esac | |
2bc7869d | 553 | if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then |
ba62bb1c MM |
554 | echo "Setting filter flags = $sim_filter" 6>&1 |
555 | fi | |
c494cadd | 556 | else |
2bc7869d MM |
557 | sim_filter="-f 64" |
558 | if test x"$silent" != x"yes"; then | |
559 | echo "Setting filter flags = $sim_filter" 6>&1 | |
560 | fi | |
c494cadd MM |
561 | fi |
562 | ||
563 | # Check whether --enable-sim-icache or --disable-sim-icache was given. | |
564 | enableval="$enable_sim_icache" | |
565 | if test -n "$enableval"; then | |
566 | case "${enableval}" in | |
567 | yes) sim_icache="-r 1024";; | |
568 | *) sim_icache="";; | |
569 | esac | |
570 | else | |
571 | sim_icache="" | |
572 | fi | |
573 | ||
574 | # Check whether --enable-sim-inline or --disable-sim-inline was given. | |
575 | enableval="$enable_sim_inline" | |
576 | if test -n "$enableval"; then | |
577 | sim_inline="" | |
578 | case "$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;; | |
597 | esac | |
2bc7869d | 598 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then |
ba62bb1c MM |
599 | echo "Setting inline flags = $sim_inline" 6>&1 |
600 | fi | |
601 | else | |
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 |
607 | else |
608 | sim_inline="" | |
609 | fi | |
ba62bb1c | 610 | fi |
c494cadd MM |
611 | |
612 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. | |
613 | enableval="$enable_sim_bswap" | |
614 | if 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="";; | |
619 | esac | |
2bc7869d | 620 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then |
ba62bb1c MM |
621 | echo "Setting bswap flags = $sim_bswap" 6>&1 |
622 | fi | |
c494cadd MM |
623 | else |
624 | sim_bswap="" | |
625 | fi | |
626 | ||
627 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
628 | enableval="$enable_sim_endian" | |
629 | if 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="";; | |
640 | esac | |
2bc7869d | 641 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then |
ba62bb1c MM |
642 | echo "Setting endian flags = $sim_endian" 6>&1 |
643 | fi | |
c494cadd MM |
644 | else |
645 | sim_endian="" | |
646 | fi | |
647 | ||
648 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. | |
649 | enableval="$enable_sim_hostendian" | |
650 | if 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="";; | |
656 | esac | |
2bc7869d | 657 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then |
ba62bb1c MM |
658 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 |
659 | fi | |
c494cadd MM |
660 | else |
661 | sim_hostendian="" | |
662 | fi | |
663 | ||
664 | # Check whether --enable-sim-smp or --disable-sim-smp was given. | |
665 | enableval="$enable_sim_smp" | |
666 | if 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";; | |
671 | esac | |
2bc7869d | 672 | if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then |
ba62bb1c MM |
673 | echo "Setting smp flags = $sim_smp" 6>&1 |
674 | fi | |
c494cadd | 675 | else |
2bc7869d MM |
676 | sim_smp="-DWITH_SMP=0" |
677 | if test x"$silent" != x"yes"; then | |
678 | echo "Setting smp flags = $sim_smp" 6>&1 | |
679 | fi | |
c494cadd MM |
680 | fi |
681 | ||
682 | # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given. | |
683 | enableval="$enable_sim_bitsize" | |
684 | if test -n "$enableval"; then | |
685 | case "${enableval}" in | |
686 | yes) sim_bitsize="";; | |
687 | no) sim_bitsize="";; | |
688 | *) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; | |
689 | esac | |
2bc7869d | 690 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then |
ba62bb1c MM |
691 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 |
692 | fi | |
c494cadd MM |
693 | else |
694 | sim_bitsize="" | |
695 | fi | |
696 | ||
697 | # Check whether --enable-sim-hostbitsize or --disable-sim-hostbitsize was given. | |
698 | enableval="$enable_sim_hostbitsize" | |
699 | if test -n "$enableval"; then | |
700 | case "${enableval}" in | |
701 | yes) sim_hostbitsize="";; | |
702 | no) sim_hostbitsize="";; | |
703 | *) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; | |
704 | esac | |
2bc7869d | 705 | if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then |
ba62bb1c MM |
706 | echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1 |
707 | fi | |
c494cadd MM |
708 | else |
709 | sim_hostbitsize="" | |
710 | fi | |
711 | ||
712 | # Check whether --enable-sim-env or --disable-sim-env was given. | |
713 | enableval="$enable_sim_env" | |
714 | if 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="";; | |
720 | esac | |
2bc7869d | 721 | if test x"$silent" != x"yes" && test x"$sim_env" != x""; then |
ba62bb1c MM |
722 | echo "Setting env flags = $sim_env" 6>&1 |
723 | fi | |
c494cadd MM |
724 | else |
725 | sim_env="" | |
726 | fi | |
727 | ||
728 | # Check whether --enable-sim-timebase or --disable-sim-timebase was given. | |
729 | enableval="$enable_sim_timebase" | |
730 | if 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="";; | |
735 | esac | |
2bc7869d | 736 | if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then |
ba62bb1c MM |
737 | echo "Setting timebase flags = $sim_timebase" 6>&1 |
738 | fi | |
c494cadd MM |
739 | else |
740 | sim_timebase="" | |
741 | fi | |
742 | ||
743 | # Check whether --enable-sim-alignment or --disable-sim-alignment was given. | |
744 | enableval="$enable_sim_alignment" | |
745 | if 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";; |
750 | esac | |
2bc7869d | 751 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then |
ba62bb1c MM |
752 | echo "Setting alignment flags = $sim_alignment" 6>&1 |
753 | fi | |
73c4941b | 754 | else |
c494cadd MM |
755 | sim_alignment="" |
756 | fi | |
757 | ||
758 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
759 | enableval="$enable_sim_trace" | |
760 | if 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="";; | |
765 | esac | |
2bc7869d | 766 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then |
ba62bb1c MM |
767 | echo "Setting trace flags = $sim_trace" 6>&1 |
768 | fi | |
c494cadd MM |
769 | else |
770 | sim_trace="" | |
771 | fi | |
772 | ||
773 | # Check whether --enable-sim-assert or --disable-sim-assert was given. | |
774 | enableval="$enable_sim_assert" | |
775 | if 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="";; | |
780 | esac | |
2bc7869d | 781 | if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then |
ba62bb1c MM |
782 | echo "Setting assert flags = $sim_assert" 6>&1 |
783 | fi | |
c494cadd MM |
784 | else |
785 | sim_assert="" | |
786 | fi | |
787 | ||
788 | # Check whether --enable-sim-float or --disable-sim-float was given. | |
789 | enableval="$enable_sim_float" | |
790 | if 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="";; | |
795 | esac | |
2bc7869d | 796 | if test x"$silent" != x"yes" && test x"$sim_float" != x""; then |
ba62bb1c MM |
797 | echo "Setting float flags = $sim_float" 6>&1 |
798 | fi | |
c494cadd MM |
799 | else |
800 | sim_float="" | |
801 | fi | |
802 | ||
803 | # Check whether --enable-sim-monitor or --disable-sim-monitor was given. | |
804 | enableval="$enable_sim_monitor" | |
805 | if 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'";; | |
812 | esac | |
2bc7869d | 813 | if test x"$silent" != x"yes" && test x"$sim_mon" != x""; then |
ba62bb1c MM |
814 | echo "Setting monitor flags = $sim_mon" 6>&1 |
815 | fi | |
c494cadd | 816 | else |
ba62bb1c | 817 | sim_mon="" |
c494cadd MM |
818 | fi |
819 | ||
73c4941b MM |
820 | # Check whether --enable-sim-function-unit or --disable-sim-function-unit was given. |
821 | enableval="$enable_sim_function_unit" | |
822 | if 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="";; | |
827 | esac | |
2bc7869d | 828 | if test x"$silent" != x"yes" && test x"$sim_func" != x""; then |
ba62bb1c MM |
829 | echo "Setting function-unit flags = $sim_func" 6>&1 |
830 | fi | |
73c4941b MM |
831 | else |
832 | sim_func="" | |
833 | fi | |
834 | ||
835 | # Check whether --enable-sim-model or --disable-sim-model was given. | |
836 | enableval="$enable_sim_model" | |
837 | if test -n "$enableval"; then | |
838 | case "${enableval}" in | |
839 | yes) sim_model="";; | |
840 | no) sim_model="";; | |
841 | *) sim_model="-DWITH_PPC_MODEL=${enableval}";; | |
842 | esac | |
2bc7869d | 843 | if test x"$silent" != x"yes" && test x"$sim_model" != x""; then |
ba62bb1c MM |
844 | echo "Setting model flags = $sim_model" 6>&1 |
845 | fi | |
73c4941b MM |
846 | else |
847 | sim_model="" | |
848 | fi | |
849 | ||
850 | # Check whether --enable-sim-default-model or --disable-sim-default-model was given. | |
851 | enableval="$enable_sim_default_model" | |
852 | if 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}";; | |
857 | esac | |
2bc7869d | 858 | if 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 |
860 | fi | |
73c4941b MM |
861 | else |
862 | sim_model="" | |
863 | fi | |
864 | ||
4f965b81 MM |
865 | ac_aux_dir= |
866 | for 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 | |
876 | done | |
877 | if 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; } | |
879 | fi | |
880 | ac_config_guess=$ac_aux_dir/config.guess | |
881 | ac_config_sub=$ac_aux_dir/config.sub | |
882 | ac_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. | |
900 | case $host---$target---$nonopt in | |
901 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
902 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
903 | esac | |
904 | ||
905 | ||
906 | # Make sure we can run config.sub. | |
907 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
908 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
909 | fi | |
910 | ||
911 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
912 | ||
913 | host_alias=$host | |
914 | case "$host_alias" in | |
915 | NONE) | |
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 ;; | |
923 | esac | |
924 | ||
925 | host=`$ac_config_sub $host_alias` | |
926 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
927 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
928 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
929 | echo "$ac_t""$host" 1>&6 | |
930 | ||
931 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
932 | ||
933 | target_alias=$target | |
934 | case "$target_alias" in | |
935 | NONE) | |
936 | case $nonopt in | |
937 | NONE) target_alias=$host_alias ;; | |
938 | *) target_alias=$nonopt ;; | |
939 | esac ;; | |
940 | esac | |
941 | ||
942 | target=`$ac_config_sub $target_alias` | |
943 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
944 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
945 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
946 | echo "$ac_t""$target" 1>&6 | |
947 | ||
948 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
949 | ||
950 | build_alias=$build | |
951 | case "$build_alias" in | |
952 | NONE) | |
953 | case $nonopt in | |
954 | NONE) build_alias=$host_alias ;; | |
955 | *) build_alias=$nonopt ;; | |
956 | esac ;; | |
957 | esac | |
958 | ||
959 | build=`$ac_config_sub $build_alias` | |
960 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
961 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
962 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
963 | echo "$ac_t""$build" 1>&6 | |
964 | ||
965 | test "$host_alias" != "$target_alias" && | |
966 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
967 | NONENONEs,x,x, && | |
968 | program_prefix=${target_alias}- | |
969 | ||
970 | if test "$program_transform_name" = s,x,x,; then | |
971 | program_transform_name= | |
972 | else | |
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 | |
977 | fi | |
978 | test "$program_prefix" != NONE && | |
979 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
980 | # Use a double $ so make ignores it. | |
981 | test "$program_suffix" != NONE && | |
982 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
983 | ||
984 | # sed with no file args requires a program. | |
985 | test "$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. |
993 | set dummy gcc; ac_word=$2 | |
994 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
995 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
996 | echo $ac_n "(cached) $ac_c" 1>&6 | |
997 | else | |
998 | if test -n "$CC"; then | |
999 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1000 | else | |
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" | |
1011 | fi | |
1012 | fi | |
1013 | CC="$ac_cv_prog_CC" | |
1014 | if test -n "$CC"; then | |
1015 | echo "$ac_t""$CC" 1>&6 | |
1016 | else | |
1017 | echo "$ac_t""no" 1>&6 | |
1018 | fi | |
1019 | ||
1020 | ||
1021 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
1022 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
1023 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1024 | else | |
1025 | cat > conftest.c <<EOF | |
1026 | #ifdef __GNUC__ | |
1027 | yes; | |
1028 | #endif | |
1029 | EOF | |
1030 | if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then | |
1031 | ac_cv_prog_gcc=yes | |
1032 | else | |
1033 | ac_cv_prog_gcc=no | |
1034 | fi | |
1035 | fi | |
1036 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1037 | if 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 | |
1041 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then | |
1042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1043 | else | |
1044 | echo 'void f(){}' > conftest.c | |
1045 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1046 | ac_cv_prog_gcc_g=yes | |
1047 | else | |
1048 | ac_cv_prog_gcc_g=no | |
1049 | fi | |
1050 | rm -f conftest* | |
1051 | ||
1052 | fi | |
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 | |
1060 | else | |
1061 | GCC= | |
1062 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1063 | fi | |
1064 | ||
1065 | ||
1066 | ||
1067 | AR=${AR-ar} | |
1068 | ||
1069 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1070 | set dummy ranlib; ac_word=$2 | |
1071 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1072 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
1073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1074 | else | |
1075 | if test -n "$RANLIB"; then | |
1076 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1077 | else | |
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=":" | |
1088 | fi | |
1089 | fi | |
1090 | RANLIB="$ac_cv_prog_RANLIB" | |
1091 | if test -n "$RANLIB"; then | |
1092 | echo "$ac_t""$RANLIB" 1>&6 | |
1093 | else | |
1094 | echo "$ac_t""no" 1>&6 | |
1095 | fi | |
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 | ||
1123 | for ac_func in getrusage | |
1124 | do | |
1125 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1126 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1127 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1128 | else | |
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. */ | |
1136 | char $ac_func(); | |
1137 | ||
1138 | int main() { return 0; } | |
1139 | int 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) | |
1145 | choke me | |
1146 | #else | |
1147 | $ac_func(); | |
1148 | #endif | |
1149 | ||
1150 | ; return 0; } | |
1151 | EOF | |
1152 | if eval $ac_link; then | |
1153 | rm -rf conftest* | |
1154 | eval "ac_cv_func_$ac_func=yes" | |
1155 | else | |
1156 | rm -rf conftest* | |
1157 | eval "ac_cv_func_$ac_func=no" | |
1158 | fi | |
1159 | rm -f conftest* | |
1160 | ||
1161 | fi | |
1162 | if 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 | |
1167 | EOF | |
1168 | ||
1169 | else | |
1170 | echo "$ac_t""no" 1>&6 | |
1171 | fi | |
1172 | done | |
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. | |
1177 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
1178 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
1179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4f965b81 | 1180 | else |
4b935ed4 MM |
1181 | if test "$cross_compiling" = yes; then |
1182 | ac_cv_c_cross=yes | |
1183 | else | |
1184 | cat > conftest.$ac_ext <<EOF | |
2bc7869d | 1185 | #line 1186 "configure" |
4b935ed4 MM |
1186 | #include "confdefs.h" |
1187 | main(){return(0);} | |
1188 | EOF | |
1189 | eval $ac_link | |
1190 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1191 | ac_cv_c_cross=no | |
1192 | else | |
1193 | ac_cv_c_cross=yes | |
1194 | fi | |
4f965b81 | 1195 | fi |
4b935ed4 MM |
1196 | rm -fr conftest* |
1197 | fi | |
1198 | cross_compiling=$ac_cv_c_cross | |
1199 | echo "$ac_t""$ac_cv_c_cross" 1>&6 | |
4f965b81 | 1200 | |
4b935ed4 MM |
1201 | if test "x$cross_compiling" = "xno"; then |
1202 | CC_FOR_BUILD='$(CC)' | |
1203 | else | |
1204 | CC_FOR_BUILD=gcc | |
4f965b81 MM |
1205 | fi |
1206 | ||
1207 | ||
4b935ed4 MM |
1208 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
1209 | # On Suns, sometimes $CPP names a directory. | |
1210 | if test -n "$CPP" && test -d "$CPP"; then | |
1211 | CPP= | |
1212 | fi | |
1213 | if test -z "$CPP"; then | |
1214 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1215 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1216 | else | |
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> | |
1226 | Syntax Error | |
1227 | EOF | |
1228 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1229 | ac_err=`grep -v '^ *+' conftest.out` | |
1230 | if test -z "$ac_err"; then | |
1231 | : | |
1232 | else | |
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> | |
1240 | Syntax Error | |
1241 | EOF | |
1242 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1243 | ac_err=`grep -v '^ *+' conftest.out` | |
1244 | if test -z "$ac_err"; then | |
1245 | : | |
1246 | else | |
1247 | echo "$ac_err" >&5 | |
1248 | rm -rf conftest* | |
1249 | CPP=/lib/cpp | |
1250 | fi | |
1251 | rm -f conftest* | |
1252 | fi | |
1253 | rm -f conftest* | |
1254 | ac_cv_prog_CPP="$CPP" | |
1255 | fi | |
1256 | CPP="$ac_cv_prog_CPP" | |
1257 | else | |
1258 | ac_cv_prog_CPP="$CPP" | |
1259 | fi | |
1260 | echo "$ac_t""$CPP" 1>&6 | |
1261 | ||
c494cadd | 1262 | for ac_hdr in string.h strings.h stdlib.h time.h sys/times.h unistd.h sys/resource.h |
4b935ed4 MM |
1263 | do |
1264 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
1265 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1266 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | cat > conftest.$ac_ext <<EOF | |
2bc7869d | 1270 | #line 1271 "configure" |
4b935ed4 MM |
1271 | #include "confdefs.h" |
1272 | #include <$ac_hdr> | |
1273 | EOF | |
1274 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1275 | ac_err=`grep -v '^ *+' conftest.out` | |
1276 | if test -z "$ac_err"; then | |
1277 | rm -rf conftest* | |
1278 | eval "ac_cv_header_$ac_safe=yes" | |
1279 | else | |
1280 | echo "$ac_err" >&5 | |
1281 | rm -rf conftest* | |
1282 | eval "ac_cv_header_$ac_safe=no" | |
1283 | fi | |
1284 | rm -f conftest* | |
1285 | fi | |
1286 | if 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 | |
1291 | EOF | |
1292 | ||
1293 | else | |
1294 | echo "$ac_t""no" 1>&6 | |
1295 | fi | |
1296 | done | |
1297 | ||
4f965b81 MM |
1298 | |
1299 | trap '' 1 2 15 | |
1300 | cat > 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 | # | |
1315 | EOF | |
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 | |
1321 | if cmp -s $cache_file confcache; then | |
1322 | : | |
1323 | else | |
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 | |
1330 | fi | |
1331 | rm -f confcache | |
1332 | ||
1333 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
1334 | ||
1335 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1336 | # Let make expand exec_prefix. | |
1337 | test "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. | |
1342 | if test "x$srcdir" = x.; then | |
1343 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1344 | fi | |
1345 | ||
1346 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1347 | ||
4b935ed4 | 1348 | DEFS=-DHAVE_CONFIG_H |
4f965b81 MM |
1349 | |
1350 | # Without the "./", some shells look in PATH for config.status. | |
1351 | : ${CONFIG_STATUS=./config.status} | |
1352 | ||
1353 | echo creating $CONFIG_STATUS | |
1354 | rm -f $CONFIG_STATUS | |
1355 | cat > $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 | ||
1367 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
1368 | for ac_option | |
1369 | do | |
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 | |
1381 | done | |
1382 | ||
1383 | ac_given_srcdir=$srcdir | |
1384 | ||
4b935ed4 | 1385 | trap '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. | |
1388 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; | |
1389 | s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF | |
1390 | $ac_vpsub | |
1391 | $extrasub | |
1392 | s%@CFLAGS@%$CFLAGS%g | |
1393 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1394 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1395 | s%@DEFS@%$DEFS%g | |
1396 | s%@LDFLAGS@%$LDFLAGS%g | |
1397 | s%@LIBS@%$LIBS%g | |
1398 | s%@exec_prefix@%$exec_prefix%g | |
1399 | s%@prefix@%$prefix%g | |
1400 | s%@program_transform_name@%$program_transform_name%g | |
1401 | s%@host@%$host%g | |
1402 | s%@host_alias@%$host_alias%g | |
1403 | s%@host_cpu@%$host_cpu%g | |
1404 | s%@host_vendor@%$host_vendor%g | |
1405 | s%@host_os@%$host_os%g | |
1406 | s%@target@%$target%g | |
1407 | s%@target_alias@%$target_alias%g | |
1408 | s%@target_cpu@%$target_cpu%g | |
1409 | s%@target_vendor@%$target_vendor%g | |
1410 | s%@target_os@%$target_os%g | |
1411 | s%@build@%$build%g | |
1412 | s%@build_alias@%$build_alias%g | |
1413 | s%@build_cpu@%$build_cpu%g | |
1414 | s%@build_vendor@%$build_vendor%g | |
1415 | s%@build_os@%$build_os%g | |
4b935ed4 MM |
1416 | s%@CC@%$CC%g |
1417 | s%@HDEFINES@%$HDEFINES%g | |
1418 | s%@AR@%$AR%g | |
1419 | s%@RANLIB@%$RANLIB%g | |
c494cadd | 1420 | s%@sim_cflags@%$sim_cflags%g |
73c4941b | 1421 | s%@sim_warnings@%$sim_warnings%g |
c494cadd MM |
1422 | s%@sim_config@%$sim_config%g |
1423 | s%@sim_opcode@%$sim_opcode%g | |
1424 | s%@sim_switch@%$sim_switch%g | |
1425 | s%@sim_dup@%$sim_dup%g | |
1426 | s%@sim_filter@%$sim_filter%g | |
1427 | s%@sim_icache@%$sim_icache%g | |
1428 | s%@sim_inline@%$sim_inline%g | |
1429 | s%@sim_bswap@%$sim_bswap%g | |
1430 | s%@sim_endian@%$sim_endian%g | |
1431 | s%@sim_hostendian@%$sim_hostendian%g | |
1432 | s%@sim_smp@%$sim_smp%g | |
1433 | s%@sim_bitsize@%$sim_bitsize%g | |
1434 | s%@sim_hostbitsize@%$sim_hostbitsize%g | |
1435 | s%@sim_env@%$sim_env%g | |
1436 | s%@sim_timebase@%$sim_timebase%g | |
1437 | s%@sim_alignment@%$sim_alignment%g | |
1438 | s%@sim_float@%$sim_float%g | |
1439 | s%@sim_trace@%$sim_trace%g | |
1440 | s%@sim_assert@%$sim_assert%g | |
1441 | s%@sim_monitor@%$sim_monitor%g | |
73c4941b MM |
1442 | s%@sim_func@%$sim_func%g |
1443 | s%@sim_model@%$sim_model%g | |
1444 | s%@sim_default_model@%$sim_default_model%g | |
4b935ed4 MM |
1445 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
1446 | s%@CPP@%$CPP%g | |
4f965b81 MM |
1447 | |
1448 | CEOF | |
1449 | EOF | |
1450 | cat >> $CONFIG_STATUS <<EOF | |
1451 | ||
1452 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
1453 | EOF | |
1454 | cat >> $CONFIG_STATUS <<\EOF | |
1455 | for 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 | |
1496 | s%@configure_input@%$configure_input%g | |
1497 | s%@srcdir@%$srcdir%g | |
1498 | s%@top_srcdir@%$top_srcdir%g | |
1499 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file | |
1500 | fi; done | |
1501 | rm -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. | |
1507 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
1508 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
1509 | ac_dC='\3' | |
1510 | ac_dD='%g' | |
1511 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
1512 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1513 | ac_uB='\([ ]\)%\1#\2define\3' | |
1514 | ac_uC=' ' | |
1515 | ac_uD='\4%g' | |
1516 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
1517 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1518 | ac_eB='$%\1#\2define\3' | |
1519 | ac_eC=' ' | |
1520 | ac_eD='%g' | |
1521 | ||
1522 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"} | |
1523 | for 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 |
1536 | EOF |
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. | |
1542 | rm -f conftest.vals | |
1543 | cat > conftest.hdr <<\EOF | |
1544 | s/[\\&%]/\\&/g | |
1545 | s%[\\$`]%\\&%g | |
1546 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
1547 | s%ac_d%ac_u%gp | |
1548 | s%ac_u%ac_e%gp | |
1549 | EOF | |
1550 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
1551 | rm -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. | |
1556 | cat >> conftest.vals <<\EOF | |
1557 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
1558 | EOF | |
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. | |
1563 | ac_max_here_lines=12 | |
1564 | ||
1565 | rm -f conftest.tail | |
1566 | while : | |
1567 | do | |
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 | |
1582 | done | |
1583 | rm -f conftest.vals | |
1584 | ||
1585 | cat >> $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 | |
1597 | fi; done | |
1598 | ||
1599 | ||
1600 | case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac | |
4f965b81 MM |
1601 | exit 0 |
1602 | EOF | |
1603 | chmod +x $CONFIG_STATUS | |
1604 | rm -fr confdefs* $ac_clean_files | |
1605 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
1606 |