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