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