OSDN Git Service

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