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