OSDN Git Service

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