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