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