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