OSDN Git Service

b1401ea76f286d6882ece50f59d520be2fb8e958
[pf3gnuchains/pf3gnuchains4x.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-newlib-io-pos-args enable printf-family positional arg support"
16 ac_help="$ac_help
17   --enable-newlib-io-long-long   enable long long type support in IO functions like printf/scanf"
18 ac_help="$ac_help
19   --enable-newlib-io-long-double   enable long double type support in IO functions printf/scanf"
20 ac_help="$ac_help
21   --enable-newlib-mb        enable multibyte support"
22 ac_help="$ac_help
23   --enable-newlib-iconv-encodings   enable specific comma-separated list of bidirectional iconv encodings to be built-in"
24 ac_help="$ac_help
25   --enable-newlib-iconv-from-encodings   enable specific comma-separated list of \"from\" iconv encodings to be built-in"
26 ac_help="$ac_help
27   --enable-newlib-iconv-to-encodings   enable specific comma-separated list of \"to\" iconv encodings to be built-in"
28 ac_help="$ac_help
29   --enable-newlib-iconv-external-ccs     enable capabilities to load external CCS files for iconv"
30 ac_help="$ac_help
31   --enable-multilib         build many library versions (default)"
32 ac_help="$ac_help
33   --enable-target-optspace  optimize for space"
34 ac_help="$ac_help
35   --enable-malloc-debugging indicate malloc debugging requested"
36 ac_help="$ac_help
37   --enable-newlib-multithread        enable support for multiple threads"
38 ac_help="$ac_help
39   --enable-newlib-iconv     enable iconv library support"
40 ac_help="$ac_help
41   --enable-newlib-elix-level         supply desired elix library level (1-4)"
42 ac_help="$ac_help
43   --disable-newlib-io-float disable printf/scanf family float support"
44 ac_help="$ac_help
45   --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
46 ac_help="$ac_help
47   --enable-maintainer-mode enable make rules and dependencies not useful
48                           (and sometimes confusing) to the casual installer"
49 ac_help="$ac_help
50   --enable-shared[=PKGS]  build shared libraries [default=yes]"
51 ac_help="$ac_help
52   --enable-static[=PKGS]  build static libraries [default=yes]"
53 ac_help="$ac_help
54   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
55 ac_help="$ac_help
56   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
57 ac_help="$ac_help
58   --disable-libtool-lock  avoid locking (might break parallel builds)"
59 ac_help="$ac_help
60   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
61 ac_help="$ac_help
62   --enable-newlib-hw-fp    Turn on hardware floating point math"
63
64 # Initialize some variables set by options.
65 # The variables have the same names as the options, with
66 # dashes changed to underlines.
67 build=NONE
68 cache_file=./config.cache
69 exec_prefix=NONE
70 host=NONE
71 no_create=
72 nonopt=NONE
73 no_recursion=
74 prefix=NONE
75 program_prefix=NONE
76 program_suffix=NONE
77 program_transform_name=s,x,x,
78 silent=
79 site=
80 srcdir=
81 target=NONE
82 verbose=
83 x_includes=NONE
84 x_libraries=NONE
85 bindir='${exec_prefix}/bin'
86 sbindir='${exec_prefix}/sbin'
87 libexecdir='${exec_prefix}/libexec'
88 datadir='${prefix}/share'
89 sysconfdir='${prefix}/etc'
90 sharedstatedir='${prefix}/com'
91 localstatedir='${prefix}/var'
92 libdir='${exec_prefix}/lib'
93 includedir='${prefix}/include'
94 oldincludedir='/usr/include'
95 infodir='${prefix}/info'
96 mandir='${prefix}/man'
97
98 # Initialize some other variables.
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 ac_max_here_lines=12
104
105 ac_prev=
106 for ac_option
107 do
108
109   # If the previous option needs an argument, assign it.
110   if test -n "$ac_prev"; then
111     eval "$ac_prev=\$ac_option"
112     ac_prev=
113     continue
114   fi
115
116   case "$ac_option" in
117   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118   *) ac_optarg= ;;
119   esac
120
121   # Accept the important Cygnus configure options, so we can diagnose typos.
122
123   case "$ac_option" in
124
125   -bindir | --bindir | --bindi | --bind | --bin | --bi)
126     ac_prev=bindir ;;
127   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
128     bindir="$ac_optarg" ;;
129
130   -build | --build | --buil | --bui | --bu)
131     ac_prev=build ;;
132   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
133     build="$ac_optarg" ;;
134
135   -cache-file | --cache-file | --cache-fil | --cache-fi \
136   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137     ac_prev=cache_file ;;
138   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
140     cache_file="$ac_optarg" ;;
141
142   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143     ac_prev=datadir ;;
144   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145   | --da=*)
146     datadir="$ac_optarg" ;;
147
148   -disable-* | --disable-*)
149     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
150     # Reject names that are not valid shell variable names.
151     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
152       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
153     fi
154     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155     eval "enable_${ac_feature}=no" ;;
156
157   -enable-* | --enable-*)
158     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
159     # Reject names that are not valid shell variable names.
160     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
161       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
162     fi
163     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164     case "$ac_option" in
165       *=*) ;;
166       *) ac_optarg=yes ;;
167     esac
168     eval "enable_${ac_feature}='$ac_optarg'" ;;
169
170   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172   | --exec | --exe | --ex)
173     ac_prev=exec_prefix ;;
174   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176   | --exec=* | --exe=* | --ex=*)
177     exec_prefix="$ac_optarg" ;;
178
179   -gas | --gas | --ga | --g)
180     # Obsolete; use --with-gas.
181     with_gas=yes ;;
182
183   -help | --help | --hel | --he)
184     # Omit some internal or obsolete options to make the list less imposing.
185     # This message is too long to be a string in the A/UX 3.1 sh.
186     cat << EOF
187 Usage: configure [options] [host]
188 Options: [defaults in brackets after descriptions]
189 Configuration:
190   --cache-file=FILE       cache test results in FILE
191   --help                  print this message
192   --no-create             do not create output files
193   --quiet, --silent       do not print \`checking...' messages
194   --version               print the version of autoconf that created configure
195 Directory and file names:
196   --prefix=PREFIX         install architecture-independent files in PREFIX
197                           [$ac_default_prefix]
198   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
199                           [same as prefix]
200   --bindir=DIR            user executables in DIR [EPREFIX/bin]
201   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
202   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
203   --datadir=DIR           read-only architecture-independent data in DIR
204                           [PREFIX/share]
205   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
206   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
207                           [PREFIX/com]
208   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
209   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
210   --includedir=DIR        C header files in DIR [PREFIX/include]
211   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
212   --infodir=DIR           info documentation in DIR [PREFIX/info]
213   --mandir=DIR            man documentation in DIR [PREFIX/man]
214   --srcdir=DIR            find the sources in DIR [configure dir or ..]
215   --program-prefix=PREFIX prepend PREFIX to installed program names
216   --program-suffix=SUFFIX append SUFFIX to installed program names
217   --program-transform-name=PROGRAM
218                           run sed PROGRAM on installed program names
219 EOF
220     cat << EOF
221 Host type:
222   --build=BUILD           configure for building on BUILD [BUILD=HOST]
223   --host=HOST             configure for HOST [guessed]
224   --target=TARGET         configure for TARGET [TARGET=HOST]
225 Features and packages:
226   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
227   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
228   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
229   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
230   --x-includes=DIR        X include files are in DIR
231   --x-libraries=DIR       X library files are in DIR
232 EOF
233     if test -n "$ac_help"; then
234       echo "--enable and --with options recognized:$ac_help"
235     fi
236     exit 0 ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host="$ac_optarg" ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir="$ac_optarg" ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir="$ac_optarg" ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir="$ac_optarg" ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir="$ac_optarg" ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir="$ac_optarg" ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir="$ac_optarg" ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir="$ac_optarg" ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix="$ac_optarg" ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix="$ac_optarg" ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix="$ac_optarg" ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name="$ac_optarg" ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir="$ac_optarg" ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir="$ac_optarg" ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site="$ac_optarg" ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir="$ac_optarg" ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir="$ac_optarg" ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target="$ac_optarg" ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers)
385     echo "configure generated by autoconf version 2.13"
386     exit 0 ;;
387
388   -with-* | --with-*)
389     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
390     # Reject names that are not valid shell variable names.
391     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
392       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393     fi
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case "$ac_option" in
396       *=*) ;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_${ac_package}='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
403     # Reject names that are not valid shell variable names.
404     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
405       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
406     fi
407     ac_package=`echo $ac_package| sed 's/-/_/g'`
408     eval "with_${ac_package}=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes="$ac_optarg" ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries="$ac_optarg" ;;
427
428   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
429     ;;
430
431   *)
432     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
433       echo "configure: warning: $ac_option: invalid host type" 1>&2
434     fi
435     if test "x$nonopt" != xNONE; then
436       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
437     fi
438     nonopt="$ac_option"
439     ;;
440
441   esac
442 done
443
444 if test -n "$ac_prev"; then
445   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
446 fi
447
448 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
449
450 # File descriptor usage:
451 # 0 standard input
452 # 1 file creation
453 # 2 errors and warnings
454 # 3 some systems may open it to /dev/tty
455 # 4 used on the Kubota Titan
456 # 6 checking for... messages and results
457 # 5 compiler messages saved in config.log
458 if test "$silent" = yes; then
459   exec 6>/dev/null
460 else
461   exec 6>&1
462 fi
463 exec 5>./config.log
464
465 echo "\
466 This file contains any messages produced by compilers while
467 running configure, to aid debugging if configure makes a mistake.
468 " 1>&5
469
470 # Strip out --no-create and --no-recursion so they do not pile up.
471 # Also quote any args containing shell metacharacters.
472 ac_configure_args=
473 for ac_arg
474 do
475   case "$ac_arg" in
476   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477   | --no-cr | --no-c) ;;
478   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
483   esac
484 done
485
486 # NLS nuisances.
487 # Only set these to C if already set.  These must not be set unconditionally
488 # because not all systems understand e.g. LANG=C (notably SCO).
489 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490 # Non-C LC_CTYPE values break the ctype check.
491 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
492 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
495
496 # confdefs.h avoids OS command line length limits that DEFS can exceed.
497 rm -rf conftest* confdefs.h
498 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
499 echo > confdefs.h
500
501 # A filename unique to this package, relative to the directory that
502 # configure is in, which we can look for to find out if srcdir is correct.
503 ac_unique_file=libc
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
522   else
523     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
524   fi
525 fi
526 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
527
528 # Prefer explicitly selected file to automatically selected ones.
529 if test -z "$CONFIG_SITE"; then
530   if test "x$prefix" != xNONE; then
531     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532   else
533     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534   fi
535 fi
536 for ac_site_file in $CONFIG_SITE; do
537   if test -r "$ac_site_file"; then
538     echo "loading site script $ac_site_file"
539     . "$ac_site_file"
540   fi
541 done
542
543 if test -r "$cache_file"; then
544   echo "loading cache $cache_file"
545   . $cache_file
546 else
547   echo "creating cache $cache_file"
548   > $cache_file
549 fi
550
551 ac_ext=c
552 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
553 ac_cpp='$CPP $CPPFLAGS'
554 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
555 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
556 cross_compiling=$ac_cv_prog_cc_cross
557
558 ac_exeext=
559 ac_objext=o
560 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563     ac_n= ac_c='
564 ' ac_t='        '
565   else
566     ac_n=-n ac_c= ac_t=
567   fi
568 else
569   ac_n= ac_c='\c' ac_t=
570 fi
571
572
573
574
575
576
577 ac_aux_dir=
578 for ac_dir in .. $srcdir/..; do
579   if test -f $ac_dir/install-sh; then
580     ac_aux_dir=$ac_dir
581     ac_install_sh="$ac_aux_dir/install-sh -c"
582     break
583   elif test -f $ac_dir/install.sh; then
584     ac_aux_dir=$ac_dir
585     ac_install_sh="$ac_aux_dir/install.sh -c"
586     break
587   fi
588 done
589 if test -z "$ac_aux_dir"; then
590   { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
591 fi
592 ac_config_guess=$ac_aux_dir/config.guess
593 ac_config_sub=$ac_aux_dir/config.sub
594 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
595
596
597 # Check whether --enable-newlib-io-pos-args or --disable-newlib-io-pos-args was given.
598 if test "${enable_newlib_io_pos_args+set}" = set; then
599   enableval="$enable_newlib_io_pos_args"
600   case "${enableval}" in
601   yes) newlib_io_pos_args=yes ;;
602   no)  newlib_io_pos_args=no ;;
603   *)   { echo "configure: error: bad value ${enableval} for newlib-io-pos-args option" 1>&2; exit 1; } ;;
604  esac
605 else
606   newlib_io_pos_args=
607 fi
608
609 # Check whether --enable-newlib-io-long-long or --disable-newlib-io-long-long was given.
610 if test "${enable_newlib_io_long_long+set}" = set; then
611   enableval="$enable_newlib_io_long_long"
612   case "${enableval}" in
613   yes) newlib_io_long_long=yes;;
614   no)  newlib_io_long_long=no ;;
615   *)   { echo "configure: error: bad value ${enableval} for newlib-io-long-long option" 1>&2; exit 1; } ;;
616  esac
617 else
618   newlib_io_long_long=
619 fi
620
621 # Check whether --enable-newlib-io-long-double or --disable-newlib-io-long-double was given.
622 if test "${enable_newlib_io_long_double+set}" = set; then
623   enableval="$enable_newlib_io_long_double"
624   case "${enableval}" in
625   yes) newlib_io_long_double=yes;;
626   no)  newlib_io_long_double=no ;;
627   *)   { echo "configure: error: bad value ${enableval} for newlib-io-long-double option" 1>&2; exit 1; } ;;
628  esac
629 else
630   newlib_io_long_double=
631 fi
632
633 # Check whether --enable-newlib-mb or --disable-newlib-mb was given.
634 if test "${enable_newlib_mb+set}" = set; then
635   enableval="$enable_newlib_mb"
636   case "${enableval}" in
637   yes) newlib_mb=yes;;
638   no)  newlib_mb=no ;;
639   *)   { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;;
640  esac
641 else
642   newlib_mb=
643 fi
644
645 # Check whether --enable-newlib-iconv-encodings or --disable-newlib-iconv-encodings was given.
646 if test "${enable_newlib_iconv_encodings+set}" = set; then
647   enableval="$enable_newlib_iconv_encodings"
648   if test x${enableval} = x; then
649    { echo "configure: error: bad value ${enableval} for newlib-iconv-encodings option - use comma-separated encodings list" 1>&2; exit 1; }
650  fi
651  iconv_encodings=${enableval}
652  
653 else
654   iconv_encodings=
655 fi
656
657 # Check whether --enable-newlib-iconv-from-encodings or --disable-newlib-iconv-from-encodings was given.
658 if test "${enable_newlib_iconv_from_encodings+set}" = set; then
659   enableval="$enable_newlib_iconv_from_encodings"
660   if test x${enableval} = x; then
661    { echo "configure: error: bad value ${enableval} for newlib-iconv-from-encodings option - use comma-separated encodings list" 1>&2; exit 1; }
662  fi
663  iconv_from_encodings=${enableval}
664  
665 else
666   iconv_from_encodings=
667 fi
668
669 # Check whether --enable-newlib-iconv-to-encodings or --disable-newlib-iconv-to-encodings was given.
670 if test "${enable_newlib_iconv_to_encodings+set}" = set; then
671   enableval="$enable_newlib_iconv_to_encodings"
672   if test x${enableval} = x; then
673    { echo "configure: error: bad value ${enableval} for newlib-iconv-to-encodings option - use comma-separated encodings list" 1>&2; exit 1; }
674  fi
675  iconv_to_encodings=${enableval}
676  
677 else
678   iconv_to_encodings=
679 fi
680
681 # Check whether --enable-newlib-iconv-external-ccs or --disable-newlib-iconv-external-ccs was given.
682 if test "${enable_newlib_iconv_external_ccs+set}" = set; then
683   enableval="$enable_newlib_iconv_external_ccs"
684   if test "${newlib_iconv_external_ccs+set}" != set; then
685    case "${enableval}" in
686      yes) newlib_iconv_external_ccs=yes ;;
687      no)  newlib_iconv_external_ccs=no ;;
688      *)   { echo "configure: error: bad value ${enableval} for newlib-iconv-external-ccs option" 1>&2; exit 1; } ;;
689    esac
690  fi
691 else
692   newlib_iconv_external_ccs=${newlib_iconv_external_ccs}
693 fi
694
695 am__api_version="1.4"
696 # Find a good install program.  We prefer a C program (faster),
697 # so one script is as good as another.  But avoid the broken or
698 # incompatible versions:
699 # SysV /etc/install, /usr/sbin/install
700 # SunOS /usr/etc/install
701 # IRIX /sbin/install
702 # AIX /bin/install
703 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
704 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
705 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
706 # ./install, which can be erroneously created by make from ./install.sh.
707 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
708 echo "configure:709: checking for a BSD compatible install" >&5
709 if test -z "$INSTALL"; then
710 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
711   echo $ac_n "(cached) $ac_c" 1>&6
712 else
713     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
714   for ac_dir in $PATH; do
715     # Account for people who put trailing slashes in PATH elements.
716     case "$ac_dir/" in
717     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
718     *)
719       # OSF1 and SCO ODT 3.0 have their own names for install.
720       # Don't use installbsd from OSF since it installs stuff as root
721       # by default.
722       for ac_prog in ginstall scoinst install; do
723         if test -f $ac_dir/$ac_prog; then
724           if test $ac_prog = install &&
725             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
726             # AIX install.  It has an incompatible calling convention.
727             :
728           else
729             ac_cv_path_install="$ac_dir/$ac_prog -c"
730             break 2
731           fi
732         fi
733       done
734       ;;
735     esac
736   done
737   IFS="$ac_save_IFS"
738
739 fi
740   if test "${ac_cv_path_install+set}" = set; then
741     INSTALL="$ac_cv_path_install"
742   else
743     # As a last resort, use the slow shell script.  We don't cache a
744     # path for INSTALL within a source directory, because that will
745     # break other packages using the cache if that directory is
746     # removed, or if the path is relative.
747     INSTALL="$ac_install_sh"
748   fi
749 fi
750 echo "$ac_t""$INSTALL" 1>&6
751
752 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
753 # It thinks the first close brace ends the variable substitution.
754 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
755
756 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
757
758 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
759
760 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
761 echo "configure:762: checking whether build environment is sane" >&5
762 # Just in case
763 sleep 1
764 echo timestamp > conftestfile
765 # Do `set' in a subshell so we don't clobber the current shell's
766 # arguments.  Must try -L first in case configure is actually a
767 # symlink; some systems play weird games with the mod time of symlinks
768 # (eg FreeBSD returns the mod time of the symlink's containing
769 # directory).
770 if (
771    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
772    if test "$*" = "X"; then
773       # -L didn't work.
774       set X `ls -t $srcdir/configure conftestfile`
775    fi
776    if test "$*" != "X $srcdir/configure conftestfile" \
777       && test "$*" != "X conftestfile $srcdir/configure"; then
778
779       # If neither matched, then we have a broken ls.  This can happen
780       # if, for instance, CONFIG_SHELL is bash and it inherits a
781       # broken ls alias from the environment.  This has actually
782       # happened.  Such a system could not be considered "sane".
783       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
784 alias in your environment" 1>&2; exit 1; }
785    fi
786
787    test "$2" = conftestfile
788    )
789 then
790    # Ok.
791    :
792 else
793    { echo "configure: error: newly created file is older than distributed files!
794 Check your system clock" 1>&2; exit 1; }
795 fi
796 rm -f conftest*
797 echo "$ac_t""yes" 1>&6
798 if test "$program_transform_name" = s,x,x,; then
799   program_transform_name=
800 else
801   # Double any \ or $.  echo might interpret backslashes.
802   cat <<\EOF_SED > conftestsed
803 s,\\,\\\\,g; s,\$,$$,g
804 EOF_SED
805   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
806   rm -f conftestsed
807 fi
808 test "$program_prefix" != NONE &&
809   program_transform_name="s,^,${program_prefix},; $program_transform_name"
810 # Use a double $ so make ignores it.
811 test "$program_suffix" != NONE &&
812   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
813
814 # sed with no file args requires a program.
815 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
816
817 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
818 echo "configure:819: checking whether ${MAKE-make} sets \${MAKE}" >&5
819 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
820 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
821   echo $ac_n "(cached) $ac_c" 1>&6
822 else
823   cat > conftestmake <<\EOF
824 all:
825         @echo 'ac_maketemp="${MAKE}"'
826 EOF
827 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
828 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
829 if test -n "$ac_maketemp"; then
830   eval ac_cv_prog_make_${ac_make}_set=yes
831 else
832   eval ac_cv_prog_make_${ac_make}_set=no
833 fi
834 rm -f conftestmake
835 fi
836 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
837   echo "$ac_t""yes" 1>&6
838   SET_MAKE=
839 else
840   echo "$ac_t""no" 1>&6
841   SET_MAKE="MAKE=${MAKE-make}"
842 fi
843
844 if test $host != $build; then
845   ac_tool_prefix=${host_alias}-
846 else
847   ac_tool_prefix=
848 fi
849
850 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
851 echo "configure:852: checking for Cygwin environment" >&5
852 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
853   echo $ac_n "(cached) $ac_c" 1>&6
854 else
855   cat > conftest.$ac_ext <<EOF
856 #line 857 "configure"
857 #include "confdefs.h"
858
859 int main() {
860
861 #ifndef __CYGWIN__
862 #define __CYGWIN__ __CYGWIN32__
863 #endif
864 return __CYGWIN__;
865 ; return 0; }
866 EOF
867 if { (eval echo configure:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
868   rm -rf conftest*
869   ac_cv_cygwin=yes
870 else
871   echo "configure: failed program was:" >&5
872   cat conftest.$ac_ext >&5
873   rm -rf conftest*
874   ac_cv_cygwin=no
875 fi
876 rm -f conftest*
877 rm -f conftest*
878 fi
879
880 echo "$ac_t""$ac_cv_cygwin" 1>&6
881 CYGWIN=
882 test "$ac_cv_cygwin" = yes && CYGWIN=yes
883 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
884 echo "configure:885: checking for mingw32 environment" >&5
885 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
886   echo $ac_n "(cached) $ac_c" 1>&6
887 else
888   cat > conftest.$ac_ext <<EOF
889 #line 890 "configure"
890 #include "confdefs.h"
891
892 int main() {
893 return __MINGW32__;
894 ; return 0; }
895 EOF
896 if { (eval echo configure:897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
897   rm -rf conftest*
898   ac_cv_mingw32=yes
899 else
900   echo "configure: failed program was:" >&5
901   cat conftest.$ac_ext >&5
902   rm -rf conftest*
903   ac_cv_mingw32=no
904 fi
905 rm -f conftest*
906 rm -f conftest*
907 fi
908
909 echo "$ac_t""$ac_cv_mingw32" 1>&6
910 MINGW32=
911 test "$ac_cv_mingw32" = yes && MINGW32=yes
912
913 # Check whether --enable-multilib or --disable-multilib was given.
914 if test "${enable_multilib+set}" = set; then
915   enableval="$enable_multilib"
916   case "${enableval}" in
917   yes) multilib=yes ;;
918   no)  multilib=no ;;
919   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
920  esac
921 else
922   multilib=yes
923 fi
924
925 # Check whether --enable-target-optspace or --disable-target-optspace was given.
926 if test "${enable_target_optspace+set}" = set; then
927   enableval="$enable_target_optspace"
928   case "${enableval}" in
929   yes) target_optspace=yes ;;
930   no)  target_optspace=no ;;
931   *)   { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
932  esac
933 else
934   target_optspace=
935 fi
936
937 # Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
938 if test "${enable_malloc_debugging+set}" = set; then
939   enableval="$enable_malloc_debugging"
940   case "${enableval}" in
941   yes) malloc_debugging=yes ;;
942   no)  malloc_debugging=no ;;
943   *)   { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
944  esac
945 else
946   malloc_debugging=
947 fi
948
949 # Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
950 if test "${enable_newlib_multithread+set}" = set; then
951   enableval="$enable_newlib_multithread"
952   case "${enableval}" in
953   yes) newlib_multithread=yes ;;
954   no)  newlib_multithread=no ;;
955   *)   { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
956  esac
957 else
958   newlib_multithread=yes
959 fi
960
961 # Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
962 if test "${enable_newlib_iconv+set}" = set; then
963   enableval="$enable_newlib_iconv"
964   if test "${newlib_iconv+set}" != set; then
965    case "${enableval}" in
966      yes) newlib_iconv=yes ;;
967      no)  newlib_iconv=no ;;
968      *)   { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
969    esac
970  fi
971 else
972   newlib_iconv=${newlib_iconv}
973 fi
974
975 # Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
976 if test "${enable_newlib_elix_level+set}" = set; then
977   enableval="$enable_newlib_elix_level"
978   case "${enableval}" in
979   0)   newlib_elix_level=0 ;;
980   1)   newlib_elix_level=1 ;;
981   2)   newlib_elix_level=2 ;;
982   3)   newlib_elix_level=3 ;;
983   4)   newlib_elix_level=4 ;;
984   *)   { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
985  esac
986 else
987   newlib_elix_level=0
988 fi
989
990 # Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
991 if test "${enable_newlib_io_float+set}" = set; then
992   enableval="$enable_newlib_io_float"
993   case "${enableval}" in
994   yes) newlib_io_float=yes ;;
995   no)  newlib_io_float=no ;;
996   *)   { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
997  esac
998 else
999   newlib_io_float=yes
1000 fi
1001
1002 # Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
1003 if test "${enable_newlib_supplied_syscalls+set}" = set; then
1004   enableval="$enable_newlib_supplied_syscalls"
1005   case "${enableval}" in
1006   yes) newlib_may_supply_syscalls=yes ;;
1007   no)  newlib_may_supply_syscalls=no ;;
1008   *)   { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
1009  esac
1010 else
1011   newlib_may_supply_syscalls=yes
1012 fi
1013
1014
1015
1016 if test x${newlib_may_supply_syscalls} = xyes; then
1017   MAY_SUPPLY_SYSCALLS_TRUE=
1018   MAY_SUPPLY_SYSCALLS_FALSE='#'
1019 else
1020   MAY_SUPPLY_SYSCALLS_TRUE='#'
1021   MAY_SUPPLY_SYSCALLS_FALSE=
1022 fi
1023
1024
1025 test -z "${with_target_subdir}" && with_target_subdir=.
1026
1027 if test "${srcdir}" = "."; then
1028   if test "${with_target_subdir}" != "."; then
1029     newlib_basedir="${srcdir}/${with_multisrctop}../."
1030   else
1031     newlib_basedir="${srcdir}/${with_multisrctop}."
1032   fi
1033 else
1034   newlib_basedir="${srcdir}/."
1035 fi
1036
1037
1038
1039 # Do some error checking and defaulting for the host and target type.
1040 # The inputs are:
1041 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1042 #
1043 # The rules are:
1044 # 1. You are not allowed to specify --host, --target, and nonopt at the
1045 #    same time.
1046 # 2. Host defaults to nonopt.
1047 # 3. If nonopt is not specified, then host defaults to the current host,
1048 #    as determined by config.guess.
1049 # 4. Target and build default to nonopt.
1050 # 5. If nonopt is not specified, then target and build default to host.
1051
1052 # The aliases save the names the user supplied, while $host etc.
1053 # will get canonicalized.
1054 case $host---$target---$nonopt in
1055 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1056 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1057 esac
1058
1059
1060 # Make sure we can run config.sub.
1061 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1062 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1063 fi
1064
1065 echo $ac_n "checking host system type""... $ac_c" 1>&6
1066 echo "configure:1067: checking host system type" >&5
1067
1068 host_alias=$host
1069 case "$host_alias" in
1070 NONE)
1071   case $nonopt in
1072   NONE)
1073     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1074     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1075     fi ;;
1076   *) host_alias=$nonopt ;;
1077   esac ;;
1078 esac
1079
1080 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1081 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1082 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1083 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1084 echo "$ac_t""$host" 1>&6
1085
1086 echo $ac_n "checking target system type""... $ac_c" 1>&6
1087 echo "configure:1088: checking target system type" >&5
1088
1089 target_alias=$target
1090 case "$target_alias" in
1091 NONE)
1092   case $nonopt in
1093   NONE) target_alias=$host_alias ;;
1094   *) target_alias=$nonopt ;;
1095   esac ;;
1096 esac
1097
1098 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1099 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1100 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1101 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1102 echo "$ac_t""$target" 1>&6
1103
1104 echo $ac_n "checking build system type""... $ac_c" 1>&6
1105 echo "configure:1106: checking build system type" >&5
1106
1107 build_alias=$build
1108 case "$build_alias" in
1109 NONE)
1110   case $nonopt in
1111   NONE) build_alias=$host_alias ;;
1112   *) build_alias=$nonopt ;;
1113   esac ;;
1114 esac
1115
1116 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1117 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1118 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1119 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$ac_t""$build" 1>&6
1121
1122 test "$host_alias" != "$target_alias" &&
1123   test "$program_prefix$program_suffix$program_transform_name" = \
1124     NONENONEs,x,x, &&
1125   program_prefix=${target_alias}-
1126
1127
1128
1129 PACKAGE=newlib
1130
1131 VERSION=1.14.0
1132
1133 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1134   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1135 fi
1136 cat >> confdefs.h <<EOF
1137 #define PACKAGE "$PACKAGE"
1138 EOF
1139
1140 cat >> confdefs.h <<EOF
1141 #define VERSION "$VERSION"
1142 EOF
1143
1144
1145
1146 missing_dir=`cd $ac_aux_dir && pwd`
1147 echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
1148 echo "configure:1149: checking for working aclocal-${am__api_version}" >&5
1149 # Run test in a subshell; some versions of sh will print an error if
1150 # an executable is not found, even if stderr is redirected.
1151 # Redirect stdin to placate older versions of autoconf.  Sigh.
1152 if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1153    ACLOCAL=aclocal-${am__api_version}
1154    echo "$ac_t""found" 1>&6
1155 else
1156    ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
1157    echo "$ac_t""missing" 1>&6
1158 fi
1159
1160 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1161 echo "configure:1162: checking for working autoconf" >&5
1162 # Run test in a subshell; some versions of sh will print an error if
1163 # an executable is not found, even if stderr is redirected.
1164 # Redirect stdin to placate older versions of autoconf.  Sigh.
1165 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1166    AUTOCONF=autoconf
1167    echo "$ac_t""found" 1>&6
1168 else
1169    AUTOCONF="$missing_dir/missing autoconf"
1170    echo "$ac_t""missing" 1>&6
1171 fi
1172
1173 echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
1174 echo "configure:1175: checking for working automake-${am__api_version}" >&5
1175 # Run test in a subshell; some versions of sh will print an error if
1176 # an executable is not found, even if stderr is redirected.
1177 # Redirect stdin to placate older versions of autoconf.  Sigh.
1178 if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1179    AUTOMAKE=automake-${am__api_version}
1180    echo "$ac_t""found" 1>&6
1181 else
1182    AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
1183    echo "$ac_t""missing" 1>&6
1184 fi
1185
1186 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1187 echo "configure:1188: checking for working autoheader" >&5
1188 # Run test in a subshell; some versions of sh will print an error if
1189 # an executable is not found, even if stderr is redirected.
1190 # Redirect stdin to placate older versions of autoconf.  Sigh.
1191 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1192    AUTOHEADER=autoheader
1193    echo "$ac_t""found" 1>&6
1194 else
1195    AUTOHEADER="$missing_dir/missing autoheader"
1196    echo "$ac_t""missing" 1>&6
1197 fi
1198
1199 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1200 echo "configure:1201: checking for working makeinfo" >&5
1201 # Run test in a subshell; some versions of sh will print an error if
1202 # an executable is not found, even if stderr is redirected.
1203 # Redirect stdin to placate older versions of autoconf.  Sigh.
1204 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1205    MAKEINFO=makeinfo
1206    echo "$ac_t""found" 1>&6
1207 else
1208    MAKEINFO="$missing_dir/missing makeinfo"
1209    echo "$ac_t""missing" 1>&6
1210 fi
1211
1212
1213
1214 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
1215 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
1216 # are probably using a cross compiler, which will not be able to fully
1217 # link an executable.  This should really be fixed in autoconf
1218 # itself.
1219
1220
1221
1222 # Extract the first word of "gcc", so it can be a program name with args.
1223 set dummy gcc; ac_word=$2
1224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1225 echo "configure:1226: checking for $ac_word" >&5
1226 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1227   echo $ac_n "(cached) $ac_c" 1>&6
1228 else
1229   if test -n "$CC"; then
1230   ac_cv_prog_CC="$CC" # Let the user override the test.
1231 else
1232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1233   ac_dummy="$PATH"
1234   for ac_dir in $ac_dummy; do
1235     test -z "$ac_dir" && ac_dir=.
1236     if test -f $ac_dir/$ac_word; then
1237       ac_cv_prog_CC="gcc"
1238       break
1239     fi
1240   done
1241   IFS="$ac_save_ifs"
1242 fi
1243 fi
1244 CC="$ac_cv_prog_CC"
1245 if test -n "$CC"; then
1246   echo "$ac_t""$CC" 1>&6
1247 else
1248   echo "$ac_t""no" 1>&6
1249 fi
1250
1251 if test -z "$CC"; then
1252   # Extract the first word of "cc", so it can be a program name with args.
1253 set dummy cc; ac_word=$2
1254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1255 echo "configure:1256: checking for $ac_word" >&5
1256 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   if test -n "$CC"; then
1260   ac_cv_prog_CC="$CC" # Let the user override the test.
1261 else
1262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1263   ac_prog_rejected=no
1264   ac_dummy="$PATH"
1265   for ac_dir in $ac_dummy; do
1266     test -z "$ac_dir" && ac_dir=.
1267     if test -f $ac_dir/$ac_word; then
1268       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1269         ac_prog_rejected=yes
1270         continue
1271       fi
1272       ac_cv_prog_CC="cc"
1273       break
1274     fi
1275   done
1276   IFS="$ac_save_ifs"
1277 if test $ac_prog_rejected = yes; then
1278   # We found a bogon in the path, so make sure we never use it.
1279   set dummy $ac_cv_prog_CC
1280   shift
1281   if test $# -gt 0; then
1282     # We chose a different compiler from the bogus one.
1283     # However, it has the same basename, so the bogon will be chosen
1284     # first if we set CC to just the basename; use the full file name.
1285     shift
1286     set dummy "$ac_dir/$ac_word" "$@"
1287     shift
1288     ac_cv_prog_CC="$@"
1289   fi
1290 fi
1291 fi
1292 fi
1293 CC="$ac_cv_prog_CC"
1294 if test -n "$CC"; then
1295   echo "$ac_t""$CC" 1>&6
1296 else
1297   echo "$ac_t""no" 1>&6
1298 fi
1299
1300   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1301 fi
1302
1303 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1304 echo "configure:1305: checking whether we are using GNU C" >&5
1305 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1306   echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308   cat > conftest.c <<EOF
1309 #ifdef __GNUC__
1310   yes;
1311 #endif
1312 EOF
1313 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1314   ac_cv_prog_gcc=yes
1315 else
1316   ac_cv_prog_gcc=no
1317 fi
1318 fi
1319
1320 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1321
1322 if test $ac_cv_prog_gcc = yes; then
1323   GCC=yes
1324   ac_test_CFLAGS="${CFLAGS+set}"
1325   ac_save_CFLAGS="$CFLAGS"
1326   CFLAGS=
1327   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1328 echo "configure:1329: checking whether ${CC-cc} accepts -g" >&5
1329 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1330   echo $ac_n "(cached) $ac_c" 1>&6
1331 else
1332   echo 'void f(){}' > conftest.c
1333 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1334   ac_cv_prog_cc_g=yes
1335 else
1336   ac_cv_prog_cc_g=no
1337 fi
1338 rm -f conftest*
1339
1340 fi
1341
1342 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1343   if test "$ac_test_CFLAGS" = set; then
1344     CFLAGS="$ac_save_CFLAGS"
1345   elif test $ac_cv_prog_cc_g = yes; then
1346     CFLAGS="-g -O2"
1347   else
1348     CFLAGS="-O2"
1349   fi
1350 else
1351   GCC=
1352   test "${CFLAGS+set}" = set || CFLAGS="-g"
1353 fi
1354
1355
1356 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1357 set dummy ${ac_tool_prefix}as; ac_word=$2
1358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1359 echo "configure:1360: checking for $ac_word" >&5
1360 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1361   echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363   if test -n "$AS"; then
1364   ac_cv_prog_AS="$AS" # Let the user override the test.
1365 else
1366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1367   ac_dummy="$PATH"
1368   for ac_dir in $ac_dummy; do
1369     test -z "$ac_dir" && ac_dir=.
1370     if test -f $ac_dir/$ac_word; then
1371       ac_cv_prog_AS="${ac_tool_prefix}as"
1372       break
1373     fi
1374   done
1375   IFS="$ac_save_ifs"
1376   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1377 fi
1378 fi
1379 AS="$ac_cv_prog_AS"
1380 if test -n "$AS"; then
1381   echo "$ac_t""$AS" 1>&6
1382 else
1383   echo "$ac_t""no" 1>&6
1384 fi
1385
1386
1387
1388 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1389 set dummy ${ac_tool_prefix}ar; ac_word=$2
1390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1391 echo "configure:1392: checking for $ac_word" >&5
1392 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1393   echo $ac_n "(cached) $ac_c" 1>&6
1394 else
1395   if test -n "$AR"; then
1396   ac_cv_prog_AR="$AR" # Let the user override the test.
1397 else
1398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1399   ac_dummy="$PATH"
1400   for ac_dir in $ac_dummy; do
1401     test -z "$ac_dir" && ac_dir=.
1402     if test -f $ac_dir/$ac_word; then
1403       ac_cv_prog_AR="${ac_tool_prefix}ar"
1404       break
1405     fi
1406   done
1407   IFS="$ac_save_ifs"
1408   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1409 fi
1410 fi
1411 AR="$ac_cv_prog_AR"
1412 if test -n "$AR"; then
1413   echo "$ac_t""$AR" 1>&6
1414 else
1415   echo "$ac_t""no" 1>&6
1416 fi
1417
1418
1419
1420 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1421 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1422 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1423 echo "configure:1424: checking for $ac_word" >&5
1424 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   if test -n "$RANLIB"; then
1428   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1429 else
1430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1431   ac_dummy="$PATH"
1432   for ac_dir in $ac_dummy; do
1433     test -z "$ac_dir" && ac_dir=.
1434     if test -f $ac_dir/$ac_word; then
1435       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1436       break
1437     fi
1438   done
1439   IFS="$ac_save_ifs"
1440 fi
1441 fi
1442 RANLIB="$ac_cv_prog_RANLIB"
1443 if test -n "$RANLIB"; then
1444   echo "$ac_t""$RANLIB" 1>&6
1445 else
1446   echo "$ac_t""no" 1>&6
1447 fi
1448
1449
1450 if test -z "$ac_cv_prog_RANLIB"; then
1451 if test -n "$ac_tool_prefix"; then
1452   # Extract the first word of "ranlib", so it can be a program name with args.
1453 set dummy ranlib; ac_word=$2
1454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1455 echo "configure:1456: checking for $ac_word" >&5
1456 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1457   echo $ac_n "(cached) $ac_c" 1>&6
1458 else
1459   if test -n "$RANLIB"; then
1460   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1461 else
1462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1463   ac_dummy="$PATH"
1464   for ac_dir in $ac_dummy; do
1465     test -z "$ac_dir" && ac_dir=.
1466     if test -f $ac_dir/$ac_word; then
1467       ac_cv_prog_RANLIB="ranlib"
1468       break
1469     fi
1470   done
1471   IFS="$ac_save_ifs"
1472   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1473 fi
1474 fi
1475 RANLIB="$ac_cv_prog_RANLIB"
1476 if test -n "$RANLIB"; then
1477   echo "$ac_t""$RANLIB" 1>&6
1478 else
1479   echo "$ac_t""no" 1>&6
1480 fi
1481
1482 else
1483   RANLIB=":"
1484 fi
1485 fi
1486
1487
1488 # Find a good install program.  We prefer a C program (faster),
1489 # so one script is as good as another.  But avoid the broken or
1490 # incompatible versions:
1491 # SysV /etc/install, /usr/sbin/install
1492 # SunOS /usr/etc/install
1493 # IRIX /sbin/install
1494 # AIX /bin/install
1495 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1496 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1497 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1498 # ./install, which can be erroneously created by make from ./install.sh.
1499 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1500 echo "configure:1501: checking for a BSD compatible install" >&5
1501 if test -z "$INSTALL"; then
1502 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1506   for ac_dir in $PATH; do
1507     # Account for people who put trailing slashes in PATH elements.
1508     case "$ac_dir/" in
1509     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1510     *)
1511       # OSF1 and SCO ODT 3.0 have their own names for install.
1512       # Don't use installbsd from OSF since it installs stuff as root
1513       # by default.
1514       for ac_prog in ginstall scoinst install; do
1515         if test -f $ac_dir/$ac_prog; then
1516           if test $ac_prog = install &&
1517             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1518             # AIX install.  It has an incompatible calling convention.
1519             :
1520           else
1521             ac_cv_path_install="$ac_dir/$ac_prog -c"
1522             break 2
1523           fi
1524         fi
1525       done
1526       ;;
1527     esac
1528   done
1529   IFS="$ac_save_IFS"
1530
1531 fi
1532   if test "${ac_cv_path_install+set}" = set; then
1533     INSTALL="$ac_cv_path_install"
1534   else
1535     # As a last resort, use the slow shell script.  We don't cache a
1536     # path for INSTALL within a source directory, because that will
1537     # break other packages using the cache if that directory is
1538     # removed, or if the path is relative.
1539     INSTALL="$ac_install_sh"
1540   fi
1541 fi
1542 echo "$ac_t""$INSTALL" 1>&6
1543
1544 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1545 # It thinks the first close brace ends the variable substitution.
1546 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1547
1548 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1549
1550 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1551
1552
1553 # Hack
1554 ac_given_INSTALL=$INSTALL
1555
1556 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1557 echo "configure:1558: checking whether to enable maintainer-specific portions of Makefiles" >&5
1558     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1559 if test "${enable_maintainer_mode+set}" = set; then
1560   enableval="$enable_maintainer_mode"
1561   USE_MAINTAINER_MODE=$enableval
1562 else
1563   USE_MAINTAINER_MODE=no
1564 fi
1565
1566   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1567   
1568
1569 if test $USE_MAINTAINER_MODE = yes; then
1570   MAINTAINER_MODE_TRUE=
1571   MAINTAINER_MODE_FALSE='#'
1572 else
1573   MAINTAINER_MODE_TRUE='#'
1574   MAINTAINER_MODE_FALSE=
1575 fi
1576   MAINT=$MAINTAINER_MODE_TRUE
1577   
1578
1579
1580 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
1581 # at least currently, we never actually build a program, so we never
1582 # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
1583 # fails, because we are probably configuring with a cross compiler
1584 # which can't create executables.  So we include AC_EXEEXT to keep
1585 # automake happy, but we don't execute it, since we don't care about
1586 # the result.
1587 if false; then
1588   
1589
1590 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1591 echo "configure:1592: checking for executable suffix" >&5
1592 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1593   echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1596   ac_cv_exeext=.exe
1597 else
1598   rm -f conftest*
1599   echo 'int main () { return 0; }' > conftest.$ac_ext
1600   ac_cv_exeext=
1601   if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1602     for file in conftest.*; do
1603       case $file in
1604       *.c | *.o | *.obj) ;;
1605       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1606       esac
1607     done
1608   else
1609     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1610   fi
1611   rm -f conftest*
1612   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1613 fi
1614 fi
1615
1616 EXEEXT=""
1617 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1618 echo "$ac_t""${ac_cv_exeext}" 1>&6
1619 ac_exeext=$EXEEXT
1620
1621 fi
1622
1623 . ${newlib_basedir}/configure.host
1624
1625 newlib_cflags="${newlib_cflags} -fno-builtin"
1626
1627 NEWLIB_CFLAGS=${newlib_cflags}
1628
1629
1630 LDFLAGS=${ldflags}
1631
1632
1633
1634
1635 if test x${newlib_elix_level} = x0; then
1636   ELIX_LEVEL_0_TRUE=
1637   ELIX_LEVEL_0_FALSE='#'
1638 else
1639   ELIX_LEVEL_0_TRUE='#'
1640   ELIX_LEVEL_0_FALSE=
1641 fi
1642
1643
1644 if test x${newlib_elix_level} = x1; then
1645   ELIX_LEVEL_1_TRUE=
1646   ELIX_LEVEL_1_FALSE='#'
1647 else
1648   ELIX_LEVEL_1_TRUE='#'
1649   ELIX_LEVEL_1_FALSE=
1650 fi
1651
1652
1653 if test x${newlib_elix_level} = x2; then
1654   ELIX_LEVEL_2_TRUE=
1655   ELIX_LEVEL_2_FALSE='#'
1656 else
1657   ELIX_LEVEL_2_TRUE='#'
1658   ELIX_LEVEL_2_FALSE=
1659 fi
1660
1661
1662 if test x${newlib_elix_level} = x3; then
1663   ELIX_LEVEL_3_TRUE=
1664   ELIX_LEVEL_3_FALSE='#'
1665 else
1666   ELIX_LEVEL_3_TRUE='#'
1667   ELIX_LEVEL_3_FALSE=
1668 fi
1669
1670
1671 if test x${newlib_elix_level} = x4; then
1672   ELIX_LEVEL_4_TRUE=
1673   ELIX_LEVEL_4_FALSE='#'
1674 else
1675   ELIX_LEVEL_4_TRUE='#'
1676   ELIX_LEVEL_4_FALSE=
1677 fi
1678
1679
1680
1681 if test x${use_libtool} = xyes; then
1682   USE_LIBTOOL_TRUE=
1683   USE_LIBTOOL_FALSE='#'
1684 else
1685   USE_LIBTOOL_TRUE='#'
1686   USE_LIBTOOL_FALSE=
1687 fi
1688
1689 # Hard-code OBJEXT.  Normally it is set by AC_OBJEXT, but we
1690 # use oext, which is set in configure.host based on the target platform.
1691 OBJEXT=${oext}
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702 # AC_CACHE_VAL(ac_cv_path_install,
1703 # [  IFS="${IFS=  }"; ac_save_IFS="$IFS"; IFS=":"
1704 #   for ac_dir in $PATH; do
1705 #     # Account for people who put trailing slashes in PATH elements.
1706 #     case "$ac_dir/" in
1707 #     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1708 #     *)
1709 #       # OSF1 and SCO ODT 3.0 have their own names for install.
1710 #       # Don't use installbsd from OSF since it installs stuff as root
1711 #       # by default.
1712 #       for ac_prog in ginstall scoinst install; do
1713 #         if test -f $ac_dir/$ac_prog; then
1714 #           if test $ac_prog = install &&
1715 #             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1716 #             # AIX install.  It has an incompatible calling convention.
1717 #             :
1718 #           else
1719 #             ac_cv_path_install="$ac_dir/$ac_prog -c"
1720 #             break 2
1721 #           fi
1722 #         fi
1723 #       done
1724 #       ;;
1725 #     esac
1726 #   done
1727 #   IFS="$ac_save_IFS"
1728 # ])dnl
1729
1730 if test "${use_libtool}" = "yes"; then
1731
1732 # Check whether --enable-shared or --disable-shared was given.
1733 if test "${enable_shared+set}" = set; then
1734   enableval="$enable_shared"
1735   p=${PACKAGE-default}
1736 case $enableval in
1737 yes) enable_shared=yes ;;
1738 no) enable_shared=no ;;
1739 *)
1740   enable_shared=no
1741   # Look at the argument we got.  We use all the common list separators.
1742   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1743   for pkg in $enableval; do
1744     if test "X$pkg" = "X$p"; then
1745       enable_shared=yes
1746     fi
1747   done
1748   IFS="$ac_save_ifs"
1749   ;;
1750 esac
1751 else
1752   enable_shared=yes
1753 fi
1754
1755 # Check whether --enable-static or --disable-static was given.
1756 if test "${enable_static+set}" = set; then
1757   enableval="$enable_static"
1758   p=${PACKAGE-default}
1759 case $enableval in
1760 yes) enable_static=yes ;;
1761 no) enable_static=no ;;
1762 *)
1763   enable_static=no
1764   # Look at the argument we got.  We use all the common list separators.
1765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1766   for pkg in $enableval; do
1767     if test "X$pkg" = "X$p"; then
1768       enable_static=yes
1769     fi
1770   done
1771   IFS="$ac_save_ifs"
1772   ;;
1773 esac
1774 else
1775   enable_static=yes
1776 fi
1777
1778 # Check whether --enable-fast-install or --disable-fast-install was given.
1779 if test "${enable_fast_install+set}" = set; then
1780   enableval="$enable_fast_install"
1781   p=${PACKAGE-default}
1782 case $enableval in
1783 yes) enable_fast_install=yes ;;
1784 no) enable_fast_install=no ;;
1785 *)
1786   enable_fast_install=no
1787   # Look at the argument we got.  We use all the common list separators.
1788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1789   for pkg in $enableval; do
1790     if test "X$pkg" = "X$p"; then
1791       enable_fast_install=yes
1792     fi
1793   done
1794   IFS="$ac_save_ifs"
1795   ;;
1796 esac
1797 else
1798   enable_fast_install=yes
1799 fi
1800
1801 # Extract the first word of "gcc", so it can be a program name with args.
1802 set dummy gcc; ac_word=$2
1803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1804 echo "configure:1805: checking for $ac_word" >&5
1805 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1806   echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808   if test -n "$CC"; then
1809   ac_cv_prog_CC="$CC" # Let the user override the test.
1810 else
1811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1812   ac_dummy="$PATH"
1813   for ac_dir in $ac_dummy; do
1814     test -z "$ac_dir" && ac_dir=.
1815     if test -f $ac_dir/$ac_word; then
1816       ac_cv_prog_CC="gcc"
1817       break
1818     fi
1819   done
1820   IFS="$ac_save_ifs"
1821 fi
1822 fi
1823 CC="$ac_cv_prog_CC"
1824 if test -n "$CC"; then
1825   echo "$ac_t""$CC" 1>&6
1826 else
1827   echo "$ac_t""no" 1>&6
1828 fi
1829
1830 if test -z "$CC"; then
1831   # Extract the first word of "cc", so it can be a program name with args.
1832 set dummy cc; ac_word=$2
1833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1834 echo "configure:1835: checking for $ac_word" >&5
1835 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1836   echo $ac_n "(cached) $ac_c" 1>&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1842   ac_prog_rejected=no
1843   ac_dummy="$PATH"
1844   for ac_dir in $ac_dummy; do
1845     test -z "$ac_dir" && ac_dir=.
1846     if test -f $ac_dir/$ac_word; then
1847       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1848         ac_prog_rejected=yes
1849         continue
1850       fi
1851       ac_cv_prog_CC="cc"
1852       break
1853     fi
1854   done
1855   IFS="$ac_save_ifs"
1856 if test $ac_prog_rejected = yes; then
1857   # We found a bogon in the path, so make sure we never use it.
1858   set dummy $ac_cv_prog_CC
1859   shift
1860   if test $# -gt 0; then
1861     # We chose a different compiler from the bogus one.
1862     # However, it has the same basename, so the bogon will be chosen
1863     # first if we set CC to just the basename; use the full file name.
1864     shift
1865     set dummy "$ac_dir/$ac_word" "$@"
1866     shift
1867     ac_cv_prog_CC="$@"
1868   fi
1869 fi
1870 fi
1871 fi
1872 CC="$ac_cv_prog_CC"
1873 if test -n "$CC"; then
1874   echo "$ac_t""$CC" 1>&6
1875 else
1876   echo "$ac_t""no" 1>&6
1877 fi
1878
1879   if test -z "$CC"; then
1880     case "`uname -s`" in
1881     *win32* | *WIN32*)
1882       # Extract the first word of "cl", so it can be a program name with args.
1883 set dummy cl; ac_word=$2
1884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1885 echo "configure:1886: checking for $ac_word" >&5
1886 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1887   echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889   if test -n "$CC"; then
1890   ac_cv_prog_CC="$CC" # Let the user override the test.
1891 else
1892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1893   ac_dummy="$PATH"
1894   for ac_dir in $ac_dummy; do
1895     test -z "$ac_dir" && ac_dir=.
1896     if test -f $ac_dir/$ac_word; then
1897       ac_cv_prog_CC="cl"
1898       break
1899     fi
1900   done
1901   IFS="$ac_save_ifs"
1902 fi
1903 fi
1904 CC="$ac_cv_prog_CC"
1905 if test -n "$CC"; then
1906   echo "$ac_t""$CC" 1>&6
1907 else
1908   echo "$ac_t""no" 1>&6
1909 fi
1910  ;;
1911     esac
1912   fi
1913   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1914 fi
1915
1916 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1917 echo "configure:1918: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1918
1919 ac_ext=c
1920 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1921 ac_cpp='$CPP $CPPFLAGS'
1922 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1923 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1924 cross_compiling=$ac_cv_prog_cc_cross
1925
1926 cat > conftest.$ac_ext << EOF
1927
1928 #line 1929 "configure"
1929 #include "confdefs.h"
1930
1931 main(){return(0);}
1932 EOF
1933 if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1934   ac_cv_prog_cc_works=yes
1935   # If we can't run a trivial program, we are probably using a cross compiler.
1936   if (./conftest; exit) 2>/dev/null; then
1937     ac_cv_prog_cc_cross=no
1938   else
1939     ac_cv_prog_cc_cross=yes
1940   fi
1941 else
1942   echo "configure: failed program was:" >&5
1943   cat conftest.$ac_ext >&5
1944   ac_cv_prog_cc_works=no
1945 fi
1946 rm -fr conftest*
1947 ac_ext=c
1948 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1949 ac_cpp='$CPP $CPPFLAGS'
1950 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1951 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1952 cross_compiling=$ac_cv_prog_cc_cross
1953
1954 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1955 if test $ac_cv_prog_cc_works = no; then
1956   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1957 fi
1958 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1960 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1961 cross_compiling=$ac_cv_prog_cc_cross
1962
1963 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1964 echo "configure:1965: checking whether we are using GNU C" >&5
1965 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1966   echo $ac_n "(cached) $ac_c" 1>&6
1967 else
1968   cat > conftest.c <<EOF
1969 #ifdef __GNUC__
1970   yes;
1971 #endif
1972 EOF
1973 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1974   ac_cv_prog_gcc=yes
1975 else
1976   ac_cv_prog_gcc=no
1977 fi
1978 fi
1979
1980 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1981
1982 if test $ac_cv_prog_gcc = yes; then
1983   GCC=yes
1984 else
1985   GCC=
1986 fi
1987
1988 ac_test_CFLAGS="${CFLAGS+set}"
1989 ac_save_CFLAGS="$CFLAGS"
1990 CFLAGS=
1991 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1992 echo "configure:1993: checking whether ${CC-cc} accepts -g" >&5
1993 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1994   echo $ac_n "(cached) $ac_c" 1>&6
1995 else
1996   echo 'void f(){}' > conftest.c
1997 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1998   ac_cv_prog_cc_g=yes
1999 else
2000   ac_cv_prog_cc_g=no
2001 fi
2002 rm -f conftest*
2003
2004 fi
2005
2006 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2007 if test "$ac_test_CFLAGS" = set; then
2008   CFLAGS="$ac_save_CFLAGS"
2009 elif test $ac_cv_prog_cc_g = yes; then
2010   if test "$GCC" = yes; then
2011     CFLAGS="-g -O2"
2012   else
2013     CFLAGS="-g"
2014   fi
2015 else
2016   if test "$GCC" = yes; then
2017     CFLAGS="-O2"
2018   else
2019     CFLAGS=
2020   fi
2021 fi
2022
2023 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2024 if test "${with_gnu_ld+set}" = set; then
2025   withval="$with_gnu_ld"
2026   test "$withval" = no || with_gnu_ld=yes
2027 else
2028   with_gnu_ld=no
2029 fi
2030
2031 ac_prog=ld
2032 if test "$GCC" = yes; then
2033   # Check if gcc -print-prog-name=ld gives a path.
2034   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2035 echo "configure:2036: checking for ld used by GCC" >&5
2036   case $host in
2037   *-*-mingw*)
2038     # gcc leaves a trailing carriage return which upsets mingw
2039     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2040   *)
2041     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2042   esac
2043   case $ac_prog in
2044     # Accept absolute paths.
2045     [\\/]* | [A-Za-z]:[\\/]*)
2046       re_direlt='/[^/][^/]*/\.\./'
2047       # Canonicalize the path of ld
2048       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2049       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2050         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2051       done
2052       test -z "$LD" && LD="$ac_prog"
2053       ;;
2054   "")
2055     # If it fails, then pretend we aren't using GCC.
2056     ac_prog=ld
2057     ;;
2058   *)
2059     # If it is relative, then search for the first ld in PATH.
2060     with_gnu_ld=unknown
2061     ;;
2062   esac
2063 elif test "$with_gnu_ld" = yes; then
2064   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2065 echo "configure:2066: checking for GNU ld" >&5
2066 else
2067   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2068 echo "configure:2069: checking for non-GNU ld" >&5
2069 fi
2070 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
2071   echo $ac_n "(cached) $ac_c" 1>&6
2072 else
2073   if test -z "$LD"; then
2074   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2075   for ac_dir in $PATH; do
2076     test -z "$ac_dir" && ac_dir=.
2077     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2078       lt_cv_path_LD="$ac_dir/$ac_prog"
2079       # Check to see if the program is GNU ld.  I'd rather use --version,
2080       # but apparently some GNU ld's only accept -v.
2081       # Break only if it was the GNU/non-GNU ld that we prefer.
2082       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2083         test "$with_gnu_ld" != no && break
2084       else
2085         test "$with_gnu_ld" != yes && break
2086       fi
2087     fi
2088   done
2089   IFS="$ac_save_ifs"
2090 else
2091   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2092 fi
2093 fi
2094
2095 LD="$lt_cv_path_LD"
2096 if test -n "$LD"; then
2097   echo "$ac_t""$LD" 1>&6
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2102 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2103 echo "configure:2104: checking if the linker ($LD) is GNU ld" >&5
2104 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2108 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2109   lt_cv_prog_gnu_ld=yes
2110 else
2111   lt_cv_prog_gnu_ld=no
2112 fi
2113 fi
2114
2115 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
2116 with_gnu_ld=$lt_cv_prog_gnu_ld
2117
2118
2119 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
2120 echo "configure:2121: checking for $LD option to reload object files" >&5
2121 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   lt_cv_ld_reload_flag='-r'
2125 fi
2126
2127 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
2128 reload_flag=$lt_cv_ld_reload_flag
2129 test -n "$reload_flag" && reload_flag=" $reload_flag"
2130
2131 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2132 echo "configure:2133: checking for BSD-compatible nm" >&5
2133 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
2134   echo $ac_n "(cached) $ac_c" 1>&6
2135 else
2136   if test -n "$NM"; then
2137   # Let the user override the test.
2138   lt_cv_path_NM="$NM"
2139 else
2140   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2141   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2142     test -z "$ac_dir" && ac_dir=.
2143     tmp_nm=$ac_dir/${ac_tool_prefix}nm
2144     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2145       # Check to see if the nm accepts a BSD-compat flag.
2146       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2147       #   nm: unknown option "B" ignored
2148       # Tru64's nm complains that /dev/null is an invalid object file
2149       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2150         lt_cv_path_NM="$tmp_nm -B"
2151         break
2152       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2153         lt_cv_path_NM="$tmp_nm -p"
2154         break
2155       else
2156         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2157         continue # so that we can try to find one that supports BSD flags
2158       fi
2159     fi
2160   done
2161   IFS="$ac_save_ifs"
2162   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2163 fi
2164 fi
2165
2166 NM="$lt_cv_path_NM"
2167 echo "$ac_t""$NM" 1>&6
2168
2169 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2170 echo "configure:2171: checking whether ln -s works" >&5
2171 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2172   echo $ac_n "(cached) $ac_c" 1>&6
2173 else
2174   rm -f conftestdata
2175 if ln -s X conftestdata 2>/dev/null
2176 then
2177   rm -f conftestdata
2178   ac_cv_prog_LN_S="ln -s"
2179 else
2180   ac_cv_prog_LN_S=ln
2181 fi
2182 fi
2183 LN_S="$ac_cv_prog_LN_S"
2184 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2185   echo "$ac_t""yes" 1>&6
2186 else
2187   echo "$ac_t""no" 1>&6
2188 fi
2189
2190 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
2191 echo "configure:2192: checking how to recognise dependant libraries" >&5
2192 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   lt_cv_file_magic_cmd='$MAGIC_CMD'
2196 lt_cv_file_magic_test_file=
2197 lt_cv_deplibs_check_method='unknown'
2198 # Need to set the preceding variable on all platforms that support
2199 # interlibrary dependencies.
2200 # 'none' -- dependencies not supported.
2201 # `unknown' -- same as none, but documents that we really don't know.
2202 # 'pass_all' -- all dependencies passed with no checks.
2203 # 'test_compile' -- check by making test program.
2204 # 'file_magic [regex]' -- check by looking for files in library path
2205 # which responds to the $file_magic_cmd with a given egrep regex.
2206 # If you have `file' or equivalent on your system and you're not sure
2207 # whether `pass_all' will *always* work, you probably want this one.
2208
2209 case $host_os in
2210 aix*)
2211   lt_cv_deplibs_check_method=pass_all
2212   ;;
2213
2214 beos*)
2215   lt_cv_deplibs_check_method=pass_all
2216   ;;
2217
2218 bsdi4*)
2219   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
2220   lt_cv_file_magic_cmd='/usr/bin/file -L'
2221   lt_cv_file_magic_test_file=/shlib/libc.so
2222   ;;
2223
2224 cygwin* | mingw* |pw32*)
2225   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2226   lt_cv_file_magic_cmd='$OBJDUMP -f'
2227   ;;
2228
2229 darwin* | rhapsody*)
2230   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2231   lt_cv_file_magic_cmd='/usr/bin/file -L'
2232   case "$host_os" in
2233   rhapsody* | darwin1.012)
2234     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
2235     ;;
2236   *) # Darwin 1.3 on
2237     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2238     ;;
2239   esac
2240   ;;
2241
2242 freebsd* )
2243   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2244     case $host_cpu in
2245     i*86 )
2246       # Not sure whether the presence of OpenBSD here was a mistake.
2247       # Let's accept both of them until this is cleared up.
2248       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
2249       lt_cv_file_magic_cmd=/usr/bin/file
2250       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2251       ;;
2252     esac
2253   else
2254     lt_cv_deplibs_check_method=pass_all
2255   fi
2256   ;;
2257
2258 gnu*)
2259   lt_cv_deplibs_check_method=pass_all
2260   ;;
2261
2262 hpux10.20*|hpux11*)
2263   case $host_cpu in
2264   hppa*)
2265     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2266     lt_cv_file_magic_cmd=/usr/bin/file
2267     lt_cv_file_magic_test_file=/usr/lib/libc.sl
2268     ;;
2269   ia64*)
2270     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
2271     lt_cv_file_magic_cmd=/usr/bin/file
2272     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2273     ;;
2274   esac
2275   ;;
2276
2277 irix5* | irix6*)
2278   case $host_os in
2279   irix5*)
2280     # this will be overridden with pass_all, but let us keep it just in case
2281     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2282     ;;
2283   *)
2284     case $LD in
2285     *-32|*"-32 ") libmagic=32-bit;;
2286     *-n32|*"-n32 ") libmagic=N32;;
2287     *-64|*"-64 ") libmagic=64-bit;;
2288     *) libmagic=never-match;;
2289     esac
2290     # this will be overridden with pass_all, but let us keep it just in case
2291     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2292     ;;
2293   esac
2294   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2295   lt_cv_deplibs_check_method=pass_all
2296   ;;
2297
2298 # This must be Linux ELF.
2299 linux-gnu*)
2300   case $host_cpu in
2301   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2302     lt_cv_deplibs_check_method=pass_all ;;
2303   *)
2304     # glibc up to 2.1.1 does not perform some relocations on ARM
2305     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2306   esac
2307   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2308   ;;
2309
2310 netbsd*)
2311   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2312     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2313   else
2314     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2315   fi
2316   ;;
2317
2318 newsos6)
2319   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2320   lt_cv_file_magic_cmd=/usr/bin/file
2321   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2322   ;;
2323
2324 osf3* | osf4* | osf5*)
2325   # this will be overridden with pass_all, but let us keep it just in case
2326   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2327   lt_cv_file_magic_test_file=/shlib/libc.so
2328   lt_cv_deplibs_check_method=pass_all
2329   ;;
2330
2331 sco3.2v5*)
2332   lt_cv_deplibs_check_method=pass_all
2333   ;;
2334
2335 solaris*)
2336   lt_cv_deplibs_check_method=pass_all
2337   lt_cv_file_magic_test_file=/lib/libc.so
2338   ;;
2339
2340 sysv5uw[78]* | sysv4*uw2*)
2341   lt_cv_deplibs_check_method=pass_all
2342   ;;
2343
2344 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2345   case $host_vendor in
2346   ncr)
2347     lt_cv_deplibs_check_method=pass_all
2348     ;;
2349   motorola)
2350     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2351     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2352     ;;
2353   esac
2354   ;;
2355 esac
2356
2357 fi
2358
2359 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2360 file_magic_cmd=$lt_cv_file_magic_cmd
2361 deplibs_check_method=$lt_cv_deplibs_check_method
2362
2363 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2364 echo "configure:2365: checking for object suffix" >&5
2365 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2366   echo $ac_n "(cached) $ac_c" 1>&6
2367 else
2368   rm -f conftest*
2369 echo 'int i = 1;' > conftest.$ac_ext
2370 if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2371   for ac_file in conftest.*; do
2372     case $ac_file in
2373     *.c) ;;
2374     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2375     esac
2376   done
2377 else
2378   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2379 fi
2380 rm -f conftest*
2381 fi
2382
2383 echo "$ac_t""$ac_cv_objext" 1>&6
2384 OBJEXT=$ac_cv_objext
2385 ac_objext=$ac_cv_objext
2386
2387 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2388
2389 # Only perform the check for file, if the check method requires it
2390 case $deplibs_check_method in
2391 file_magic*)
2392   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2393     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2394 echo "configure:2395: checking for ${ac_tool_prefix}file" >&5
2395 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2396   echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398   case $MAGIC_CMD in
2399   /*)
2400   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2401   ;;
2402   ?:/*)
2403   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2404   ;;
2405   *)
2406   ac_save_MAGIC_CMD="$MAGIC_CMD"
2407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2408   ac_dummy="/usr/bin:$PATH"
2409   for ac_dir in $ac_dummy; do
2410     test -z "$ac_dir" && ac_dir=.
2411     if test -f $ac_dir/${ac_tool_prefix}file; then
2412       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2413       if test -n "$file_magic_test_file"; then
2414         case $deplibs_check_method in
2415         "file_magic "*)
2416           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2417           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2418           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2419             egrep "$file_magic_regex" > /dev/null; then
2420             :
2421           else
2422             cat <<EOF 1>&2
2423
2424 *** Warning: the command libtool uses to detect shared libraries,
2425 *** $file_magic_cmd, produces output that libtool cannot recognize.
2426 *** The result is that libtool may fail to recognize shared libraries
2427 *** as such.  This will affect the creation of libtool libraries that
2428 *** depend on shared libraries, but programs linked with such libtool
2429 *** libraries will work regardless of this problem.  Nevertheless, you
2430 *** may want to report the problem to your system manager and/or to
2431 *** bug-libtool@gnu.org
2432
2433 EOF
2434           fi ;;
2435         esac
2436       fi
2437       break
2438     fi
2439   done
2440   IFS="$ac_save_ifs"
2441   MAGIC_CMD="$ac_save_MAGIC_CMD"
2442   ;;
2443 esac
2444 fi
2445
2446 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2447 if test -n "$MAGIC_CMD"; then
2448   echo "$ac_t""$MAGIC_CMD" 1>&6
2449 else
2450   echo "$ac_t""no" 1>&6
2451 fi
2452
2453 if test -z "$lt_cv_path_MAGIC_CMD"; then
2454   if test -n "$ac_tool_prefix"; then
2455     echo $ac_n "checking for file""... $ac_c" 1>&6
2456 echo "configure:2457: checking for file" >&5
2457 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2458   echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460   case $MAGIC_CMD in
2461   /*)
2462   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2463   ;;
2464   ?:/*)
2465   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2466   ;;
2467   *)
2468   ac_save_MAGIC_CMD="$MAGIC_CMD"
2469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2470   ac_dummy="/usr/bin:$PATH"
2471   for ac_dir in $ac_dummy; do
2472     test -z "$ac_dir" && ac_dir=.
2473     if test -f $ac_dir/file; then
2474       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2475       if test -n "$file_magic_test_file"; then
2476         case $deplibs_check_method in
2477         "file_magic "*)
2478           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2479           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2480           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2481             egrep "$file_magic_regex" > /dev/null; then
2482             :
2483           else
2484             cat <<EOF 1>&2
2485
2486 *** Warning: the command libtool uses to detect shared libraries,
2487 *** $file_magic_cmd, produces output that libtool cannot recognize.
2488 *** The result is that libtool may fail to recognize shared libraries
2489 *** as such.  This will affect the creation of libtool libraries that
2490 *** depend on shared libraries, but programs linked with such libtool
2491 *** libraries will work regardless of this problem.  Nevertheless, you
2492 *** may want to report the problem to your system manager and/or to
2493 *** bug-libtool@gnu.org
2494
2495 EOF
2496           fi ;;
2497         esac
2498       fi
2499       break
2500     fi
2501   done
2502   IFS="$ac_save_ifs"
2503   MAGIC_CMD="$ac_save_MAGIC_CMD"
2504   ;;
2505 esac
2506 fi
2507
2508 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2509 if test -n "$MAGIC_CMD"; then
2510   echo "$ac_t""$MAGIC_CMD" 1>&6
2511 else
2512   echo "$ac_t""no" 1>&6
2513 fi
2514
2515   else
2516     MAGIC_CMD=:
2517   fi
2518 fi
2519
2520   fi
2521   ;;
2522 esac
2523
2524 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2525 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2527 echo "configure:2528: checking for $ac_word" >&5
2528 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2529   echo $ac_n "(cached) $ac_c" 1>&6
2530 else
2531   if test -n "$RANLIB"; then
2532   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2533 else
2534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2535   ac_dummy="$PATH"
2536   for ac_dir in $ac_dummy; do
2537     test -z "$ac_dir" && ac_dir=.
2538     if test -f $ac_dir/$ac_word; then
2539       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2540       break
2541     fi
2542   done
2543   IFS="$ac_save_ifs"
2544 fi
2545 fi
2546 RANLIB="$ac_cv_prog_RANLIB"
2547 if test -n "$RANLIB"; then
2548   echo "$ac_t""$RANLIB" 1>&6
2549 else
2550   echo "$ac_t""no" 1>&6
2551 fi
2552
2553
2554 if test -z "$ac_cv_prog_RANLIB"; then
2555 if test -n "$ac_tool_prefix"; then
2556   # Extract the first word of "ranlib", so it can be a program name with args.
2557 set dummy ranlib; ac_word=$2
2558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2559 echo "configure:2560: checking for $ac_word" >&5
2560 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2561   echo $ac_n "(cached) $ac_c" 1>&6
2562 else
2563   if test -n "$RANLIB"; then
2564   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2565 else
2566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2567   ac_dummy="$PATH"
2568   for ac_dir in $ac_dummy; do
2569     test -z "$ac_dir" && ac_dir=.
2570     if test -f $ac_dir/$ac_word; then
2571       ac_cv_prog_RANLIB="ranlib"
2572       break
2573     fi
2574   done
2575   IFS="$ac_save_ifs"
2576   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2577 fi
2578 fi
2579 RANLIB="$ac_cv_prog_RANLIB"
2580 if test -n "$RANLIB"; then
2581   echo "$ac_t""$RANLIB" 1>&6
2582 else
2583   echo "$ac_t""no" 1>&6
2584 fi
2585
2586 else
2587   RANLIB=":"
2588 fi
2589 fi
2590
2591 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2592 set dummy ${ac_tool_prefix}strip; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   if test -n "$STRIP"; then
2599   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2600 else
2601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2602   ac_dummy="$PATH"
2603   for ac_dir in $ac_dummy; do
2604     test -z "$ac_dir" && ac_dir=.
2605     if test -f $ac_dir/$ac_word; then
2606       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2607       break
2608     fi
2609   done
2610   IFS="$ac_save_ifs"
2611 fi
2612 fi
2613 STRIP="$ac_cv_prog_STRIP"
2614 if test -n "$STRIP"; then
2615   echo "$ac_t""$STRIP" 1>&6
2616 else
2617   echo "$ac_t""no" 1>&6
2618 fi
2619
2620
2621 if test -z "$ac_cv_prog_STRIP"; then
2622 if test -n "$ac_tool_prefix"; then
2623   # Extract the first word of "strip", so it can be a program name with args.
2624 set dummy strip; ac_word=$2
2625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2626 echo "configure:2627: checking for $ac_word" >&5
2627 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2628   echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630   if test -n "$STRIP"; then
2631   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2632 else
2633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2634   ac_dummy="$PATH"
2635   for ac_dir in $ac_dummy; do
2636     test -z "$ac_dir" && ac_dir=.
2637     if test -f $ac_dir/$ac_word; then
2638       ac_cv_prog_STRIP="strip"
2639       break
2640     fi
2641   done
2642   IFS="$ac_save_ifs"
2643   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2644 fi
2645 fi
2646 STRIP="$ac_cv_prog_STRIP"
2647 if test -n "$STRIP"; then
2648   echo "$ac_t""$STRIP" 1>&6
2649 else
2650   echo "$ac_t""no" 1>&6
2651 fi
2652
2653 else
2654   STRIP=":"
2655 fi
2656 fi
2657
2658
2659 # Check for any special flags to pass to ltconfig.
2660 libtool_flags="--cache-file=$cache_file"
2661 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2662 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2663 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2664 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2665 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2666
2667 libtool_flags="$libtool_flags --enable-win32-dll"
2668 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2669 if test "${enable_libtool_lock+set}" = set; then
2670   enableval="$enable_libtool_lock"
2671   :
2672 fi
2673
2674 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2675 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2676
2677 # Check whether --with-pic or --without-pic was given.
2678 if test "${with_pic+set}" = set; then
2679   withval="$with_pic"
2680   pic_mode="$withval"
2681 else
2682   pic_mode=default
2683 fi
2684
2685 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2686 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2687
2688 # Some flags need to be propagated to the compiler or linker for good
2689 # libtool support.
2690 case $host in
2691 *-*-irix6*)
2692   # Find out which ABI we are using.
2693   echo '#line 2694 "configure"' > conftest.$ac_ext
2694   if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2695     case `/usr/bin/file conftest.$ac_objext` in
2696     *32-bit*)
2697       LD="${LD-ld} -32"
2698       ;;
2699     *N32*)
2700       LD="${LD-ld} -n32"
2701       ;;
2702     *64-bit*)
2703       LD="${LD-ld} -64"
2704       ;;
2705     esac
2706   fi
2707   rm -rf conftest*
2708   ;;
2709
2710 ia64-*-hpux*)
2711   # Find out which ABI we are using.
2712   echo 'int i;' > conftest.$ac_ext
2713   if { (eval echo configure:2714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2714     case "`/usr/bin/file conftest.o`" in
2715     *ELF-32*)
2716       HPUX_IA64_MODE="32"
2717       ;;
2718     *ELF-64*)
2719       HPUX_IA64_MODE="64"
2720       ;;
2721     esac
2722   fi
2723   rm -rf conftest*
2724   ;;
2725
2726 *-*-sco3.2v5*)
2727   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2728   SAVE_CFLAGS="$CFLAGS"
2729   CFLAGS="$CFLAGS -belf"
2730   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2731 echo "configure:2732: checking whether the C compiler needs -belf" >&5
2732 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2733   echo $ac_n "(cached) $ac_c" 1>&6
2734 else
2735   
2736      ac_ext=c
2737 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2738 ac_cpp='$CPP $CPPFLAGS'
2739 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2740 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2741 cross_compiling=$ac_cv_prog_cc_cross
2742
2743      cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746
2747 int main() {
2748
2749 ; return 0; }
2750 EOF
2751 if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2752   rm -rf conftest*
2753   lt_cv_cc_needs_belf=yes
2754 else
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757   rm -rf conftest*
2758   lt_cv_cc_needs_belf=no
2759 fi
2760 rm -f conftest*
2761      ac_ext=c
2762 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2763 ac_cpp='$CPP $CPPFLAGS'
2764 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2765 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2766 cross_compiling=$ac_cv_prog_cc_cross
2767
2768 fi
2769
2770 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2771   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2772     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2773     CFLAGS="$SAVE_CFLAGS"
2774   fi
2775   ;;
2776
2777 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
2778   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2779 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2781 echo "configure:2782: checking for $ac_word" >&5
2782 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   if test -n "$DLLTOOL"; then
2786   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2787 else
2788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2789   ac_dummy="$PATH"
2790   for ac_dir in $ac_dummy; do
2791     test -z "$ac_dir" && ac_dir=.
2792     if test -f $ac_dir/$ac_word; then
2793       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2794       break
2795     fi
2796   done
2797   IFS="$ac_save_ifs"
2798 fi
2799 fi
2800 DLLTOOL="$ac_cv_prog_DLLTOOL"
2801 if test -n "$DLLTOOL"; then
2802   echo "$ac_t""$DLLTOOL" 1>&6
2803 else
2804   echo "$ac_t""no" 1>&6
2805 fi
2806
2807
2808 if test -z "$ac_cv_prog_DLLTOOL"; then
2809 if test -n "$ac_tool_prefix"; then
2810   # Extract the first word of "dlltool", so it can be a program name with args.
2811 set dummy dlltool; ac_word=$2
2812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2813 echo "configure:2814: checking for $ac_word" >&5
2814 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2815   echo $ac_n "(cached) $ac_c" 1>&6
2816 else
2817   if test -n "$DLLTOOL"; then
2818   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2819 else
2820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2821   ac_dummy="$PATH"
2822   for ac_dir in $ac_dummy; do
2823     test -z "$ac_dir" && ac_dir=.
2824     if test -f $ac_dir/$ac_word; then
2825       ac_cv_prog_DLLTOOL="dlltool"
2826       break
2827     fi
2828   done
2829   IFS="$ac_save_ifs"
2830   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2831 fi
2832 fi
2833 DLLTOOL="$ac_cv_prog_DLLTOOL"
2834 if test -n "$DLLTOOL"; then
2835   echo "$ac_t""$DLLTOOL" 1>&6
2836 else
2837   echo "$ac_t""no" 1>&6
2838 fi
2839
2840 else
2841   DLLTOOL="false"
2842 fi
2843 fi
2844
2845   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2846 set dummy ${ac_tool_prefix}as; ac_word=$2
2847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2848 echo "configure:2849: checking for $ac_word" >&5
2849 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2850   echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852   if test -n "$AS"; then
2853   ac_cv_prog_AS="$AS" # Let the user override the test.
2854 else
2855   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2856   ac_dummy="$PATH"
2857   for ac_dir in $ac_dummy; do
2858     test -z "$ac_dir" && ac_dir=.
2859     if test -f $ac_dir/$ac_word; then
2860       ac_cv_prog_AS="${ac_tool_prefix}as"
2861       break
2862     fi
2863   done
2864   IFS="$ac_save_ifs"
2865 fi
2866 fi
2867 AS="$ac_cv_prog_AS"
2868 if test -n "$AS"; then
2869   echo "$ac_t""$AS" 1>&6
2870 else
2871   echo "$ac_t""no" 1>&6
2872 fi
2873
2874
2875 if test -z "$ac_cv_prog_AS"; then
2876 if test -n "$ac_tool_prefix"; then
2877   # Extract the first word of "as", so it can be a program name with args.
2878 set dummy as; ac_word=$2
2879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2880 echo "configure:2881: checking for $ac_word" >&5
2881 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   if test -n "$AS"; then
2885   ac_cv_prog_AS="$AS" # Let the user override the test.
2886 else
2887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2888   ac_dummy="$PATH"
2889   for ac_dir in $ac_dummy; do
2890     test -z "$ac_dir" && ac_dir=.
2891     if test -f $ac_dir/$ac_word; then
2892       ac_cv_prog_AS="as"
2893       break
2894     fi
2895   done
2896   IFS="$ac_save_ifs"
2897   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
2898 fi
2899 fi
2900 AS="$ac_cv_prog_AS"
2901 if test -n "$AS"; then
2902   echo "$ac_t""$AS" 1>&6
2903 else
2904   echo "$ac_t""no" 1>&6
2905 fi
2906
2907 else
2908   AS="false"
2909 fi
2910 fi
2911
2912   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
2913 set dummy ${ac_tool_prefix}objdump; ac_word=$2
2914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2915 echo "configure:2916: checking for $ac_word" >&5
2916 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
2917   echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919   if test -n "$OBJDUMP"; then
2920   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
2921 else
2922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2923   ac_dummy="$PATH"
2924   for ac_dir in $ac_dummy; do
2925     test -z "$ac_dir" && ac_dir=.
2926     if test -f $ac_dir/$ac_word; then
2927       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
2928       break
2929     fi
2930   done
2931   IFS="$ac_save_ifs"
2932 fi
2933 fi
2934 OBJDUMP="$ac_cv_prog_OBJDUMP"
2935 if test -n "$OBJDUMP"; then
2936   echo "$ac_t""$OBJDUMP" 1>&6
2937 else
2938   echo "$ac_t""no" 1>&6
2939 fi
2940
2941
2942 if test -z "$ac_cv_prog_OBJDUMP"; then
2943 if test -n "$ac_tool_prefix"; then
2944   # Extract the first word of "objdump", so it can be a program name with args.
2945 set dummy objdump; ac_word=$2
2946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2947 echo "configure:2948: checking for $ac_word" >&5
2948 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   if test -n "$OBJDUMP"; then
2952   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
2953 else
2954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2955   ac_dummy="$PATH"
2956   for ac_dir in $ac_dummy; do
2957     test -z "$ac_dir" && ac_dir=.
2958     if test -f $ac_dir/$ac_word; then
2959       ac_cv_prog_OBJDUMP="objdump"
2960       break
2961     fi
2962   done
2963   IFS="$ac_save_ifs"
2964   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
2965 fi
2966 fi
2967 OBJDUMP="$ac_cv_prog_OBJDUMP"
2968 if test -n "$OBJDUMP"; then
2969   echo "$ac_t""$OBJDUMP" 1>&6
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973
2974 else
2975   OBJDUMP="false"
2976 fi
2977 fi
2978
2979
2980   # recent cygwin and mingw systems supply a stub DllMain which the user
2981   # can override, but on older systems we have to supply one
2982   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
2983 echo "configure:2984: checking if libtool should supply DllMain function" >&5
2984 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990
2991 int main() {
2992 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
2993       DllMain (0, 0, 0);
2994 ; return 0; }
2995 EOF
2996 if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2997   rm -rf conftest*
2998   lt_cv_need_dllmain=no
2999 else
3000   echo "configure: failed program was:" >&5
3001   cat conftest.$ac_ext >&5
3002   rm -rf conftest*
3003   lt_cv_need_dllmain=yes
3004 fi
3005 rm -f conftest*
3006 fi
3007
3008 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
3009
3010   case $host/$CC in
3011   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
3012     # old mingw systems require "-dll" to link a DLL, while more recent ones
3013     # require "-mdll"
3014     SAVE_CFLAGS="$CFLAGS"
3015     CFLAGS="$CFLAGS -mdll"
3016     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
3017 echo "configure:3018: checking how to link DLLs" >&5
3018 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
3019   echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021   cat > conftest.$ac_ext <<EOF
3022 #line 3023 "configure"
3023 #include "confdefs.h"
3024
3025 int main() {
3026
3027 ; return 0; }
3028 EOF
3029 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3030   rm -rf conftest*
3031   lt_cv_cc_dll_switch=-mdll
3032 else
3033   echo "configure: failed program was:" >&5
3034   cat conftest.$ac_ext >&5
3035   rm -rf conftest*
3036   lt_cv_cc_dll_switch=-dll
3037 fi
3038 rm -f conftest*
3039 fi
3040
3041 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
3042     CFLAGS="$SAVE_CFLAGS" ;;
3043   *-*-cygwin* | *-*-pw32*)
3044     # cygwin systems need to pass --dll to the linker, and not link
3045     # crt.o which will require a WinMain@16 definition.
3046     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
3047   esac
3048   ;;
3049   
3050 esac
3051
3052
3053 # Save cache, so that ltconfig can load it
3054 cat > confcache <<\EOF
3055 # This file is a shell script that caches the results of configure
3056 # tests run on this system so they can be shared between configure
3057 # scripts and configure runs.  It is not useful on other systems.
3058 # If it contains results you don't want to keep, you may remove or edit it.
3059 #
3060 # By default, configure uses ./config.cache as the cache file,
3061 # creating it if it does not exist already.  You can give configure
3062 # the --cache-file=FILE option to use a different cache file; that is
3063 # what configure does when it calls configure scripts in
3064 # subdirectories, so they share the cache.
3065 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3066 # config.status only pays attention to the cache file if you give it the
3067 # --recheck option to rerun configure.
3068 #
3069 EOF
3070 # The following way of writing the cache mishandles newlines in values,
3071 # but we know of no workaround that is simple, portable, and efficient.
3072 # So, don't put newlines in cache variables' values.
3073 # Ultrix sh set writes to stderr and can't be redirected directly,
3074 # and sets the high bit in the cache file unless we assign to the vars.
3075 (set) 2>&1 |
3076   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3077   *ac_space=\ *)
3078     # `set' does not quote correctly, so add quotes (double-quote substitution
3079     # turns \\\\ into \\, and sed turns \\ into \).
3080     sed -n \
3081       -e "s/'/'\\\\''/g" \
3082       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3083     ;;
3084   *)
3085     # `set' quotes correctly as required by POSIX, so do not add quotes.
3086     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3087     ;;
3088   esac >> confcache
3089 if cmp -s $cache_file confcache; then
3090   :
3091 else
3092   if test -w $cache_file; then
3093     echo "updating cache $cache_file"
3094     cat confcache > $cache_file
3095   else
3096     echo "not updating unwritable cache $cache_file"
3097   fi
3098 fi
3099 rm -f confcache
3100
3101
3102 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3103 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3104 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3105 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3106 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
3107 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
3108 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
3109 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3110 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
3111 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3112
3113 # Reload cache, that may have been modified by ltconfig
3114 if test -r "$cache_file"; then
3115   echo "loading cache $cache_file"
3116   . $cache_file
3117 else
3118   echo "creating cache $cache_file"
3119   > $cache_file
3120 fi
3121
3122
3123 # This can be used to rebuild libtool when needed
3124 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
3125
3126 # Always use our own libtool.
3127 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3128
3129 # Redirect the config.log output again, so that the ltconfig log is not
3130 # clobbered by the next message.
3131 exec 5>>./config.log
3132
3133   
3134
3135   
3136          
3137          
3138 for ac_prog in mawk gawk nawk awk
3139 do
3140 # Extract the first word of "$ac_prog", so it can be a program name with args.
3141 set dummy $ac_prog; ac_word=$2
3142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3143 echo "configure:3144: checking for $ac_word" >&5
3144 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   if test -n "$AWK"; then
3148   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3149 else
3150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3151   ac_dummy="$PATH"
3152   for ac_dir in $ac_dummy; do
3153     test -z "$ac_dir" && ac_dir=.
3154     if test -f $ac_dir/$ac_word; then
3155       ac_cv_prog_AWK="$ac_prog"
3156       break
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160 fi
3161 fi
3162 AWK="$ac_cv_prog_AWK"
3163 if test -n "$AWK"; then
3164   echo "$ac_t""$AWK" 1>&6
3165 else
3166   echo "$ac_t""no" 1>&6
3167 fi
3168
3169 test -n "$AWK" && break
3170 done
3171
3172 fi
3173
3174 configdirs="libc libm"
3175
3176 # Check whether --enable-newlib_hw_fp or --disable-newlib_hw_fp was given.
3177 if test "${enable_newlib_hw_fp+set}" = set; then
3178   enableval="$enable_newlib_hw_fp"
3179   case "${enableval}" in
3180    yes) newlib_hw_fp=true ;;
3181    no)  newlib_hw_fp=false ;;
3182    *) { echo "configure: error: bad value ${enableval} for --enable-newlib-hw-fp" 1>&2; exit 1; } ;;
3183  esac
3184 else
3185   newlib_hw_fp=false
3186 fi
3187
3188
3189
3190 if test x$newlib_hw_fp = xtrue; then
3191   NEWLIB_HW_FP_TRUE=
3192   NEWLIB_HW_FP_FALSE='#'
3193 else
3194   NEWLIB_HW_FP_TRUE='#'
3195   NEWLIB_HW_FP_FALSE=
3196 fi
3197
3198 if test -z "${with_multisubdir}"; then
3199   configdirs="${configdirs} doc"
3200   have_doc=yes
3201 else
3202   have_doc=
3203 fi
3204
3205
3206 if test x$have_doc = xyes; then
3207   HAVE_DOC_TRUE=
3208   HAVE_DOC_FALSE='#'
3209 else
3210   HAVE_DOC_TRUE='#'
3211   HAVE_DOC_FALSE=
3212 fi
3213
3214 EXTRA_DIRS=
3215 case $host in
3216   i[34567]86-pc-linux-*)
3217         configdirs="${configdirs} iconvdata"
3218         EXTRA_DIRS=iconvdata
3219         ;;
3220 esac
3221
3222
3223 # These get added in the top-level configure.in, except in the case where
3224 # newlib is being built natively.
3225 LIBC_INCLUDE_GREP=`echo ${CC} | grep \/libc\/include`
3226 abs_newlib_basedir=`cd ${newlib_basedir} && pwd`
3227 if test -z "${LIBC_INCLUDE_GREP}"; then
3228   CC_FOR_NEWLIB="${CC} -I$PWD/targ-include -I${abs_newlib_basedir}/libc/include"
3229 else
3230   CC_FOR_NEWLIB="${CC}"
3231 fi
3232
3233
3234 subdirs="${configdirs}"
3235
3236
3237 CRT0=
3238 CRT0_DIR=
3239 if test "x${have_crt0}" = "xyes"; then
3240   CRT0=crt0.o
3241   CRT0_DIR=libc/
3242 fi
3243
3244
3245
3246 CRT1=${crt1}
3247 CRT1_DIR=
3248 if test -n "${crt1_dir}"; then
3249   CRT1_DIR=${crt1_dir}/
3250 fi
3251
3252
3253
3254 if test -n "${libm_machine_dir}"; then
3255   LIBM_MACHINE_OBJECTLIST=libm/machine/${libm_machine_dir}/objectlist.awk.in
3256 fi
3257
3258
3259 if test -n "${machine_dir}"; then
3260   MACHINE_OBJECTLIST=libc/machine/${machine_dir}/objectlist.awk.in
3261 fi
3262
3263
3264 if test -n "${sys_dir}"; then
3265   SYS_OBJECTLIST=libc/sys/${sys_dir}/objectlist.awk.in
3266 fi
3267
3268
3269 if test "${have_sys_mach_dir}" = "yes"; then
3270   SYS_MACH_OBJECTLIST=libc/sys/${sys_dir}/machine/${machine_dir}/objectlist.awk.in
3271 fi
3272
3273
3274 if test -n "${posix_dir}"; then
3275   POSIX_OBJECTLIST=libc/${posix_dir}/objectlist.awk.in
3276 fi
3277
3278
3279 if test -n "${signal_dir}"; then
3280   SIGNAL_OBJECTLIST=libc/${signal_dir}/objectlist.awk.in
3281 fi
3282
3283
3284 if test -n "${syscall_dir}"; then
3285   SYSCALL_OBJECTLIST=libc/${syscall_dir}/objectlist.awk.in
3286 fi
3287
3288
3289 if test -n "${unix_dir}"; then
3290   UNIX_OBJECTLIST=libc/${unix_dir}/objectlist.awk.in
3291 fi
3292
3293
3294 if test -n "${stdio64_dir}"; then
3295   STDIO64_OBJECTLIST=libc/${stdio64_dir}/objectlist.awk.in
3296 fi
3297
3298
3299 # Put a plausible default for CC_FOR_BUILD in Makefile.
3300 if test -z "$CC_FOR_BUILD"; then
3301   CC_FOR_BUILD=gcc
3302 fi
3303
3304
3305 if test "${newlib_elix_level}" -gt "0"; then
3306 cat >> confdefs.h <<EOF
3307 #define _ELIX_LEVEL ${newlib_elix_level}
3308 EOF
3309
3310 fi
3311
3312 if test "${newlib_io_long_long}" = "yes"; then
3313 cat >> confdefs.h <<EOF
3314 #define _WANT_IO_LONG_LONG 1
3315 EOF
3316
3317 fi
3318
3319 if test "${newlib_io_long_double}" = "yes"; then
3320 cat >> confdefs.h <<EOF
3321 #define _WANT_IO_LONG_DOUBLE 1
3322 EOF
3323
3324 fi
3325
3326 if test "${newlib_io_pos_args}" = "yes"; then
3327 cat >> confdefs.h <<EOF
3328 #define _WANT_IO_POS_ARGS 1
3329 EOF
3330
3331 fi
3332
3333 if test "${newlib_mb}" = "yes"; then
3334 cat >> confdefs.h <<EOF
3335 #define _MB_CAPABLE 1
3336 EOF
3337
3338 cat >> confdefs.h <<EOF
3339 #define _MB_LEN_MAX 8
3340 EOF
3341
3342 else
3343 cat >> confdefs.h <<EOF
3344 #define _MB_LEN_MAX 1
3345 EOF
3346
3347 fi
3348
3349 if test "${newlib_iconv_external_ccs}" = "yes"; then
3350 cat >> confdefs.h <<EOF
3351 #define _ICONV_ENABLE_EXTERNAL_CCS 1
3352 EOF
3353
3354 fi
3355
3356 cat >> confdefs.h <<EOF
3357 #define _NEWLIB_VERSION "$VERSION"
3358 EOF
3359
3360
3361 if test "${multilib}" = "yes"; then
3362   multilib_arg="--enable-multilib"
3363 else
3364   multilib_arg=
3365 fi
3366
3367 if test "${newlib_iconv}" = "yes"; then
3368 cat >> confdefs.h <<EOF
3369 #define _ICONV_ENABLED 1
3370 EOF
3371
3372 fi
3373
3374 if test "x${newlib_iconv_external_ccs}" = "xyes"; then
3375   if test "x${newlib_iconv}" = "x"; then
3376       { echo "configure: error: --enable-newlib-iconv-external-ccs option can't be used if iconv library is disabled" 1>&2; exit 1; }
3377   fi
3378   cat >> confdefs.h <<EOF
3379 #define _ICONV_ENABLE_EXTERNAL_CCS 1
3380 EOF
3381
3382 fi
3383
3384 if test "x${iconv_encodings}" != "x" \
3385    || test "x${iconv_to_encodings}" != "x" \
3386    || test "x${iconv_from_encodings}" != "x"; then
3387   
3388     if test "x${newlib_iconv}" = "x"; then
3389       { echo "configure: error: --enable-newlib-iconv-encodings" 1>&2; exit 1; }
3390   fi
3391   
3392     iconv_encodings=`echo "${iconv_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3393   iconv_to_encodings=`echo "${iconv_to_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3394   iconv_from_encodings=`echo "${iconv_from_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3395  
3396       available_encodings=`cat "${srcdir}/libc/iconv/encoding.aliases" | sed -e '/^#.*/d'`
3397   
3398       
3399     iconv_encodings1="${iconv_encodings}"
3400   iconv_encodings=""
3401   for encoding in ${iconv_encodings1}; do
3402       result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`
3403       if test $? != "0"; then
3404           { echo "configure: error: ${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings" 1>&2; exit 1; }
3405       fi
3406       encoding1=`echo "${result}" | sed -e 's/\(^[^ ]*\).*$/\1/'`
3407       iconv_encodings="${iconv_encodings} ${encoding1}"
3408   done
3409     for encoding in ${iconv_encodings}; do
3410       opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3411       cat >> confdefs.h <<EOF
3412 #define $opt 1
3413 EOF
3414
3415       opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3416       cat >> confdefs.h <<EOF
3417 #define $opt 1
3418 EOF
3419
3420   done
3421
3422     iconv_encodings1="${iconv_to_encodings}"
3423   iconv_to_encodings=""
3424   for encoding in ${iconv_encodings1}; do
3425       result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`
3426       if test $? != "0"; then
3427           { echo "configure: error: ${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings" 1>&2; exit 1; }
3428       fi
3429       encoding1=`echo "${result}" | sed -e 's/\(^[^ ]*\).*$/\1/'`
3430       iconv_to_encodings="${iconv_to_encodings} ${encoding1}"
3431   done
3432     for encoding in ${iconv_to_encodings}; do
3433       opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3434       cat >> confdefs.h <<EOF
3435 #define $opt 1
3436 EOF
3437
3438   done
3439
3440     iconv_encodings1="${iconv_from_encodings}"
3441   iconv_from_encodings=""
3442   for encoding in ${iconv_encodings1}; do
3443       result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`
3444       if test $? != "0"; then
3445           { echo "configure: error: ${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings" 1>&2; exit 1; }
3446       fi
3447       encoding1=`echo "${result}" | sed -e 's/\(^[^ ]*\).*$/\1/'`
3448       iconv_from_encodings="${iconv_from_encodings} ${encoding1}"
3449   done
3450     for encoding in ${iconv_from_encodings}; do
3451       opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3452       cat >> confdefs.h <<EOF
3453 #define $opt 1
3454 EOF
3455
3456   done
3457 fi;
3458
3459 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
3460 echo "configure:3461: checking for .preinit_array/.init_array/.fini_array support" >&5
3461 if eval "test \"`echo '$''{'libc_cv_initfinit_array'+set}'`\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   cat > conftest.c <<EOF
3465 int _start (void) { return 0; }
3466 int __start (void) { return 0; }
3467 int foo (void) { return 1; }
3468 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
3469 EOF
3470 if { ac_try='${CC} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
3471                    -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD'; { (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
3472 then
3473   if readelf -S conftest | grep -e INIT_ARRAY > /dev/null; then
3474     libc_cv_initfinit_array=yes
3475   else
3476     libc_cv_initfinit_array=no
3477   fi
3478 else
3479   libc_cv_initfinit_array=no
3480 fi
3481 rm -f conftest*
3482 fi
3483
3484 echo "$ac_t""$libc_cv_initfinit_array" 1>&6
3485
3486 if test $libc_cv_initfinit_array = yes; then
3487   cat >> confdefs.h <<EOF
3488 #define HAVE_INITFINI_ARRAY 1
3489 EOF
3490
3491 fi
3492
3493 echo $ac_n "checking for array aliasing support""... $ac_c" 1>&6
3494 echo "configure:3495: checking for array aliasing support" >&5
3495 if eval "test \"`echo '$''{'libc_cv_array_aliasing'+set}'`\" = set"; then
3496   echo $ac_n "(cached) $ac_c" 1>&6
3497 else
3498   cat > conftest.c <<EOF
3499 char x3 = { 'a', 'b', 'c' };
3500 extern char y2 __attribute__((alias ("x+1")));
3501 EOF
3502 if { ac_try='${CC} $CFLAGS $CPPFLAGS -c conftest.c
3503                    1>&AS_MESSAGE_LOG_FD'; { (eval echo configure:3504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
3504 then
3505   libc_cv_array_aliasing=yes
3506 else
3507   libc_cv_array_aliasing=no
3508 fi
3509 rm -f conftest*
3510 fi
3511
3512 echo "$ac_t""$libc_cv_array_aliasing" 1>&6
3513
3514 if test $libc_cv_array_aliasing = yes; then
3515   cat >> confdefs.h <<EOF
3516 #define _HAVE_ARRAY_ALIASING 1
3517 EOF
3518
3519 fi
3520
3521 trap '' 1 2 15
3522 cat > confcache <<\EOF
3523 # This file is a shell script that caches the results of configure
3524 # tests run on this system so they can be shared between configure
3525 # scripts and configure runs.  It is not useful on other systems.
3526 # If it contains results you don't want to keep, you may remove or edit it.
3527 #
3528 # By default, configure uses ./config.cache as the cache file,
3529 # creating it if it does not exist already.  You can give configure
3530 # the --cache-file=FILE option to use a different cache file; that is
3531 # what configure does when it calls configure scripts in
3532 # subdirectories, so they share the cache.
3533 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3534 # config.status only pays attention to the cache file if you give it the
3535 # --recheck option to rerun configure.
3536 #
3537 EOF
3538 # The following way of writing the cache mishandles newlines in values,
3539 # but we know of no workaround that is simple, portable, and efficient.
3540 # So, don't put newlines in cache variables' values.
3541 # Ultrix sh set writes to stderr and can't be redirected directly,
3542 # and sets the high bit in the cache file unless we assign to the vars.
3543 (set) 2>&1 |
3544   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3545   *ac_space=\ *)
3546     # `set' does not quote correctly, so add quotes (double-quote substitution
3547     # turns \\\\ into \\, and sed turns \\ into \).
3548     sed -n \
3549       -e "s/'/'\\\\''/g" \
3550       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3551     ;;
3552   *)
3553     # `set' quotes correctly as required by POSIX, so do not add quotes.
3554     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3555     ;;
3556   esac >> confcache
3557 if cmp -s $cache_file confcache; then
3558   :
3559 else
3560   if test -w $cache_file; then
3561     echo "updating cache $cache_file"
3562     cat confcache > $cache_file
3563   else
3564     echo "not updating unwritable cache $cache_file"
3565   fi
3566 fi
3567 rm -f confcache
3568
3569 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3570
3571 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3572 # Let make expand exec_prefix.
3573 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3574
3575 # Any assignment to VPATH causes Sun make to only execute
3576 # the first set of double-colon rules, so remove it if not needed.
3577 # If there is a colon in the path, we need to keep it.
3578 if test "x$srcdir" = x.; then
3579   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3580 fi
3581
3582 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3583
3584 DEFS=-DHAVE_CONFIG_H
3585
3586 # Without the "./", some shells look in PATH for config.status.
3587 : ${CONFIG_STATUS=./config.status}
3588
3589 echo creating $CONFIG_STATUS
3590 rm -f $CONFIG_STATUS
3591 cat > $CONFIG_STATUS <<EOF
3592 #! /bin/sh
3593 # Generated automatically by configure.
3594 # Run this file to recreate the current configuration.
3595 # This directory was configured as follows,
3596 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3597 #
3598 # $0 $ac_configure_args
3599 #
3600 # Compiler output produced by configure, useful for debugging
3601 # configure, is in ./config.log if it exists.
3602
3603 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3604 for ac_option
3605 do
3606   case "\$ac_option" in
3607   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3608     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3609     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3610   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3611     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3612     exit 0 ;;
3613   -help | --help | --hel | --he | --h)
3614     echo "\$ac_cs_usage"; exit 0 ;;
3615   *) echo "\$ac_cs_usage"; exit 1 ;;
3616   esac
3617 done
3618
3619 ac_given_srcdir=$srcdir
3620 ac_given_INSTALL="$INSTALL"
3621
3622 trap 'rm -fr `echo "Makefile newlib.h:newlib.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3623 EOF
3624 cat >> $CONFIG_STATUS <<EOF
3625
3626 # Protect against being on the right side of a sed subst in config.status.
3627 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3628  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3629 $ac_vpsub
3630 $extrasub
3631 s%@SHELL@%$SHELL%g
3632 s%@CFLAGS@%$CFLAGS%g
3633 s%@CPPFLAGS@%$CPPFLAGS%g
3634 s%@CXXFLAGS@%$CXXFLAGS%g
3635 s%@FFLAGS@%$FFLAGS%g
3636 s%@DEFS@%$DEFS%g
3637 s%@LDFLAGS@%$LDFLAGS%g
3638 s%@LIBS@%$LIBS%g
3639 s%@exec_prefix@%$exec_prefix%g
3640 s%@prefix@%$prefix%g
3641 s%@program_transform_name@%$program_transform_name%g
3642 s%@bindir@%$bindir%g
3643 s%@sbindir@%$sbindir%g
3644 s%@libexecdir@%$libexecdir%g
3645 s%@datadir@%$datadir%g
3646 s%@sysconfdir@%$sysconfdir%g
3647 s%@sharedstatedir@%$sharedstatedir%g
3648 s%@localstatedir@%$localstatedir%g
3649 s%@libdir@%$libdir%g
3650 s%@includedir@%$includedir%g
3651 s%@oldincludedir@%$oldincludedir%g
3652 s%@infodir@%$infodir%g
3653 s%@mandir@%$mandir%g
3654 s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
3655 s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
3656 s%@newlib_basedir@%$newlib_basedir%g
3657 s%@host@%$host%g
3658 s%@host_alias@%$host_alias%g
3659 s%@host_cpu@%$host_cpu%g
3660 s%@host_vendor@%$host_vendor%g
3661 s%@host_os@%$host_os%g
3662 s%@target@%$target%g
3663 s%@target_alias@%$target_alias%g
3664 s%@target_cpu@%$target_cpu%g
3665 s%@target_vendor@%$target_vendor%g
3666 s%@target_os@%$target_os%g
3667 s%@build@%$build%g
3668 s%@build_alias@%$build_alias%g
3669 s%@build_cpu@%$build_cpu%g
3670 s%@build_vendor@%$build_vendor%g
3671 s%@build_os@%$build_os%g
3672 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3673 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3674 s%@INSTALL_DATA@%$INSTALL_DATA%g
3675 s%@PACKAGE@%$PACKAGE%g
3676 s%@VERSION@%$VERSION%g
3677 s%@ACLOCAL@%$ACLOCAL%g
3678 s%@AUTOCONF@%$AUTOCONF%g
3679 s%@AUTOMAKE@%$AUTOMAKE%g
3680 s%@AUTOHEADER@%$AUTOHEADER%g
3681 s%@MAKEINFO@%$MAKEINFO%g
3682 s%@SET_MAKE@%$SET_MAKE%g
3683 s%@CC@%$CC%g
3684 s%@AS@%$AS%g
3685 s%@AR@%$AR%g
3686 s%@RANLIB@%$RANLIB%g
3687 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3688 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3689 s%@MAINT@%$MAINT%g
3690 s%@EXEEXT@%$EXEEXT%g
3691 s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
3692 s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
3693 s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
3694 s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
3695 s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
3696 s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
3697 s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
3698 s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
3699 s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
3700 s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
3701 s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
3702 s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
3703 s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
3704 s%@OBJEXT@%$OBJEXT%g
3705 s%@oext@%$oext%g
3706 s%@aext@%$aext%g
3707 s%@libm_machine_dir@%$libm_machine_dir%g
3708 s%@machine_dir@%$machine_dir%g
3709 s%@sys_dir@%$sys_dir%g
3710 s%@LN_S@%$LN_S%g
3711 s%@STRIP@%$STRIP%g
3712 s%@DLLTOOL@%$DLLTOOL%g
3713 s%@OBJDUMP@%$OBJDUMP%g
3714 s%@LIBTOOL@%$LIBTOOL%g
3715 s%@AWK@%$AWK%g
3716 s%@NEWLIB_HW_FP_TRUE@%$NEWLIB_HW_FP_TRUE%g
3717 s%@NEWLIB_HW_FP_FALSE@%$NEWLIB_HW_FP_FALSE%g
3718 s%@HAVE_DOC_TRUE@%$HAVE_DOC_TRUE%g
3719 s%@HAVE_DOC_FALSE@%$HAVE_DOC_FALSE%g
3720 s%@EXTRA_DIRS@%$EXTRA_DIRS%g
3721 s%@CC_FOR_NEWLIB@%$CC_FOR_NEWLIB%g
3722 s%@subdirs@%$subdirs%g
3723 s%@CRT0@%$CRT0%g
3724 s%@CRT0_DIR@%$CRT0_DIR%g
3725 s%@CRT1@%$CRT1%g
3726 s%@CRT1_DIR@%$CRT1_DIR%g
3727 s%@LIBM_MACHINE_OBJECTLIST@%$LIBM_MACHINE_OBJECTLIST%g
3728 s%@MACHINE_OBJECTLIST@%$MACHINE_OBJECTLIST%g
3729 s%@SYS_OBJECTLIST@%$SYS_OBJECTLIST%g
3730 s%@SYS_MACH_OBJECTLIST@%$SYS_MACH_OBJECTLIST%g
3731 s%@POSIX_OBJECTLIST@%$POSIX_OBJECTLIST%g
3732 s%@SIGNAL_OBJECTLIST@%$SIGNAL_OBJECTLIST%g
3733 s%@SYSCALL_OBJECTLIST@%$SYSCALL_OBJECTLIST%g
3734 s%@UNIX_OBJECTLIST@%$UNIX_OBJECTLIST%g
3735 s%@STDIO64_OBJECTLIST@%$STDIO64_OBJECTLIST%g
3736 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3737 s%@libc_cv_initfinit_array@%$libc_cv_initfinit_array%g
3738 s%@libc_cv_array_aliasing@%$libc_cv_array_aliasing%g
3739
3740 CEOF
3741 EOF
3742
3743 cat >> $CONFIG_STATUS <<\EOF
3744
3745 # Split the substitutions into bite-sized pieces for seds with
3746 # small command number limits, like on Digital OSF/1 and HP-UX.
3747 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3748 ac_file=1 # Number of current file.
3749 ac_beg=1 # First line for current file.
3750 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3751 ac_more_lines=:
3752 ac_sed_cmds=""
3753 while $ac_more_lines; do
3754   if test $ac_beg -gt 1; then
3755     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3756   else
3757     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3758   fi
3759   if test ! -s conftest.s$ac_file; then
3760     ac_more_lines=false
3761     rm -f conftest.s$ac_file
3762   else
3763     if test -z "$ac_sed_cmds"; then
3764       ac_sed_cmds="sed -f conftest.s$ac_file"
3765     else
3766       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3767     fi
3768     ac_file=`expr $ac_file + 1`
3769     ac_beg=$ac_end
3770     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3771   fi
3772 done
3773 if test -z "$ac_sed_cmds"; then
3774   ac_sed_cmds=cat
3775 fi
3776 EOF
3777
3778 cat >> $CONFIG_STATUS <<EOF
3779
3780 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3781 EOF
3782 cat >> $CONFIG_STATUS <<\EOF
3783 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3784   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3785   case "$ac_file" in
3786   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3787        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3788   *) ac_file_in="${ac_file}.in" ;;
3789   esac
3790
3791   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3792
3793   # Remove last slash and all that follows it.  Not all systems have dirname.
3794   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3795   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3796     # The file is in a subdirectory.
3797     test ! -d "$ac_dir" && mkdir "$ac_dir"
3798     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3799     # A "../" for each directory in $ac_dir_suffix.
3800     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3801   else
3802     ac_dir_suffix= ac_dots=
3803   fi
3804
3805   case "$ac_given_srcdir" in
3806   .)  srcdir=.
3807       if test -z "$ac_dots"; then top_srcdir=.
3808       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3809   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3810   *) # Relative path.
3811     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3812     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3813   esac
3814
3815   case "$ac_given_INSTALL" in
3816   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3817   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3818   esac
3819
3820   echo creating "$ac_file"
3821   rm -f "$ac_file"
3822   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3823   case "$ac_file" in
3824   *Makefile*) ac_comsub="1i\\
3825 # $configure_input" ;;
3826   *) ac_comsub= ;;
3827   esac
3828
3829   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3830   sed -e "$ac_comsub
3831 s%@configure_input@%$configure_input%g
3832 s%@srcdir@%$srcdir%g
3833 s%@top_srcdir@%$top_srcdir%g
3834 s%@INSTALL@%$INSTALL%g
3835 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3836 fi; done
3837 rm -f conftest.s*
3838
3839 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3840 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3841 #
3842 # ac_d sets the value in "#define NAME VALUE" lines.
3843 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3844 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3845 ac_dC='\3'
3846 ac_dD='%g'
3847 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3848 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3849 ac_uB='\([      ]\)%\1#\2define\3'
3850 ac_uC=' '
3851 ac_uD='\4%g'
3852 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3853 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3854 ac_eB='$%\1#\2define\3'
3855 ac_eC=' '
3856 ac_eD='%g'
3857
3858 if test "${CONFIG_HEADERS+set}" != set; then
3859 EOF
3860 cat >> $CONFIG_STATUS <<EOF
3861   CONFIG_HEADERS="newlib.h:newlib.hin"
3862 EOF
3863 cat >> $CONFIG_STATUS <<\EOF
3864 fi
3865 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3866   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3867   case "$ac_file" in
3868   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3869        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3870   *) ac_file_in="${ac_file}.in" ;;
3871   esac
3872
3873   echo creating $ac_file
3874
3875   rm -f conftest.frag conftest.in conftest.out
3876   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3877   cat $ac_file_inputs > conftest.in
3878
3879 EOF
3880
3881 # Transform confdefs.h into a sed script conftest.vals that substitutes
3882 # the proper values into config.h.in to produce config.h.  And first:
3883 # Protect against being on the right side of a sed subst in config.status.
3884 # Protect against being in an unquoted here document in config.status.
3885 rm -f conftest.vals
3886 cat > conftest.hdr <<\EOF
3887 s/[\\&%]/\\&/g
3888 s%[\\$`]%\\&%g
3889 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3890 s%ac_d%ac_u%gp
3891 s%ac_u%ac_e%gp
3892 EOF
3893 sed -n -f conftest.hdr confdefs.h > conftest.vals
3894 rm -f conftest.hdr
3895
3896 # This sed command replaces #undef with comments.  This is necessary, for
3897 # example, in the case of _POSIX_SOURCE, which is predefined and required
3898 # on some systems where configure will not decide to define it.
3899 cat >> conftest.vals <<\EOF
3900 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3901 EOF
3902
3903 # Break up conftest.vals because some shells have a limit on
3904 # the size of here documents, and old seds have small limits too.
3905
3906 rm -f conftest.tail
3907 while :
3908 do
3909   ac_lines=`grep -c . conftest.vals`
3910   # grep -c gives empty output for an empty file on some AIX systems.
3911   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3912   # Write a limited-size here document to conftest.frag.
3913   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3914   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3915   echo 'CEOF
3916   sed -f conftest.frag conftest.in > conftest.out
3917   rm -f conftest.in
3918   mv conftest.out conftest.in
3919 ' >> $CONFIG_STATUS
3920   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3921   rm -f conftest.vals
3922   mv conftest.tail conftest.vals
3923 done
3924 rm -f conftest.vals
3925
3926 cat >> $CONFIG_STATUS <<\EOF
3927   rm -f conftest.frag conftest.h
3928   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3929   cat conftest.in >> conftest.h
3930   rm -f conftest.in
3931   if cmp -s $ac_file conftest.h 2>/dev/null; then
3932     echo "$ac_file is unchanged"
3933     rm -f conftest.h
3934   else
3935     # Remove last slash and all that follows it.  Not all systems have dirname.
3936       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3937       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3938       # The file is in a subdirectory.
3939       test ! -d "$ac_dir" && mkdir "$ac_dir"
3940     fi
3941     rm -f $ac_file
3942     mv conftest.h $ac_file
3943   fi
3944 fi; done
3945
3946 EOF
3947 cat >> $CONFIG_STATUS <<EOF
3948
3949 srcdir=${srcdir}
3950 host=${host}
3951 target=${target}
3952 with_multisubdir=${with_multisubdir}
3953 ac_configure_args="${multilib_arg} ${ac_configure_args}"
3954 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3955 newlib_basedir=${newlib_basedir}
3956 CC="${CC}"
3957 LDFLAGS="${LDFLAGS}"
3958 INSTALL="${INSTALL}"
3959
3960 EOF
3961 cat >> $CONFIG_STATUS <<\EOF
3962 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3963 if test -n "$CONFIG_FILES"; then
3964   unset ac_file
3965   . ${newlib_basedir}/../config-ml.in
3966 fi
3967 exit 0
3968 EOF
3969 chmod +x $CONFIG_STATUS
3970 rm -fr confdefs* $ac_clean_files
3971 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3972
3973 if test "$no_recursion" != yes; then
3974
3975   # Remove --cache-file and --srcdir arguments so they do not pile up.
3976   ac_sub_configure_args=
3977   ac_prev=
3978   for ac_arg in $ac_configure_args; do
3979     if test -n "$ac_prev"; then
3980       ac_prev=
3981       continue
3982     fi
3983     case "$ac_arg" in
3984     -cache-file | --cache-file | --cache-fil | --cache-fi \
3985     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3986       ac_prev=cache_file ;;
3987     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3988     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3989       ;;
3990     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3991       ac_prev=srcdir ;;
3992     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3993       ;;
3994     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3995     esac
3996   done
3997
3998   for ac_config_dir in ${configdirs}; do
3999
4000     # Do not complain, so a configure script can configure whichever
4001     # parts of a large source tree are present.
4002     if test ! -d $srcdir/$ac_config_dir; then
4003       continue
4004     fi
4005
4006     echo configuring in $ac_config_dir
4007
4008     case "$srcdir" in
4009     .) ;;
4010     *)
4011       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
4012       else
4013         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
4014       fi
4015       ;;
4016     esac
4017
4018     ac_popdir=`pwd`
4019     cd $ac_config_dir
4020
4021       # A "../" for each directory in /$ac_config_dir.
4022       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4023
4024     case "$srcdir" in
4025     .) # No --srcdir option.  We are building in place.
4026       ac_sub_srcdir=$srcdir ;;
4027     /*) # Absolute path.
4028       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
4029     *) # Relative path.
4030       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
4031     esac
4032
4033     # Check for guested configure; otherwise get Cygnus style configure.
4034     if test -f $ac_sub_srcdir/configure; then
4035       ac_sub_configure=$ac_sub_srcdir/configure
4036     elif test -f $ac_sub_srcdir/configure.in; then
4037       ac_sub_configure=$ac_configure
4038     else
4039       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
4040       ac_sub_configure=
4041     fi
4042
4043     # The recursion is here.
4044     if test -n "$ac_sub_configure"; then
4045
4046       # Make the cache file name correct relative to the subdirectory.
4047       case "$cache_file" in
4048       /*) ac_sub_cache_file=$cache_file ;;
4049       *) # Relative path.
4050         ac_sub_cache_file="$ac_dots$cache_file" ;;
4051       esac
4052   case "$ac_given_INSTALL" in
4053         [/$]*) INSTALL="$ac_given_INSTALL" ;;
4054         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4055         esac
4056
4057       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
4058       # The eval makes quoting arguments work.
4059       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
4060       then :
4061       else
4062         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
4063       fi
4064     fi
4065
4066     cd $ac_popdir
4067   done
4068 fi
4069