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