OSDN Git Service

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