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