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