Build X11 targets before gcc/targetlib.
[deliverable/binutils-gdb.git] / sim / mips / configure
CommitLineData
4fa134be
ILT
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
fbda74b1 4# Generated automatically using autoconf version 2.12
4fa134be
ILT
5# Copyright (C) 1992, 93, 94, 95, 96 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:
601fb8ae
MM
14ac_help="$ac_help
15 --enable-sim-bswap Use Host specific BSWAP instruction."
fd14b47f
DE
16ac_help="$ac_help
17 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
18ac_help="$ac_help
19 --enable-sim-debug=opts Enable debugging flags"
a35e91c3
AC
20ac_help="$ac_help
21 --enable-sim-stdio Specify whether to use stdio for console input/output."
fd14b47f
DE
22ac_help="$ac_help
23 --enable-sim-trace=opts Enable tracing flags"
4fa134be
ILT
24
25# Initialize some variables set by options.
26# The variables have the same names as the options, with
27# dashes changed to underlines.
28build=NONE
29cache_file=./config.cache
30exec_prefix=NONE
31host=NONE
32no_create=
33nonopt=NONE
34no_recursion=
35prefix=NONE
36program_prefix=NONE
37program_suffix=NONE
38program_transform_name=s,x,x,
39silent=
40site=
41srcdir=
42target=NONE
43verbose=
44x_includes=NONE
45x_libraries=NONE
46bindir='${exec_prefix}/bin'
47sbindir='${exec_prefix}/sbin'
48libexecdir='${exec_prefix}/libexec'
49datadir='${prefix}/share'
50sysconfdir='${prefix}/etc'
51sharedstatedir='${prefix}/com'
52localstatedir='${prefix}/var'
53libdir='${exec_prefix}/lib'
54includedir='${prefix}/include'
55oldincludedir='/usr/include'
56infodir='${prefix}/info'
57mandir='${prefix}/man'
58
59# Initialize some other variables.
60subdirs=
61MFLAGS= MAKEFLAGS=
fbda74b1
DE
62# Maximum number of lines to put in a shell here document.
63ac_max_here_lines=12
4fa134be
ILT
64
65ac_prev=
66for ac_option
67do
68
69 # If the previous option needs an argument, assign it.
70 if test -n "$ac_prev"; then
71 eval "$ac_prev=\$ac_option"
72 ac_prev=
73 continue
74 fi
75
76 case "$ac_option" in
77 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
78 *) ac_optarg= ;;
79 esac
80
81 # Accept the important Cygnus configure options, so we can diagnose typos.
82
83 case "$ac_option" in
84
85 -bindir | --bindir | --bindi | --bind | --bin | --bi)
86 ac_prev=bindir ;;
87 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
88 bindir="$ac_optarg" ;;
89
90 -build | --build | --buil | --bui | --bu)
91 ac_prev=build ;;
92 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
93 build="$ac_optarg" ;;
94
95 -cache-file | --cache-file | --cache-fil | --cache-fi \
96 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
97 ac_prev=cache_file ;;
98 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
99 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
100 cache_file="$ac_optarg" ;;
101
102 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
103 ac_prev=datadir ;;
104 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
105 | --da=*)
106 datadir="$ac_optarg" ;;
107
108 -disable-* | --disable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113 fi
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115 eval "enable_${ac_feature}=no" ;;
116
117 -enable-* | --enable-*)
118 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
119 # Reject names that are not valid shell variable names.
120 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
121 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 fi
123 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124 case "$ac_option" in
125 *=*) ;;
126 *) ac_optarg=yes ;;
127 esac
128 eval "enable_${ac_feature}='$ac_optarg'" ;;
129
130 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
131 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
132 | --exec | --exe | --ex)
133 ac_prev=exec_prefix ;;
134 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
135 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
136 | --exec=* | --exe=* | --ex=*)
137 exec_prefix="$ac_optarg" ;;
138
139 -gas | --gas | --ga | --g)
140 # Obsolete; use --with-gas.
141 with_gas=yes ;;
142
143 -help | --help | --hel | --he)
144 # Omit some internal or obsolete options to make the list less imposing.
145 # This message is too long to be a string in the A/UX 3.1 sh.
146 cat << EOF
147Usage: configure [options] [host]
148Options: [defaults in brackets after descriptions]
149Configuration:
150 --cache-file=FILE cache test results in FILE
151 --help print this message
152 --no-create do not create output files
153 --quiet, --silent do not print \`checking...' messages
154 --version print the version of autoconf that created configure
155Directory and file names:
156 --prefix=PREFIX install architecture-independent files in PREFIX
157 [$ac_default_prefix]
158 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
159 [same as prefix]
160 --bindir=DIR user executables in DIR [EPREFIX/bin]
161 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
162 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
163 --datadir=DIR read-only architecture-independent data in DIR
164 [PREFIX/share]
165 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
166 --sharedstatedir=DIR modifiable architecture-independent data in DIR
167 [PREFIX/com]
168 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
169 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
170 --includedir=DIR C header files in DIR [PREFIX/include]
171 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
172 --infodir=DIR info documentation in DIR [PREFIX/info]
173 --mandir=DIR man documentation in DIR [PREFIX/man]
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
178 run sed PROGRAM on installed program names
179EOF
180 cat << EOF
181Host type:
182 --build=BUILD configure for building on BUILD [BUILD=HOST]
183 --host=HOST configure for HOST [guessed]
184 --target=TARGET configure for TARGET [TARGET=HOST]
185Features and packages:
186 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
187 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
188 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
189 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
190 --x-includes=DIR X include files are in DIR
191 --x-libraries=DIR X library files are in DIR
192EOF
193 if test -n "$ac_help"; then
194 echo "--enable and --with options recognized:$ac_help"
195 fi
196 exit 0 ;;
197
198 -host | --host | --hos | --ho)
199 ac_prev=host ;;
200 -host=* | --host=* | --hos=* | --ho=*)
201 host="$ac_optarg" ;;
202
203 -includedir | --includedir | --includedi | --included | --include \
204 | --includ | --inclu | --incl | --inc)
205 ac_prev=includedir ;;
206 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
207 | --includ=* | --inclu=* | --incl=* | --inc=*)
208 includedir="$ac_optarg" ;;
209
210 -infodir | --infodir | --infodi | --infod | --info | --inf)
211 ac_prev=infodir ;;
212 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
213 infodir="$ac_optarg" ;;
214
215 -libdir | --libdir | --libdi | --libd)
216 ac_prev=libdir ;;
217 -libdir=* | --libdir=* | --libdi=* | --libd=*)
218 libdir="$ac_optarg" ;;
219
220 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
221 | --libexe | --libex | --libe)
222 ac_prev=libexecdir ;;
223 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
224 | --libexe=* | --libex=* | --libe=*)
225 libexecdir="$ac_optarg" ;;
226
227 -localstatedir | --localstatedir | --localstatedi | --localstated \
228 | --localstate | --localstat | --localsta | --localst \
229 | --locals | --local | --loca | --loc | --lo)
230 ac_prev=localstatedir ;;
231 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
232 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
233 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
234 localstatedir="$ac_optarg" ;;
235
236 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
237 ac_prev=mandir ;;
238 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
239 mandir="$ac_optarg" ;;
240
241 -nfp | --nfp | --nf)
242 # Obsolete; use --without-fp.
243 with_fp=no ;;
244
245 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
246 | --no-cr | --no-c)
247 no_create=yes ;;
248
249 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
250 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
251 no_recursion=yes ;;
252
253 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
254 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
255 | --oldin | --oldi | --old | --ol | --o)
256 ac_prev=oldincludedir ;;
257 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
258 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
259 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
260 oldincludedir="$ac_optarg" ;;
261
262 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
263 ac_prev=prefix ;;
264 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
265 prefix="$ac_optarg" ;;
266
267 -program-prefix | --program-prefix | --program-prefi | --program-pref \
268 | --program-pre | --program-pr | --program-p)
269 ac_prev=program_prefix ;;
270 -program-prefix=* | --program-prefix=* | --program-prefi=* \
271 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
272 program_prefix="$ac_optarg" ;;
273
274 -program-suffix | --program-suffix | --program-suffi | --program-suff \
275 | --program-suf | --program-su | --program-s)
276 ac_prev=program_suffix ;;
277 -program-suffix=* | --program-suffix=* | --program-suffi=* \
278 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
279 program_suffix="$ac_optarg" ;;
280
281 -program-transform-name | --program-transform-name \
282 | --program-transform-nam | --program-transform-na \
283 | --program-transform-n | --program-transform- \
284 | --program-transform | --program-transfor \
285 | --program-transfo | --program-transf \
286 | --program-trans | --program-tran \
287 | --progr-tra | --program-tr | --program-t)
288 ac_prev=program_transform_name ;;
289 -program-transform-name=* | --program-transform-name=* \
290 | --program-transform-nam=* | --program-transform-na=* \
291 | --program-transform-n=* | --program-transform-=* \
292 | --program-transform=* | --program-transfor=* \
293 | --program-transfo=* | --program-transf=* \
294 | --program-trans=* | --program-tran=* \
295 | --progr-tra=* | --program-tr=* | --program-t=*)
296 program_transform_name="$ac_optarg" ;;
297
298 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
299 | -silent | --silent | --silen | --sile | --sil)
300 silent=yes ;;
301
302 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
303 ac_prev=sbindir ;;
304 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
305 | --sbi=* | --sb=*)
306 sbindir="$ac_optarg" ;;
307
308 -sharedstatedir | --sharedstatedir | --sharedstatedi \
309 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
310 | --sharedst | --shareds | --shared | --share | --shar \
311 | --sha | --sh)
312 ac_prev=sharedstatedir ;;
313 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
314 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
315 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
316 | --sha=* | --sh=*)
317 sharedstatedir="$ac_optarg" ;;
318
319 -site | --site | --sit)
320 ac_prev=site ;;
321 -site=* | --site=* | --sit=*)
322 site="$ac_optarg" ;;
323
324 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
325 ac_prev=srcdir ;;
326 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
327 srcdir="$ac_optarg" ;;
328
329 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
330 | --syscon | --sysco | --sysc | --sys | --sy)
331 ac_prev=sysconfdir ;;
332 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
333 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
334 sysconfdir="$ac_optarg" ;;
335
336 -target | --target | --targe | --targ | --tar | --ta | --t)
337 ac_prev=target ;;
338 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
339 target="$ac_optarg" ;;
340
341 -v | -verbose | --verbose | --verbos | --verbo | --verb)
342 verbose=yes ;;
343
344 -version | --version | --versio | --versi | --vers)
fbda74b1 345 echo "configure generated by autoconf version 2.12"
4fa134be
ILT
346 exit 0 ;;
347
348 -with-* | --with-*)
349 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
350 # Reject names that are not valid shell variable names.
351 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
352 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353 fi
354 ac_package=`echo $ac_package| sed 's/-/_/g'`
355 case "$ac_option" in
356 *=*) ;;
357 *) ac_optarg=yes ;;
358 esac
359 eval "with_${ac_package}='$ac_optarg'" ;;
360
361 -without-* | --without-*)
362 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
363 # Reject names that are not valid shell variable names.
364 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
365 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 fi
367 ac_package=`echo $ac_package| sed 's/-/_/g'`
368 eval "with_${ac_package}=no" ;;
369
370 --x)
371 # Obsolete; use --with-x.
372 with_x=yes ;;
373
374 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
375 | --x-incl | --x-inc | --x-in | --x-i)
376 ac_prev=x_includes ;;
377 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
378 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
379 x_includes="$ac_optarg" ;;
380
381 -x-libraries | --x-libraries | --x-librarie | --x-librari \
382 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
383 ac_prev=x_libraries ;;
384 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
385 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
386 x_libraries="$ac_optarg" ;;
387
388 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
389 ;;
390
391 *)
392 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
393 echo "configure: warning: $ac_option: invalid host type" 1>&2
394 fi
395 if test "x$nonopt" != xNONE; then
396 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
397 fi
398 nonopt="$ac_option"
399 ;;
400
401 esac
402done
403
404if test -n "$ac_prev"; then
405 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
406fi
407
408trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
409
410# File descriptor usage:
411# 0 standard input
412# 1 file creation
413# 2 errors and warnings
414# 3 some systems may open it to /dev/tty
415# 4 used on the Kubota Titan
416# 6 checking for... messages and results
417# 5 compiler messages saved in config.log
418if test "$silent" = yes; then
419 exec 6>/dev/null
420else
421 exec 6>&1
422fi
423exec 5>./config.log
424
425echo "\
426This file contains any messages produced by compilers while
427running configure, to aid debugging if configure makes a mistake.
428" 1>&5
429
430# Strip out --no-create and --no-recursion so they do not pile up.
431# Also quote any args containing shell metacharacters.
432ac_configure_args=
433for ac_arg
434do
435 case "$ac_arg" in
436 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
437 | --no-cr | --no-c) ;;
438 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
439 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
440 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
441 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
442 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
443 esac
444done
445
446# NLS nuisances.
fbda74b1
DE
447# Only set these to C if already set. These must not be set unconditionally
448# because not all systems understand e.g. LANG=C (notably SCO).
449# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
450# Non-C LC_CTYPE values break the ctype check.
a77aa7ec 451if test "${LANG+set}" = set; then LANG=C; export LANG; fi
fbda74b1
DE
452if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
453if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
454if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
4fa134be
ILT
455
456# confdefs.h avoids OS command line length limits that DEFS can exceed.
457rm -rf conftest* confdefs.h
458# AIX cpp loses on an empty file, so make sure it contains at least a newline.
459echo > confdefs.h
460
461# A filename unique to this package, relative to the directory that
462# configure is in, which we can look for to find out if srcdir is correct.
463ac_unique_file=Makefile.in
464
465# Find the source files, if location was not specified.
466if test -z "$srcdir"; then
467 ac_srcdir_defaulted=yes
468 # Try the directory containing this script, then its parent.
469 ac_prog=$0
470 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
471 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
472 srcdir=$ac_confdir
473 if test ! -r $srcdir/$ac_unique_file; then
474 srcdir=..
475 fi
476else
477 ac_srcdir_defaulted=no
478fi
479if test ! -r $srcdir/$ac_unique_file; then
480 if test "$ac_srcdir_defaulted" = yes; then
481 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
482 else
483 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
484 fi
485fi
486srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
487
488# Prefer explicitly selected file to automatically selected ones.
489if test -z "$CONFIG_SITE"; then
490 if test "x$prefix" != xNONE; then
491 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
492 else
493 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
494 fi
495fi
496for ac_site_file in $CONFIG_SITE; do
497 if test -r "$ac_site_file"; then
498 echo "loading site script $ac_site_file"
499 . "$ac_site_file"
500 fi
501done
502
503if test -r "$cache_file"; then
504 echo "loading cache $cache_file"
505 . $cache_file
506else
507 echo "creating cache $cache_file"
508 > $cache_file
509fi
510
511ac_ext=c
512# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
513ac_cpp='$CPP $CPPFLAGS'
514ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
515ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
fbda74b1 516cross_compiling=$ac_cv_prog_cc_cross
4fa134be
ILT
517
518if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
519 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
520 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
521 ac_n= ac_c='
522' ac_t=' '
523 else
524 ac_n=-n ac_c= ac_t=
525 fi
526else
527 ac_n= ac_c='\c' ac_t=
528fi
529
530
531
fbda74b1
DE
532echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
533echo "configure:534: checking how to run the C preprocessor" >&5
534# On Suns, sometimes $CPP names a directory.
535if test -n "$CPP" && test -d "$CPP"; then
536 CPP=
537fi
538if test -z "$CPP"; then
539if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
540 echo $ac_n "(cached) $ac_c" 1>&6
541else
542 # This must be in double quotes, not single quotes, because CPP may get
543 # substituted into the Makefile and "${CC-cc}" will confuse make.
544 CPP="${CC-cc} -E"
545 # On the NeXT, cc -E runs the code through the compiler's parser,
546 # not just through cpp.
547 cat > conftest.$ac_ext <<EOF
548#line 549 "configure"
549#include "confdefs.h"
550#include <assert.h>
551Syntax Error
552EOF
553ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
554{ (eval echo configure:555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
555ac_err=`grep -v '^ *+' conftest.out`
556if test -z "$ac_err"; then
557 :
558else
559 echo "$ac_err" >&5
560 echo "configure: failed program was:" >&5
561 cat conftest.$ac_ext >&5
562 rm -rf conftest*
563 CPP="${CC-cc} -E -traditional-cpp"
564 cat > conftest.$ac_ext <<EOF
565#line 566 "configure"
566#include "confdefs.h"
567#include <assert.h>
568Syntax Error
569EOF
570ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
571{ (eval echo configure:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
572ac_err=`grep -v '^ *+' conftest.out`
573if test -z "$ac_err"; then
574 :
575else
576 echo "$ac_err" >&5
577 echo "configure: failed program was:" >&5
578 cat conftest.$ac_ext >&5
579 rm -rf conftest*
580 CPP=/lib/cpp
581fi
582rm -f conftest*
583fi
584rm -f conftest*
585 ac_cv_prog_CPP="$CPP"
586fi
587 CPP="$ac_cv_prog_CPP"
588else
589 ac_cv_prog_CPP="$CPP"
590fi
591echo "$ac_t""$CPP" 1>&6
592
fd14b47f
DE
593
594# autoconf.info says this should be called right after AC_INIT.
4fa134be
ILT
595
596
597ac_aux_dir=
598for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
599 if test -f $ac_dir/install-sh; then
600 ac_aux_dir=$ac_dir
601 ac_install_sh="$ac_aux_dir/install-sh -c"
602 break
603 elif test -f $ac_dir/install.sh; then
604 ac_aux_dir=$ac_dir
605 ac_install_sh="$ac_aux_dir/install.sh -c"
606 break
607 fi
608done
609if test -z "$ac_aux_dir"; then
610 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
611fi
612ac_config_guess=$ac_aux_dir/config.guess
613ac_config_sub=$ac_aux_dir/config.sub
614ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
615
616
617# Do some error checking and defaulting for the host and target type.
618# The inputs are:
619# configure --host=HOST --target=TARGET --build=BUILD NONOPT
620#
621# The rules are:
622# 1. You are not allowed to specify --host, --target, and nonopt at the
623# same time.
624# 2. Host defaults to nonopt.
625# 3. If nonopt is not specified, then host defaults to the current host,
626# as determined by config.guess.
627# 4. Target and build default to nonopt.
628# 5. If nonopt is not specified, then target and build default to host.
629
630# The aliases save the names the user supplied, while $host etc.
631# will get canonicalized.
632case $host---$target---$nonopt in
633NONE---*---* | *---NONE---* | *---*---NONE) ;;
634*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
635esac
636
637
638# Make sure we can run config.sub.
639if $ac_config_sub sun4 >/dev/null 2>&1; then :
640else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
641fi
642
643echo $ac_n "checking host system type""... $ac_c" 1>&6
fbda74b1 644echo "configure:645: checking host system type" >&5
4fa134be
ILT
645
646host_alias=$host
647case "$host_alias" in
648NONE)
649 case $nonopt in
650 NONE)
651 if host_alias=`$ac_config_guess`; then :
652 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
653 fi ;;
654 *) host_alias=$nonopt ;;
655 esac ;;
656esac
657
658host=`$ac_config_sub $host_alias`
fbda74b1
DE
659host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
660host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
661host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4fa134be
ILT
662echo "$ac_t""$host" 1>&6
663
664echo $ac_n "checking target system type""... $ac_c" 1>&6
fbda74b1 665echo "configure:666: checking target system type" >&5
4fa134be
ILT
666
667target_alias=$target
668case "$target_alias" in
669NONE)
670 case $nonopt in
671 NONE) target_alias=$host_alias ;;
672 *) target_alias=$nonopt ;;
673 esac ;;
674esac
675
676target=`$ac_config_sub $target_alias`
fbda74b1
DE
677target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
678target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
679target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4fa134be
ILT
680echo "$ac_t""$target" 1>&6
681
682echo $ac_n "checking build system type""... $ac_c" 1>&6
fbda74b1 683echo "configure:684: checking build system type" >&5
4fa134be
ILT
684
685build_alias=$build
686case "$build_alias" in
687NONE)
688 case $nonopt in
689 NONE) build_alias=$host_alias ;;
690 *) build_alias=$nonopt ;;
691 esac ;;
692esac
693
694build=`$ac_config_sub $build_alias`
fbda74b1
DE
695build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
696build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
697build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4fa134be
ILT
698echo "$ac_t""$build" 1>&6
699
700test "$host_alias" != "$target_alias" &&
701 test "$program_prefix$program_suffix$program_transform_name" = \
702 NONENONEs,x,x, &&
703 program_prefix=${target_alias}-
704
705if test "$program_transform_name" = s,x,x,; then
706 program_transform_name=
707else
708 # Double any \ or $. echo might interpret backslashes.
709 cat <<\EOF_SED > conftestsed
710s,\\,\\\\,g; s,\$,$$,g
711EOF_SED
712 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
713 rm -f conftestsed
714fi
715test "$program_prefix" != NONE &&
716 program_transform_name="s,^,${program_prefix},; $program_transform_name"
717# Use a double $ so make ignores it.
718test "$program_suffix" != NONE &&
719 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
720
721# sed with no file args requires a program.
722test "$program_transform_name" = "" && program_transform_name="s,x,x,"
723
4fa134be
ILT
724# Extract the first word of "gcc", so it can be a program name with args.
725set dummy gcc; ac_word=$2
726echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
fbda74b1 727echo "configure:728: checking for $ac_word" >&5
4fa134be
ILT
728if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
729 echo $ac_n "(cached) $ac_c" 1>&6
730else
731 if test -n "$CC"; then
732 ac_cv_prog_CC="$CC" # Let the user override the test.
733else
734 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
735 for ac_dir in $PATH; do
736 test -z "$ac_dir" && ac_dir=.
737 if test -f $ac_dir/$ac_word; then
738 ac_cv_prog_CC="gcc"
739 break
740 fi
741 done
742 IFS="$ac_save_ifs"
743fi
744fi
745CC="$ac_cv_prog_CC"
746if test -n "$CC"; then
747 echo "$ac_t""$CC" 1>&6
748else
749 echo "$ac_t""no" 1>&6
750fi
751
752if test -z "$CC"; then
753 # Extract the first word of "cc", so it can be a program name with args.
754set dummy cc; ac_word=$2
755echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
fbda74b1 756echo "configure:757: checking for $ac_word" >&5
4fa134be
ILT
757if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
758 echo $ac_n "(cached) $ac_c" 1>&6
759else
760 if test -n "$CC"; then
761 ac_cv_prog_CC="$CC" # Let the user override the test.
762else
763 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
764 ac_prog_rejected=no
765 for ac_dir in $PATH; do
766 test -z "$ac_dir" && ac_dir=.
767 if test -f $ac_dir/$ac_word; then
768 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
769 ac_prog_rejected=yes
770 continue
771 fi
772 ac_cv_prog_CC="cc"
773 break
774 fi
775 done
776 IFS="$ac_save_ifs"
777if test $ac_prog_rejected = yes; then
778 # We found a bogon in the path, so make sure we never use it.
779 set dummy $ac_cv_prog_CC
780 shift
781 if test $# -gt 0; then
782 # We chose a different compiler from the bogus one.
783 # However, it has the same basename, so the bogon will be chosen
784 # first if we set CC to just the basename; use the full file name.
785 shift
786 set dummy "$ac_dir/$ac_word" "$@"
787 shift
788 ac_cv_prog_CC="$@"
789 fi
790fi
791fi
792fi
793CC="$ac_cv_prog_CC"
794if test -n "$CC"; then
795 echo "$ac_t""$CC" 1>&6
796else
797 echo "$ac_t""no" 1>&6
798fi
799
800 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
801fi
802
fbda74b1
DE
803echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
804echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
805
806ac_ext=c
807# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808ac_cpp='$CPP $CPPFLAGS'
809ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811cross_compiling=$ac_cv_prog_cc_cross
812
813cat > conftest.$ac_ext <<EOF
814#line 815 "configure"
815#include "confdefs.h"
816main(){return(0);}
817EOF
818if { (eval echo configure:819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
819 ac_cv_prog_cc_works=yes
820 # If we can't run a trivial program, we are probably using a cross compiler.
821 if (./conftest; exit) 2>/dev/null; then
822 ac_cv_prog_cc_cross=no
823 else
824 ac_cv_prog_cc_cross=yes
825 fi
826else
827 echo "configure: failed program was:" >&5
828 cat conftest.$ac_ext >&5
829 ac_cv_prog_cc_works=no
830fi
831rm -fr conftest*
832
833echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
834if test $ac_cv_prog_cc_works = no; then
835 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
836fi
837echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
838echo "configure:839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
839echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
840cross_compiling=$ac_cv_prog_cc_cross
841
4fa134be 842echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
fbda74b1 843echo "configure:844: checking whether we are using GNU C" >&5
4fa134be
ILT
844if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
845 echo $ac_n "(cached) $ac_c" 1>&6
846else
847 cat > conftest.c <<EOF
848#ifdef __GNUC__
849 yes;
850#endif
851EOF
fbda74b1 852if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
4fa134be
ILT
853 ac_cv_prog_gcc=yes
854else
855 ac_cv_prog_gcc=no
856fi
857fi
858
859echo "$ac_t""$ac_cv_prog_gcc" 1>&6
fbda74b1 860
4fa134be
ILT
861if test $ac_cv_prog_gcc = yes; then
862 GCC=yes
fbda74b1
DE
863 ac_test_CFLAGS="${CFLAGS+set}"
864 ac_save_CFLAGS="$CFLAGS"
865 CFLAGS=
866 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
867echo "configure:868: checking whether ${CC-cc} accepts -g" >&5
868if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
4fa134be
ILT
869 echo $ac_n "(cached) $ac_c" 1>&6
870else
871 echo 'void f(){}' > conftest.c
872if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
fbda74b1 873 ac_cv_prog_cc_g=yes
4fa134be 874else
fbda74b1 875 ac_cv_prog_cc_g=no
4fa134be
ILT
876fi
877rm -f conftest*
878
879fi
880
fbda74b1
DE
881echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
882 if test "$ac_test_CFLAGS" = set; then
883 CFLAGS="$ac_save_CFLAGS"
884 elif test $ac_cv_prog_cc_g = yes; then
885 CFLAGS="-g -O2"
886 else
887 CFLAGS="-O2"
4fa134be
ILT
888 fi
889else
890 GCC=
891 test "${CFLAGS+set}" = set || CFLAGS="-g"
892fi
893
fd14b47f
DE
894# Find a good install program. We prefer a C program (faster),
895# so one script is as good as another. But avoid the broken or
896# incompatible versions:
897# SysV /etc/install, /usr/sbin/install
898# SunOS /usr/etc/install
899# IRIX /sbin/install
900# AIX /bin/install
901# AFS /usr/afsws/bin/install, which mishandles nonexistent args
902# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
903# ./install, which can be erroneously created by make from ./install.sh.
904echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
fbda74b1 905echo "configure:906: checking for a BSD compatible install" >&5
fd14b47f
DE
906if test -z "$INSTALL"; then
907if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
908 echo $ac_n "(cached) $ac_c" 1>&6
909else
fbda74b1 910 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
fd14b47f
DE
911 for ac_dir in $PATH; do
912 # Account for people who put trailing slashes in PATH elements.
913 case "$ac_dir/" in
914 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
915 *)
916 # OSF1 and SCO ODT 3.0 have their own names for install.
917 for ac_prog in ginstall installbsd scoinst install; do
918 if test -f $ac_dir/$ac_prog; then
919 if test $ac_prog = install &&
920 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
921 # AIX install. It has an incompatible calling convention.
922 # OSF/1 installbsd also uses dspmsg, but is usable.
923 :
924 else
925 ac_cv_path_install="$ac_dir/$ac_prog -c"
926 break 2
927 fi
928 fi
929 done
930 ;;
931 esac
932 done
fbda74b1 933 IFS="$ac_save_IFS"
fd14b47f
DE
934
935fi
936 if test "${ac_cv_path_install+set}" = set; then
937 INSTALL="$ac_cv_path_install"
938 else
939 # As a last resort, use the slow shell script. We don't cache a
940 # path for INSTALL within a source directory, because that will
941 # break other packages using the cache if that directory is
942 # removed, or if the path is relative.
943 INSTALL="$ac_install_sh"
944 fi
945fi
946echo "$ac_t""$INSTALL" 1>&6
947
948# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
949# It thinks the first close brace ends the variable substitution.
950test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
951
952test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
953
fd14b47f
DE
954
955# Put a plausible default for CC_FOR_BUILD in Makefile.
fd14b47f
DE
956
957if test "x$cross_compiling" = "xno"; then
958 CC_FOR_BUILD='$(CC)'
959else
960 CC_FOR_BUILD=gcc
961fi
962
963
4fa134be
ILT
964
965
966AR=${AR-ar}
967
968# Extract the first word of "ranlib", so it can be a program name with args.
969set dummy ranlib; ac_word=$2
970echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
fbda74b1 971echo "configure:972: checking for $ac_word" >&5
4fa134be
ILT
972if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
973 echo $ac_n "(cached) $ac_c" 1>&6
974else
975 if test -n "$RANLIB"; then
976 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
977else
978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
979 for ac_dir in $PATH; do
980 test -z "$ac_dir" && ac_dir=.
981 if test -f $ac_dir/$ac_word; then
982 ac_cv_prog_RANLIB="ranlib"
983 break
984 fi
985 done
986 IFS="$ac_save_ifs"
987 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
988fi
989fi
990RANLIB="$ac_cv_prog_RANLIB"
991if test -n "$RANLIB"; then
992 echo "$ac_t""$RANLIB" 1>&6
993else
994 echo "$ac_t""no" 1>&6
995fi
996
997
fbda74b1
DE
998# Check for common headers.
999for ac_hdr in stdlib.h string.h strings.h unistd.h
1000do
1001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1003echo "configure:1004: checking for $ac_hdr" >&5
1004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1005 echo $ac_n "(cached) $ac_c" 1>&6
1006else
1007 cat > conftest.$ac_ext <<EOF
1008#line 1009 "configure"
1009#include "confdefs.h"
1010#include <$ac_hdr>
1011EOF
1012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1013{ (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1014ac_err=`grep -v '^ *+' conftest.out`
1015if test -z "$ac_err"; then
1016 rm -rf conftest*
1017 eval "ac_cv_header_$ac_safe=yes"
1018else
1019 echo "$ac_err" >&5
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022 rm -rf conftest*
1023 eval "ac_cv_header_$ac_safe=no"
1024fi
1025rm -f conftest*
1026fi
1027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1028 echo "$ac_t""yes" 1>&6
1029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1030 cat >> confdefs.h <<EOF
1031#define $ac_tr_hdr 1
1032EOF
1033
1034else
1035 echo "$ac_t""no" 1>&6
1036fi
1037done
1038
1039
fd14b47f
DE
1040. ${srcdir}/../../bfd/configure.host
1041
1042
601fb8ae
MM
1043
1044# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
1045if test "${enable_sim_bswap+set}" = set; then
1046 enableval="$enable_sim_bswap"
1047 case "${enableval}" in
a77aa7ec 1048 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
601fb8ae
MM
1049 no) sim_bswap="-DWITH_BSWAP=0";;
1050 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
1051esac
1052if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
1053 echo "Setting bswap flags = $sim_bswap" 6>&1
1054fi
1055else
1056 sim_bswap=""
1057fi
1058
1059
1060
fd14b47f
DE
1061# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
1062if test "${enable_sim_cflags+set}" = set; then
1063 enableval="$enable_sim_cflags"
1064 case "${enableval}" in
1065 yes) sim_cflags="-O2";;
1066 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
1067 no) sim_cflags="";;
1068 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1069esac
1070if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
1071 echo "Setting sim cflags = $sim_cflags" 6>&1
1072fi
4fa134be 1073else
fd14b47f
DE
1074 sim_cflags=""
1075fi
1076
1077
601fb8ae 1078
fd14b47f
DE
1079# Check whether --enable-sim-debug or --disable-sim-debug was given.
1080if test "${enable_sim_debug+set}" = set; then
1081 enableval="$enable_sim_debug"
1082 case "${enableval}" in
fbda74b1
DE
1083 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
1084 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
1085 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
fd14b47f
DE
1086esac
1087if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
1088 echo "Setting sim debug = $sim_debug" 6>&1
1089fi
4fa134be 1090else
fd14b47f
DE
1091 sim_debug=""
1092fi
1093
1094
601fb8ae 1095
a35e91c3
AC
1096# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
1097if test "${enable_sim_stdio+set}" = set; then
1098 enableval="$enable_sim_stdio"
1099 case "${enableval}" in
1100 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
1101 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
1102 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
1103esac
1104if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
1105 echo "Setting stdio flags = $sim_stdio" 6>&1
1106fi
1107else
1108 sim_stdio=""
1109fi
a77aa7ec
AC
1110
1111
1112
fd14b47f
DE
1113# Check whether --enable-sim-trace or --disable-sim-trace was given.
1114if test "${enable_sim_trace+set}" = set; then
1115 enableval="$enable_sim_trace"
1116 case "${enableval}" in
a77aa7ec
AC
1117 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=1";;
1118 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
1119 *) sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
fd14b47f
DE
1120esac
1121if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
1122 echo "Setting sim trace = $sim_trace" 6>&1
1123fi
4fa134be 1124else
fd14b47f 1125 sim_trace=""
4fa134be 1126fi
fd14b47f
DE
1127
1128
4fa134be 1129
fd14b47f
DE
1130sim_link_files=
1131sim_link_links=
1132
1133sim_link_links=tconfig.h
1134if test -f ${srcdir}/tconfig.in
1135then
1136 sim_link_files=tconfig.in
4fa134be 1137else
fd14b47f 1138 sim_link_files=../common/tconfig.in
4fa134be
ILT
1139fi
1140
19c5af72 1141# targ-vals.def points to the libc macro description file.
295dbbe4 1142case "${target}" in
19c5af72 1143*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
295dbbe4 1144esac
19c5af72
DE
1145sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
1146sim_link_links="${sim_link_links} targ-vals.def"
295dbbe4
SG
1147
1148
fd14b47f
DE
1149
1150# Ensure a reasonable default simulator is constructed:
1151case "${target}" in
601fb8ae
MM
1152# start-sanitize-r5900
1153 mips64vr59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";;
1154# end-sanitize-r5900
fd14b47f 1155 mips64*-*-*) SIMCONF="-mips0 --warnings";;
295dbbe4 1156 mips16*-*-*) SIMCONF="-mips0 --warnings";;
fd14b47f
DE
1157 mips*-*-*) SIMCONF="-mips2 --warnings";;
1158 *) SIMCONF="-mips0 --warnings";;
1159esac
1160
1161
4fa134be
ILT
1162for ac_hdr in string.h strings.h stdlib.h
1163do
fbda74b1 1164ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4fa134be 1165echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
fbda74b1 1166echo "configure:1167: checking for $ac_hdr" >&5
4fa134be
ILT
1167if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169else
1170 cat > conftest.$ac_ext <<EOF
fbda74b1 1171#line 1172 "configure"
4fa134be
ILT
1172#include "confdefs.h"
1173#include <$ac_hdr>
1174EOF
1175ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
fbda74b1 1176{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4fa134be
ILT
1177ac_err=`grep -v '^ *+' conftest.out`
1178if test -z "$ac_err"; then
1179 rm -rf conftest*
1180 eval "ac_cv_header_$ac_safe=yes"
1181else
1182 echo "$ac_err" >&5
fbda74b1
DE
1183 echo "configure: failed program was:" >&5
1184 cat conftest.$ac_ext >&5
4fa134be
ILT
1185 rm -rf conftest*
1186 eval "ac_cv_header_$ac_safe=no"
1187fi
1188rm -f conftest*
1189fi
1190if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1191 echo "$ac_t""yes" 1>&6
fbda74b1 1192 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4fa134be
ILT
1193 cat >> confdefs.h <<EOF
1194#define $ac_tr_hdr 1
1195EOF
1196
1197else
1198 echo "$ac_t""no" 1>&6
1199fi
1200done
1201
fbda74b1
DE
1202echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
1203echo "configure:1204: checking for fabs in -lm" >&5
1204ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
4fa134be
ILT
1205if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
1207else
1208 ac_save_LIBS="$LIBS"
1209LIBS="-lm $LIBS"
1210cat > conftest.$ac_ext <<EOF
fbda74b1 1211#line 1212 "configure"
4fa134be
ILT
1212#include "confdefs.h"
1213/* Override any gcc2 internal prototype to avoid an error. */
1214/* We use char because int might match the return type of a gcc2
1215 builtin and then its argument prototype would still apply. */
1216char fabs();
1217
fbda74b1 1218int main() {
4fa134be
ILT
1219fabs()
1220; return 0; }
1221EOF
fbda74b1 1222if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4fa134be
ILT
1223 rm -rf conftest*
1224 eval "ac_cv_lib_$ac_lib_var=yes"
1225else
fbda74b1
DE
1226 echo "configure: failed program was:" >&5
1227 cat conftest.$ac_ext >&5
4fa134be
ILT
1228 rm -rf conftest*
1229 eval "ac_cv_lib_$ac_lib_var=no"
1230fi
1231rm -f conftest*
1232LIBS="$ac_save_LIBS"
1233
1234fi
1235if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1236 echo "$ac_t""yes" 1>&6
fbda74b1
DE
1237 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1238 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4fa134be
ILT
1239 cat >> confdefs.h <<EOF
1240#define $ac_tr_lib 1
1241EOF
1242
1243 LIBS="-lm $LIBS"
1244
1245else
1246 echo "$ac_t""no" 1>&6
1247fi
1248
fd14b47f 1249for ac_func in aint anint sqrt
4fa134be
ILT
1250do
1251echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
fbda74b1 1252echo "configure:1253: checking for $ac_func" >&5
4fa134be
ILT
1253if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255else
1256 cat > conftest.$ac_ext <<EOF
fbda74b1 1257#line 1258 "configure"
4fa134be
ILT
1258#include "confdefs.h"
1259/* System header to define __stub macros and hopefully few prototypes,
1260 which can conflict with char $ac_func(); below. */
1261#include <assert.h>
1262/* Override any gcc2 internal prototype to avoid an error. */
1263/* We use char because int might match the return type of a gcc2
1264 builtin and then its argument prototype would still apply. */
1265char $ac_func();
1266
fbda74b1 1267int main() {
4fa134be
ILT
1268
1269/* The GNU C library defines this for functions which it implements
1270 to always fail with ENOSYS. Some functions are actually named
1271 something starting with __ and the normal name is an alias. */
1272#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1273choke me
1274#else
1275$ac_func();
1276#endif
1277
1278; return 0; }
1279EOF
fbda74b1 1280if { (eval echo configure:1281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4fa134be
ILT
1281 rm -rf conftest*
1282 eval "ac_cv_func_$ac_func=yes"
1283else
fbda74b1
DE
1284 echo "configure: failed program was:" >&5
1285 cat conftest.$ac_ext >&5
4fa134be
ILT
1286 rm -rf conftest*
1287 eval "ac_cv_func_$ac_func=no"
1288fi
1289rm -f conftest*
a77aa7ec 1290fi
fbda74b1 1291
4fa134be
ILT
1292if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1293 echo "$ac_t""yes" 1>&6
1294 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1295 cat >> confdefs.h <<EOF
1296#define $ac_tr_func 1
1297EOF
1298
1299else
1300 echo "$ac_t""no" 1>&6
1301fi
1302done
1303
1304
fd14b47f
DE
1305
1306
19c5af72 1307trap '' 1 2 15
4fa134be
ILT
1308cat > confcache <<\EOF
1309# This file is a shell script that caches the results of configure
1310# tests run on this system so they can be shared between configure
1311# scripts and configure runs. It is not useful on other systems.
1312# If it contains results you don't want to keep, you may remove or edit it.
1313#
1314# By default, configure uses ./config.cache as the cache file,
1315# creating it if it does not exist already. You can give configure
1316# the --cache-file=FILE option to use a different cache file; that is
1317# what configure does when it calls configure scripts in
1318# subdirectories, so they share the cache.
1319# Giving --cache-file=/dev/null disables caching, for debugging configure.
1320# config.status only pays attention to the cache file if you give it the
1321# --recheck option to rerun configure.
1322#
1323EOF
fbda74b1
DE
1324# The following way of writing the cache mishandles newlines in values,
1325# but we know of no workaround that is simple, portable, and efficient.
1326# So, don't put newlines in cache variables' values.
4fa134be
ILT
1327# Ultrix sh set writes to stderr and can't be redirected directly,
1328# and sets the high bit in the cache file unless we assign to the vars.
1329(set) 2>&1 |
fbda74b1
DE
1330 case `(ac_space=' '; set) 2>&1` in
1331 *ac_space=\ *)
1332 # `set' does not quote correctly, so add quotes (double-quote substitution
1333 # turns \\\\ into \\, and sed turns \\ into \).
1334 sed -n \
1335 -e "s/'/'\\\\''/g" \
1336 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1337 ;;
1338 *)
1339 # `set' quotes correctly as required by POSIX, so do not add quotes.
1340 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1341 ;;
1342 esac >> confcache
4fa134be
ILT
1343if cmp -s $cache_file confcache; then
1344 :
1345else
1346 if test -w $cache_file; then
1347 echo "updating cache $cache_file"
1348 cat confcache > $cache_file
1349 else
1350 echo "not updating unwritable cache $cache_file"
1351 fi
1352fi
1353rm -f confcache
1354
1355trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1356
1357test "x$prefix" = xNONE && prefix=$ac_default_prefix
1358# Let make expand exec_prefix.
1359test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1360
1361# Any assignment to VPATH causes Sun make to only execute
1362# the first set of double-colon rules, so remove it if not needed.
1363# If there is a colon in the path, we need to keep it.
1364if test "x$srcdir" = x.; then
1365 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1366fi
1367
1368trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1369
1370DEFS=-DHAVE_CONFIG_H
1371
1372# Without the "./", some shells look in PATH for config.status.
1373: ${CONFIG_STATUS=./config.status}
1374
1375echo creating $CONFIG_STATUS
1376rm -f $CONFIG_STATUS
1377cat > $CONFIG_STATUS <<EOF
1378#! /bin/sh
1379# Generated automatically by configure.
1380# Run this file to recreate the current configuration.
1381# This directory was configured as follows,
1382# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1383#
1384# $0 $ac_configure_args
1385#
1386# Compiler output produced by configure, useful for debugging
1387# configure, is in ./config.log if it exists.
1388
1389ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1390for ac_option
1391do
1392 case "\$ac_option" in
1393 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1394 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1395 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1396 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
fbda74b1 1397 echo "$CONFIG_STATUS generated by autoconf version 2.12"
4fa134be
ILT
1398 exit 0 ;;
1399 -help | --help | --hel | --he | --h)
1400 echo "\$ac_cs_usage"; exit 0 ;;
1401 *) echo "\$ac_cs_usage"; exit 1 ;;
1402 esac
1403done
1404
1405ac_given_srcdir=$srcdir
fd14b47f 1406ac_given_INSTALL="$INSTALL"
4fa134be 1407
19c5af72 1408trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4fa134be
ILT
1409EOF
1410cat >> $CONFIG_STATUS <<EOF
1411
1412# Protect against being on the right side of a sed subst in config.status.
1413sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1414 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1415$ac_vpsub
1416$extrasub
1417s%@CFLAGS@%$CFLAGS%g
1418s%@CPPFLAGS@%$CPPFLAGS%g
1419s%@CXXFLAGS@%$CXXFLAGS%g
1420s%@DEFS@%$DEFS%g
1421s%@LDFLAGS@%$LDFLAGS%g
1422s%@LIBS@%$LIBS%g
1423s%@exec_prefix@%$exec_prefix%g
1424s%@prefix@%$prefix%g
1425s%@program_transform_name@%$program_transform_name%g
1426s%@bindir@%$bindir%g
1427s%@sbindir@%$sbindir%g
1428s%@libexecdir@%$libexecdir%g
1429s%@datadir@%$datadir%g
1430s%@sysconfdir@%$sysconfdir%g
1431s%@sharedstatedir@%$sharedstatedir%g
1432s%@localstatedir@%$localstatedir%g
1433s%@libdir@%$libdir%g
1434s%@includedir@%$includedir%g
1435s%@oldincludedir@%$oldincludedir%g
1436s%@infodir@%$infodir%g
1437s%@mandir@%$mandir%g
1438s%@host@%$host%g
1439s%@host_alias@%$host_alias%g
1440s%@host_cpu@%$host_cpu%g
1441s%@host_vendor@%$host_vendor%g
1442s%@host_os@%$host_os%g
1443s%@target@%$target%g
1444s%@target_alias@%$target_alias%g
1445s%@target_cpu@%$target_cpu%g
1446s%@target_vendor@%$target_vendor%g
1447s%@target_os@%$target_os%g
1448s%@build@%$build%g
1449s%@build_alias@%$build_alias%g
1450s%@build_cpu@%$build_cpu%g
1451s%@build_vendor@%$build_vendor%g
1452s%@build_os@%$build_os%g
1453s%@CC@%$CC%g
fd14b47f
DE
1454s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1455s%@INSTALL_DATA@%$INSTALL_DATA%g
1456s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4fa134be
ILT
1457s%@HDEFINES@%$HDEFINES%g
1458s%@AR@%$AR%g
1459s%@RANLIB@%$RANLIB%g
fbda74b1 1460s%@CPP@%$CPP%g
601fb8ae 1461s%@sim_bswap@%$sim_bswap%g
fd14b47f
DE
1462s%@sim_cflags@%$sim_cflags%g
1463s%@sim_debug@%$sim_debug%g
a35e91c3 1464s%@sim_stdio@%$sim_stdio%g
fd14b47f 1465s%@sim_trace@%$sim_trace%g
fd14b47f 1466s%@SIMCONF@%$SIMCONF%g
4fa134be
ILT
1467
1468CEOF
1469EOF
fbda74b1
DE
1470
1471cat >> $CONFIG_STATUS <<\EOF
1472
1473# Split the substitutions into bite-sized pieces for seds with
1474# small command number limits, like on Digital OSF/1 and HP-UX.
1475ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1476ac_file=1 # Number of current file.
1477ac_beg=1 # First line for current file.
1478ac_end=$ac_max_sed_cmds # Line after last line for current file.
1479ac_more_lines=:
1480ac_sed_cmds=""
1481while $ac_more_lines; do
1482 if test $ac_beg -gt 1; then
1483 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1484 else
1485 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1486 fi
1487 if test ! -s conftest.s$ac_file; then
1488 ac_more_lines=false
1489 rm -f conftest.s$ac_file
1490 else
1491 if test -z "$ac_sed_cmds"; then
1492 ac_sed_cmds="sed -f conftest.s$ac_file"
1493 else
1494 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1495 fi
1496 ac_file=`expr $ac_file + 1`
1497 ac_beg=$ac_end
1498 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1499 fi
1500done
1501if test -z "$ac_sed_cmds"; then
1502 ac_sed_cmds=cat
1503fi
1504EOF
1505
4fa134be
ILT
1506cat >> $CONFIG_STATUS <<EOF
1507
19c5af72 1508CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in"}
4fa134be
ILT
1509EOF
1510cat >> $CONFIG_STATUS <<\EOF
1511for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
fbda74b1 1512 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4fa134be 1513 case "$ac_file" in
fbda74b1 1514 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4fa134be
ILT
1515 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1516 *) ac_file_in="${ac_file}.in" ;;
1517 esac
1518
fbda74b1 1519 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4fa134be
ILT
1520
1521 # Remove last slash and all that follows it. Not all systems have dirname.
1522 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1523 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1524 # The file is in a subdirectory.
1525 test ! -d "$ac_dir" && mkdir "$ac_dir"
1526 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1527 # A "../" for each directory in $ac_dir_suffix.
1528 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1529 else
1530 ac_dir_suffix= ac_dots=
1531 fi
1532
1533 case "$ac_given_srcdir" in
1534 .) srcdir=.
1535 if test -z "$ac_dots"; then top_srcdir=.
1536 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1537 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1538 *) # Relative path.
1539 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1540 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1541 esac
1542
fd14b47f
DE
1543 case "$ac_given_INSTALL" in
1544 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1545 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1546 esac
fbda74b1 1547
4fa134be
ILT
1548 echo creating "$ac_file"
1549 rm -f "$ac_file"
1550 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1551 case "$ac_file" in
1552 *Makefile*) ac_comsub="1i\\
1553# $configure_input" ;;
1554 *) ac_comsub= ;;
1555 esac
fbda74b1
DE
1556
1557 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4fa134be
ILT
1558 sed -e "$ac_comsub
1559s%@configure_input@%$configure_input%g
1560s%@srcdir@%$srcdir%g
1561s%@top_srcdir@%$top_srcdir%g
fd14b47f 1562s%@INSTALL@%$INSTALL%g
fbda74b1 1563" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4fa134be 1564fi; done
fbda74b1 1565rm -f conftest.s*
4fa134be
ILT
1566
1567# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1568# NAME is the cpp macro being defined and VALUE is the value it is being given.
1569#
1570# ac_d sets the value in "#define NAME VALUE" lines.
1571ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1572ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1573ac_dC='\3'
1574ac_dD='%g'
1575# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1576ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1577ac_uB='\([ ]\)%\1#\2define\3'
1578ac_uC=' '
1579ac_uD='\4%g'
1580# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1581ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1582ac_eB='$%\1#\2define\3'
1583ac_eC=' '
1584ac_eD='%g'
1585
fbda74b1
DE
1586if test "${CONFIG_HEADERS+set}" != set; then
1587EOF
1588cat >> $CONFIG_STATUS <<EOF
1589 CONFIG_HEADERS="config.h:config.in"
1590EOF
1591cat >> $CONFIG_STATUS <<\EOF
1592fi
4fa134be 1593for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
fbda74b1 1594 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4fa134be 1595 case "$ac_file" in
fbda74b1 1596 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4fa134be
ILT
1597 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1598 *) ac_file_in="${ac_file}.in" ;;
1599 esac
1600
1601 echo creating $ac_file
1602
1603 rm -f conftest.frag conftest.in conftest.out
fbda74b1
DE
1604 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1605 cat $ac_file_inputs > conftest.in
4fa134be
ILT
1606
1607EOF
1608
1609# Transform confdefs.h into a sed script conftest.vals that substitutes
1610# the proper values into config.h.in to produce config.h. And first:
1611# Protect against being on the right side of a sed subst in config.status.
1612# Protect against being in an unquoted here document in config.status.
1613rm -f conftest.vals
1614cat > conftest.hdr <<\EOF
1615s/[\\&%]/\\&/g
1616s%[\\$`]%\\&%g
1617s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1618s%ac_d%ac_u%gp
1619s%ac_u%ac_e%gp
1620EOF
1621sed -n -f conftest.hdr confdefs.h > conftest.vals
1622rm -f conftest.hdr
1623
1624# This sed command replaces #undef with comments. This is necessary, for
1625# example, in the case of _POSIX_SOURCE, which is predefined and required
1626# on some systems where configure will not decide to define it.
1627cat >> conftest.vals <<\EOF
1628s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1629EOF
1630
1631# Break up conftest.vals because some shells have a limit on
1632# the size of here documents, and old seds have small limits too.
4fa134be
ILT
1633
1634rm -f conftest.tail
1635while :
1636do
1637 ac_lines=`grep -c . conftest.vals`
1638 # grep -c gives empty output for an empty file on some AIX systems.
1639 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1640 # Write a limited-size here document to conftest.frag.
1641 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1642 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1643 echo 'CEOF
1644 sed -f conftest.frag conftest.in > conftest.out
1645 rm -f conftest.in
1646 mv conftest.out conftest.in
1647' >> $CONFIG_STATUS
1648 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1649 rm -f conftest.vals
1650 mv conftest.tail conftest.vals
1651done
1652rm -f conftest.vals
1653
1654cat >> $CONFIG_STATUS <<\EOF
1655 rm -f conftest.frag conftest.h
1656 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1657 cat conftest.in >> conftest.h
1658 rm -f conftest.in
1659 if cmp -s $ac_file conftest.h 2>/dev/null; then
1660 echo "$ac_file is unchanged"
1661 rm -f conftest.h
1662 else
1663 # Remove last slash and all that follows it. Not all systems have dirname.
1664 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1665 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1666 # The file is in a subdirectory.
1667 test ! -d "$ac_dir" && mkdir "$ac_dir"
1668 fi
1669 rm -f $ac_file
1670 mv conftest.h $ac_file
1671 fi
1672fi; done
1673
fd14b47f
DE
1674EOF
1675
1676cat >> $CONFIG_STATUS <<EOF
1677ac_sources="$sim_link_files"
1678ac_dests="$sim_link_links"
1679EOF
1680
1681cat >> $CONFIG_STATUS <<\EOF
1682srcdir=$ac_given_srcdir
1683while test -n "$ac_sources"; do
1684 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
1685 set $ac_sources; ac_source=$1; shift; ac_sources=$*
1686
1687 echo "linking $srcdir/$ac_source to $ac_dest"
1688
1689 if test ! -r $srcdir/$ac_source; then
1690 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
1691 fi
1692 rm -f $ac_dest
1693
1694 # Make relative symlinks.
1695 # Remove last slash and all that follows it. Not all systems have dirname.
1696 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
1697 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
1698 # The dest file is in a subdirectory.
1699 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
1700 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
1701 # A "../" for each directory in $ac_dest_dir_suffix.
1702 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
1703 else
1704 ac_dest_dir_suffix= ac_dots=
1705 fi
1706
1707 case "$srcdir" in
1708 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
1709 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
1710 esac
1711
1712 # Make a symlink if possible; otherwise try a hard link.
1713 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
1714 ln $srcdir/$ac_source $ac_dest; then :
1715 else
1716 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
1717 fi
1718done
fbda74b1
DE
1719EOF
1720cat >> $CONFIG_STATUS <<EOF
fd14b47f 1721
fbda74b1
DE
1722EOF
1723cat >> $CONFIG_STATUS <<\EOF
19c5af72
DE
1724case "x$CONFIG_FILES" in xMakefile*)
1725 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
1726 rm -f Makesim1.tmp Makesim2.tmp Makefile
1727 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
1728 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
1729 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
1730 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
1731 <Makefile.sim >Makefile
1732 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
1733 ;;
1734 esac
295dbbe4 1735 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
19c5af72 1736
4fa134be
ILT
1737exit 0
1738EOF
1739chmod +x $CONFIG_STATUS
1740rm -fr confdefs* $ac_clean_files
1741test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1742
fd14b47f 1743
This page took 0.118691 seconds and 4 git commands to generate.