b70e55d4e2339cfdeb3111ca6336325e55b09b00
[deliverable/binutils-gdb.git] / sim / common / 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 # This is intended for use by the target specific directories, and by us.
615 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
616 echo "configure:617: checking how to run the C preprocessor" >&5
617 # On Suns, sometimes $CPP names a directory.
618 if test -n "$CPP" && test -d "$CPP"; then
619 CPP=
620 fi
621 if test -z "$CPP"; then
622 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
623 echo $ac_n "(cached) $ac_c" 1>&6
624 else
625 # This must be in double quotes, not single quotes, because CPP may get
626 # substituted into the Makefile and "${CC-cc}" will confuse make.
627 CPP="${CC-cc} -E"
628 # On the NeXT, cc -E runs the code through the compiler's parser,
629 # not just through cpp.
630 cat > conftest.$ac_ext <<EOF
631 #line 632 "configure"
632 #include "confdefs.h"
633 #include <assert.h>
634 Syntax Error
635 EOF
636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
637 { (eval echo configure:638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
638 ac_err=`grep -v '^ *+' conftest.out`
639 if test -z "$ac_err"; then
640 :
641 else
642 echo "$ac_err" >&5
643 echo "configure: failed program was:" >&5
644 cat conftest.$ac_ext >&5
645 rm -rf conftest*
646 CPP="${CC-cc} -E -traditional-cpp"
647 cat > conftest.$ac_ext <<EOF
648 #line 649 "configure"
649 #include "confdefs.h"
650 #include <assert.h>
651 Syntax Error
652 EOF
653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
654 { (eval echo configure:655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
655 ac_err=`grep -v '^ *+' conftest.out`
656 if test -z "$ac_err"; then
657 :
658 else
659 echo "$ac_err" >&5
660 echo "configure: failed program was:" >&5
661 cat conftest.$ac_ext >&5
662 rm -rf conftest*
663 CPP=/lib/cpp
664 fi
665 rm -f conftest*
666 fi
667 rm -f conftest*
668 ac_cv_prog_CPP="$CPP"
669 fi
670 CPP="$ac_cv_prog_CPP"
671 else
672 ac_cv_prog_CPP="$CPP"
673 fi
674 echo "$ac_t""$CPP" 1>&6
675
676
677 # autoconf.info says this should be called right after AC_INIT.
678
679
680 ac_aux_dir=
681 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
682 if test -f $ac_dir/install-sh; then
683 ac_aux_dir=$ac_dir
684 ac_install_sh="$ac_aux_dir/install-sh -c"
685 break
686 elif test -f $ac_dir/install.sh; then
687 ac_aux_dir=$ac_dir
688 ac_install_sh="$ac_aux_dir/install.sh -c"
689 break
690 fi
691 done
692 if test -z "$ac_aux_dir"; then
693 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
694 fi
695 ac_config_guess=$ac_aux_dir/config.guess
696 ac_config_sub=$ac_aux_dir/config.sub
697 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
698
699
700 # Do some error checking and defaulting for the host and target type.
701 # The inputs are:
702 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
703 #
704 # The rules are:
705 # 1. You are not allowed to specify --host, --target, and nonopt at the
706 # same time.
707 # 2. Host defaults to nonopt.
708 # 3. If nonopt is not specified, then host defaults to the current host,
709 # as determined by config.guess.
710 # 4. Target and build default to nonopt.
711 # 5. If nonopt is not specified, then target and build default to host.
712
713 # The aliases save the names the user supplied, while $host etc.
714 # will get canonicalized.
715 case $host---$target---$nonopt in
716 NONE---*---* | *---NONE---* | *---*---NONE) ;;
717 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
718 esac
719
720
721 # Make sure we can run config.sub.
722 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
723 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking host system type""... $ac_c" 1>&6
727 echo "configure:728: checking host system type" >&5
728
729 host_alias=$host
730 case "$host_alias" in
731 NONE)
732 case $nonopt in
733 NONE)
734 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
735 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
736 fi ;;
737 *) host_alias=$nonopt ;;
738 esac ;;
739 esac
740
741 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
742 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745 echo "$ac_t""$host" 1>&6
746
747 echo $ac_n "checking target system type""... $ac_c" 1>&6
748 echo "configure:749: checking target system type" >&5
749
750 target_alias=$target
751 case "$target_alias" in
752 NONE)
753 case $nonopt in
754 NONE) target_alias=$host_alias ;;
755 *) target_alias=$nonopt ;;
756 esac ;;
757 esac
758
759 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
760 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
761 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
762 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
763 echo "$ac_t""$target" 1>&6
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767
768 build_alias=$build
769 case "$build_alias" in
770 NONE)
771 case $nonopt in
772 NONE) build_alias=$host_alias ;;
773 *) build_alias=$nonopt ;;
774 esac ;;
775 esac
776
777 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
778 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
779 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
780 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
781 echo "$ac_t""$build" 1>&6
782
783 test "$host_alias" != "$target_alias" &&
784 test "$program_prefix$program_suffix$program_transform_name" = \
785 NONENONEs,x,x, &&
786 program_prefix=${target_alias}-
787
788 if test "$program_transform_name" = s,x,x,; then
789 program_transform_name=
790 else
791 # Double any \ or $. echo might interpret backslashes.
792 cat <<\EOF_SED > conftestsed
793 s,\\,\\\\,g; s,\$,$$,g
794 EOF_SED
795 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
796 rm -f conftestsed
797 fi
798 test "$program_prefix" != NONE &&
799 program_transform_name="s,^,${program_prefix},; $program_transform_name"
800 # Use a double $ so make ignores it.
801 test "$program_suffix" != NONE &&
802 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
803
804 # sed with no file args requires a program.
805 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
806
807 # Extract the first word of "gcc", so it can be a program name with args.
808 set dummy gcc; ac_word=$2
809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
810 echo "configure:811: checking for $ac_word" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
812 echo $ac_n "(cached) $ac_c" 1>&6
813 else
814 if test -n "$CC"; then
815 ac_cv_prog_CC="$CC" # Let the user override the test.
816 else
817 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
818 for ac_dir in $PATH; do
819 test -z "$ac_dir" && ac_dir=.
820 if test -f $ac_dir/$ac_word; then
821 ac_cv_prog_CC="gcc"
822 break
823 fi
824 done
825 IFS="$ac_save_ifs"
826 fi
827 fi
828 CC="$ac_cv_prog_CC"
829 if test -n "$CC"; then
830 echo "$ac_t""$CC" 1>&6
831 else
832 echo "$ac_t""no" 1>&6
833 fi
834
835 if test -z "$CC"; then
836 # Extract the first word of "cc", so it can be a program name with args.
837 set dummy cc; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:840: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842 else
843 if test -n "$CC"; then
844 ac_cv_prog_CC="$CC" # Let the user override the test.
845 else
846 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
847 ac_prog_rejected=no
848 for ac_dir in $PATH; do
849 test -z "$ac_dir" && ac_dir=.
850 if test -f $ac_dir/$ac_word; then
851 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
852 ac_prog_rejected=yes
853 continue
854 fi
855 ac_cv_prog_CC="cc"
856 break
857 fi
858 done
859 IFS="$ac_save_ifs"
860 if test $ac_prog_rejected = yes; then
861 # We found a bogon in the path, so make sure we never use it.
862 set dummy $ac_cv_prog_CC
863 shift
864 if test $# -gt 0; then
865 # We chose a different compiler from the bogus one.
866 # However, it has the same basename, so the bogon will be chosen
867 # first if we set CC to just the basename; use the full file name.
868 shift
869 set dummy "$ac_dir/$ac_word" "$@"
870 shift
871 ac_cv_prog_CC="$@"
872 fi
873 fi
874 fi
875 fi
876 CC="$ac_cv_prog_CC"
877 if test -n "$CC"; then
878 echo "$ac_t""$CC" 1>&6
879 else
880 echo "$ac_t""no" 1>&6
881 fi
882
883 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
884 fi
885
886 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
887 echo "configure:888: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
888
889 ac_ext=c
890 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
891 ac_cpp='$CPP $CPPFLAGS'
892 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
893 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
894 cross_compiling=$ac_cv_prog_cc_cross
895
896 cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 main(){return(0);}
900 EOF
901 if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
902 ac_cv_prog_cc_works=yes
903 # If we can't run a trivial program, we are probably using a cross compiler.
904 if (./conftest; exit) 2>/dev/null; then
905 ac_cv_prog_cc_cross=no
906 else
907 ac_cv_prog_cc_cross=yes
908 fi
909 else
910 echo "configure: failed program was:" >&5
911 cat conftest.$ac_ext >&5
912 ac_cv_prog_cc_works=no
913 fi
914 rm -fr conftest*
915
916 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
917 if test $ac_cv_prog_cc_works = no; then
918 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
919 fi
920 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
921 echo "configure:922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
922 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
923 cross_compiling=$ac_cv_prog_cc_cross
924
925 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
926 echo "configure:927: checking whether we are using GNU C" >&5
927 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
928 echo $ac_n "(cached) $ac_c" 1>&6
929 else
930 cat > conftest.c <<EOF
931 #ifdef __GNUC__
932 yes;
933 #endif
934 EOF
935 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
936 ac_cv_prog_gcc=yes
937 else
938 ac_cv_prog_gcc=no
939 fi
940 fi
941
942 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
943
944 if test $ac_cv_prog_gcc = yes; then
945 GCC=yes
946 ac_test_CFLAGS="${CFLAGS+set}"
947 ac_save_CFLAGS="$CFLAGS"
948 CFLAGS=
949 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
950 echo "configure:951: checking whether ${CC-cc} accepts -g" >&5
951 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
952 echo $ac_n "(cached) $ac_c" 1>&6
953 else
954 echo 'void f(){}' > conftest.c
955 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
956 ac_cv_prog_cc_g=yes
957 else
958 ac_cv_prog_cc_g=no
959 fi
960 rm -f conftest*
961
962 fi
963
964 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
965 if test "$ac_test_CFLAGS" = set; then
966 CFLAGS="$ac_save_CFLAGS"
967 elif test $ac_cv_prog_cc_g = yes; then
968 CFLAGS="-g -O2"
969 else
970 CFLAGS="-O2"
971 fi
972 else
973 GCC=
974 test "${CFLAGS+set}" = set || CFLAGS="-g"
975 fi
976
977 # Find a good install program. We prefer a C program (faster),
978 # so one script is as good as another. But avoid the broken or
979 # incompatible versions:
980 # SysV /etc/install, /usr/sbin/install
981 # SunOS /usr/etc/install
982 # IRIX /sbin/install
983 # AIX /bin/install
984 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
985 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
986 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
987 # ./install, which can be erroneously created by make from ./install.sh.
988 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
989 echo "configure:990: checking for a BSD compatible install" >&5
990 if test -z "$INSTALL"; then
991 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
992 echo $ac_n "(cached) $ac_c" 1>&6
993 else
994 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
995 for ac_dir in $PATH; do
996 # Account for people who put trailing slashes in PATH elements.
997 case "$ac_dir/" in
998 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
999 *)
1000 # OSF1 and SCO ODT 3.0 have their own names for install.
1001 # Don't use installbsd from OSF since it installs stuff as root
1002 # by default.
1003 for ac_prog in ginstall scoinst install; do
1004 if test -f $ac_dir/$ac_prog; then
1005 if test $ac_prog = install &&
1006 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1007 # AIX install. It has an incompatible calling convention.
1008 :
1009 else
1010 ac_cv_path_install="$ac_dir/$ac_prog -c"
1011 break 2
1012 fi
1013 fi
1014 done
1015 ;;
1016 esac
1017 done
1018 IFS="$ac_save_IFS"
1019
1020 fi
1021 if test "${ac_cv_path_install+set}" = set; then
1022 INSTALL="$ac_cv_path_install"
1023 else
1024 # As a last resort, use the slow shell script. We don't cache a
1025 # path for INSTALL within a source directory, because that will
1026 # break other packages using the cache if that directory is
1027 # removed, or if the path is relative.
1028 INSTALL="$ac_install_sh"
1029 fi
1030 fi
1031 echo "$ac_t""$INSTALL" 1>&6
1032
1033 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1034 # It thinks the first close brace ends the variable substitution.
1035 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1036
1037 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1038
1039
1040 # Put a plausible default for CC_FOR_BUILD in Makefile.
1041 if test "x$cross_compiling" = "xno"; then
1042 CC_FOR_BUILD='$(CC)'
1043 else
1044 CC_FOR_BUILD=gcc
1045 fi
1046
1047
1048
1049
1050 AR=${AR-ar}
1051
1052 # Extract the first word of "ranlib", so it can be a program name with args.
1053 set dummy ranlib; ac_word=$2
1054 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1055 echo "configure:1056: checking for $ac_word" >&5
1056 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1057 echo $ac_n "(cached) $ac_c" 1>&6
1058 else
1059 if test -n "$RANLIB"; then
1060 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1061 else
1062 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1063 for ac_dir in $PATH; do
1064 test -z "$ac_dir" && ac_dir=.
1065 if test -f $ac_dir/$ac_word; then
1066 ac_cv_prog_RANLIB="ranlib"
1067 break
1068 fi
1069 done
1070 IFS="$ac_save_ifs"
1071 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1072 fi
1073 fi
1074 RANLIB="$ac_cv_prog_RANLIB"
1075 if test -n "$RANLIB"; then
1076 echo "$ac_t""$RANLIB" 1>&6
1077 else
1078 echo "$ac_t""no" 1>&6
1079 fi
1080
1081
1082 # Check for common headers.
1083 # FIXME: Seems to me this can cause problems for i386-windows hosts.
1084 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
1085 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
1086 do
1087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1089 echo "configure:1090: checking for $ac_hdr" >&5
1090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092 else
1093 cat > conftest.$ac_ext <<EOF
1094 #line 1095 "configure"
1095 #include "confdefs.h"
1096 #include <$ac_hdr>
1097 EOF
1098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1099 { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1100 ac_err=`grep -v '^ *+' conftest.out`
1101 if test -z "$ac_err"; then
1102 rm -rf conftest*
1103 eval "ac_cv_header_$ac_safe=yes"
1104 else
1105 echo "$ac_err" >&5
1106 echo "configure: failed program was:" >&5
1107 cat conftest.$ac_ext >&5
1108 rm -rf conftest*
1109 eval "ac_cv_header_$ac_safe=no"
1110 fi
1111 rm -f conftest*
1112 fi
1113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1114 echo "$ac_t""yes" 1>&6
1115 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1116 cat >> confdefs.h <<EOF
1117 #define $ac_tr_hdr 1
1118 EOF
1119
1120 else
1121 echo "$ac_t""no" 1>&6
1122 fi
1123 done
1124
1125 for ac_hdr in sys/time.h sys/resource.h
1126 do
1127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1129 echo "configure:1130: checking for $ac_hdr" >&5
1130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1131 echo $ac_n "(cached) $ac_c" 1>&6
1132 else
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1135 "configure"
1135 #include "confdefs.h"
1136 #include <$ac_hdr>
1137 EOF
1138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1139 { (eval echo configure:1140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1140 ac_err=`grep -v '^ *+' conftest.out`
1141 if test -z "$ac_err"; then
1142 rm -rf conftest*
1143 eval "ac_cv_header_$ac_safe=yes"
1144 else
1145 echo "$ac_err" >&5
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1148 rm -rf conftest*
1149 eval "ac_cv_header_$ac_safe=no"
1150 fi
1151 rm -f conftest*
1152 fi
1153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1154 echo "$ac_t""yes" 1>&6
1155 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1156 cat >> confdefs.h <<EOF
1157 #define $ac_tr_hdr 1
1158 EOF
1159
1160 else
1161 echo "$ac_t""no" 1>&6
1162 fi
1163 done
1164
1165 for ac_hdr in fcntl.h
1166 do
1167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1169 echo "configure:1170: checking for $ac_hdr" >&5
1170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173 cat > conftest.$ac_ext <<EOF
1174 #line 1175 "configure"
1175 #include "confdefs.h"
1176 #include <$ac_hdr>
1177 EOF
1178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1179 { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1180 ac_err=`grep -v '^ *+' conftest.out`
1181 if test -z "$ac_err"; then
1182 rm -rf conftest*
1183 eval "ac_cv_header_$ac_safe=yes"
1184 else
1185 echo "$ac_err" >&5
1186 echo "configure: failed program was:" >&5
1187 cat conftest.$ac_ext >&5
1188 rm -rf conftest*
1189 eval "ac_cv_header_$ac_safe=no"
1190 fi
1191 rm -f conftest*
1192 fi
1193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1194 echo "$ac_t""yes" 1>&6
1195 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1196 cat >> confdefs.h <<EOF
1197 #define $ac_tr_hdr 1
1198 EOF
1199
1200 else
1201 echo "$ac_t""no" 1>&6
1202 fi
1203 done
1204
1205 for ac_func in getrusage time sigaction
1206 do
1207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1208 echo "configure:1209: checking for $ac_func" >&5
1209 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212 cat > conftest.$ac_ext <<EOF
1213 #line 1214 "configure"
1214 #include "confdefs.h"
1215 /* System header to define __stub macros and hopefully few prototypes,
1216 which can conflict with char $ac_func(); below. */
1217 #include <assert.h>
1218 /* Override any gcc2 internal prototype to avoid an error. */
1219 /* We use char because int might match the return type of a gcc2
1220 builtin and then its argument prototype would still apply. */
1221 char $ac_func();
1222
1223 int main() {
1224
1225 /* The GNU C library defines this for functions which it implements
1226 to always fail with ENOSYS. Some functions are actually named
1227 something starting with __ and the normal name is an alias. */
1228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1229 choke me
1230 #else
1231 $ac_func();
1232 #endif
1233
1234 ; return 0; }
1235 EOF
1236 if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1237 rm -rf conftest*
1238 eval "ac_cv_func_$ac_func=yes"
1239 else
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1242 rm -rf conftest*
1243 eval "ac_cv_func_$ac_func=no"
1244 fi
1245 rm -f conftest*
1246 fi
1247
1248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1249 echo "$ac_t""yes" 1>&6
1250 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1251 cat >> confdefs.h <<EOF
1252 #define $ac_tr_func 1
1253 EOF
1254
1255 else
1256 echo "$ac_t""no" 1>&6
1257 fi
1258 done
1259
1260
1261 . ${srcdir}/../../bfd/configure.host
1262
1263
1264
1265 USE_MAINTAINER_MODE=no
1266 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1267 if test "${enable_maintainer_mode+set}" = set; then
1268 enableval="$enable_maintainer_mode"
1269 case "${enableval}" in
1270 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
1271 no) MAINT="#" ;;
1272 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
1273 esac
1274 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
1275 echo "Setting maintainer mode" 6>&1
1276 fi
1277 else
1278 MAINT="#"
1279 fi
1280
1281
1282
1283 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
1284 if test "${enable_sim_bswap+set}" = set; then
1285 enableval="$enable_sim_bswap"
1286 case "${enableval}" in
1287 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
1288 no) sim_bswap="-DWITH_BSWAP=0";;
1289 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
1290 esac
1291 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
1292 echo "Setting bswap flags = $sim_bswap" 6>&1
1293 fi
1294 else
1295 sim_bswap=""
1296 fi
1297
1298
1299
1300 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
1301 if test "${enable_sim_cflags+set}" = set; then
1302 enableval="$enable_sim_cflags"
1303 case "${enableval}" in
1304 yes) sim_cflags="-O2";;
1305 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
1306 no) sim_cflags="";;
1307 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1308 esac
1309 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
1310 echo "Setting sim cflags = $sim_cflags" 6>&1
1311 fi
1312 else
1313 sim_cflags=""
1314 fi
1315
1316
1317
1318 # Check whether --enable-sim-debug or --disable-sim-debug was given.
1319 if test "${enable_sim_debug+set}" = set; then
1320 enableval="$enable_sim_debug"
1321 case "${enableval}" in
1322 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
1323 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
1324 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
1325 esac
1326 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
1327 echo "Setting sim debug = $sim_debug" 6>&1
1328 fi
1329 else
1330 sim_debug=""
1331 fi
1332
1333
1334
1335 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
1336 if test "${enable_sim_stdio+set}" = set; then
1337 enableval="$enable_sim_stdio"
1338 case "${enableval}" in
1339 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
1340 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
1341 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
1342 esac
1343 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
1344 echo "Setting stdio flags = $sim_stdio" 6>&1
1345 fi
1346 else
1347 sim_stdio=""
1348 fi
1349
1350
1351
1352 # Check whether --enable-sim-trace or --disable-sim-trace was given.
1353 if test "${enable_sim_trace+set}" = set; then
1354 enableval="$enable_sim_trace"
1355 case "${enableval}" in
1356 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
1357 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
1358 [-0-9]*)
1359 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
1360 [a-z]*)
1361 sim_trace=""
1362 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1363 if test x"$sim_trace" = x; then
1364 sim_trace="-DWITH_TRACE='(TRACE_$x"
1365 else
1366 sim_trace="${sim_trace}|TRACE_$x"
1367 fi
1368 done
1369 sim_trace="$sim_trace)'" ;;
1370 esac
1371 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
1372 echo "Setting sim trace = $sim_trace" 6>&1
1373 fi
1374 else
1375 sim_trace=""
1376 fi
1377
1378
1379
1380 # Check whether --enable-sim-profile or --disable-sim-profile was given.
1381 if test "${enable_sim_profile+set}" = set; then
1382 enableval="$enable_sim_profile"
1383 case "${enableval}" in
1384 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
1385 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
1386 [-0-9]*)
1387 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
1388 [a-z]*)
1389 sim_profile=""
1390 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1391 if test x"$sim_profile" = x; then
1392 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
1393 else
1394 sim_profile="${sim_profile}|PROFILE_$x"
1395 fi
1396 done
1397 sim_profile="$sim_profile)'" ;;
1398 esac
1399 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
1400 echo "Setting sim profile = $sim_profile" 6>&1
1401 fi
1402 else
1403 sim_profile=""
1404 fi
1405
1406
1407
1408 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1409 echo "configure:1410: checking return type of signal handlers" >&5
1410 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1411 echo $ac_n "(cached) $ac_c" 1>&6
1412 else
1413 cat > conftest.$ac_ext <<EOF
1414 #line 1415 "configure"
1415 #include "confdefs.h"
1416 #include <sys/types.h>
1417 #include <signal.h>
1418 #ifdef signal
1419 #undef signal
1420 #endif
1421 #ifdef __cplusplus
1422 extern "C" void (*signal (int, void (*)(int)))(int);
1423 #else
1424 void (*signal ()) ();
1425 #endif
1426
1427 int main() {
1428 int i;
1429 ; return 0; }
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1432 rm -rf conftest*
1433 ac_cv_type_signal=void
1434 else
1435 echo "configure: failed program was:" >&5
1436 cat conftest.$ac_ext >&5
1437 rm -rf conftest*
1438 ac_cv_type_signal=int
1439 fi
1440 rm -f conftest*
1441 fi
1442
1443 echo "$ac_t""$ac_cv_type_signal" 1>&6
1444 cat >> confdefs.h <<EOF
1445 #define RETSIGTYPE $ac_cv_type_signal
1446 EOF
1447
1448
1449
1450
1451 sim_link_files=
1452 sim_link_links=
1453
1454 sim_link_links=tconfig.h
1455 if test -f ${srcdir}/tconfig.in
1456 then
1457 sim_link_files=tconfig.in
1458 else
1459 sim_link_files=../common/tconfig.in
1460 fi
1461
1462 # targ-vals.def points to the libc macro description file.
1463 case "${target}" in
1464 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
1465 esac
1466 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
1467 sim_link_links="${sim_link_links} targ-vals.def"
1468
1469
1470
1471 # Put a useful copy of CPP_FOR_TARGET in Makefile.
1472 # This is only used to build the target values header files. These files are
1473 # shipped with distributions so CPP_FOR_TARGET only needs to work in
1474 # developer's trees. This value is borrowed from ../../Makefile.in.
1475 CPP_FOR_TARGET="\` \
1476 if test -f \$\${rootme}/../../gcc/Makefile ; then \
1477 if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \
1478 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \
1479 else \
1480 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \
1481 fi; \
1482 else \
1483 if test '\$(host_canonical)' = '\$(target_canonical)' ; then \
1484 echo \$(CC); \
1485 else \
1486 t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \
1487 fi; \
1488 fi\` -E"
1489
1490
1491 # Set TARGET_SUBDIR, needed by CPP_FOR_TARGET.
1492 if test x"${host}" = x"${target}" ; then
1493 TARGET_SUBDIR="."
1494 else
1495 TARGET_SUBDIR=${target_alias}
1496 fi
1497
1498
1499 # These aren't all needed yet, but will be eventually.
1500 for ac_hdr in stdlib.h string.h strings.h time.h sys/times.h
1501 do
1502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1504 echo "configure:1505: checking for $ac_hdr" >&5
1505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1506 echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508 cat > conftest.$ac_ext <<EOF
1509 #line 1510 "configure"
1510 #include "confdefs.h"
1511 #include <$ac_hdr>
1512 EOF
1513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1514 { (eval echo configure:1515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1515 ac_err=`grep -v '^ *+' conftest.out`
1516 if test -z "$ac_err"; then
1517 rm -rf conftest*
1518 eval "ac_cv_header_$ac_safe=yes"
1519 else
1520 echo "$ac_err" >&5
1521 echo "configure: failed program was:" >&5
1522 cat conftest.$ac_ext >&5
1523 rm -rf conftest*
1524 eval "ac_cv_header_$ac_safe=no"
1525 fi
1526 rm -f conftest*
1527 fi
1528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1529 echo "$ac_t""yes" 1>&6
1530 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1531 cat >> confdefs.h <<EOF
1532 #define $ac_tr_hdr 1
1533 EOF
1534
1535 else
1536 echo "$ac_t""no" 1>&6
1537 fi
1538 done
1539
1540
1541 trap '' 1 2 15
1542 cat > confcache <<\EOF
1543 # This file is a shell script that caches the results of configure
1544 # tests run on this system so they can be shared between configure
1545 # scripts and configure runs. It is not useful on other systems.
1546 # If it contains results you don't want to keep, you may remove or edit it.
1547 #
1548 # By default, configure uses ./config.cache as the cache file,
1549 # creating it if it does not exist already. You can give configure
1550 # the --cache-file=FILE option to use a different cache file; that is
1551 # what configure does when it calls configure scripts in
1552 # subdirectories, so they share the cache.
1553 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1554 # config.status only pays attention to the cache file if you give it the
1555 # --recheck option to rerun configure.
1556 #
1557 EOF
1558 # The following way of writing the cache mishandles newlines in values,
1559 # but we know of no workaround that is simple, portable, and efficient.
1560 # So, don't put newlines in cache variables' values.
1561 # Ultrix sh set writes to stderr and can't be redirected directly,
1562 # and sets the high bit in the cache file unless we assign to the vars.
1563 (set) 2>&1 |
1564 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
1565 *ac_space=\ *)
1566 # `set' does not quote correctly, so add quotes (double-quote substitution
1567 # turns \\\\ into \\, and sed turns \\ into \).
1568 sed -n \
1569 -e "s/'/'\\\\''/g" \
1570 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1571 ;;
1572 *)
1573 # `set' quotes correctly as required by POSIX, so do not add quotes.
1574 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1575 ;;
1576 esac >> confcache
1577 if cmp -s $cache_file confcache; then
1578 :
1579 else
1580 if test -w $cache_file; then
1581 echo "updating cache $cache_file"
1582 cat confcache > $cache_file
1583 else
1584 echo "not updating unwritable cache $cache_file"
1585 fi
1586 fi
1587 rm -f confcache
1588
1589 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1590
1591 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1592 # Let make expand exec_prefix.
1593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1594
1595 # Any assignment to VPATH causes Sun make to only execute
1596 # the first set of double-colon rules, so remove it if not needed.
1597 # If there is a colon in the path, we need to keep it.
1598 if test "x$srcdir" = x.; then
1599 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1600 fi
1601
1602 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1603
1604 DEFS=-DHAVE_CONFIG_H
1605
1606 # Without the "./", some shells look in PATH for config.status.
1607 : ${CONFIG_STATUS=./config.status}
1608
1609 echo creating $CONFIG_STATUS
1610 rm -f $CONFIG_STATUS
1611 cat > $CONFIG_STATUS <<EOF
1612 #! /bin/sh
1613 # Generated automatically by configure.
1614 # Run this file to recreate the current configuration.
1615 # This directory was configured as follows,
1616 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1617 #
1618 # $0 $ac_configure_args
1619 #
1620 # Compiler output produced by configure, useful for debugging
1621 # configure, is in ./config.log if it exists.
1622
1623 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1624 for ac_option
1625 do
1626 case "\$ac_option" in
1627 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1628 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1629 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1630 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1631 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
1632 exit 0 ;;
1633 -help | --help | --hel | --he | --h)
1634 echo "\$ac_cs_usage"; exit 0 ;;
1635 *) echo "\$ac_cs_usage"; exit 1 ;;
1636 esac
1637 done
1638
1639 ac_given_srcdir=$srcdir
1640 ac_given_INSTALL="$INSTALL"
1641
1642 trap 'rm -fr `echo "Makefile cconfig.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1643 EOF
1644 cat >> $CONFIG_STATUS <<EOF
1645
1646 # Protect against being on the right side of a sed subst in config.status.
1647 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1648 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1649 $ac_vpsub
1650 $extrasub
1651 s%@sim_environment@%$sim_environment%g
1652 s%@sim_alignment@%$sim_alignment%g
1653 s%@sim_assert@%$sim_assert%g
1654 s%@sim_bitsize@%$sim_bitsize%g
1655 s%@sim_endian@%$sim_endian%g
1656 s%@sim_hostendian@%$sim_hostendian%g
1657 s%@sim_float@%$sim_float%g
1658 s%@sim_scache@%$sim_scache%g
1659 s%@sim_default_model@%$sim_default_model%g
1660 s%@sim_hardware@%$sim_hardware%g
1661 s%@sim_hw_obj@%$sim_hw_obj%g
1662 s%@sim_dv_src@%$sim_dv_src%g
1663 s%@sim_dv_obj@%$sim_dv_obj%g
1664 s%@sim_inline@%$sim_inline%g
1665 s%@sim_packages@%$sim_packages%g
1666 s%@sim_regparm@%$sim_regparm%g
1667 s%@sim_reserved_bits@%$sim_reserved_bits%g
1668 s%@sim_smp@%$sim_smp%g
1669 s%@sim_stdcall@%$sim_stdcall%g
1670 s%@sim_xor_endian@%$sim_xor_endian%g
1671 s%@sim_warnings@%$sim_warnings%g
1672 s%@SHELL@%$SHELL%g
1673 s%@CFLAGS@%$CFLAGS%g
1674 s%@CPPFLAGS@%$CPPFLAGS%g
1675 s%@CXXFLAGS@%$CXXFLAGS%g
1676 s%@DEFS@%$DEFS%g
1677 s%@LDFLAGS@%$LDFLAGS%g
1678 s%@LIBS@%$LIBS%g
1679 s%@exec_prefix@%$exec_prefix%g
1680 s%@prefix@%$prefix%g
1681 s%@program_transform_name@%$program_transform_name%g
1682 s%@bindir@%$bindir%g
1683 s%@sbindir@%$sbindir%g
1684 s%@libexecdir@%$libexecdir%g
1685 s%@datadir@%$datadir%g
1686 s%@sysconfdir@%$sysconfdir%g
1687 s%@sharedstatedir@%$sharedstatedir%g
1688 s%@localstatedir@%$localstatedir%g
1689 s%@libdir@%$libdir%g
1690 s%@includedir@%$includedir%g
1691 s%@oldincludedir@%$oldincludedir%g
1692 s%@infodir@%$infodir%g
1693 s%@mandir@%$mandir%g
1694 s%@host@%$host%g
1695 s%@host_alias@%$host_alias%g
1696 s%@host_cpu@%$host_cpu%g
1697 s%@host_vendor@%$host_vendor%g
1698 s%@host_os@%$host_os%g
1699 s%@target@%$target%g
1700 s%@target_alias@%$target_alias%g
1701 s%@target_cpu@%$target_cpu%g
1702 s%@target_vendor@%$target_vendor%g
1703 s%@target_os@%$target_os%g
1704 s%@build@%$build%g
1705 s%@build_alias@%$build_alias%g
1706 s%@build_cpu@%$build_cpu%g
1707 s%@build_vendor@%$build_vendor%g
1708 s%@build_os@%$build_os%g
1709 s%@CC@%$CC%g
1710 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1711 s%@INSTALL_DATA@%$INSTALL_DATA%g
1712 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
1713 s%@HDEFINES@%$HDEFINES%g
1714 s%@AR@%$AR%g
1715 s%@RANLIB@%$RANLIB%g
1716 s%@CPP@%$CPP%g
1717 s%@MAINT@%$MAINT%g
1718 s%@sim_bswap@%$sim_bswap%g
1719 s%@sim_cflags@%$sim_cflags%g
1720 s%@sim_debug@%$sim_debug%g
1721 s%@sim_stdio@%$sim_stdio%g
1722 s%@sim_trace@%$sim_trace%g
1723 s%@sim_profile@%$sim_profile%g
1724 s%@CPP_FOR_TARGET@%$CPP_FOR_TARGET%g
1725 s%@TARGET_SUBDIR@%$TARGET_SUBDIR%g
1726
1727 CEOF
1728 EOF
1729
1730 cat >> $CONFIG_STATUS <<\EOF
1731
1732 # Split the substitutions into bite-sized pieces for seds with
1733 # small command number limits, like on Digital OSF/1 and HP-UX.
1734 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1735 ac_file=1 # Number of current file.
1736 ac_beg=1 # First line for current file.
1737 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1738 ac_more_lines=:
1739 ac_sed_cmds=""
1740 while $ac_more_lines; do
1741 if test $ac_beg -gt 1; then
1742 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1743 else
1744 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1745 fi
1746 if test ! -s conftest.s$ac_file; then
1747 ac_more_lines=false
1748 rm -f conftest.s$ac_file
1749 else
1750 if test -z "$ac_sed_cmds"; then
1751 ac_sed_cmds="sed -f conftest.s$ac_file"
1752 else
1753 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1754 fi
1755 ac_file=`expr $ac_file + 1`
1756 ac_beg=$ac_end
1757 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1758 fi
1759 done
1760 if test -z "$ac_sed_cmds"; then
1761 ac_sed_cmds=cat
1762 fi
1763 EOF
1764
1765 cat >> $CONFIG_STATUS <<EOF
1766
1767 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1768 EOF
1769 cat >> $CONFIG_STATUS <<\EOF
1770 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1771 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1772 case "$ac_file" in
1773 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1774 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1775 *) ac_file_in="${ac_file}.in" ;;
1776 esac
1777
1778 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1779
1780 # Remove last slash and all that follows it. Not all systems have dirname.
1781 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1782 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1783 # The file is in a subdirectory.
1784 test ! -d "$ac_dir" && mkdir "$ac_dir"
1785 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1786 # A "../" for each directory in $ac_dir_suffix.
1787 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1788 else
1789 ac_dir_suffix= ac_dots=
1790 fi
1791
1792 case "$ac_given_srcdir" in
1793 .) srcdir=.
1794 if test -z "$ac_dots"; then top_srcdir=.
1795 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1796 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1797 *) # Relative path.
1798 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1799 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1800 esac
1801
1802 case "$ac_given_INSTALL" in
1803 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1804 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1805 esac
1806
1807 echo creating "$ac_file"
1808 rm -f "$ac_file"
1809 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1810 case "$ac_file" in
1811 *Makefile*) ac_comsub="1i\\
1812 # $configure_input" ;;
1813 *) ac_comsub= ;;
1814 esac
1815
1816 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1817 sed -e "$ac_comsub
1818 s%@configure_input@%$configure_input%g
1819 s%@srcdir@%$srcdir%g
1820 s%@top_srcdir@%$top_srcdir%g
1821 s%@INSTALL@%$INSTALL%g
1822 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1823 fi; done
1824 rm -f conftest.s*
1825
1826 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1827 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1828 #
1829 # ac_d sets the value in "#define NAME VALUE" lines.
1830 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1831 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1832 ac_dC='\3'
1833 ac_dD='%g'
1834 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1835 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1836 ac_uB='\([ ]\)%\1#\2define\3'
1837 ac_uC=' '
1838 ac_uD='\4%g'
1839 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1840 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1841 ac_eB='$%\1#\2define\3'
1842 ac_eC=' '
1843 ac_eD='%g'
1844
1845 if test "${CONFIG_HEADERS+set}" != set; then
1846 EOF
1847 cat >> $CONFIG_STATUS <<EOF
1848 CONFIG_HEADERS="cconfig.h:config.in"
1849 EOF
1850 cat >> $CONFIG_STATUS <<\EOF
1851 fi
1852 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1853 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1854 case "$ac_file" in
1855 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1856 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1857 *) ac_file_in="${ac_file}.in" ;;
1858 esac
1859
1860 echo creating $ac_file
1861
1862 rm -f conftest.frag conftest.in conftest.out
1863 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1864 cat $ac_file_inputs > conftest.in
1865
1866 EOF
1867
1868 # Transform confdefs.h into a sed script conftest.vals that substitutes
1869 # the proper values into config.h.in to produce config.h. And first:
1870 # Protect against being on the right side of a sed subst in config.status.
1871 # Protect against being in an unquoted here document in config.status.
1872 rm -f conftest.vals
1873 cat > conftest.hdr <<\EOF
1874 s/[\\&%]/\\&/g
1875 s%[\\$`]%\\&%g
1876 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1877 s%ac_d%ac_u%gp
1878 s%ac_u%ac_e%gp
1879 EOF
1880 sed -n -f conftest.hdr confdefs.h > conftest.vals
1881 rm -f conftest.hdr
1882
1883 # This sed command replaces #undef with comments. This is necessary, for
1884 # example, in the case of _POSIX_SOURCE, which is predefined and required
1885 # on some systems where configure will not decide to define it.
1886 cat >> conftest.vals <<\EOF
1887 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1888 EOF
1889
1890 # Break up conftest.vals because some shells have a limit on
1891 # the size of here documents, and old seds have small limits too.
1892
1893 rm -f conftest.tail
1894 while :
1895 do
1896 ac_lines=`grep -c . conftest.vals`
1897 # grep -c gives empty output for an empty file on some AIX systems.
1898 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1899 # Write a limited-size here document to conftest.frag.
1900 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1901 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1902 echo 'CEOF
1903 sed -f conftest.frag conftest.in > conftest.out
1904 rm -f conftest.in
1905 mv conftest.out conftest.in
1906 ' >> $CONFIG_STATUS
1907 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1908 rm -f conftest.vals
1909 mv conftest.tail conftest.vals
1910 done
1911 rm -f conftest.vals
1912
1913 cat >> $CONFIG_STATUS <<\EOF
1914 rm -f conftest.frag conftest.h
1915 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1916 cat conftest.in >> conftest.h
1917 rm -f conftest.in
1918 if cmp -s $ac_file conftest.h 2>/dev/null; then
1919 echo "$ac_file is unchanged"
1920 rm -f conftest.h
1921 else
1922 # Remove last slash and all that follows it. Not all systems have dirname.
1923 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1924 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1925 # The file is in a subdirectory.
1926 test ! -d "$ac_dir" && mkdir "$ac_dir"
1927 fi
1928 rm -f $ac_file
1929 mv conftest.h $ac_file
1930 fi
1931 fi; done
1932
1933 EOF
1934 cat >> $CONFIG_STATUS <<EOF
1935
1936 EOF
1937 cat >> $CONFIG_STATUS <<\EOF
1938 case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac
1939 exit 0
1940 EOF
1941 chmod +x $CONFIG_STATUS
1942 rm -fr confdefs* $ac_clean_files
1943 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1944
This page took 0.110333 seconds and 3 git commands to generate.