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