]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/configure
[multiple changes]
[thirdparty/gcc.git] / libstdc++-v3 / configure
CommitLineData
b2dad0e3
BK
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19ac_help="$ac_help
20 --enable-multilib build hella library versions (default)"
21ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34ac_help="$ac_help
35 --enable-debug extra debugging, turn off optimization [default=no]"
36ac_help="$ac_help
37 --enable-cstdio enable GNU libio for target io package. (default)
38 --enable-cstdio=LIB use LIB target-speific io package."
39ac_help="$ac_help
d0d88ce3 40 --enable-long-long turns on 'long long' [default=no]"
99246c90 41ac_help="$ac_help
d0d88ce3
BK
42 --enable-cshadow-headers construct "shadowed" C header files for
43 g++ [default=no]"
b2dad0e3
BK
44ac_help="$ac_help
45 --enable-threads enable thread usage for target GCC.
46 --enable-threads=LIB use LIB thread package for target GCC."
dcfa0bc8
PE
47ac_help="$ac_help
48 --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
32a4595e 49 [default=none]"
b2dad0e3
BK
50
51# Initialize some variables set by options.
52# The variables have the same names as the options, with
53# dashes changed to underlines.
54build=NONE
55cache_file=./config.cache
56exec_prefix=NONE
57host=NONE
58no_create=
59nonopt=NONE
60no_recursion=
61prefix=NONE
62program_prefix=NONE
63program_suffix=NONE
64program_transform_name=s,x,x,
65silent=
66site=
67srcdir=
68target=NONE
69verbose=
70x_includes=NONE
71x_libraries=NONE
72bindir='${exec_prefix}/bin'
73sbindir='${exec_prefix}/sbin'
74libexecdir='${exec_prefix}/libexec'
75datadir='${prefix}/share'
76sysconfdir='${prefix}/etc'
77sharedstatedir='${prefix}/com'
78localstatedir='${prefix}/var'
79libdir='${exec_prefix}/lib'
80includedir='${prefix}/include'
81oldincludedir='/usr/include'
82infodir='${prefix}/info'
83mandir='${prefix}/man'
84
85# Initialize some other variables.
86subdirs=
87MFLAGS= MAKEFLAGS=
88SHELL=${CONFIG_SHELL-/bin/sh}
89# Maximum number of lines to put in a shell here document.
90ac_max_here_lines=12
91
92ac_prev=
93for ac_option
94do
95
96 # If the previous option needs an argument, assign it.
97 if test -n "$ac_prev"; then
98 eval "$ac_prev=\$ac_option"
99 ac_prev=
100 continue
101 fi
102
103 case "$ac_option" in
104 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
105 *) ac_optarg= ;;
106 esac
107
108 # Accept the important Cygnus configure options, so we can diagnose typos.
109
110 case "$ac_option" in
111
112 -bindir | --bindir | --bindi | --bind | --bin | --bi)
113 ac_prev=bindir ;;
114 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
115 bindir="$ac_optarg" ;;
116
117 -build | --build | --buil | --bui | --bu)
118 ac_prev=build ;;
119 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
120 build="$ac_optarg" ;;
121
122 -cache-file | --cache-file | --cache-fil | --cache-fi \
123 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
124 ac_prev=cache_file ;;
125 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
126 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
127 cache_file="$ac_optarg" ;;
128
129 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
130 ac_prev=datadir ;;
131 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
132 | --da=*)
133 datadir="$ac_optarg" ;;
134
135 -disable-* | --disable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
137 # Reject names that are not valid shell variable names.
138 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 eval "enable_${ac_feature}=no" ;;
143
144 -enable-* | --enable-*)
145 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
146 # Reject names that are not valid shell variable names.
147 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
148 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
149 fi
150 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151 case "$ac_option" in
152 *=*) ;;
153 *) ac_optarg=yes ;;
154 esac
155 eval "enable_${ac_feature}='$ac_optarg'" ;;
156
157 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
158 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
159 | --exec | --exe | --ex)
160 ac_prev=exec_prefix ;;
161 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
162 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
163 | --exec=* | --exe=* | --ex=*)
164 exec_prefix="$ac_optarg" ;;
165
166 -gas | --gas | --ga | --g)
167 # Obsolete; use --with-gas.
168 with_gas=yes ;;
169
170 -help | --help | --hel | --he)
171 # Omit some internal or obsolete options to make the list less imposing.
172 # This message is too long to be a string in the A/UX 3.1 sh.
173 cat << EOF
174Usage: configure [options] [host]
175Options: [defaults in brackets after descriptions]
176Configuration:
177 --cache-file=FILE cache test results in FILE
178 --help print this message
179 --no-create do not create output files
180 --quiet, --silent do not print \`checking...' messages
181 --version print the version of autoconf that created configure
182Directory and file names:
183 --prefix=PREFIX install architecture-independent files in PREFIX
184 [$ac_default_prefix]
185 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
186 [same as prefix]
187 --bindir=DIR user executables in DIR [EPREFIX/bin]
188 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
189 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
190 --datadir=DIR read-only architecture-independent data in DIR
191 [PREFIX/share]
192 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
193 --sharedstatedir=DIR modifiable architecture-independent data in DIR
194 [PREFIX/com]
195 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
196 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
197 --includedir=DIR C header files in DIR [PREFIX/include]
198 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
199 --infodir=DIR info documentation in DIR [PREFIX/info]
200 --mandir=DIR man documentation in DIR [PREFIX/man]
201 --srcdir=DIR find the sources in DIR [configure dir or ..]
202 --program-prefix=PREFIX prepend PREFIX to installed program names
203 --program-suffix=SUFFIX append SUFFIX to installed program names
204 --program-transform-name=PROGRAM
205 run sed PROGRAM on installed program names
206EOF
207 cat << EOF
208Host type:
209 --build=BUILD configure for building on BUILD [BUILD=HOST]
210 --host=HOST configure for HOST [guessed]
211 --target=TARGET configure for TARGET [TARGET=HOST]
212Features and packages:
213 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
214 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
215 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
216 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
217 --x-includes=DIR X include files are in DIR
218 --x-libraries=DIR X library files are in DIR
219EOF
220 if test -n "$ac_help"; then
221 echo "--enable and --with options recognized:$ac_help"
222 fi
223 exit 0 ;;
224
225 -host | --host | --hos | --ho)
226 ac_prev=host ;;
227 -host=* | --host=* | --hos=* | --ho=*)
228 host="$ac_optarg" ;;
229
230 -includedir | --includedir | --includedi | --included | --include \
231 | --includ | --inclu | --incl | --inc)
232 ac_prev=includedir ;;
233 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
234 | --includ=* | --inclu=* | --incl=* | --inc=*)
235 includedir="$ac_optarg" ;;
236
237 -infodir | --infodir | --infodi | --infod | --info | --inf)
238 ac_prev=infodir ;;
239 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
240 infodir="$ac_optarg" ;;
241
242 -libdir | --libdir | --libdi | --libd)
243 ac_prev=libdir ;;
244 -libdir=* | --libdir=* | --libdi=* | --libd=*)
245 libdir="$ac_optarg" ;;
246
247 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
248 | --libexe | --libex | --libe)
249 ac_prev=libexecdir ;;
250 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
251 | --libexe=* | --libex=* | --libe=*)
252 libexecdir="$ac_optarg" ;;
253
254 -localstatedir | --localstatedir | --localstatedi | --localstated \
255 | --localstate | --localstat | --localsta | --localst \
256 | --locals | --local | --loca | --loc | --lo)
257 ac_prev=localstatedir ;;
258 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
259 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
260 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
261 localstatedir="$ac_optarg" ;;
262
263 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
264 ac_prev=mandir ;;
265 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
266 mandir="$ac_optarg" ;;
267
268 -nfp | --nfp | --nf)
269 # Obsolete; use --without-fp.
270 with_fp=no ;;
271
272 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273 | --no-cr | --no-c)
274 no_create=yes ;;
275
276 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
278 no_recursion=yes ;;
279
280 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
281 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
282 | --oldin | --oldi | --old | --ol | --o)
283 ac_prev=oldincludedir ;;
284 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
285 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
286 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
287 oldincludedir="$ac_optarg" ;;
288
289 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
290 ac_prev=prefix ;;
291 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
292 prefix="$ac_optarg" ;;
293
294 -program-prefix | --program-prefix | --program-prefi | --program-pref \
295 | --program-pre | --program-pr | --program-p)
296 ac_prev=program_prefix ;;
297 -program-prefix=* | --program-prefix=* | --program-prefi=* \
298 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
299 program_prefix="$ac_optarg" ;;
300
301 -program-suffix | --program-suffix | --program-suffi | --program-suff \
302 | --program-suf | --program-su | --program-s)
303 ac_prev=program_suffix ;;
304 -program-suffix=* | --program-suffix=* | --program-suffi=* \
305 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
306 program_suffix="$ac_optarg" ;;
307
308 -program-transform-name | --program-transform-name \
309 | --program-transform-nam | --program-transform-na \
310 | --program-transform-n | --program-transform- \
311 | --program-transform | --program-transfor \
312 | --program-transfo | --program-transf \
313 | --program-trans | --program-tran \
314 | --progr-tra | --program-tr | --program-t)
315 ac_prev=program_transform_name ;;
316 -program-transform-name=* | --program-transform-name=* \
317 | --program-transform-nam=* | --program-transform-na=* \
318 | --program-transform-n=* | --program-transform-=* \
319 | --program-transform=* | --program-transfor=* \
320 | --program-transfo=* | --program-transf=* \
321 | --program-trans=* | --program-tran=* \
322 | --progr-tra=* | --program-tr=* | --program-t=*)
323 program_transform_name="$ac_optarg" ;;
324
325 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
326 | -silent | --silent | --silen | --sile | --sil)
327 silent=yes ;;
328
329 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
330 ac_prev=sbindir ;;
331 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
332 | --sbi=* | --sb=*)
333 sbindir="$ac_optarg" ;;
334
335 -sharedstatedir | --sharedstatedir | --sharedstatedi \
336 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
337 | --sharedst | --shareds | --shared | --share | --shar \
338 | --sha | --sh)
339 ac_prev=sharedstatedir ;;
340 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
341 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
342 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
343 | --sha=* | --sh=*)
344 sharedstatedir="$ac_optarg" ;;
345
346 -site | --site | --sit)
347 ac_prev=site ;;
348 -site=* | --site=* | --sit=*)
349 site="$ac_optarg" ;;
350
351 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
352 ac_prev=srcdir ;;
353 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
354 srcdir="$ac_optarg" ;;
355
356 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
357 | --syscon | --sysco | --sysc | --sys | --sy)
358 ac_prev=sysconfdir ;;
359 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
360 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
361 sysconfdir="$ac_optarg" ;;
362
363 -target | --target | --targe | --targ | --tar | --ta | --t)
364 ac_prev=target ;;
365 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
366 target="$ac_optarg" ;;
367
368 -v | -verbose | --verbose | --verbos | --verbo | --verb)
369 verbose=yes ;;
370
371 -version | --version | --versio | --versi | --vers)
372 echo "configure generated by autoconf version 2.13"
373 exit 0 ;;
374
375 -with-* | --with-*)
376 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
377 # Reject names that are not valid shell variable names.
378 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
379 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
380 fi
381 ac_package=`echo $ac_package| sed 's/-/_/g'`
382 case "$ac_option" in
383 *=*) ;;
384 *) ac_optarg=yes ;;
385 esac
386 eval "with_${ac_package}='$ac_optarg'" ;;
387
388 -without-* | --without-*)
389 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
390 # Reject names that are not valid shell variable names.
391 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 eval "with_${ac_package}=no" ;;
396
397 --x)
398 # Obsolete; use --with-x.
399 with_x=yes ;;
400
401 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
402 | --x-incl | --x-inc | --x-in | --x-i)
403 ac_prev=x_includes ;;
404 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
405 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
406 x_includes="$ac_optarg" ;;
407
408 -x-libraries | --x-libraries | --x-librarie | --x-librari \
409 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
410 ac_prev=x_libraries ;;
411 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
412 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
413 x_libraries="$ac_optarg" ;;
414
415 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
416 ;;
417
418 *)
419 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
420 echo "configure: warning: $ac_option: invalid host type" 1>&2
421 fi
422 if test "x$nonopt" != xNONE; then
423 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
424 fi
425 nonopt="$ac_option"
426 ;;
427
428 esac
429done
430
431if test -n "$ac_prev"; then
432 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
433fi
434
435trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
436
437# File descriptor usage:
438# 0 standard input
439# 1 file creation
440# 2 errors and warnings
441# 3 some systems may open it to /dev/tty
442# 4 used on the Kubota Titan
443# 6 checking for... messages and results
444# 5 compiler messages saved in config.log
445if test "$silent" = yes; then
446 exec 6>/dev/null
447else
448 exec 6>&1
449fi
450exec 5>./config.log
451
452echo "\
453This file contains any messages produced by compilers while
454running configure, to aid debugging if configure makes a mistake.
455" 1>&5
456
457# Strip out --no-create and --no-recursion so they do not pile up.
458# Also quote any args containing shell metacharacters.
459ac_configure_args=
460for ac_arg
461do
462 case "$ac_arg" in
463 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
464 | --no-cr | --no-c) ;;
465 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
466 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
467 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
468 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
469 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
470 esac
471done
472
473# NLS nuisances.
474# Only set these to C if already set. These must not be set unconditionally
475# because not all systems understand e.g. LANG=C (notably SCO).
476# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
477# Non-C LC_CTYPE values break the ctype check.
478if test "${LANG+set}" = set; then LANG=C; export LANG; fi
479if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
480if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
481if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
482
483# confdefs.h avoids OS command line length limits that DEFS can exceed.
484rm -rf conftest* confdefs.h
485# AIX cpp loses on an empty file, so make sure it contains at least a newline.
486echo > confdefs.h
487
488# A filename unique to this package, relative to the directory that
489# configure is in, which we can look for to find out if srcdir is correct.
490ac_unique_file=src/complex.cc
491
492# Find the source files, if location was not specified.
493if test -z "$srcdir"; then
494 ac_srcdir_defaulted=yes
495 # Try the directory containing this script, then its parent.
496 ac_prog=$0
497 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
498 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
499 srcdir=$ac_confdir
500 if test ! -r $srcdir/$ac_unique_file; then
501 srcdir=..
502 fi
503else
504 ac_srcdir_defaulted=no
505fi
506if test ! -r $srcdir/$ac_unique_file; then
507 if test "$ac_srcdir_defaulted" = yes; then
508 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
509 else
510 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
511 fi
512fi
513srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
514
515# Prefer explicitly selected file to automatically selected ones.
516if test -z "$CONFIG_SITE"; then
517 if test "x$prefix" != xNONE; then
518 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
519 else
520 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
521 fi
522fi
523for ac_site_file in $CONFIG_SITE; do
524 if test -r "$ac_site_file"; then
525 echo "loading site script $ac_site_file"
526 . "$ac_site_file"
527 fi
528done
529
530if test -r "$cache_file"; then
531 echo "loading cache $cache_file"
532 . $cache_file
533else
534 echo "creating cache $cache_file"
535 > $cache_file
536fi
537
538ac_ext=c
539# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540ac_cpp='$CPP $CPPFLAGS'
541ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543cross_compiling=$ac_cv_prog_cc_cross
544
545ac_exeext=
546ac_objext=o
547if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
548 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
549 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
550 ac_n= ac_c='
551' ac_t=' '
552 else
553 ac_n=-n ac_c= ac_t=
554 fi
555else
556 ac_n= ac_c='\c' ac_t=
557fi
558
559
560ac_aux_dir=
561for ac_dir in .. $srcdir/..; do
562 if test -f $ac_dir/install-sh; then
563 ac_aux_dir=$ac_dir
564 ac_install_sh="$ac_aux_dir/install-sh -c"
565 break
566 elif test -f $ac_dir/install.sh; then
567 ac_aux_dir=$ac_dir
568 ac_install_sh="$ac_aux_dir/install.sh -c"
569 break
570 fi
571done
572if test -z "$ac_aux_dir"; then
573 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
574fi
575ac_config_guess=$ac_aux_dir/config.guess
576ac_config_sub=$ac_aux_dir/config.sub
577ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
578
579
580# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
581
582# Do some error checking and defaulting for the host and target type.
583# The inputs are:
584# configure --host=HOST --target=TARGET --build=BUILD NONOPT
585#
586# The rules are:
587# 1. You are not allowed to specify --host, --target, and nonopt at the
588# same time.
589# 2. Host defaults to nonopt.
590# 3. If nonopt is not specified, then host defaults to the current host,
591# as determined by config.guess.
592# 4. Target and build default to nonopt.
593# 5. If nonopt is not specified, then target and build default to host.
594
595# The aliases save the names the user supplied, while $host etc.
596# will get canonicalized.
597case $host---$target---$nonopt in
598NONE---*---* | *---NONE---* | *---*---NONE) ;;
599*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
600esac
601
602
603# Make sure we can run config.sub.
604if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
605else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
606fi
607
608echo $ac_n "checking host system type""... $ac_c" 1>&6
99246c90 609echo "configure:610: checking host system type" >&5
b2dad0e3
BK
610
611host_alias=$host
612case "$host_alias" in
613NONE)
614 case $nonopt in
615 NONE)
616 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
617 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
618 fi ;;
619 *) host_alias=$nonopt ;;
620 esac ;;
621esac
622
623host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
624host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
627echo "$ac_t""$host" 1>&6
628
629echo $ac_n "checking target system type""... $ac_c" 1>&6
99246c90 630echo "configure:631: checking target system type" >&5
b2dad0e3
BK
631
632target_alias=$target
633case "$target_alias" in
634NONE)
635 case $nonopt in
636 NONE) target_alias=$host_alias ;;
637 *) target_alias=$nonopt ;;
638 esac ;;
639esac
640
641target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
642target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
645echo "$ac_t""$target" 1>&6
646
647echo $ac_n "checking build system type""... $ac_c" 1>&6
99246c90 648echo "configure:649: checking build system type" >&5
b2dad0e3
BK
649
650build_alias=$build
651case "$build_alias" in
652NONE)
653 case $nonopt in
654 NONE) build_alias=$host_alias ;;
655 *) build_alias=$nonopt ;;
656 esac ;;
657esac
658
659build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
660build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
663echo "$ac_t""$build" 1>&6
664
665test "$host_alias" != "$target_alias" &&
666 test "$program_prefix$program_suffix$program_transform_name" = \
667 NONENONEs,x,x, &&
668 program_prefix=${target_alias}-
669
670
671# We use these options to decide which functions to include.
672# Check whether --with-target-subdir or --without-target-subdir was given.
673if test "${with_target_subdir+set}" = set; then
674 withval="$with_target_subdir"
675 :
676fi
677
678# Check whether --with-cross-host or --without-cross-host was given.
679if test "${with_cross_host+set}" = set; then
680 withval="$with_cross_host"
681 :
682fi
683
684
685# Find a good install program. We prefer a C program (faster),
686# so one script is as good as another. But avoid the broken or
687# incompatible versions:
688# SysV /etc/install, /usr/sbin/install
689# SunOS /usr/etc/install
690# IRIX /sbin/install
691# AIX /bin/install
692# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
693# AFS /usr/afsws/bin/install, which mishandles nonexistent args
694# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
695# ./install, which can be erroneously created by make from ./install.sh.
696echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
99246c90 697echo "configure:698: checking for a BSD compatible install" >&5
b2dad0e3
BK
698if test -z "$INSTALL"; then
699if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
701else
702 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
703 for ac_dir in $PATH; do
704 # Account for people who put trailing slashes in PATH elements.
705 case "$ac_dir/" in
706 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
707 *)
708 # OSF1 and SCO ODT 3.0 have their own names for install.
709 # Don't use installbsd from OSF since it installs stuff as root
710 # by default.
711 for ac_prog in ginstall scoinst install; do
712 if test -f $ac_dir/$ac_prog; then
713 if test $ac_prog = install &&
714 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
715 # AIX install. It has an incompatible calling convention.
716 :
717 else
718 ac_cv_path_install="$ac_dir/$ac_prog -c"
719 break 2
720 fi
721 fi
722 done
723 ;;
724 esac
725 done
726 IFS="$ac_save_IFS"
727
728fi
729 if test "${ac_cv_path_install+set}" = set; then
730 INSTALL="$ac_cv_path_install"
731 else
732 # As a last resort, use the slow shell script. We don't cache a
733 # path for INSTALL within a source directory, because that will
734 # break other packages using the cache if that directory is
735 # removed, or if the path is relative.
736 INSTALL="$ac_install_sh"
737 fi
738fi
739echo "$ac_t""$INSTALL" 1>&6
740
741# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
742# It thinks the first close brace ends the variable substitution.
743test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
744
745test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
746
747test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
748
749echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
99246c90 750echo "configure:751: checking whether build environment is sane" >&5
b2dad0e3
BK
751# Just in case
752sleep 1
753echo timestamp > conftestfile
754# Do `set' in a subshell so we don't clobber the current shell's
755# arguments. Must try -L first in case configure is actually a
756# symlink; some systems play weird games with the mod time of symlinks
757# (eg FreeBSD returns the mod time of the symlink's containing
758# directory).
759if (
760 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
761 if test "$*" = "X"; then
762 # -L didn't work.
763 set X `ls -t $srcdir/configure conftestfile`
764 fi
765 if test "$*" != "X $srcdir/configure conftestfile" \
766 && test "$*" != "X conftestfile $srcdir/configure"; then
767
768 # If neither matched, then we have a broken ls. This can happen
769 # if, for instance, CONFIG_SHELL is bash and it inherits a
770 # broken ls alias from the environment. This has actually
771 # happened. Such a system could not be considered "sane".
772 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
773alias in your environment" 1>&2; exit 1; }
774 fi
775
776 test "$2" = conftestfile
777 )
778then
779 # Ok.
780 :
781else
782 { echo "configure: error: newly created file is older than distributed files!
783Check your system clock" 1>&2; exit 1; }
784fi
785rm -f conftest*
786echo "$ac_t""yes" 1>&6
787if test "$program_transform_name" = s,x,x,; then
788 program_transform_name=
789else
790 # Double any \ or $. echo might interpret backslashes.
791 cat <<\EOF_SED > conftestsed
792s,\\,\\\\,g; s,\$,$$,g
793EOF_SED
794 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
795 rm -f conftestsed
796fi
797test "$program_prefix" != NONE &&
798 program_transform_name="s,^,${program_prefix},; $program_transform_name"
799# Use a double $ so make ignores it.
800test "$program_suffix" != NONE &&
801 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
802
803# sed with no file args requires a program.
804test "$program_transform_name" = "" && program_transform_name="s,x,x,"
805
806echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
99246c90 807echo "configure:808: checking whether ${MAKE-make} sets \${MAKE}" >&5
b2dad0e3
BK
808set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
809if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
811else
812 cat > conftestmake <<\EOF
813all:
814 @echo 'ac_maketemp="${MAKE}"'
815EOF
816# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
817eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
818if test -n "$ac_maketemp"; then
819 eval ac_cv_prog_make_${ac_make}_set=yes
820else
821 eval ac_cv_prog_make_${ac_make}_set=no
822fi
823rm -f conftestmake
824fi
825if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
826 echo "$ac_t""yes" 1>&6
827 SET_MAKE=
828else
829 echo "$ac_t""no" 1>&6
830 SET_MAKE="MAKE=${MAKE-make}"
831fi
832
833if test $host != $build; then
834 ac_tool_prefix=${host_alias}-
835else
836 ac_tool_prefix=
837fi
838
839echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
99246c90 840echo "configure:841: checking for Cygwin environment" >&5
b2dad0e3
BK
841if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843else
844 cat > conftest.$ac_ext <<EOF
99246c90 845#line 846 "configure"
b2dad0e3
BK
846#include "confdefs.h"
847
848int main() {
849
850#ifndef __CYGWIN__
851#define __CYGWIN__ __CYGWIN32__
852#endif
853return __CYGWIN__;
854; return 0; }
855EOF
99246c90 856if { (eval echo configure:857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
857 rm -rf conftest*
858 ac_cv_cygwin=yes
859else
860 echo "configure: failed program was:" >&5
861 cat conftest.$ac_ext >&5
862 rm -rf conftest*
863 ac_cv_cygwin=no
864fi
865rm -f conftest*
866rm -f conftest*
867fi
868
869echo "$ac_t""$ac_cv_cygwin" 1>&6
870CYGWIN=
871test "$ac_cv_cygwin" = yes && CYGWIN=yes
872echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
99246c90 873echo "configure:874: checking for mingw32 environment" >&5
b2dad0e3
BK
874if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
876else
877 cat > conftest.$ac_ext <<EOF
99246c90 878#line 879 "configure"
b2dad0e3
BK
879#include "confdefs.h"
880
881int main() {
882return __MINGW32__;
883; return 0; }
884EOF
99246c90 885if { (eval echo configure:886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
886 rm -rf conftest*
887 ac_cv_mingw32=yes
888else
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 ac_cv_mingw32=no
893fi
894rm -f conftest*
895rm -f conftest*
896fi
897
898echo "$ac_t""$ac_cv_mingw32" 1>&6
899MINGW32=
900test "$ac_cv_mingw32" = yes && MINGW32=yes
901
902 # Check whether --enable-multilib or --disable-multilib was given.
903if test "${enable_multilib+set}" = set; then
904 enableval="$enable_multilib"
905 case "${enableval}" in
906 yes) multilib=yes ;;
907 no) multilib=no ;;
908 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
909 esac
910else
911 multilib=yes
912fi
913
914 if test "${srcdir}" = "."; then
915 if test "${with_target_subdir}" != "."; then
916 glibcpp_basedir="${srcdir}/${with_multisrctop}../."
917 else
918 glibcpp_basedir="${srcdir}/${with_multisrctop}."
919 fi
920 else
921 glibcpp_basedir="${srcdir}/."
922 fi
923
924
925
926# Make sure we can run config.sub.
927if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
928else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929fi
930
931echo $ac_n "checking host system type""... $ac_c" 1>&6
99246c90 932echo "configure:933: checking host system type" >&5
b2dad0e3
BK
933
934host_alias=$host
935case "$host_alias" in
936NONE)
937 case $nonopt in
938 NONE)
939 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
940 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
941 fi ;;
942 *) host_alias=$nonopt ;;
943 esac ;;
944esac
945
946host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
947host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
948host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
949host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
950echo "$ac_t""$host" 1>&6
951
952
953
954PACKAGE=libstdc++
955
956VERSION=2.90.8
957
958if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
959 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
960fi
961cat >> confdefs.h <<EOF
962#define PACKAGE "$PACKAGE"
963EOF
964
965cat >> confdefs.h <<EOF
966#define VERSION "$VERSION"
967EOF
968
969
970
971missing_dir=`cd $ac_aux_dir && pwd`
972echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
99246c90 973echo "configure:974: checking for working aclocal" >&5
b2dad0e3
BK
974# Run test in a subshell; some versions of sh will print an error if
975# an executable is not found, even if stderr is redirected.
976# Redirect stdin to placate older versions of autoconf. Sigh.
977if (aclocal --version) < /dev/null > /dev/null 2>&1; then
978 ACLOCAL=aclocal
979 echo "$ac_t""found" 1>&6
980else
981 ACLOCAL="$missing_dir/missing aclocal"
982 echo "$ac_t""missing" 1>&6
983fi
984
985echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
99246c90 986echo "configure:987: checking for working autoconf" >&5
b2dad0e3
BK
987# Run test in a subshell; some versions of sh will print an error if
988# an executable is not found, even if stderr is redirected.
989# Redirect stdin to placate older versions of autoconf. Sigh.
990if (autoconf --version) < /dev/null > /dev/null 2>&1; then
991 AUTOCONF=autoconf
992 echo "$ac_t""found" 1>&6
993else
994 AUTOCONF="$missing_dir/missing autoconf"
995 echo "$ac_t""missing" 1>&6
996fi
997
998echo $ac_n "checking for working automake""... $ac_c" 1>&6
99246c90 999echo "configure:1000: checking for working automake" >&5
b2dad0e3
BK
1000# Run test in a subshell; some versions of sh will print an error if
1001# an executable is not found, even if stderr is redirected.
1002# Redirect stdin to placate older versions of autoconf. Sigh.
1003if (automake --version) < /dev/null > /dev/null 2>&1; then
1004 AUTOMAKE=automake
1005 echo "$ac_t""found" 1>&6
1006else
1007 AUTOMAKE="$missing_dir/missing automake"
1008 echo "$ac_t""missing" 1>&6
1009fi
1010
1011echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
99246c90 1012echo "configure:1013: checking for working autoheader" >&5
b2dad0e3
BK
1013# Run test in a subshell; some versions of sh will print an error if
1014# an executable is not found, even if stderr is redirected.
1015# Redirect stdin to placate older versions of autoconf. Sigh.
1016if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1017 AUTOHEADER=autoheader
1018 echo "$ac_t""found" 1>&6
1019else
1020 AUTOHEADER="$missing_dir/missing autoheader"
1021 echo "$ac_t""missing" 1>&6
1022fi
1023
1024echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
99246c90 1025echo "configure:1026: checking for working makeinfo" >&5
b2dad0e3
BK
1026# Run test in a subshell; some versions of sh will print an error if
1027# an executable is not found, even if stderr is redirected.
1028# Redirect stdin to placate older versions of autoconf. Sigh.
1029if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1030 MAKEINFO=makeinfo
1031 echo "$ac_t""found" 1>&6
1032else
1033 MAKEINFO="$missing_dir/missing makeinfo"
1034 echo "$ac_t""missing" 1>&6
1035fi
1036
1037
1038
1039# FIXME: We temporarily define our own version of AC_PROG_CC. This is
1040# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1041# are probably using a cross compiler, which will not be able to fully
1042# link an executable. This should really be fixed in autoconf
1043# itself.
1044
1045
1046
1047
1048# Extract the first word of "gcc", so it can be a program name with args.
1049set dummy gcc; ac_word=$2
1050echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1051echo "configure:1052: checking for $ac_word" >&5
b2dad0e3
BK
1052if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1054else
1055 if test -n "$CC"; then
1056 ac_cv_prog_CC="$CC" # Let the user override the test.
1057else
1058 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1059 ac_dummy="$PATH"
1060 for ac_dir in $ac_dummy; do
1061 test -z "$ac_dir" && ac_dir=.
1062 if test -f $ac_dir/$ac_word; then
1063 ac_cv_prog_CC="gcc"
1064 break
1065 fi
1066 done
1067 IFS="$ac_save_ifs"
1068fi
1069fi
1070CC="$ac_cv_prog_CC"
1071if test -n "$CC"; then
1072 echo "$ac_t""$CC" 1>&6
1073else
1074 echo "$ac_t""no" 1>&6
1075fi
1076
1077if test -z "$CC"; then
1078 # Extract the first word of "cc", so it can be a program name with args.
1079set dummy cc; ac_word=$2
1080echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1081echo "configure:1082: checking for $ac_word" >&5
b2dad0e3
BK
1082if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1084else
1085 if test -n "$CC"; then
1086 ac_cv_prog_CC="$CC" # Let the user override the test.
1087else
1088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1089 ac_prog_rejected=no
1090 ac_dummy="$PATH"
1091 for ac_dir in $ac_dummy; do
1092 test -z "$ac_dir" && ac_dir=.
1093 if test -f $ac_dir/$ac_word; then
1094 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1095 ac_prog_rejected=yes
1096 continue
1097 fi
1098 ac_cv_prog_CC="cc"
1099 break
1100 fi
1101 done
1102 IFS="$ac_save_ifs"
1103if test $ac_prog_rejected = yes; then
1104 # We found a bogon in the path, so make sure we never use it.
1105 set dummy $ac_cv_prog_CC
1106 shift
1107 if test $# -gt 0; then
1108 # We chose a different compiler from the bogus one.
1109 # However, it has the same basename, so the bogon will be chosen
1110 # first if we set CC to just the basename; use the full file name.
1111 shift
1112 set dummy "$ac_dir/$ac_word" "$@"
1113 shift
1114 ac_cv_prog_CC="$@"
1115 fi
1116fi
1117fi
1118fi
1119CC="$ac_cv_prog_CC"
1120if test -n "$CC"; then
1121 echo "$ac_t""$CC" 1>&6
1122else
1123 echo "$ac_t""no" 1>&6
1124fi
1125
1126 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1127fi
1128
1129echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
99246c90 1130echo "configure:1131: checking whether we are using GNU C" >&5
b2dad0e3
BK
1131if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 cat > conftest.c <<EOF
1135#ifdef __GNUC__
1136 yes;
1137#endif
1138EOF
99246c90 1139if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b2dad0e3
BK
1140 ac_cv_prog_gcc=yes
1141else
1142 ac_cv_prog_gcc=no
1143fi
1144fi
1145
1146echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1147
1148if test $ac_cv_prog_gcc = yes; then
1149 GCC=yes
1150 ac_test_CFLAGS="${CFLAGS+set}"
1151 ac_save_CFLAGS="$CFLAGS"
1152 CFLAGS=
1153 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
99246c90 1154echo "configure:1155: checking whether ${CC-cc} accepts -g" >&5
b2dad0e3
BK
1155if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157else
1158 echo 'void f(){}' > conftest.c
1159if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1160 ac_cv_prog_cc_g=yes
1161else
1162 ac_cv_prog_cc_g=no
1163fi
1164rm -f conftest*
1165
1166fi
1167
1168echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1169 if test "$ac_test_CFLAGS" = set; then
1170 CFLAGS="$ac_save_CFLAGS"
1171 elif test $ac_cv_prog_cc_g = yes; then
1172 CFLAGS="-g -O2"
1173 else
1174 CFLAGS="-O2"
1175 fi
1176else
1177 GCC=
1178 test "${CFLAGS+set}" = set || CFLAGS="-g"
1179fi
1180
1181
1182# Likewise for AC_PROG_CXX.
1183
1184
1185
1186for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1187do
1188# Extract the first word of "$ac_prog", so it can be a program name with args.
1189set dummy $ac_prog; ac_word=$2
1190echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1191echo "configure:1192: checking for $ac_word" >&5
b2dad0e3
BK
1192if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1193 echo $ac_n "(cached) $ac_c" 1>&6
1194else
1195 if test -n "$CXX"; then
1196 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1197else
1198 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201 test -z "$ac_dir" && ac_dir=.
1202 if test -f $ac_dir/$ac_word; then
1203 ac_cv_prog_CXX="$ac_prog"
1204 break
1205 fi
1206 done
1207 IFS="$ac_save_ifs"
1208fi
1209fi
1210CXX="$ac_cv_prog_CXX"
1211if test -n "$CXX"; then
1212 echo "$ac_t""$CXX" 1>&6
1213else
1214 echo "$ac_t""no" 1>&6
1215fi
1216
1217test -n "$CXX" && break
1218done
1219test -n "$CXX" || CXX="gcc"
1220
1221test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1222
1223echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
99246c90 1224echo "configure:1225: checking whether we are using GNU C++" >&5
b2dad0e3
BK
1225if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1227else
1228 cat > conftest.C <<EOF
1229#ifdef __GNUC__
1230 yes;
1231#endif
1232EOF
99246c90 1233if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b2dad0e3
BK
1234 ac_cv_prog_gxx=yes
1235else
1236 ac_cv_prog_gxx=no
1237fi
1238fi
1239
1240echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1241
1242if test $ac_cv_prog_gxx = yes; then
1243 GXX=yes
1244 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1245 ac_save_CXXFLAGS="$CXXFLAGS"
1246 CXXFLAGS=
1247 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
99246c90 1248echo "configure:1249: checking whether ${CXX-g++} accepts -g" >&5
b2dad0e3
BK
1249if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 echo 'void f(){}' > conftest.cc
1253if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1254 ac_cv_prog_cxx_g=yes
1255else
1256 ac_cv_prog_cxx_g=no
1257fi
1258rm -f conftest*
1259
1260fi
1261
1262echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1263 if test "$ac_test_CXXFLAGS" = set; then
1264 CXXFLAGS="$ac_save_CXXFLAGS"
1265 elif test $ac_cv_prog_cxx_g = yes; then
1266 CXXFLAGS="-g -O2"
1267 else
1268 CXXFLAGS="-O2"
1269 fi
1270else
1271 GXX=
1272 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1273fi
1274
1275
1276# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
1277# run it explicitly here, it will be run implicitly before
1278# LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1279# be run before AC_CANONICAL_HOST.
1280echo $ac_n "checking build system type""... $ac_c" 1>&6
99246c90 1281echo "configure:1282: checking build system type" >&5
b2dad0e3
BK
1282
1283build_alias=$build
1284case "$build_alias" in
1285NONE)
1286 case $nonopt in
1287 NONE) build_alias=$host_alias ;;
1288 *) build_alias=$nonopt ;;
1289 esac ;;
1290esac
1291
1292build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1293build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296echo "$ac_t""$build" 1>&6
1297
1298
1299# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1300set dummy ${ac_tool_prefix}as; ac_word=$2
1301echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1302echo "configure:1303: checking for $ac_word" >&5
b2dad0e3
BK
1303if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 if test -n "$AS"; then
1307 ac_cv_prog_AS="$AS" # Let the user override the test.
1308else
1309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1310 ac_dummy="$PATH"
1311 for ac_dir in $ac_dummy; do
1312 test -z "$ac_dir" && ac_dir=.
1313 if test -f $ac_dir/$ac_word; then
1314 ac_cv_prog_AS="${ac_tool_prefix}as"
1315 break
1316 fi
1317 done
1318 IFS="$ac_save_ifs"
1319 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1320fi
1321fi
1322AS="$ac_cv_prog_AS"
1323if test -n "$AS"; then
1324 echo "$ac_t""$AS" 1>&6
1325else
1326 echo "$ac_t""no" 1>&6
1327fi
1328
1329
1330
1331# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1332set dummy ${ac_tool_prefix}ar; ac_word=$2
1333echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1334echo "configure:1335: checking for $ac_word" >&5
b2dad0e3
BK
1335if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 if test -n "$AR"; then
1339 ac_cv_prog_AR="$AR" # Let the user override the test.
1340else
1341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1342 ac_dummy="$PATH"
1343 for ac_dir in $ac_dummy; do
1344 test -z "$ac_dir" && ac_dir=.
1345 if test -f $ac_dir/$ac_word; then
1346 ac_cv_prog_AR="${ac_tool_prefix}ar"
1347 break
1348 fi
1349 done
1350 IFS="$ac_save_ifs"
1351 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1352fi
1353fi
1354AR="$ac_cv_prog_AR"
1355if test -n "$AR"; then
1356 echo "$ac_t""$AR" 1>&6
1357else
1358 echo "$ac_t""no" 1>&6
1359fi
1360
1361
1362
1363# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1364set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1365echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1366echo "configure:1367: checking for $ac_word" >&5
b2dad0e3
BK
1367if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1368 echo $ac_n "(cached) $ac_c" 1>&6
1369else
1370 if test -n "$RANLIB"; then
1371 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1372else
1373 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1374 ac_dummy="$PATH"
1375 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 if test -f $ac_dir/$ac_word; then
1378 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1379 break
1380 fi
1381 done
1382 IFS="$ac_save_ifs"
1383fi
1384fi
1385RANLIB="$ac_cv_prog_RANLIB"
1386if test -n "$RANLIB"; then
1387 echo "$ac_t""$RANLIB" 1>&6
1388else
1389 echo "$ac_t""no" 1>&6
1390fi
1391
1392
1393if test -z "$ac_cv_prog_RANLIB"; then
1394if test -n "$ac_tool_prefix"; then
1395 # Extract the first word of "ranlib", so it can be a program name with args.
1396set dummy ranlib; ac_word=$2
1397echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1398echo "configure:1399: checking for $ac_word" >&5
b2dad0e3
BK
1399if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402 if test -n "$RANLIB"; then
1403 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1404else
1405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408 test -z "$ac_dir" && ac_dir=.
1409 if test -f $ac_dir/$ac_word; then
1410 ac_cv_prog_RANLIB="ranlib"
1411 break
1412 fi
1413 done
1414 IFS="$ac_save_ifs"
1415 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1416fi
1417fi
1418RANLIB="$ac_cv_prog_RANLIB"
1419if test -n "$RANLIB"; then
1420 echo "$ac_t""$RANLIB" 1>&6
1421else
1422 echo "$ac_t""no" 1>&6
1423fi
1424
1425else
1426 RANLIB=":"
1427fi
1428fi
1429
1430
1431# Find a good install program. We prefer a C program (faster),
1432# so one script is as good as another. But avoid the broken or
1433# incompatible versions:
1434# SysV /etc/install, /usr/sbin/install
1435# SunOS /usr/etc/install
1436# IRIX /sbin/install
1437# AIX /bin/install
1438# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1439# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1440# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1441# ./install, which can be erroneously created by make from ./install.sh.
1442echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
99246c90 1443echo "configure:1444: checking for a BSD compatible install" >&5
b2dad0e3
BK
1444if test -z "$INSTALL"; then
1445if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1447else
1448 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1449 for ac_dir in $PATH; do
1450 # Account for people who put trailing slashes in PATH elements.
1451 case "$ac_dir/" in
1452 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1453 *)
1454 # OSF1 and SCO ODT 3.0 have their own names for install.
1455 # Don't use installbsd from OSF since it installs stuff as root
1456 # by default.
1457 for ac_prog in ginstall scoinst install; do
1458 if test -f $ac_dir/$ac_prog; then
1459 if test $ac_prog = install &&
1460 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1461 # AIX install. It has an incompatible calling convention.
1462 :
1463 else
1464 ac_cv_path_install="$ac_dir/$ac_prog -c"
1465 break 2
1466 fi
1467 fi
1468 done
1469 ;;
1470 esac
1471 done
1472 IFS="$ac_save_IFS"
1473
1474fi
1475 if test "${ac_cv_path_install+set}" = set; then
1476 INSTALL="$ac_cv_path_install"
1477 else
1478 # As a last resort, use the slow shell script. We don't cache a
1479 # path for INSTALL within a source directory, because that will
1480 # break other packages using the cache if that directory is
1481 # removed, or if the path is relative.
1482 INSTALL="$ac_install_sh"
1483 fi
1484fi
1485echo "$ac_t""$INSTALL" 1>&6
1486
1487# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1488# It thinks the first close brace ends the variable substitution.
1489test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1490
1491test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1492
1493test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1494
1495
1496echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
99246c90 1497echo "configure:1498: checking whether to enable maintainer-specific portions of Makefiles" >&5
b2dad0e3
BK
1498 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1499if test "${enable_maintainer_mode+set}" = set; then
1500 enableval="$enable_maintainer_mode"
1501 USE_MAINTAINER_MODE=$enableval
1502else
1503 USE_MAINTAINER_MODE=no
1504fi
1505
1506 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1507
1508
1509if test $USE_MAINTAINER_MODE = yes; then
1510 MAINTAINER_MODE_TRUE=
1511 MAINTAINER_MODE_FALSE='#'
1512else
1513 MAINTAINER_MODE_TRUE='#'
1514 MAINTAINER_MODE_FALSE=
1515fi
1516 MAINT=$MAINTAINER_MODE_TRUE
1517
1518
1519
1520# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1521# at least currently, we never actually build a program, so we never
1522# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1523# fails, because we are probably configuring with a cross compiler
1524# which cant create executables. So we include AC_EXEEXT to keep
1525# automake happy, but we dont execute it, since we dont care about
1526# the result.
1527if false; then
1528
1529
1530echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
99246c90 1531echo "configure:1532: checking for executable suffix" >&5
b2dad0e3
BK
1532if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1533 echo $ac_n "(cached) $ac_c" 1>&6
1534else
1535 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1536 ac_cv_exeext=.exe
1537else
1538 rm -f conftest*
1539 echo 'int main () { return 0; }' > conftest.$ac_ext
1540 ac_cv_exeext=
99246c90 1541 if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b2dad0e3
BK
1542 for file in conftest.*; do
1543 case $file in
1544 *.c | *.o | *.obj) ;;
1545 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1546 esac
1547 done
1548 else
1549 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1550 fi
1551 rm -f conftest*
1552 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1553fi
1554fi
1555
1556EXEEXT=""
1557test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1558echo "$ac_t""${ac_cv_exeext}" 1>&6
1559ac_exeext=$EXEEXT
1560
1561fi
1562
1563# configure.host sets the following important variables
1564# glibcpp_cflags - host specific C compiler flags
1565# glibcpp_cxxflags - host specific C++ compiler flags
1566
1567glibcpp_cflags=
1568glibcpp_cxxflags=
1569
1570. ${glibcpp_basedir}/configure.host
1571
1572case ${glibcpp_basedir} in
1573/* | A-Za-z:/\\*) libgcj_flagbasedir=${glibcpp_basedir} ;;
1574*) glibcpp_flagbasedir='$(top_builddir)/'${glibcpp_basedir} ;;
1575esac
1576
1577GLIBCPP_CFLAGS="${glibcpp_cflags}"
1578GLIBCPP_CXXFLAGS="${glibcpp_cxxflags}"
1579
1580
1581
1582
1583# Check whether --enable-shared or --disable-shared was given.
1584if test "${enable_shared+set}" = set; then
1585 enableval="$enable_shared"
1586 p=${PACKAGE-default}
1587case "$enableval" in
1588yes) enable_shared=yes ;;
1589no) enable_shared=no ;;
1590*)
1591 enable_shared=no
1592 # Look at the argument we got. We use all the common list separators.
1593 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1594 for pkg in $enableval; do
1595 if test "X$pkg" = "X$p"; then
1596 enable_shared=yes
1597 fi
1598 done
1599 IFS="$ac_save_ifs"
1600 ;;
1601esac
1602else
1603 enable_shared=yes
1604fi
1605
1606# Check whether --enable-static or --disable-static was given.
1607if test "${enable_static+set}" = set; then
1608 enableval="$enable_static"
1609 p=${PACKAGE-default}
1610case "$enableval" in
1611yes) enable_static=yes ;;
1612no) enable_static=no ;;
1613*)
1614 enable_static=no
1615 # Look at the argument we got. We use all the common list separators.
1616 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1617 for pkg in $enableval; do
1618 if test "X$pkg" = "X$p"; then
1619 enable_static=yes
1620 fi
1621 done
1622 IFS="$ac_save_ifs"
1623 ;;
1624esac
1625else
1626 enable_static=yes
1627fi
1628
1629# Check whether --enable-fast-install or --disable-fast-install was given.
1630if test "${enable_fast_install+set}" = set; then
1631 enableval="$enable_fast_install"
1632 p=${PACKAGE-default}
1633case "$enableval" in
1634yes) enable_fast_install=yes ;;
1635no) enable_fast_install=no ;;
1636*)
1637 enable_fast_install=no
1638 # Look at the argument we got. We use all the common list separators.
1639 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1640 for pkg in $enableval; do
1641 if test "X$pkg" = "X$p"; then
1642 enable_fast_install=yes
1643 fi
1644 done
1645 IFS="$ac_save_ifs"
1646 ;;
1647esac
1648else
1649 enable_fast_install=yes
1650fi
1651
1652# Extract the first word of "ranlib", so it can be a program name with args.
1653set dummy ranlib; ac_word=$2
1654echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
99246c90 1655echo "configure:1656: checking for $ac_word" >&5
b2dad0e3
BK
1656if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1658else
1659 if test -n "$RANLIB"; then
1660 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1661else
1662 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1663 ac_dummy="$PATH"
1664 for ac_dir in $ac_dummy; do
1665 test -z "$ac_dir" && ac_dir=.
1666 if test -f $ac_dir/$ac_word; then
1667 ac_cv_prog_RANLIB="ranlib"
1668 break
1669 fi
1670 done
1671 IFS="$ac_save_ifs"
1672 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1673fi
1674fi
1675RANLIB="$ac_cv_prog_RANLIB"
1676if test -n "$RANLIB"; then
1677 echo "$ac_t""$RANLIB" 1>&6
1678else
1679 echo "$ac_t""no" 1>&6
1680fi
1681
1682# Check whether --with-gnu-ld or --without-gnu-ld was given.
1683if test "${with_gnu_ld+set}" = set; then
1684 withval="$with_gnu_ld"
1685 test "$withval" = no || with_gnu_ld=yes
1686else
1687 with_gnu_ld=no
1688fi
1689
1690ac_prog=ld
1691if test "$ac_cv_prog_gcc" = yes; then
1692 # Check if gcc -print-prog-name=ld gives a path.
1693 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
99246c90 1694echo "configure:1695: checking for ld used by GCC" >&5
b2dad0e3
BK
1695 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1696 case "$ac_prog" in
1697 # Accept absolute paths.
1698 [\\/]* | [A-Za-z]:[\\/]*)
1699 re_direlt='/[^/][^/]*/\.\./'
1700 # Canonicalize the path of ld
1701 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1702 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1703 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1704 done
1705 test -z "$LD" && LD="$ac_prog"
1706 ;;
1707 "")
1708 # If it fails, then pretend we aren't using GCC.
1709 ac_prog=ld
1710 ;;
1711 *)
1712 # If it is relative, then search for the first ld in PATH.
1713 with_gnu_ld=unknown
1714 ;;
1715 esac
1716elif test "$with_gnu_ld" = yes; then
1717 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
99246c90 1718echo "configure:1719: checking for GNU ld" >&5
b2dad0e3
BK
1719else
1720 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
99246c90 1721echo "configure:1722: checking for non-GNU ld" >&5
b2dad0e3
BK
1722fi
1723if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1725else
1726 if test -z "$LD"; then
1727 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1728 for ac_dir in $PATH; do
1729 test -z "$ac_dir" && ac_dir=.
1730 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1731 ac_cv_path_LD="$ac_dir/$ac_prog"
1732 # Check to see if the program is GNU ld. I'd rather use --version,
1733 # but apparently some GNU ld's only accept -v.
1734 # Break only if it was the GNU/non-GNU ld that we prefer.
1735 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1736 test "$with_gnu_ld" != no && break
1737 else
1738 test "$with_gnu_ld" != yes && break
1739 fi
1740 fi
1741 done
1742 IFS="$ac_save_ifs"
1743else
1744 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1745fi
1746fi
1747
1748LD="$ac_cv_path_LD"
1749if test -n "$LD"; then
1750 echo "$ac_t""$LD" 1>&6
1751else
1752 echo "$ac_t""no" 1>&6
1753fi
1754test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1755echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
99246c90 1756echo "configure:1757: checking if the linker ($LD) is GNU ld" >&5
b2dad0e3
BK
1757if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759else
1760 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1761if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1762 ac_cv_prog_gnu_ld=yes
1763else
1764 ac_cv_prog_gnu_ld=no
1765fi
1766fi
1767
1768echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1769
1770
1771echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
99246c90 1772echo "configure:1773: checking for BSD-compatible nm" >&5
b2dad0e3
BK
1773if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 if test -n "$NM"; then
1777 # Let the user override the test.
1778 ac_cv_path_NM="$NM"
1779else
1780 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1781 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1782 test -z "$ac_dir" && ac_dir=.
1783 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1784 # Check to see if the nm accepts a BSD-compat flag.
1785 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1786 # nm: unknown option "B" ignored
1787 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1788 ac_cv_path_NM="$ac_dir/nm -B"
1789 break
1790 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1791 ac_cv_path_NM="$ac_dir/nm -p"
1792 break
1793 else
1794 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1795 continue # so that we can try to find one that supports BSD flags
1796 fi
1797 fi
1798 done
1799 IFS="$ac_save_ifs"
1800 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1801fi
1802fi
1803
1804NM="$ac_cv_path_NM"
1805echo "$ac_t""$NM" 1>&6
1806
1807echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
99246c90 1808echo "configure:1809: checking whether ln -s works" >&5
b2dad0e3
BK
1809if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811else
1812 rm -f conftestdata
1813if ln -s X conftestdata 2>/dev/null
1814then
1815 rm -f conftestdata
1816 ac_cv_prog_LN_S="ln -s"
1817else
1818 ac_cv_prog_LN_S=ln
1819fi
1820fi
1821LN_S="$ac_cv_prog_LN_S"
1822if test "$ac_cv_prog_LN_S" = "ln -s"; then
1823 echo "$ac_t""yes" 1>&6
1824else
1825 echo "$ac_t""no" 1>&6
1826fi
1827
1828
1829case "$target" in
1830NONE) lt_target="$host" ;;
1831*) lt_target="$target" ;;
1832esac
1833
1834# Check for any special flags to pass to ltconfig.
1835libtool_flags="--cache-file=$cache_file"
1836test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1837test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1838test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1839test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1840test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1841libtool_flags="$libtool_flags --enable-dlopen"
1842
1843# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1844if test "${enable_libtool_lock+set}" = set; then
1845 enableval="$enable_libtool_lock"
1846 :
1847fi
1848
1849test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1850test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1851
1852# Some flags need to be propagated to the compiler or linker for good
1853# libtool support.
1854case "$lt_target" in
1855*-*-irix6*)
1856 # Find out which ABI we are using.
99246c90
PE
1857 echo '#line 1858 "configure"' > conftest.$ac_ext
1858 if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
1859 case "`/usr/bin/file conftest.o`" in
1860 *32-bit*)
1861 LD="${LD-ld} -32"
1862 ;;
1863 *N32*)
1864 LD="${LD-ld} -n32"
1865 ;;
1866 *64-bit*)
1867 LD="${LD-ld} -64"
1868 ;;
1869 esac
1870 fi
1871 rm -rf conftest*
1872 ;;
1873
1874*-*-sco3.2v5*)
1875 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1876 SAVE_CFLAGS="$CFLAGS"
1877 CFLAGS="$CFLAGS -belf"
1878 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
99246c90 1879echo "configure:1880: checking whether the C compiler needs -belf" >&5
b2dad0e3
BK
1880if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
1882else
1883 cat > conftest.$ac_ext <<EOF
99246c90 1884#line 1885 "configure"
b2dad0e3
BK
1885#include "confdefs.h"
1886
1887int main() {
1888
1889; return 0; }
1890EOF
99246c90 1891if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
1892 rm -rf conftest*
1893 lt_cv_cc_needs_belf=yes
1894else
1895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
1897 rm -rf conftest*
1898 lt_cv_cc_needs_belf=no
1899fi
1900rm -f conftest*
1901fi
1902
1903echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1904 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1905 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1906 CFLAGS="$SAVE_CFLAGS"
1907 fi
1908 ;;
1909
1910
1911esac
1912
1913
1914# Save cache, so that ltconfig can load it
1915cat > confcache <<\EOF
1916# This file is a shell script that caches the results of configure
1917# tests run on this system so they can be shared between configure
1918# scripts and configure runs. It is not useful on other systems.
1919# If it contains results you don't want to keep, you may remove or edit it.
1920#
1921# By default, configure uses ./config.cache as the cache file,
1922# creating it if it does not exist already. You can give configure
1923# the --cache-file=FILE option to use a different cache file; that is
1924# what configure does when it calls configure scripts in
1925# subdirectories, so they share the cache.
1926# Giving --cache-file=/dev/null disables caching, for debugging configure.
1927# config.status only pays attention to the cache file if you give it the
1928# --recheck option to rerun configure.
1929#
1930EOF
1931# The following way of writing the cache mishandles newlines in values,
1932# but we know of no workaround that is simple, portable, and efficient.
1933# So, don't put newlines in cache variables' values.
1934# Ultrix sh set writes to stderr and can't be redirected directly,
1935# and sets the high bit in the cache file unless we assign to the vars.
1936(set) 2>&1 |
1937 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1938 *ac_space=\ *)
1939 # `set' does not quote correctly, so add quotes (double-quote substitution
1940 # turns \\\\ into \\, and sed turns \\ into \).
1941 sed -n \
1942 -e "s/'/'\\\\''/g" \
1943 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1944 ;;
1945 *)
1946 # `set' quotes correctly as required by POSIX, so do not add quotes.
1947 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1948 ;;
1949 esac >> confcache
1950if cmp -s $cache_file confcache; then
1951 :
1952else
1953 if test -w $cache_file; then
1954 echo "updating cache $cache_file"
1955 cat confcache > $cache_file
1956 else
1957 echo "not updating unwritable cache $cache_file"
1958 fi
1959fi
1960rm -f confcache
1961
1962
1963# Actually configure libtool. ac_aux_dir is where install-sh is found.
1964CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1965LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1966LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1967DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1968${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1969$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1970|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1971
1972# Reload cache, that may have been modified by ltconfig
1973if test -r "$cache_file"; then
1974 echo "loading cache $cache_file"
1975 . $cache_file
1976else
1977 echo "creating cache $cache_file"
1978 > $cache_file
1979fi
1980
1981
1982# This can be used to rebuild libtool when needed
1983LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1984
1985# Always use our own libtool.
1986LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1987
1988# Redirect the config.log output again, so that the ltconfig log is not
1989# clobbered by the next message.
1990exec 5>>./config.log
1991
1992
1993
1994
1995
1996# Check for c++ or library specific bits that don't require linking.
a4e99046
PE
1997echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1998echo "configure:1999: checking how to run the C++ preprocessor" >&5
1999if test -z "$CXXCPP"; then
2000if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
b2dad0e3
BK
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002else
a4e99046
PE
2003 ac_ext=C
2004# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2005ac_cpp='$CXXCPP $CPPFLAGS'
2006ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2007ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2008cross_compiling=$ac_cv_prog_cxx_cross
2009 CXXCPP="${CXX-g++} -E"
b2dad0e3 2010 cat > conftest.$ac_ext <<EOF
a4e99046 2011#line 2012 "configure"
b2dad0e3 2012#include "confdefs.h"
a4e99046 2013#include <stdlib.h>
b2dad0e3
BK
2014EOF
2015ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a4e99046 2016{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2017ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2018if test -z "$ac_err"; then
2019 :
2020else
2021 echo "$ac_err" >&5
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -rf conftest*
a4e99046 2025 CXXCPP=/lib/cpp
b2dad0e3
BK
2026fi
2027rm -f conftest*
a4e99046
PE
2028 ac_cv_prog_CXXCPP="$CXXCPP"
2029ac_ext=C
2030# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2031ac_cpp='$CXXCPP $CPPFLAGS'
2032ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2033ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2034cross_compiling=$ac_cv_prog_cxx_cross
b2dad0e3 2035fi
b2dad0e3 2036fi
a4e99046
PE
2037CXXCPP="$ac_cv_prog_CXXCPP"
2038echo "$ac_t""$CXXCPP" 1>&6
2039
b2dad0e3 2040
a4e99046
PE
2041 # All these tests are for C++; save the language and the compiler flags.
2042 # The CXXFLAGS thing is suspicious, but based on similar bits
2043 # found in GLIBCPP_CONFIGURE.
2044
2045 ac_ext=C
2046# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2047ac_cpp='$CXXCPP $CPPFLAGS'
2048ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2049ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2050cross_compiling=$ac_cv_prog_cxx_cross
2051
2052 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2053 ac_save_CXXFLAGS="$CXXFLAGS"
2054 WERROR='-Werror'
b2dad0e3 2055
d3a12960 2056 # Sanity check that g++ is capable of dealing with v-3.
b2dad0e3 2057 echo $ac_n "checking for g++ that will successfullly compile this code""... $ac_c" 1>&6
d3a12960 2058echo "configure:2059: checking for g++ that will successfullly compile this code" >&5
b2dad0e3 2059 cat > conftest.$ac_ext <<EOF
d3a12960 2060#line 2061 "configure"
b2dad0e3
BK
2061#include "confdefs.h"
2062
2063 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
2064 ok
2065 #endif
2066
2067EOF
2068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2069 egrep "ok" >/dev/null 2>&1; then
2070 rm -rf conftest*
2071 gpp_satisfactory=yes
2072else
2073 rm -rf conftest*
2074 { echo "configure: error: "please upgrade to gcc-2.95 or above"" 1>&2; exit 1; }
2075fi
2076rm -f conftest*
2077
2078 echo "$ac_t""$gpp_satisfactory" 1>&6
2079
d3a12960
BK
2080 # Check for pragma system_header.
2081 echo $ac_n "checking for g++ that supports pragma system_header""... $ac_c" 1>&6
2082echo "configure:2083: checking for g++ that supports pragma system_header" >&5
8bd636c5
PE
2083 CXXFLAGS='-Wunknown-pragmas -Werror'
2084 cat > conftest.$ac_ext <<EOF
d3a12960 2085#line 2086 "configure"
8bd636c5
PE
2086#include "confdefs.h"
2087#pragma system_header
2088int main() {
2089int foo;
2090
2091; return 0; }
2092EOF
d3a12960 2093if { (eval echo configure:2094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8bd636c5 2094 rm -rf conftest*
11a6e9a7 2095 ac_newpragma=yes
8bd636c5
PE
2096else
2097 echo "configure: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 rm -rf conftest*
11a6e9a7 2100 ac_newpragma=no
8bd636c5
PE
2101fi
2102rm -f conftest*
2103 if test "$ac_test_CXXFLAGS" = set; then
2104 CXXFLAGS="$ac_save_CXXFLAGS"
2105 else
2106 # this is the suspicious part
2107 CXXFLAGS=''
2108 fi
11a6e9a7
PE
2109 if test "$ac_newpragma" = "no"; then
2110 WERROR="$WERROR -Wno-unknown-pragmas"
8bd636c5 2111 fi
11a6e9a7 2112 echo "$ac_t""$ac_newpragma" 1>&6
8bd636c5 2113
d3a12960
BK
2114 # Check for more sophisticated diagnostic control.
2115 echo $ac_n "checking for g++ that supports -fdiagnostics-show-location=once""... $ac_c" 1>&6
2116echo "configure:2117: checking for g++ that supports -fdiagnostics-show-location=once" >&5
a4e99046
PE
2117 CXXFLAGS='-fdiagnostics-show-location=once'
2118 cat > conftest.$ac_ext <<EOF
d3a12960 2119#line 2120 "configure"
a4e99046
PE
2120#include "confdefs.h"
2121
2122int main() {
2123int foo;
2124
2125; return 0; }
2126EOF
d3a12960 2127if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4e99046
PE
2128 rm -rf conftest*
2129 ac_gabydiags=yes
2130else
2131 echo "configure: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
2133 rm -rf conftest*
2134 ac_gabydiags=no
2135fi
2136rm -f conftest*
2137 if test "$ac_test_CXXFLAGS" = set; then
2138 CXXFLAGS="$ac_save_CXXFLAGS"
2139 else
2140 # this is the suspicious part
2141 CXXFLAGS=''
2142 fi
2143 if test "$ac_gabydiags" = "yes"; then
d3a12960 2144 FMTFLAGS='-fdiagnostics-show-location=once'
a4e99046
PE
2145 fi
2146 echo "$ac_t""$ac_gabydiags" 1>&6
2147
a4e99046
PE
2148 ac_ext=c
2149# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2150ac_cpp='$CPP $CPPFLAGS'
2151ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2152ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2153cross_compiling=$ac_cv_prog_cc_cross
2154
b2dad0e3
BK
2155
2156
2157
2158
2159 echo $ac_n "checking for cpu primitives directory""... $ac_c" 1>&6
d3a12960 2160echo "configure:2161: checking for cpu primitives directory" >&5
cde28f0d 2161 CPUFLAGS=
b2dad0e3
BK
2162 case "$target_cpu" in
2163 alpha*)
2164 cpu_include_dir="config/cpu/alpha"
2165 ;;
2166 arm*)
2167 cpu_include_dir="config/cpu/arm"
2168 ;;
bf93f43b 2169 i386)
b2dad0e3 2170 cpu_include_dir="config/cpu/i386"
bf93f43b
BK
2171 ;;
2172 i486 | i586 | i686 | i786)
2173 cpu_include_dir="config/cpu/i486"
b2dad0e3
BK
2174 ;;
2175 powerpc | rs6000)
2176 cpu_include_dir="config/cpu/powerpc"
7b267e3e 2177 CPUFLAGS='-mcpu=powerpc'
b2dad0e3
BK
2178 ;;
2179 sparc64 | ultrasparc)
2180 cpu_include_dir="config/cpu/sparc/sparc64"
2181 ;;
2182 sparc*)
2183 cpu_include_dir="config/cpu/sparc/sparc32"
2184 ;;
2185 *)
2186 cpu_include_dir="config/cpu/generic"
2187 ;;
2188 esac
2189 echo "$ac_t""$cpu_include_dir" 1>&6
2190
cde28f0d 2191
b2dad0e3
BK
2192
2193
2194# Enable all the crazy c++ stuff.
2195# Check whether --enable-debug or --disable-debug was given.
2196if test "${enable_debug+set}" = set; then
2197 enableval="$enable_debug"
2198 case "$enableval" in
2199 yes) enable_debug=yes ;;
2200 no) enable_debug=no ;;
2201 *) { echo "configure: error: Unknown argument to enable/disable extra debugging" 1>&2; exit 1; } ;;
2202 esac
2203else
2204 enable_debug=no
2205fi
2206case "$enable_debug" in
cde28f0d
BK
2207 yes)
2208 DEBUGFLAGS='-O0 -ggdb'
2209 ;;
f3b004d8
BK
2210 no)
2211 DEBUGFLAGS='-g'
2212 ;;
b2dad0e3
BK
2213esac
2214
2215
a4e99046 2216echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
bf93f43b 2217echo "configure:2218: checking how to run the C preprocessor" >&5
a4e99046
PE
2218# On Suns, sometimes $CPP names a directory.
2219if test -n "$CPP" && test -d "$CPP"; then
2220 CPP=
2221fi
2222if test -z "$CPP"; then
2223if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2224 echo $ac_n "(cached) $ac_c" 1>&6
2225else
2226 # This must be in double quotes, not single quotes, because CPP may get
2227 # substituted into the Makefile and "${CC-cc}" will confuse make.
2228 CPP="${CC-cc} -E"
2229 # On the NeXT, cc -E runs the code through the compiler's parser,
2230 # not just through cpp.
2231 cat > conftest.$ac_ext <<EOF
bf93f43b 2232#line 2233 "configure"
a4e99046
PE
2233#include "confdefs.h"
2234#include <assert.h>
2235Syntax Error
2236EOF
2237ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2238{ (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a4e99046
PE
2239ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2240if test -z "$ac_err"; then
2241 :
2242else
2243 echo "$ac_err" >&5
2244 echo "configure: failed program was:" >&5
2245 cat conftest.$ac_ext >&5
2246 rm -rf conftest*
2247 CPP="${CC-cc} -E -traditional-cpp"
2248 cat > conftest.$ac_ext <<EOF
bf93f43b 2249#line 2250 "configure"
a4e99046
PE
2250#include "confdefs.h"
2251#include <assert.h>
2252Syntax Error
2253EOF
2254ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2255{ (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a4e99046
PE
2256ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2257if test -z "$ac_err"; then
2258 :
2259else
2260 echo "$ac_err" >&5
2261 echo "configure: failed program was:" >&5
2262 cat conftest.$ac_ext >&5
2263 rm -rf conftest*
2264 CPP="${CC-cc} -nologo -E"
2265 cat > conftest.$ac_ext <<EOF
bf93f43b 2266#line 2267 "configure"
a4e99046
PE
2267#include "confdefs.h"
2268#include <assert.h>
2269Syntax Error
2270EOF
2271ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2272{ (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a4e99046
PE
2273ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2274if test -z "$ac_err"; then
2275 :
2276else
2277 echo "$ac_err" >&5
2278 echo "configure: failed program was:" >&5
2279 cat conftest.$ac_ext >&5
2280 rm -rf conftest*
2281 CPP=/lib/cpp
2282fi
2283rm -f conftest*
2284fi
2285rm -f conftest*
2286fi
2287rm -f conftest*
2288 ac_cv_prog_CPP="$CPP"
2289fi
2290 CPP="$ac_cv_prog_CPP"
2291else
2292 ac_cv_prog_CPP="$CPP"
2293fi
2294echo "$ac_t""$CPP" 1>&6
2295
b2dad0e3
BK
2296
2297 echo $ac_n "checking for cstdio to use""... $ac_c" 1>&6
bf93f43b 2298echo "configure:2299: checking for cstdio to use" >&5
b2dad0e3
BK
2299 # Check whether --enable-cstdio or --disable-cstdio was given.
2300if test "${enable_cstdio+set}" = set; then
2301 enableval="$enable_cstdio"
2302 if test x$enable_cstdio = xno; then
2303 enable_cstdio=libio
2304 fi
2305else
2306 enable_cstdio=libio
2307fi
2308
2309
2310 enable_cstdio_flag=$enable_cstdio
2311
2312 case x${enable_cstdio_flag} in
2313 xlibio | x | xno | xnone | xyes)
2314 # default
2315 CSTDIO_H=c_io_libio.h
2316 CSTDIO_CC=c_io_libio.cc
2317 echo "$ac_t""libio" 1>&6
2318
2319 # see if we are on a system with libio native (ie, linux)
2320 ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
2321echo $ac_n "checking for libio.h""... $ac_c" 1>&6
bf93f43b 2322echo "configure:2323: checking for libio.h" >&5
b2dad0e3
BK
2323if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2324 echo $ac_n "(cached) $ac_c" 1>&6
2325else
2326 cat > conftest.$ac_ext <<EOF
bf93f43b 2327#line 2328 "configure"
b2dad0e3
BK
2328#include "confdefs.h"
2329#include <libio.h>
2330EOF
2331ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2332{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2333ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334if test -z "$ac_err"; then
2335 rm -rf conftest*
2336 eval "ac_cv_header_$ac_safe=yes"
2337else
2338 echo "$ac_err" >&5
2339 echo "configure: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 rm -rf conftest*
2342 eval "ac_cv_header_$ac_safe=no"
2343fi
2344rm -f conftest*
2345fi
2346if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2347 echo "$ac_t""yes" 1>&6
2348 has_libio=yes
2349else
2350 echo "$ac_t""no" 1>&6
2351has_libio=no
2352fi
2353
2354 if test $has_libio = "yes"; then
2355 BUILD_LIBIO_INCLUDE=
2356 need_libio=no
2357 else
2358 BUILD_LIBIO_INCLUDE='-I../libio'
2359 need_libio=yes
2360 fi
2361
f3b004d8
BK
2362
2363 # see if the _G_config.h header needs to be built.
2364 # NB: This replaces the _G_CONFIG_H machinery in libio-v2
2365 ac_safe=`echo "_G_config.h" | sed 'y%./+-%__p_%'`
2366echo $ac_n "checking for _G_config.h""... $ac_c" 1>&6
bf93f43b 2367echo "configure:2368: checking for _G_config.h" >&5
f3b004d8
BK
2368if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370else
2371 cat > conftest.$ac_ext <<EOF
bf93f43b 2372#line 2373 "configure"
f3b004d8
BK
2373#include "confdefs.h"
2374#include <_G_config.h>
2375EOF
2376ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2377{ (eval echo configure:2378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
f3b004d8
BK
2378ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2379if test -z "$ac_err"; then
2380 rm -rf conftest*
2381 eval "ac_cv_header_$ac_safe=yes"
2382else
2383 echo "$ac_err" >&5
2384 echo "configure: failed program was:" >&5
2385 cat conftest.$ac_ext >&5
2386 rm -rf conftest*
2387 eval "ac_cv_header_$ac_safe=no"
2388fi
2389rm -f conftest*
2390fi
2391if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2392 echo "$ac_t""yes" 1>&6
2393 has_gconf_h=yes
2394else
2395 echo "$ac_t""no" 1>&6
2396has_gconf_h=no
2397fi
2398
2399
2400
2401if test "$has_gconf_h" = no; then
2402 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE=
2403 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE='#'
2404else
2405 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE='#'
2406 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE=
2407fi
b2dad0e3
BK
2408 ;;
2409 xwince)
2410 CSTDIO_H=c_io_wince.h
2411 CSTDIO_CC=c_io_wince.cc
2412 echo "$ac_t""wince" 1>&6
2413
2414 need_libio=no
2415 BUILD_LIBIO_INCLUDE=
2416
2417 ;;
2418 *)
2419 echo "$enable_cstdio is an unknown io package" 1>&2
2420 exit 1
2421 ;;
2422 esac
2423
2424
2425
2426
2427if test "$need_libio" = yes; then
2428 GLIBCPP_NEED_LIBIO_TRUE=
2429 GLIBCPP_NEED_LIBIO_FALSE='#'
2430else
2431 GLIBCPP_NEED_LIBIO_TRUE='#'
2432 GLIBCPP_NEED_LIBIO_FALSE=
2433fi
2434
d0d88ce3 2435 echo $ac_n "checking for enabled long long""... $ac_c" 1>&6
bf93f43b 2436echo "configure:2437: checking for enabled long long" >&5
d0d88ce3 2437 # Check whether --enable-long-long or --disable-long-long was given.
b2dad0e3
BK
2438if test "${enable_long_long+set}" = set; then
2439 enableval="$enable_long_long"
2440 case "$enableval" in
2441 yes) enable_long_long=yes ;;
2442 no) enable_long_long=no ;;
2443 *) { echo "configure: error: Unknown argument to enable/disable long long" 1>&2; exit 1; } ;;
2444 esac
2445else
2446 enable_long_long=no
2447fi
d0d88ce3 2448 echo "$ac_t""$enable_long_long" 1>&6
b2dad0e3
BK
2449 case "$enable_long_long" in
2450 yes) cat >> confdefs.h <<\EOF
2451#define _GLIBCPP_USE_LONG_LONG 1
2452EOF
2453
2454 ;;
2455 esac
2456
d0d88ce3 2457echo $ac_n "checking for enabled cshadow headers""... $ac_c" 1>&6
bf93f43b 2458echo "configure:2459: checking for enabled cshadow headers" >&5
d0d88ce3
BK
2459# Check whether --enable-cshadow-headers or --disable-cshadow-headers was given.
2460if test "${enable_cshadow_headers+set}" = set; then
2461 enableval="$enable_cshadow_headers"
99246c90 2462 case "$enableval" in
d0d88ce3
BK
2463 yes) enable_cshadow_headers=yes
2464 ;;
2465 no) enable_cshadow_headers=no
2466 ;;
2467 *) { echo "configure: error: Unknown argument to enable/disable shadowed C headers" 1>&2; exit 1; }
2468 ;;
99246c90
PE
2469 esac
2470else
d0d88ce3 2471 enable_cshadow_headers=no
99246c90 2472fi
d0d88ce3
BK
2473echo "$ac_t""$enable_cshadow_headers" 1>&6
2474case "$enable_cshadow_headers" in
99246c90 2475 yes)
d0d88ce3 2476 SHADOW_INCLUDES="-I$srcdir/shadow -I$blddir/cshadow"
8bd636c5 2477 $srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
99246c90
PE
2478 ;;
2479 no)
2480 SHADOW_INCLUDES=''
2481 ;;
2482esac
032cc955 2483# SHADOW_INCLUDES is currently not used anywhere in the source
99246c90
PE
2484
2485
b2dad0e3
BK
2486
2487 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
bf93f43b 2488echo "configure:2489: checking for threads package to use" >&5
b2dad0e3
BK
2489 # Check whether --enable-threads or --disable-threads was given.
2490if test "${enable_threads+set}" = set; then
2491 enableval="$enable_threads"
2492 if test x$enable_threads = xno; then
2493 enable_threads=''
2494 fi
2495else
2496 enable_threads=''
2497fi
2498
2499
2500 enable_threads_flag=$enable_threads
2501
2502 case x${enable_threads_flag} in
2503 x | xno | xnone)
2504 # No threads
2505 target_thread_file='single'
2506 ;;
2507 xyes)
2508 # default
2509 target_thread_file=''
2510 ;;
2511 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2512 xsolaris | xwin32 | xdce | xvxworks)
2513 target_thread_file=$enable_threads_flag
2514 ;;
2515 *)
2516 echo "$enable_threads is an unknown thread package" 1>&2
2517 exit 1
2518 ;;
2519 esac
2520
2521 case "$target_thread_file" in
2522 no | none | single)
2523 THREADS=none
2524 ;;
2525 posix | pthreads)
2526 THREADS=posix
2527 case "$host" in
2528 *-*-linux*)
2529 ;;
2530 esac
2531 ;;
2532 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
2533 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
2534 ;;
2535 *)
2536 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
2537 ;;
2538 esac
2539 echo "$ac_t""$THREADS" 1>&6
2540
2541 THREADLIBS=
2542 THREADINCS=
2543 THREADDEPS=
2544 THREADOBJS=
2545 THREADH=
2546 THREADSPEC=
2547 case "$THREADS" in
2548 posix)
2549 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2550echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
bf93f43b 2551echo "configure:2552: checking for pthread.h" >&5
b2dad0e3
BK
2552if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2554else
2555 cat > conftest.$ac_ext <<EOF
bf93f43b 2556#line 2557 "configure"
b2dad0e3
BK
2557#include "confdefs.h"
2558#include <pthread.h>
2559EOF
2560ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2561{ (eval echo configure:2562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2562ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2563if test -z "$ac_err"; then
2564 rm -rf conftest*
2565 eval "ac_cv_header_$ac_safe=yes"
2566else
2567 echo "$ac_err" >&5
2568 echo "configure: failed program was:" >&5
2569 cat conftest.$ac_ext >&5
2570 rm -rf conftest*
2571 eval "ac_cv_header_$ac_safe=no"
2572fi
2573rm -f conftest*
2574fi
2575if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2576 echo "$ac_t""yes" 1>&6
2577 have_pthread_h=yes
2578else
2579 echo "$ac_t""no" 1>&6
2580have_pthread_h=
2581fi
2582
2583 THREADLIBS=-lpthread
2584 THREADSPEC=-lpthread
2585 THREADH=threads-posix.h
2586 ;;
2587 none)
2588 THREADH=threads-no.h
2589 ;;
2590 esac
2591
2592
2593
2594
2595
2596
b2dad0e3 2597#GLIBCPP_ENABLE_RELIBGCC([../..])
dcfa0bc8
PE
2598# Check whether --enable-cxx-flags or --disable-cxx-flags was given.
2599if test "${enable_cxx_flags+set}" = set; then
2600 enableval="$enable_cxx_flags"
2601 case "x$enableval" in
2602 xyes) { echo "configure: error: --enable-cxx-flags needs compiler flags as arguments" 1>&2; exit 1; } ;;
32a4595e 2603 xno|x) enable_cxx_flags='' ;;
dcfa0bc8
PE
2604 *) enable_cxx_flags="$enableval" ;;
2605 esac
2606else
32a4595e 2607 enable_cxx_flags='none'
dcfa0bc8 2608fi
32a4595e 2609if test "$enable_cxx_flags" = "none"; then enable_cxx_flags=''; fi
dcfa0bc8
PE
2610if test -n "$enable_cxx_flags"; then
2611 for f in $enable_cxx_flags; do
2612 case "$f" in
991a40fc 2613 -fhonor-std) ;;
dcfa0bc8
PE
2614 -*) ;;
2615 *) # and we're trying to pass /what/ exactly?
2616 { echo "configure: error: compiler flags start with a -" 1>&2; exit 1; } ;;
2617 esac
2618 done
2619fi
2620EXTRA_CXX_FLAGS="$enable_cxx_flags"
2621
2622
b2dad0e3 2623
cde28f0d 2624
b2dad0e3
BK
2625if test -n "$with_cross_host"; then
2626
2627 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
2628 # may not work correctly, because the compiler may not be able to
2629 # link executables.
2630
2631 xcompiling=1
2632 NATIVE=no
2633 # If Canadian cross, then don't pick up tools from the build
2634 # directory.
2635 if test "$build" != "$with_cross_host"; then
2636 CANADIAN=yes
2637 NULL_TARGET=yes
2638 else
2639 CANADIAN=no
2640 NULL_TARGET=no
2641 fi
2642
2643 case "$target_alias" in
2644 *-wince-*)
2645 # Configure for Microsoft Windows CE, or whatever they are
2646 # currently calling it.
2647 cat >> confdefs.h <<\EOF
2648#define HAVE_FLOAT_H 1
2649EOF
2650
2651
2652 cat >> confdefs.h <<\EOF
2653#define HAVE__FINITE 1
2654EOF
2655
2656 cat >> confdefs.h <<\EOF
2657#define HAVE__ISNAN 1
2658EOF
2659
2660 cat >> confdefs.h <<\EOF
2661#define HAVE__COPYSIGN 1
2662EOF
2663
2664 cat >> confdefs.h <<\EOF
2665#define HAVE__FPCLASS 1
2666EOF
2667
2668 cat >> confdefs.h <<\EOF
2669#define HAVE_MODF 1
2670EOF
2671
2672
2673 ctype_include_dir="config/wince"
2674
2675
2676 cat >> confdefs.h <<\EOF
2677#define _GLIBCPP_NEED_MBSTATE_T 1
2678EOF
2679
2680
2681 cat >> confdefs.h <<\EOF
2682#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2683EOF
2684
2685 cat >> confdefs.h <<\EOF
2686#define _GLIBCPP_BUGGY_COMPLEX 1
2687EOF
2688
2689 ;;
2690 *)
2691 # We assume newlib. This lets us hard-code the functions we know
2692 # we'll have.
2693 cat >> confdefs.h <<\EOF
2694#define HAVE_FINITE 1
2695EOF
2696
2697 cat >> confdefs.h <<\EOF
2698#define HAVE_ISNAN 1
2699EOF
2700
2701 cat >> confdefs.h <<\EOF
2702#define HAVE_ISNANF 1
2703EOF
2704
2705 cat >> confdefs.h <<\EOF
2706#define HAVE_ISINF 1
2707EOF
2708
2709 cat >> confdefs.h <<\EOF
2710#define HAVE_ISINFF 1
2711EOF
2712
2713
2714 ctype_include_dir="config/newlib"
2715
2716
2717 cat >> confdefs.h <<\EOF
2718#define _GLIBCPP_NEED_MBSTATE_T 1
2719EOF
2720
2721
2722 cat >> confdefs.h <<\EOF
2723#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2724EOF
2725
2726 cat >> confdefs.h <<\EOF
2727#define _GLIBCPP_BUGGY_COMPLEX 1
2728EOF
2729
2730 # need to ceck for faster f versions of math functions, ie sinf?
2731 ;;
2732 esac
2733else
2734
2735 # We are being configured natively. We can do more elaborate tests
2736 # that include AC_TRY_COMPILE now, as the linker is assumed to be
2737 # working.
2738
2739 xcompiling=0
2740 NATIVE=yes
2741 CANADIAN=no
2742 NULL_TARGET=no
2743
2744 # Check for available headers.
2745 for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
2746 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h
2747do
2748ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2749echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
bf93f43b 2750echo "configure:2751: checking for $ac_hdr" >&5
b2dad0e3
BK
2751if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2752 echo $ac_n "(cached) $ac_c" 1>&6
2753else
2754 cat > conftest.$ac_ext <<EOF
bf93f43b 2755#line 2756 "configure"
b2dad0e3
BK
2756#include "confdefs.h"
2757#include <$ac_hdr>
2758EOF
2759ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 2760{ (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2761ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2762if test -z "$ac_err"; then
2763 rm -rf conftest*
2764 eval "ac_cv_header_$ac_safe=yes"
2765else
2766 echo "$ac_err" >&5
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2769 rm -rf conftest*
2770 eval "ac_cv_header_$ac_safe=no"
2771fi
2772rm -f conftest*
2773fi
2774if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2775 echo "$ac_t""yes" 1>&6
2776 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2777 cat >> confdefs.h <<EOF
2778#define $ac_tr_hdr 1
2779EOF
2780
2781else
2782 echo "$ac_t""no" 1>&6
2783fi
2784done
2785
2786
2787
2788
2789 echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6
bf93f43b 2790echo "configure:2791: checking for GNU C++ __complex__ support" >&5
b2dad0e3
BK
2791 if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2793else
2794
2795
2796 ac_ext=C
2797# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2798ac_cpp='$CXXCPP $CPPFLAGS'
2799ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2800ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2801cross_compiling=$ac_cv_prog_cxx_cross
2802
2803 cat > conftest.$ac_ext <<EOF
bf93f43b 2804#line 2805 "configure"
b2dad0e3
BK
2805#include "confdefs.h"
2806struct dcomplex { __complex__ double x; }; \
2807 dcomplex f(const dcomplex& x) { return dcomplex(x); }
2808int main() {
2809\
2810 dcomplex x; f(x);
2811; return 0; }
2812EOF
bf93f43b 2813if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2814 rm -rf conftest*
2815 glibcpp_cv_complex=ok
2816else
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2819 rm -rf conftest*
2820 glibcpp_cv_complex=buggy
2821
2822fi
2823rm -f conftest*
2824 ac_ext=c
2825# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2826ac_cpp='$CPP $CPPFLAGS'
2827ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2828ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2829cross_compiling=$ac_cv_prog_cc_cross
2830
2831
2832fi
2833
2834 echo "$ac_t""$glibcpp_cv_complex" 1>&6
2835 if test $glibcpp_cv_complex = buggy; then
2836 cat >> confdefs.h <<\EOF
2837#define _GLIBCPP_BUGGY_COMPLEX 1
2838EOF
2839
2840 fi
2841
2842
2843
2844 echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6
bf93f43b 2845echo "configure:2846: checking for GNU C++ __complex__ float support" >&5
b2dad0e3
BK
2846 if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
2847 echo $ac_n "(cached) $ac_c" 1>&6
2848else
2849
2850
2851 ac_ext=C
2852# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2853ac_cpp='$CXXCPP $CPPFLAGS'
2854ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2855ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2856cross_compiling=$ac_cv_prog_cxx_cross
2857
2858 rm -f conftest.h
2859 cat > conftest.h <<EOB
2860 //
2861 // Check for buggy __complex__ that causes ICE in most versions of egcs
2862 // and gcc-2.95.x on certain platforms (eg., x86-win32).
2863 //
2864 // See http://egcs.cygnus.com/ml/gcc-bugs/1999-07/msg00845.html for
2865 // more info on the bug itself.
2866 //
2867 struct
2868 float_complex
2869 {
2870 __complex__ float m_value;
2871 float_complex (float = 0.0f, float = 0.0f);
2872 float_complex (__complex__ float val) : m_value (val) {}
2873 float_complex foo (const float_complex &val)
2874 { return float_complex (~val.m_value); }
2875 };
2876EOB
2877 cat > conftest.$ac_ext <<EOF
bf93f43b 2878#line 2879 "configure"
b2dad0e3
BK
2879#include "confdefs.h"
2880#include "conftest.h"
2881int main() {
2882
2883; return 0; }
2884EOF
bf93f43b 2885if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2886 rm -rf conftest*
2887 glibcpp_cv_float_complex=ok
2888else
2889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
2891 rm -rf conftest*
2892 glibcpp_cv_float_complex=buggy
2893
2894fi
2895rm -f conftest*
2896 ac_ext=c
2897# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2898ac_cpp='$CPP $CPPFLAGS'
2899ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2900ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2901cross_compiling=$ac_cv_prog_cc_cross
2902
2903
2904fi
2905
2906 echo "$ac_t""$glibcpp_cv_float_complex" 1>&6
2907 if test $glibcpp_cv_float_complex = buggy; then
2908 cat >> confdefs.h <<\EOF
2909#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2910EOF
2911
2912 fi
2913
2914
2915 echo $ac_n "checking for __builtin_sinf""... $ac_c" 1>&6
bf93f43b 2916echo "configure:2917: checking for __builtin_sinf" >&5
b2dad0e3 2917 cat > conftest.$ac_ext <<EOF
bf93f43b 2918#line 2919 "configure"
b2dad0e3
BK
2919#include "confdefs.h"
2920#include <math.h>
2921int main() {
2922float foo(void) { __builtin_sinf(0.0); }
2923; return 0; }
2924EOF
bf93f43b 2925if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2926 rm -rf conftest*
2927 use_builtin_sinf=yes
2928else
2929 echo "configure: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 rm -rf conftest*
2932 use_builtin_sinf=no
2933fi
2934rm -f conftest*
2935 echo "$ac_t""$use_builtin_sinf" 1>&6
2936 if test $use_builtin_sinf = "yes"; then
2937 cat >> confdefs.h <<\EOF
2938#define _GLIBCPP_HAS_BUILTIN_SINF 1
2939EOF
2940
2941 fi
2942
2943 echo $ac_n "checking for __builtin_cosf""... $ac_c" 1>&6
bf93f43b 2944echo "configure:2945: checking for __builtin_cosf" >&5
b2dad0e3 2945 cat > conftest.$ac_ext <<EOF
bf93f43b 2946#line 2947 "configure"
b2dad0e3
BK
2947#include "confdefs.h"
2948#include <math.h>
2949int main() {
2950float foo(void) { __builtin_cosf(0.0); }
2951; return 0; }
2952EOF
bf93f43b 2953if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2954 rm -rf conftest*
2955 use_builtin_cosf=yes
2956else
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 use_builtin_cosf=no
2961fi
2962rm -f conftest*
2963 echo "$ac_t""$use_builtin_cosf" 1>&6
2964 if test $use_builtin_cosf = "yes"; then
2965 cat >> confdefs.h <<\EOF
2966#define _GLIBCPP_HAS_BUILTIN_COSF 1
2967EOF
2968
2969 fi
2970
2971 echo $ac_n "checking for __builtin_fabsf""... $ac_c" 1>&6
bf93f43b 2972echo "configure:2973: checking for __builtin_fabsf" >&5
b2dad0e3 2973 cat > conftest.$ac_ext <<EOF
bf93f43b 2974#line 2975 "configure"
b2dad0e3
BK
2975#include "confdefs.h"
2976#include <math.h>
2977int main() {
2978float foo(void) { __builtin_fabsf(0.0); }
2979; return 0; }
2980EOF
bf93f43b 2981if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2982 rm -rf conftest*
2983 use_builtin_fabsf=yes
2984else
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 use_builtin_fabsf=no
2989fi
2990rm -f conftest*
2991 echo "$ac_t""$use_builtin_fabsf" 1>&6
2992 if test $use_builtin_fabsf = "yes"; then
2993 cat >> confdefs.h <<\EOF
2994#define _GLIBCPP_HAS_BUILTIN_FABSF 1
2995EOF
2996
2997 fi
2998
2999 echo $ac_n "checking for __builtin_sqrtf""... $ac_c" 1>&6
bf93f43b 3000echo "configure:3001: checking for __builtin_sqrtf" >&5
b2dad0e3 3001 cat > conftest.$ac_ext <<EOF
bf93f43b 3002#line 3003 "configure"
b2dad0e3
BK
3003#include "confdefs.h"
3004#include <math.h>
3005int main() {
3006float foo(void) { __builtin_sqrtf(0.0); }
3007; return 0; }
3008EOF
bf93f43b 3009if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3010 rm -rf conftest*
3011 use_builtin_sqrtf=yes
3012else
3013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -rf conftest*
3016 use_builtin_sqrtf=no
3017fi
3018rm -f conftest*
3019 echo "$ac_t""$use_builtin_sqrtf" 1>&6
3020 if test $use_builtin_sqrtf = "yes"; then
3021 cat >> confdefs.h <<\EOF
3022#define _GLIBCPP_HAS_BUILTIN_SQRTF 1
3023EOF
3024
3025 fi
3026
3027
3028 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
bf93f43b 3029echo "configure:3030: checking for sin in -lm" >&5
b2dad0e3
BK
3030ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
3031if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3032 echo $ac_n "(cached) $ac_c" 1>&6
3033else
3034 ac_save_LIBS="$LIBS"
3035LIBS="-lm $LIBS"
3036cat > conftest.$ac_ext <<EOF
bf93f43b 3037#line 3038 "configure"
b2dad0e3
BK
3038#include "confdefs.h"
3039/* Override any gcc2 internal prototype to avoid an error. */
3040/* We use char because int might match the return type of a gcc2
3041 builtin and then its argument prototype would still apply. */
3042char sin();
3043
3044int main() {
3045sin()
3046; return 0; }
3047EOF
bf93f43b 3048if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3049 rm -rf conftest*
3050 eval "ac_cv_lib_$ac_lib_var=yes"
3051else
3052 echo "configure: failed program was:" >&5
3053 cat conftest.$ac_ext >&5
3054 rm -rf conftest*
3055 eval "ac_cv_lib_$ac_lib_var=no"
3056fi
3057rm -f conftest*
3058LIBS="$ac_save_LIBS"
3059
3060fi
3061if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3062 echo "$ac_t""yes" 1>&6
3063 libm="-lm"
3064else
3065 echo "$ac_t""no" 1>&6
3066fi
3067
3068 save_LIBS="$LIBS"
3069 LIBS="$LIBS $libm"
3070
3071 for ac_hdr in complex.h
3072do
3073ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3074echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
bf93f43b 3075echo "configure:3076: checking for $ac_hdr" >&5
b2dad0e3
BK
3076if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078else
3079 cat > conftest.$ac_ext <<EOF
bf93f43b 3080#line 3081 "configure"
b2dad0e3
BK
3081#include "confdefs.h"
3082#include <$ac_hdr>
3083EOF
3084ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 3085{ (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
3086ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087if test -z "$ac_err"; then
3088 rm -rf conftest*
3089 eval "ac_cv_header_$ac_safe=yes"
3090else
3091 echo "$ac_err" >&5
3092 echo "configure: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 rm -rf conftest*
3095 eval "ac_cv_header_$ac_safe=no"
3096fi
3097rm -f conftest*
3098fi
3099if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3100 echo "$ac_t""yes" 1>&6
3101 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3102 cat >> confdefs.h <<EOF
3103#define $ac_tr_hdr 1
3104EOF
3105
3106else
3107 echo "$ac_t""no" 1>&6
3108fi
3109done
3110
3111 for ac_func in ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
3112 clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
3113 ctan ctanf ctanh ctanhf \
3114 carg cargf nan hypot hypotf atan2f expf copysignf
3115do
3116echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3117echo "configure:3118: checking for $ac_func" >&5
b2dad0e3
BK
3118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3119 echo $ac_n "(cached) $ac_c" 1>&6
3120else
3121 cat > conftest.$ac_ext <<EOF
bf93f43b 3122#line 3123 "configure"
b2dad0e3
BK
3123#include "confdefs.h"
3124/* System header to define __stub macros and hopefully few prototypes,
3125 which can conflict with char $ac_func(); below. */
3126#include <assert.h>
3127/* Override any gcc2 internal prototype to avoid an error. */
3128/* We use char because int might match the return type of a gcc2
3129 builtin and then its argument prototype would still apply. */
3130char $ac_func();
3131
3132int main() {
3133
3134/* The GNU C library defines this for functions which it implements
3135 to always fail with ENOSYS. Some functions are actually named
3136 something starting with __ and the normal name is an alias. */
3137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3138choke me
3139#else
3140$ac_func();
3141#endif
3142
3143; return 0; }
3144EOF
bf93f43b 3145if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3146 rm -rf conftest*
3147 eval "ac_cv_func_$ac_func=yes"
3148else
3149 echo "configure: failed program was:" >&5
3150 cat conftest.$ac_ext >&5
3151 rm -rf conftest*
3152 eval "ac_cv_func_$ac_func=no"
3153fi
3154rm -f conftest*
3155fi
3156
3157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3158 echo "$ac_t""yes" 1>&6
3159 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3160 cat >> confdefs.h <<EOF
3161#define $ac_tr_func 1
3162EOF
3163
3164else
3165 echo "$ac_t""no" 1>&6
3166LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
3167fi
3168done
3169
3170
3171
3172 USE_LONG_DOUBLE=no
f3b004d8 3173 echo $ac_n "checking for copysignl""... $ac_c" 1>&6
bf93f43b 3174echo "configure:3175: checking for copysignl" >&5
f3b004d8 3175if eval "test \"`echo '$''{'ac_cv_func_copysignl'+set}'`\" = set"; then
b2dad0e3
BK
3176 echo $ac_n "(cached) $ac_c" 1>&6
3177else
3178 cat > conftest.$ac_ext <<EOF
bf93f43b 3179#line 3180 "configure"
b2dad0e3
BK
3180#include "confdefs.h"
3181/* System header to define __stub macros and hopefully few prototypes,
f3b004d8 3182 which can conflict with char copysignl(); below. */
b2dad0e3
BK
3183#include <assert.h>
3184/* Override any gcc2 internal prototype to avoid an error. */
3185/* We use char because int might match the return type of a gcc2
3186 builtin and then its argument prototype would still apply. */
f3b004d8 3187char copysignl();
b2dad0e3
BK
3188
3189int main() {
3190
3191/* The GNU C library defines this for functions which it implements
3192 to always fail with ENOSYS. Some functions are actually named
3193 something starting with __ and the normal name is an alias. */
f3b004d8 3194#if defined (__stub_copysignl) || defined (__stub___copysignl)
b2dad0e3
BK
3195choke me
3196#else
f3b004d8 3197copysignl();
b2dad0e3
BK
3198#endif
3199
3200; return 0; }
3201EOF
bf93f43b 3202if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3 3203 rm -rf conftest*
f3b004d8 3204 eval "ac_cv_func_copysignl=yes"
b2dad0e3
BK
3205else
3206 echo "configure: failed program was:" >&5
3207 cat conftest.$ac_ext >&5
3208 rm -rf conftest*
f3b004d8 3209 eval "ac_cv_func_copysignl=no"
b2dad0e3
BK
3210fi
3211rm -f conftest*
3212fi
3213
f3b004d8 3214if eval "test \"`echo '$ac_cv_func_'copysignl`\" = yes"; then
b2dad0e3
BK
3215 echo "$ac_t""yes" 1>&6
3216 USE_LONG_DOUBLE=yes
3217 for ac_func in ccoshl ccosl cexpl cpowl csinhl csinl \
3218 csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l
3219do
3220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3221echo "configure:3222: checking for $ac_func" >&5
b2dad0e3
BK
3222if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3223 echo $ac_n "(cached) $ac_c" 1>&6
3224else
3225 cat > conftest.$ac_ext <<EOF
bf93f43b 3226#line 3227 "configure"
b2dad0e3
BK
3227#include "confdefs.h"
3228/* System header to define __stub macros and hopefully few prototypes,
3229 which can conflict with char $ac_func(); below. */
3230#include <assert.h>
3231/* Override any gcc2 internal prototype to avoid an error. */
3232/* We use char because int might match the return type of a gcc2
3233 builtin and then its argument prototype would still apply. */
3234char $ac_func();
3235
3236int main() {
3237
3238/* The GNU C library defines this for functions which it implements
3239 to always fail with ENOSYS. Some functions are actually named
3240 something starting with __ and the normal name is an alias. */
3241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3242choke me
3243#else
3244$ac_func();
3245#endif
3246
3247; return 0; }
3248EOF
bf93f43b 3249if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3250 rm -rf conftest*
3251 eval "ac_cv_func_$ac_func=yes"
3252else
3253 echo "configure: failed program was:" >&5
3254 cat conftest.$ac_ext >&5
3255 rm -rf conftest*
3256 eval "ac_cv_func_$ac_func=no"
3257fi
3258rm -f conftest*
3259fi
3260
3261if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3262 echo "$ac_t""yes" 1>&6
3263 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3264 cat >> confdefs.h <<EOF
3265#define $ac_tr_func 1
3266EOF
3267
3268else
3269 echo "$ac_t""no" 1>&6
3270LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
3271fi
3272done
3273
3274
3275else
3276 echo "$ac_t""no" 1>&6
3277fi
3278
3279
3280
3281 for ac_func in modf isnan isnanf isnanl isinf isinff isinfl copysign \
3282 copysignl cosf coshf logf log10f powf sinf sinhf sqrtf tanf tanhf \
3283 strtof strtold fabsf sincos sincosf sincosl finite finite fqfinite \
3284 fpclass qfpclass
3285do
3286echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3287echo "configure:3288: checking for $ac_func" >&5
b2dad0e3
BK
3288if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3289 echo $ac_n "(cached) $ac_c" 1>&6
3290else
3291 cat > conftest.$ac_ext <<EOF
bf93f43b 3292#line 3293 "configure"
b2dad0e3
BK
3293#include "confdefs.h"
3294/* System header to define __stub macros and hopefully few prototypes,
3295 which can conflict with char $ac_func(); below. */
3296#include <assert.h>
3297/* Override any gcc2 internal prototype to avoid an error. */
3298/* We use char because int might match the return type of a gcc2
3299 builtin and then its argument prototype would still apply. */
3300char $ac_func();
3301
3302int main() {
3303
3304/* The GNU C library defines this for functions which it implements
3305 to always fail with ENOSYS. Some functions are actually named
3306 something starting with __ and the normal name is an alias. */
3307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3308choke me
3309#else
3310$ac_func();
3311#endif
3312
3313; return 0; }
3314EOF
bf93f43b 3315if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3316 rm -rf conftest*
3317 eval "ac_cv_func_$ac_func=yes"
3318else
3319 echo "configure: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3321 rm -rf conftest*
3322 eval "ac_cv_func_$ac_func=no"
3323fi
3324rm -f conftest*
3325fi
3326
3327if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3328 echo "$ac_t""yes" 1>&6
3329 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3330 cat >> confdefs.h <<EOF
3331#define $ac_tr_func 1
3332EOF
3333
3334else
3335 echo "$ac_t""no" 1>&6
3336fi
3337done
3338
3339
3340#Some runtimes have these functions with a preceding underscore. Please
3341# keep this sync'd with the one above. And if you add any new symbol,
3342# please add the corresponding block in the @BOTTOM@ section of
3343# acconfig.h.
3344for ac_func in _modf _isnan _isnanf _isnanl _isinf _isinff _isinfl _copysign \
3345_copysignl _cosf _coshf _logf _log10f _powf _sinf _sinhf _sqrtf _tanf _tanhf \
3346_strtof _strtold _fabsf _sincos _sincosf _sincosl _finite _finitef _qfinite \
3347_fpclass _qfpclass
3348do
3349echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3350echo "configure:3351: checking for $ac_func" >&5
b2dad0e3
BK
3351if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353else
3354 cat > conftest.$ac_ext <<EOF
bf93f43b 3355#line 3356 "configure"
b2dad0e3
BK
3356#include "confdefs.h"
3357/* System header to define __stub macros and hopefully few prototypes,
3358 which can conflict with char $ac_func(); below. */
3359#include <assert.h>
3360/* Override any gcc2 internal prototype to avoid an error. */
3361/* We use char because int might match the return type of a gcc2
3362 builtin and then its argument prototype would still apply. */
3363char $ac_func();
3364
3365int main() {
3366
3367/* The GNU C library defines this for functions which it implements
3368 to always fail with ENOSYS. Some functions are actually named
3369 something starting with __ and the normal name is an alias. */
3370#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3371choke me
3372#else
3373$ac_func();
3374#endif
3375
3376; return 0; }
3377EOF
bf93f43b 3378if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3379 rm -rf conftest*
3380 eval "ac_cv_func_$ac_func=yes"
3381else
3382 echo "configure: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384 rm -rf conftest*
3385 eval "ac_cv_func_$ac_func=no"
3386fi
3387rm -f conftest*
3388fi
3389
3390if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3391 echo "$ac_t""yes" 1>&6
3392 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3393 cat >> confdefs.h <<EOF
3394#define $ac_tr_func 1
3395EOF
3396
3397else
3398 echo "$ac_t""no" 1>&6
3399fi
3400done
3401
3402
3403LIBS="$save_LIBS"
3404
3405
3406 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
3407echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
bf93f43b 3408echo "configure:3409: checking for wchar.h" >&5
b2dad0e3
BK
3409if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3410 echo $ac_n "(cached) $ac_c" 1>&6
3411else
3412 cat > conftest.$ac_ext <<EOF
bf93f43b 3413#line 3414 "configure"
b2dad0e3
BK
3414#include "confdefs.h"
3415#include <wchar.h>
3416EOF
3417ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 3418{ (eval echo configure:3419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
3419ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3420if test -z "$ac_err"; then
3421 rm -rf conftest*
3422 eval "ac_cv_header_$ac_safe=yes"
3423else
3424 echo "$ac_err" >&5
3425 echo "configure: failed program was:" >&5
3426 cat conftest.$ac_ext >&5
3427 rm -rf conftest*
3428 eval "ac_cv_header_$ac_safe=no"
3429fi
3430rm -f conftest*
3431fi
3432if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3433 echo "$ac_t""yes" 1>&6
3434
3435 echo $ac_n "checking for native mbstate_t""... $ac_c" 1>&6
bf93f43b 3436echo "configure:3437: checking for native mbstate_t" >&5
b2dad0e3 3437 cat > conftest.$ac_ext <<EOF
bf93f43b 3438#line 3439 "configure"
b2dad0e3
BK
3439#include "confdefs.h"
3440#include <wchar.h>
3441int main() {
3442mbstate_t teststate;
3443; return 0; }
3444EOF
bf93f43b 3445if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3446 rm -rf conftest*
3447 use_native_mbstatet=yes
3448else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -rf conftest*
3452 use_native_mbstatet=no
3453fi
3454rm -f conftest*
3455 echo "$ac_t""$use_native_mbstatet" 1>&6
3456 if test $use_native_mbstatet = "no"; then
3457 cat >> confdefs.h <<\EOF
3458#define _GLIBCPP_NEED_MBSTATE_T 1
3459EOF
3460
3461 fi
3462
3463 echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
bf93f43b 3464echo "configure:3465: checking for WCHAR_MIN and WCHAR_MAX" >&5
b2dad0e3 3465 cat > conftest.$ac_ext <<EOF
bf93f43b 3466#line 3467 "configure"
b2dad0e3
BK
3467#include "confdefs.h"
3468#include <wchar.h>
3469int main() {
3470int i = WCHAR_MIN; int j = WCHAR_MAX;
3471; return 0; }
3472EOF
bf93f43b 3473if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3474 rm -rf conftest*
3475 has_wchar_minmax=yes
3476else
3477 echo "configure: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 rm -rf conftest*
3480 has_wchar_minmax=no
3481fi
3482rm -f conftest*
3483 echo "$ac_t""$has_wchar_minmax" 1>&6
3484 if test $has_wchar_minmax = "yes"; then
3485 cat >> confdefs.h <<\EOF
3486#define _GLIBCPP_HAS_WCHAR_MIN_MAX 1
3487EOF
3488
3489 fi
3490
3491 # Test wchar.h for WEOF, which is what we use to determine whether
3492 # to specialize for wchar_t or not.
3493 echo $ac_n "checking for WEOF""... $ac_c" 1>&6
bf93f43b 3494echo "configure:3495: checking for WEOF" >&5
b2dad0e3 3495 cat > conftest.$ac_ext <<EOF
bf93f43b 3496#line 3497 "configure"
b2dad0e3
BK
3497#include "confdefs.h"
3498
3499 #include <wchar.h>
3500 #include <stddef.h>
3501int main() {
3502wint_t i = WEOF;
3503; return 0; }
3504EOF
bf93f43b 3505if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3506 rm -rf conftest*
3507 has_weof=yes
3508else
3509 echo "configure: failed program was:" >&5
3510 cat conftest.$ac_ext >&5
3511 rm -rf conftest*
3512 has_weof=no
3513fi
3514rm -f conftest*
3515 echo "$ac_t""$has_weof" 1>&6
3516
3517 for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
3518do
3519echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3520echo "configure:3521: checking for $ac_func" >&5
b2dad0e3
BK
3521if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3522 echo $ac_n "(cached) $ac_c" 1>&6
3523else
3524 cat > conftest.$ac_ext <<EOF
bf93f43b 3525#line 3526 "configure"
b2dad0e3
BK
3526#include "confdefs.h"
3527/* System header to define __stub macros and hopefully few prototypes,
3528 which can conflict with char $ac_func(); below. */
3529#include <assert.h>
3530/* Override any gcc2 internal prototype to avoid an error. */
3531/* We use char because int might match the return type of a gcc2
3532 builtin and then its argument prototype would still apply. */
3533char $ac_func();
3534
3535int main() {
3536
3537/* The GNU C library defines this for functions which it implements
3538 to always fail with ENOSYS. Some functions are actually named
3539 something starting with __ and the normal name is an alias. */
3540#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3541choke me
3542#else
3543$ac_func();
3544#endif
3545
3546; return 0; }
3547EOF
bf93f43b 3548if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3549 rm -rf conftest*
3550 eval "ac_cv_func_$ac_func=yes"
3551else
3552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
3554 rm -rf conftest*
3555 eval "ac_cv_func_$ac_func=no"
3556fi
3557rm -f conftest*
3558fi
3559
3560if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3561 echo "$ac_t""yes" 1>&6
3562 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3563 cat >> confdefs.h <<EOF
3564#define $ac_tr_func 1
3565EOF
3566
3567else
3568 echo "$ac_t""no" 1>&6
3569LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"
3570fi
3571done
3572
3573
5d89258a 3574
b2dad0e3
BK
3575
3576 echo $ac_n "checking for wide character support""... $ac_c" 1>&6
bf93f43b 3577echo "configure:3578: checking for wide character support" >&5
b2dad0e3 3578 if test $has_weof = "yes" && test $has_wchar_minmax = "yes"; then
5d89258a 3579 libinst_wstring_la="libinst-wstring.la"
b2dad0e3
BK
3580 cat >> confdefs.h <<\EOF
3581#define _GLIBCPP_USE_WCHAR_T 1
3582EOF
3583
3584 echo "$ac_t""ok" 1>&6
3585 else
5d89258a 3586 libinst_wstring_la=""
b2dad0e3
BK
3587 echo "$ac_t"""not specializing for wchar_t"" 1>&6
3588 fi
3589
3590else
3591 echo "$ac_t""no" 1>&6
3592
3593 echo "configure: warning: <wchar.h> not found" 1>&2
3594 cat >> confdefs.h <<\EOF
3595#define _GLIBCPP_NEED_MBSTATE_T 1
3596EOF
3597
3598
3599fi
3600
3601
3602
3603 ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
3604echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
bf93f43b 3605echo "configure:3606: checking for ctype.h" >&5
b2dad0e3
BK
3606if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3607 echo $ac_n "(cached) $ac_c" 1>&6
3608else
3609 cat > conftest.$ac_ext <<EOF
bf93f43b 3610#line 3611 "configure"
b2dad0e3
BK
3611#include "confdefs.h"
3612#include <ctype.h>
3613EOF
3614ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 3615{ (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
3616ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3617if test -z "$ac_err"; then
3618 rm -rf conftest*
3619 eval "ac_cv_header_$ac_safe=yes"
3620else
3621 echo "$ac_err" >&5
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3624 rm -rf conftest*
3625 eval "ac_cv_header_$ac_safe=no"
3626fi
3627rm -f conftest*
3628fi
3629if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3630 echo "$ac_t""yes" 1>&6
3631
3632
3633 ctype_default=yes
3634
8445e42a 3635 echo $ac_n "checking <ctype> for gnu-linux ""... $ac_c" 1>&6
bf93f43b 3636echo "configure:3637: checking <ctype> for gnu-linux " >&5
b2dad0e3 3637 cat > conftest.$ac_ext <<EOF
bf93f43b 3638#line 3639 "configure"
b2dad0e3
BK
3639#include "confdefs.h"
3640#include <ctype.h>
3641int main() {
3642int
3643 foo (int a)
3644 { return _ISspace + _ISprint + _IScntrl + _ISupper + _ISlower + _ISalpha \
3645 + _ISdigit + _ISpunct + _ISxdigit + _ISalnum + _ISgraph \
3646 + __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}
3647; return 0; }
3648EOF
bf93f43b 3649if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3650 rm -rf conftest*
3651 \
3652 ctype_linux=yes
3653else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 ctype_linux=no
3658fi
3659rm -f conftest*
3660 echo "$ac_t""$ctype_linux" 1>&6
3661 if test $ctype_linux = "yes"; then
3662 ctype_include_dir="config/gnu-linux"
3663 ctype_default=no
3664 fi
3665
65dd21b7
LR
3666 if test $ctype_default = "yes"; then
3667 echo $ac_n "checking <ctype> for freebsd 4.0 ""... $ac_c" 1>&6
bf93f43b 3668echo "configure:3669: checking <ctype> for freebsd 4.0 " >&5
7b267e3e 3669 cat > conftest.$ac_ext <<EOF
bf93f43b 3670#line 3671 "configure"
7b267e3e
BK
3671#include "confdefs.h"
3672#include <ctype.h>
3673int main() {
3674int
3675 foo (int a)
3676 { return _CTYPE_S + _CTYPE_R + _CTYPE_C + _CTYPE_U + _CTYPE_L + _CTYPE_A \
3677 + _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;}
3678; return 0; }
3679EOF
bf93f43b 3680if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7b267e3e
BK
3681 rm -rf conftest*
3682 \
3683 ctype_bsd=yes
3684else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
3688 ctype_bsd=no
3689fi
3690rm -f conftest*
3691 echo "$ac_t""$ctype_bsd" 1>&6
3692 if test $ctype_bsd = "yes"; then
3693 ctype_include_dir="config/bsd"
3694 ctype_default=no
65dd21b7 3695 fi
7b267e3e
BK
3696 fi
3697
65dd21b7
LR
3698 if test $ctype_default = "yes"; then
3699 echo $ac_n "checking <ctype> for freebsd 3.4 ""... $ac_c" 1>&6
bf93f43b 3700echo "configure:3701: checking <ctype> for freebsd 3.4 " >&5
6ad50467 3701 cat > conftest.$ac_ext <<EOF
bf93f43b 3702#line 3703 "configure"
6ad50467
BK
3703#include "confdefs.h"
3704#include <ctype.h>
3705int main() {
3706int
3707 foo (int a)
3708 { return _S + _R + _C + _U + _L + _A \
3709 + _D + _P + _X + _G + __istype (a, 0);}
3710; return 0; }
3711EOF
bf93f43b 3712if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6ad50467
BK
3713 rm -rf conftest*
3714 \
3715 ctype_freebsd34=yes
3716else
3717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -rf conftest*
3720 ctype_freebsd34=no
3721fi
3722rm -f conftest*
3723 echo "$ac_t""$ctype_freebsd34" 1>&6
3724 if test $ctype_freebsd34 = "yes"; then
3725 ctype_include_dir="config/bsd"
3726 ctype_default=no
65dd21b7 3727 fi
6ad50467
BK
3728 fi
3729
b2dad0e3 3730 if test $ctype_default = "yes"; then
8445e42a 3731 echo $ac_n "checking <ctype> for solaris 2.6,7,8 ""... $ac_c" 1>&6
bf93f43b 3732echo "configure:3733: checking <ctype> for solaris 2.6,7,8 " >&5
b2dad0e3 3733 cat > conftest.$ac_ext <<EOF
bf93f43b 3734#line 3735 "configure"
b2dad0e3
BK
3735#include "confdefs.h"
3736#include <ctype.h>
3737int main() {
3738int
3739 foo (int a)
3740 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
3741 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
3742 + __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}
3743; return 0; }
3744EOF
bf93f43b 3745if { (eval echo configure:3746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3746 rm -rf conftest*
3747 \
3748 ctype_solaris=yes
3749else
3750 echo "configure: failed program was:" >&5
3751 cat conftest.$ac_ext >&5
3752 rm -rf conftest*
3753 ctype_solaris=no
3754fi
3755rm -f conftest*
3756 echo "$ac_t""$ctype_solaris" 1>&6
3757
3758 if test $ctype_solaris = "yes"; then
3759 echo $ac_n "checking for version""... $ac_c" 1>&6
bf93f43b 3760echo "configure:3761: checking for version" >&5
b2dad0e3
BK
3761 ac_ext=C
3762# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3763ac_cpp='$CXXCPP $CPPFLAGS'
3764ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3765ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3766cross_compiling=$ac_cv_prog_cxx_cross
3767
3768 cat > conftest.$ac_ext <<EOF
bf93f43b 3769#line 3770 "configure"
b2dad0e3
BK
3770#include "confdefs.h"
3771#include <ctype.h>
3772int main() {
3773typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
3774; return 0; }
3775EOF
bf93f43b 3776if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3777 rm -rf conftest*
3778 \
3779 ctype_solaris26=yes
3780else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 rm -rf conftest*
3784 ctype_solaris26=no
3785fi
3786rm -f conftest*
3787 ac_ext=c
3788# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3789ac_cpp='$CPP $CPPFLAGS'
3790ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3791ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3792cross_compiling=$ac_cv_prog_cc_cross
3793
3794 if test $ctype_solaris26 = "yes"; then
3795 ctype_include_dir="config/solaris/solaris2.6"
3796 echo "$ac_t"""solaris2.6"" 1>&6
3797 ctype_default=no
3798 else
3799 ctype_include_dir="config/solaris/solaris2.7"
32a4595e 3800 echo "$ac_t"""solaris2.7,8"" 1>&6
b2dad0e3
BK
3801 ctype_default=no
3802 fi
3803 fi
3804 fi
3805
3806 if test $ctype_default = "yes"; then
8445e42a 3807 echo $ac_n "checking <ctype> for solaris 2.5.1 ""... $ac_c" 1>&6
bf93f43b 3808echo "configure:3809: checking <ctype> for solaris 2.5.1 " >&5
b2dad0e3 3809 cat > conftest.$ac_ext <<EOF
bf93f43b 3810#line 3811 "configure"
b2dad0e3
BK
3811#include "confdefs.h"
3812#include <ctype.h>
3813int main() {
3814int
3815 foo (int a)
3816 { return _U + _L + _N + _S + _P + _C + _X + _B \
3817 + __ctype[a];}
3818; return 0; }
3819EOF
bf93f43b 3820if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3821 rm -rf conftest*
3822 \
3823 ctype_solaris25=yes
3824else
3825 echo "configure: failed program was:" >&5
3826 cat conftest.$ac_ext >&5
3827 rm -rf conftest*
3828 ctype_solaris25=no
3829fi
3830rm -f conftest*
3831 echo "$ac_t""$ctype_solaris25" 1>&6
3832 if test $ctype_solaris25 = "yes"; then
3833 ctype_include_dir="config/solaris/solaris2.5"
3834 ctype_default=no
3835 fi
3836 fi
3837
3838 if test $ctype_default = "yes"; then
8445e42a 3839 echo $ac_n "checking <ctype> for aix ""... $ac_c" 1>&6
bf93f43b 3840echo "configure:3841: checking <ctype> for aix " >&5
b2dad0e3 3841 cat > conftest.$ac_ext <<EOF
bf93f43b 3842#line 3843 "configure"
b2dad0e3
BK
3843#include "confdefs.h"
3844#include <ctype.h>
3845int main() {
3846int
3847 foo (int a)
3848 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
3849 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
3850 + _VALC('a') + _IS('c', 0);}
3851; return 0; }
3852EOF
bf93f43b 3853if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3854 rm -rf conftest*
3855 \
3856 ctype_aix=yes
3857else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -rf conftest*
3861 ctype_aix=no
3862fi
3863rm -f conftest*
3864 echo "$ac_t""$ctype_aix" 1>&6
3865 if test $ctype_aix = "yes"; then
3866 ctype_include_dir="config/aix"
3867 ctype_default=no
3868 fi
3869 fi
3870
3871 if test $ctype_default = "yes"; then
8445e42a 3872 echo $ac_n "checking <ctype> for newlib ""... $ac_c" 1>&6
bf93f43b 3873echo "configure:3874: checking <ctype> for newlib " >&5
b2dad0e3 3874 cat > conftest.$ac_ext <<EOF
bf93f43b 3875#line 3876 "configure"
b2dad0e3
BK
3876#include "confdefs.h"
3877#include <ctype.h>
3878int main() {
3879int
3880 foo (int a)
3881 { return _U + _L + _N + _S + _P + _C + _X + _B \
3882 + _ctype_[a];}
3883; return 0; }
3884EOF
bf93f43b 3885if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3886 rm -rf conftest*
3887 \
3888 ctype_newlib=yes
3889else
3890 echo "configure: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3892 rm -rf conftest*
3893 ctype_newlib=no
3894fi
3895rm -f conftest*
3896 echo "$ac_t""$ctype_newlib" 1>&6
3897 if test $ctype_newlib = "yes"; then
3898 ctype_include_dir="config/newlib"
3899 ctype_default=no
3900 fi
3901 fi
3902
3903 if test $ctype_default = "yes"; then
3904 ctype_include_dir="config/generic"
3905 echo "configure: warning: "Using default ctype headers."" 1>&2
3906 fi
3907
3908
3909else
3910 echo "$ac_t""no" 1>&6
3911fi
3912
3913
3914
3915 for ac_hdr in unistd.h
3916do
3917ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3918echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
bf93f43b 3919echo "configure:3920: checking for $ac_hdr" >&5
b2dad0e3
BK
3920if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3921 echo $ac_n "(cached) $ac_c" 1>&6
3922else
3923 cat > conftest.$ac_ext <<EOF
bf93f43b 3924#line 3925 "configure"
b2dad0e3
BK
3925#include "confdefs.h"
3926#include <$ac_hdr>
3927EOF
3928ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
bf93f43b 3929{ (eval echo configure:3930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
3930ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3931if test -z "$ac_err"; then
3932 rm -rf conftest*
3933 eval "ac_cv_header_$ac_safe=yes"
3934else
3935 echo "$ac_err" >&5
3936 echo "configure: failed program was:" >&5
3937 cat conftest.$ac_ext >&5
3938 rm -rf conftest*
3939 eval "ac_cv_header_$ac_safe=no"
3940fi
3941rm -f conftest*
3942fi
3943if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3944 echo "$ac_t""yes" 1>&6
3945 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3946 cat >> confdefs.h <<EOF
3947#define $ac_tr_hdr 1
3948EOF
3949
3950else
3951 echo "$ac_t""no" 1>&6
3952fi
3953done
3954
3955for ac_func in getpagesize
3956do
3957echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
bf93f43b 3958echo "configure:3959: checking for $ac_func" >&5
b2dad0e3
BK
3959if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3960 echo $ac_n "(cached) $ac_c" 1>&6
3961else
3962 cat > conftest.$ac_ext <<EOF
bf93f43b 3963#line 3964 "configure"
b2dad0e3
BK
3964#include "confdefs.h"
3965/* System header to define __stub macros and hopefully few prototypes,
3966 which can conflict with char $ac_func(); below. */
3967#include <assert.h>
3968/* Override any gcc2 internal prototype to avoid an error. */
3969/* We use char because int might match the return type of a gcc2
3970 builtin and then its argument prototype would still apply. */
3971char $ac_func();
3972
3973int main() {
3974
3975/* The GNU C library defines this for functions which it implements
3976 to always fail with ENOSYS. Some functions are actually named
3977 something starting with __ and the normal name is an alias. */
3978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3979choke me
3980#else
3981$ac_func();
3982#endif
3983
3984; return 0; }
3985EOF
bf93f43b 3986if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
3987 rm -rf conftest*
3988 eval "ac_cv_func_$ac_func=yes"
3989else
3990 echo "configure: failed program was:" >&5
3991 cat conftest.$ac_ext >&5
3992 rm -rf conftest*
3993 eval "ac_cv_func_$ac_func=no"
3994fi
3995rm -f conftest*
3996fi
3997
3998if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3999 echo "$ac_t""yes" 1>&6
4000 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4001 cat >> confdefs.h <<EOF
4002#define $ac_tr_func 1
4003EOF
4004
4005else
4006 echo "$ac_t""no" 1>&6
4007fi
4008done
4009
4010echo $ac_n "checking for working mmap""... $ac_c" 1>&6
bf93f43b 4011echo "configure:4012: checking for working mmap" >&5
b2dad0e3
BK
4012if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4013 echo $ac_n "(cached) $ac_c" 1>&6
4014else
4015 if test "$cross_compiling" = yes; then
4016 ac_cv_func_mmap_fixed_mapped=no
4017else
4018 cat > conftest.$ac_ext <<EOF
bf93f43b 4019#line 4020 "configure"
b2dad0e3
BK
4020#include "confdefs.h"
4021
4022/* Thanks to Mike Haertel and Jim Avera for this test.
4023 Here is a matrix of mmap possibilities:
4024 mmap private not fixed
4025 mmap private fixed at somewhere currently unmapped
4026 mmap private fixed at somewhere already mapped
4027 mmap shared not fixed
4028 mmap shared fixed at somewhere currently unmapped
4029 mmap shared fixed at somewhere already mapped
4030 For private mappings, we should verify that changes cannot be read()
4031 back from the file, nor mmap's back from the file at a different
4032 address. (There have been systems where private was not correctly
4033 implemented like the infamous i386 svr4.0, and systems where the
4034 VM page cache was not coherent with the filesystem buffer cache
4035 like early versions of FreeBSD and possibly contemporary NetBSD.)
4036 For shared mappings, we should conversely verify that changes get
4037 propogated back to all the places they're supposed to be.
4038
4039 Grep wants private fixed already mapped.
4040 The main things grep needs to know about mmap are:
4041 * does it exist and is it safe to write into the mmap'd area
4042 * how to use it (BSD variants) */
4043#include <sys/types.h>
4044#include <fcntl.h>
4045#include <sys/mman.h>
4046
4047/* This mess was copied from the GNU getpagesize.h. */
4048#ifndef HAVE_GETPAGESIZE
4049# ifdef HAVE_UNISTD_H
4050# include <unistd.h>
4051# endif
4052
4053/* Assume that all systems that can run configure have sys/param.h. */
4054# ifndef HAVE_SYS_PARAM_H
4055# define HAVE_SYS_PARAM_H 1
4056# endif
4057
4058# ifdef _SC_PAGESIZE
4059# define getpagesize() sysconf(_SC_PAGESIZE)
4060# else /* no _SC_PAGESIZE */
4061# ifdef HAVE_SYS_PARAM_H
4062# include <sys/param.h>
4063# ifdef EXEC_PAGESIZE
4064# define getpagesize() EXEC_PAGESIZE
4065# else /* no EXEC_PAGESIZE */
4066# ifdef NBPG
4067# define getpagesize() NBPG * CLSIZE
4068# ifndef CLSIZE
4069# define CLSIZE 1
4070# endif /* no CLSIZE */
4071# else /* no NBPG */
4072# ifdef NBPC
4073# define getpagesize() NBPC
4074# else /* no NBPC */
4075# ifdef PAGESIZE
4076# define getpagesize() PAGESIZE
4077# endif /* PAGESIZE */
4078# endif /* no NBPC */
4079# endif /* no NBPG */
4080# endif /* no EXEC_PAGESIZE */
4081# else /* no HAVE_SYS_PARAM_H */
4082# define getpagesize() 8192 /* punt totally */
4083# endif /* no HAVE_SYS_PARAM_H */
4084# endif /* no _SC_PAGESIZE */
4085
4086#endif /* no HAVE_GETPAGESIZE */
4087
4088#ifdef __cplusplus
4089extern "C" { void *malloc(unsigned); }
4090#else
4091char *malloc();
4092#endif
4093
4094int
4095main()
4096{
4097 char *data, *data2, *data3;
4098 int i, pagesize;
4099 int fd;
4100
4101 pagesize = getpagesize();
4102
4103 /*
4104 * First, make a file with some known garbage in it.
4105 */
4106 data = malloc(pagesize);
4107 if (!data)
4108 exit(1);
4109 for (i = 0; i < pagesize; ++i)
4110 *(data + i) = rand();
4111 umask(0);
4112 fd = creat("conftestmmap", 0600);
4113 if (fd < 0)
4114 exit(1);
4115 if (write(fd, data, pagesize) != pagesize)
4116 exit(1);
4117 close(fd);
4118
4119 /*
4120 * Next, try to mmap the file at a fixed address which
4121 * already has something else allocated at it. If we can,
4122 * also make sure that we see the same garbage.
4123 */
4124 fd = open("conftestmmap", O_RDWR);
4125 if (fd < 0)
4126 exit(1);
4127 data2 = malloc(2 * pagesize);
4128 if (!data2)
4129 exit(1);
4130 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4131 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4132 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4133 exit(1);
4134 for (i = 0; i < pagesize; ++i)
4135 if (*(data + i) != *(data2 + i))
4136 exit(1);
4137
4138 /*
4139 * Finally, make sure that changes to the mapped area
4140 * do not percolate back to the file as seen by read().
4141 * (This is a bug on some variants of i386 svr4.0.)
4142 */
4143 for (i = 0; i < pagesize; ++i)
4144 *(data2 + i) = *(data2 + i) + 1;
4145 data3 = malloc(pagesize);
4146 if (!data3)
4147 exit(1);
4148 if (read(fd, data3, pagesize) != pagesize)
4149 exit(1);
4150 for (i = 0; i < pagesize; ++i)
4151 if (*(data + i) != *(data3 + i))
4152 exit(1);
4153 close(fd);
4154 unlink("conftestmmap");
4155 exit(0);
4156}
4157
4158EOF
bf93f43b 4159if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
b2dad0e3
BK
4160then
4161 ac_cv_func_mmap_fixed_mapped=yes
4162else
4163 echo "configure: failed program was:" >&5
4164 cat conftest.$ac_ext >&5
4165 rm -fr conftest*
4166 ac_cv_func_mmap_fixed_mapped=no
4167fi
4168rm -fr conftest*
4169fi
4170
4171fi
4172
4173echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4174if test $ac_cv_func_mmap_fixed_mapped = yes; then
4175 cat >> confdefs.h <<\EOF
4176#define HAVE_MMAP 1
4177EOF
4178
4179fi
4180
4181fi
4182
4183
4184
4185if test "$CANADIAN" = yes; then
4186 CANADIAN_TRUE=
4187 CANADIAN_FALSE='#'
4188else
4189 CANADIAN_TRUE='#'
4190 CANADIAN_FALSE=
4191fi
4192
4193
4194if test "$NULL_TARGET" = yes; then
4195 NULL_TARGET_TRUE=
4196 NULL_TARGET_FALSE='#'
4197else
4198 NULL_TARGET_TRUE='#'
4199 NULL_TARGET_FALSE=
4200fi
4201
4202
4203if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
4204 NATIVE_TRUE=
4205 NATIVE_FALSE='#'
4206else
4207 NATIVE_TRUE='#'
4208 NATIVE_FALSE=
4209fi
4210
4211
4212if test -z "$with_cross_host"; then
4213 USE_LIBDIR_TRUE=
4214 USE_LIBDIR_FALSE='#'
4215else
4216 USE_LIBDIR_TRUE='#'
4217 USE_LIBDIR_FALSE=
4218fi
4219
4220if test $ac_cv_header_locale_h = yes; then
4221 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
bf93f43b 4222echo "configure:4223: checking for LC_MESSAGES" >&5
b2dad0e3
BK
4223if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4224 echo $ac_n "(cached) $ac_c" 1>&6
4225else
4226 cat > conftest.$ac_ext <<EOF
bf93f43b 4227#line 4228 "configure"
b2dad0e3
BK
4228#include "confdefs.h"
4229#include <locale.h>
4230int main() {
4231return LC_MESSAGES
4232; return 0; }
4233EOF
bf93f43b 4234if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
4235 rm -rf conftest*
4236 ac_cv_val_LC_MESSAGES=yes
4237else
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 rm -rf conftest*
4241 ac_cv_val_LC_MESSAGES=no
4242fi
4243rm -f conftest*
4244fi
4245
4246echo "$ac_t""$ac_cv_val_LC_MESSAGES" 1>&6
4247 if test $ac_cv_val_LC_MESSAGES = yes; then
4248 cat >> confdefs.h <<\EOF
4249#define HAVE_LC_MESSAGES 1
4250EOF
4251
4252 fi
4253 fi
4254
4255
4256# Sanity checking & User-visible messages.
4257# Checks down here, otherwise they get scrolled off before
4258# the user will notice.
4259if test "$enable_namespaces" = "yes" && test "$enable_libgcc_rebuild" = "no"
4260then
4261 echo "configure: warning: libgcc.a will not match mangled symbols unless it is rebuilt" 1>&2
4262fi
4263if test "$enable_namespaces" = "no" && test "$enable_libgcc_rebuild" != "no"
4264then
4265 # Other things besides namespaces can make this true as well, but none
4266 # of them are done automatically... yet
4267 echo "configure: warning: no point in rebuilding libgcc.a if namespaces aren't used" 1>&2
4268fi
4269
4270
4271if test "${multilib}" = "yes"; then
4272 multilib_arg="--enable-multilib"
4273else
4274 multilib_arg=
4275fi
4276
4277
4278# Generate the various Makefiles, include files, and scripts.
4279
4280# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
4281# so that multilib installs will end up installed in the correct
4282# place. To work around this not being passed down from config-ml.in
4283# -> top_srcdir/Makefile.am -> top_srcdir/src/Makefile.am, manually
4284# append it here.
4285
4286trap '' 1 2 15
4287cat > confcache <<\EOF
4288# This file is a shell script that caches the results of configure
4289# tests run on this system so they can be shared between configure
4290# scripts and configure runs. It is not useful on other systems.
4291# If it contains results you don't want to keep, you may remove or edit it.
4292#
4293# By default, configure uses ./config.cache as the cache file,
4294# creating it if it does not exist already. You can give configure
4295# the --cache-file=FILE option to use a different cache file; that is
4296# what configure does when it calls configure scripts in
4297# subdirectories, so they share the cache.
4298# Giving --cache-file=/dev/null disables caching, for debugging configure.
4299# config.status only pays attention to the cache file if you give it the
4300# --recheck option to rerun configure.
4301#
4302EOF
4303# The following way of writing the cache mishandles newlines in values,
4304# but we know of no workaround that is simple, portable, and efficient.
4305# So, don't put newlines in cache variables' values.
4306# Ultrix sh set writes to stderr and can't be redirected directly,
4307# and sets the high bit in the cache file unless we assign to the vars.
4308(set) 2>&1 |
4309 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4310 *ac_space=\ *)
4311 # `set' does not quote correctly, so add quotes (double-quote substitution
4312 # turns \\\\ into \\, and sed turns \\ into \).
4313 sed -n \
4314 -e "s/'/'\\\\''/g" \
4315 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4316 ;;
4317 *)
4318 # `set' quotes correctly as required by POSIX, so do not add quotes.
4319 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4320 ;;
4321 esac >> confcache
4322if cmp -s $cache_file confcache; then
4323 :
4324else
4325 if test -w $cache_file; then
4326 echo "updating cache $cache_file"
4327 cat confcache > $cache_file
4328 else
4329 echo "not updating unwritable cache $cache_file"
4330 fi
4331fi
4332rm -f confcache
4333
4334trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4335
4336test "x$prefix" = xNONE && prefix=$ac_default_prefix
4337# Let make expand exec_prefix.
4338test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4339
4340# Any assignment to VPATH causes Sun make to only execute
4341# the first set of double-colon rules, so remove it if not needed.
4342# If there is a colon in the path, we need to keep it.
4343if test "x$srcdir" = x.; then
4344 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4345fi
4346
4347trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4348
4349DEFS=-DHAVE_CONFIG_H
4350
4351# Without the "./", some shells look in PATH for config.status.
4352: ${CONFIG_STATUS=./config.status}
4353
4354echo creating $CONFIG_STATUS
4355rm -f $CONFIG_STATUS
4356cat > $CONFIG_STATUS <<EOF
4357#! /bin/sh
4358# Generated automatically by configure.
4359# Run this file to recreate the current configuration.
4360# This directory was configured as follows,
4361# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4362#
4363# $0 $ac_configure_args
4364#
4365# Compiler output produced by configure, useful for debugging
4366# configure, is in ./config.log if it exists.
4367
4368ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4369for ac_option
4370do
4371 case "\$ac_option" in
4372 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4373 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4374 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4375 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4376 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4377 exit 0 ;;
4378 -help | --help | --hel | --he | --h)
4379 echo "\$ac_cs_usage"; exit 0 ;;
4380 *) echo "\$ac_cs_usage"; exit 1 ;;
4381 esac
4382done
4383
4384ac_given_srcdir=$srcdir
4385ac_given_INSTALL="$INSTALL"
4386
4387trap 'rm -fr `echo "mkcheck Makefile src/Makefile math/Makefile libio/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4388EOF
4389cat >> $CONFIG_STATUS <<EOF
4390
4391# Protect against being on the right side of a sed subst in config.status.
4392sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4393 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4394$ac_vpsub
4395$extrasub
4396s%@SHELL@%$SHELL%g
4397s%@CFLAGS@%$CFLAGS%g
4398s%@CPPFLAGS@%$CPPFLAGS%g
4399s%@CXXFLAGS@%$CXXFLAGS%g
4400s%@FFLAGS@%$FFLAGS%g
4401s%@DEFS@%$DEFS%g
4402s%@LDFLAGS@%$LDFLAGS%g
4403s%@LIBS@%$LIBS%g
4404s%@exec_prefix@%$exec_prefix%g
4405s%@prefix@%$prefix%g
4406s%@program_transform_name@%$program_transform_name%g
4407s%@bindir@%$bindir%g
4408s%@sbindir@%$sbindir%g
4409s%@libexecdir@%$libexecdir%g
4410s%@datadir@%$datadir%g
4411s%@sysconfdir@%$sysconfdir%g
4412s%@sharedstatedir@%$sharedstatedir%g
4413s%@localstatedir@%$localstatedir%g
4414s%@libdir@%$libdir%g
4415s%@includedir@%$includedir%g
4416s%@oldincludedir@%$oldincludedir%g
4417s%@infodir@%$infodir%g
4418s%@mandir@%$mandir%g
4419s%@host@%$host%g
4420s%@host_alias@%$host_alias%g
4421s%@host_cpu@%$host_cpu%g
4422s%@host_vendor@%$host_vendor%g
4423s%@host_os@%$host_os%g
4424s%@target@%$target%g
4425s%@target_alias@%$target_alias%g
4426s%@target_cpu@%$target_cpu%g
4427s%@target_vendor@%$target_vendor%g
4428s%@target_os@%$target_os%g
4429s%@build@%$build%g
4430s%@build_alias@%$build_alias%g
4431s%@build_cpu@%$build_cpu%g
4432s%@build_vendor@%$build_vendor%g
4433s%@build_os@%$build_os%g
4434s%@glibcpp_basedir@%$glibcpp_basedir%g
4435s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4436s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4437s%@INSTALL_DATA@%$INSTALL_DATA%g
4438s%@PACKAGE@%$PACKAGE%g
4439s%@VERSION@%$VERSION%g
4440s%@ACLOCAL@%$ACLOCAL%g
4441s%@AUTOCONF@%$AUTOCONF%g
4442s%@AUTOMAKE@%$AUTOMAKE%g
4443s%@AUTOHEADER@%$AUTOHEADER%g
4444s%@MAKEINFO@%$MAKEINFO%g
4445s%@SET_MAKE@%$SET_MAKE%g
4446s%@CC@%$CC%g
4447s%@CXX@%$CXX%g
4448s%@AS@%$AS%g
4449s%@AR@%$AR%g
4450s%@RANLIB@%$RANLIB%g
4451s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
4452s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
4453s%@MAINT@%$MAINT%g
4454s%@EXEEXT@%$EXEEXT%g
4455s%@GLIBCPP_CFLAGS@%$GLIBCPP_CFLAGS%g
4456s%@GLIBCPP_CXXFLAGS@%$GLIBCPP_CXXFLAGS%g
4457s%@LN_S@%$LN_S%g
4458s%@LIBTOOL@%$LIBTOOL%g
a4e99046 4459s%@CXXCPP@%$CXXCPP%g
8bd636c5 4460s%@WERROR@%$WERROR%g
d3a12960 4461s%@FMTFLAGS@%$FMTFLAGS%g
b2dad0e3 4462s%@cpu_include_dir@%$cpu_include_dir%g
cde28f0d 4463s%@CPUFLAGS@%$CPUFLAGS%g
b2dad0e3 4464s%@DEBUGFLAGS@%$DEBUGFLAGS%g
a4e99046 4465s%@CPP@%$CPP%g
b2dad0e3 4466s%@BUILD_LIBIO_INCLUDE@%$BUILD_LIBIO_INCLUDE%g
f3b004d8
BK
4467s%@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE%g
4468s%@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE%g
b2dad0e3
BK
4469s%@CSTDIO_H@%$CSTDIO_H%g
4470s%@CSTDIO_CC@%$CSTDIO_CC%g
4471s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g
4472s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g
99246c90 4473s%@SHADOW_INCLUDES@%$SHADOW_INCLUDES%g
b2dad0e3
BK
4474s%@THREADLIBS@%$THREADLIBS%g
4475s%@THREADINCS@%$THREADINCS%g
4476s%@THREADDEPS@%$THREADDEPS%g
4477s%@THREADOBJS@%$THREADOBJS%g
4478s%@THREADSPEC@%$THREADSPEC%g
dcfa0bc8 4479s%@EXTRA_CXX_FLAGS@%$EXTRA_CXX_FLAGS%g
b2dad0e3
BK
4480s%@ctype_include_dir@%$ctype_include_dir%g
4481s%@LIBMATHOBJS@%$LIBMATHOBJS%g
4482s%@USE_LONG_DOUBLE@%$USE_LONG_DOUBLE%g
4483s%@LIBSTRINGOBJS@%$LIBSTRINGOBJS%g
5d89258a 4484s%@libinst_wstring_la@%$libinst_wstring_la%g
b2dad0e3
BK
4485s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
4486s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
4487s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
4488s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
4489s%@NATIVE_TRUE@%$NATIVE_TRUE%g
4490s%@NATIVE_FALSE@%$NATIVE_FALSE%g
4491s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
4492s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
4493
4494CEOF
4495EOF
4496
4497cat >> $CONFIG_STATUS <<\EOF
4498
4499# Split the substitutions into bite-sized pieces for seds with
4500# small command number limits, like on Digital OSF/1 and HP-UX.
4501ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4502ac_file=1 # Number of current file.
4503ac_beg=1 # First line for current file.
4504ac_end=$ac_max_sed_cmds # Line after last line for current file.
4505ac_more_lines=:
4506ac_sed_cmds=""
4507while $ac_more_lines; do
4508 if test $ac_beg -gt 1; then
4509 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4510 else
4511 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4512 fi
4513 if test ! -s conftest.s$ac_file; then
4514 ac_more_lines=false
4515 rm -f conftest.s$ac_file
4516 else
4517 if test -z "$ac_sed_cmds"; then
4518 ac_sed_cmds="sed -f conftest.s$ac_file"
4519 else
4520 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4521 fi
4522 ac_file=`expr $ac_file + 1`
4523 ac_beg=$ac_end
4524 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4525 fi
4526done
4527if test -z "$ac_sed_cmds"; then
4528 ac_sed_cmds=cat
4529fi
4530EOF
4531
4532cat >> $CONFIG_STATUS <<EOF
4533
4534CONFIG_FILES=\${CONFIG_FILES-"mkcheck Makefile src/Makefile math/Makefile libio/Makefile"}
4535EOF
4536cat >> $CONFIG_STATUS <<\EOF
4537for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4538 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4539 case "$ac_file" in
4540 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4541 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4542 *) ac_file_in="${ac_file}.in" ;;
4543 esac
4544
4545 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4546
4547 # Remove last slash and all that follows it. Not all systems have dirname.
4548 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4549 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4550 # The file is in a subdirectory.
4551 test ! -d "$ac_dir" && mkdir "$ac_dir"
4552 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4553 # A "../" for each directory in $ac_dir_suffix.
4554 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4555 else
4556 ac_dir_suffix= ac_dots=
4557 fi
4558
4559 case "$ac_given_srcdir" in
4560 .) srcdir=.
4561 if test -z "$ac_dots"; then top_srcdir=.
4562 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4563 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4564 *) # Relative path.
4565 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4566 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4567 esac
4568
4569 case "$ac_given_INSTALL" in
4570 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4571 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4572 esac
4573
4574 echo creating "$ac_file"
4575 rm -f "$ac_file"
4576 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4577 case "$ac_file" in
4578 *Makefile*) ac_comsub="1i\\
4579# $configure_input" ;;
4580 *) ac_comsub= ;;
4581 esac
4582
4583 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4584 sed -e "$ac_comsub
4585s%@configure_input@%$configure_input%g
4586s%@srcdir@%$srcdir%g
4587s%@top_srcdir@%$top_srcdir%g
4588s%@INSTALL@%$INSTALL%g
4589" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4590fi; done
4591rm -f conftest.s*
4592
4593# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4594# NAME is the cpp macro being defined and VALUE is the value it is being given.
4595#
4596# ac_d sets the value in "#define NAME VALUE" lines.
4597ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4598ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4599ac_dC='\3'
4600ac_dD='%g'
4601# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4602ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4603ac_uB='\([ ]\)%\1#\2define\3'
4604ac_uC=' '
4605ac_uD='\4%g'
4606# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4607ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4608ac_eB='$%\1#\2define\3'
4609ac_eC=' '
4610ac_eD='%g'
4611
4612if test "${CONFIG_HEADERS+set}" != set; then
4613EOF
4614cat >> $CONFIG_STATUS <<EOF
4615 CONFIG_HEADERS="config.h"
4616EOF
4617cat >> $CONFIG_STATUS <<\EOF
4618fi
4619for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4620 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4621 case "$ac_file" in
4622 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4623 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4624 *) ac_file_in="${ac_file}.in" ;;
4625 esac
4626
4627 echo creating $ac_file
4628
4629 rm -f conftest.frag conftest.in conftest.out
4630 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4631 cat $ac_file_inputs > conftest.in
4632
4633EOF
4634
4635# Transform confdefs.h into a sed script conftest.vals that substitutes
4636# the proper values into config.h.in to produce config.h. And first:
4637# Protect against being on the right side of a sed subst in config.status.
4638# Protect against being in an unquoted here document in config.status.
4639rm -f conftest.vals
4640cat > conftest.hdr <<\EOF
4641s/[\\&%]/\\&/g
4642s%[\\$`]%\\&%g
4643s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4644s%ac_d%ac_u%gp
4645s%ac_u%ac_e%gp
4646EOF
4647sed -n -f conftest.hdr confdefs.h > conftest.vals
4648rm -f conftest.hdr
4649
4650# This sed command replaces #undef with comments. This is necessary, for
4651# example, in the case of _POSIX_SOURCE, which is predefined and required
4652# on some systems where configure will not decide to define it.
4653cat >> conftest.vals <<\EOF
4654s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4655EOF
4656
4657# Break up conftest.vals because some shells have a limit on
4658# the size of here documents, and old seds have small limits too.
4659
4660rm -f conftest.tail
4661while :
4662do
4663 ac_lines=`grep -c . conftest.vals`
4664 # grep -c gives empty output for an empty file on some AIX systems.
4665 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4666 # Write a limited-size here document to conftest.frag.
4667 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4668 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4669 echo 'CEOF
4670 sed -f conftest.frag conftest.in > conftest.out
4671 rm -f conftest.in
4672 mv conftest.out conftest.in
4673' >> $CONFIG_STATUS
4674 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4675 rm -f conftest.vals
4676 mv conftest.tail conftest.vals
4677done
4678rm -f conftest.vals
4679
4680cat >> $CONFIG_STATUS <<\EOF
4681 rm -f conftest.frag conftest.h
4682 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4683 cat conftest.in >> conftest.h
4684 rm -f conftest.in
4685 if cmp -s $ac_file conftest.h 2>/dev/null; then
4686 echo "$ac_file is unchanged"
4687 rm -f conftest.h
4688 else
4689 # Remove last slash and all that follows it. Not all systems have dirname.
4690 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4691 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4692 # The file is in a subdirectory.
4693 test ! -d "$ac_dir" && mkdir "$ac_dir"
4694 fi
4695 rm -f $ac_file
4696 mv conftest.h $ac_file
4697 fi
4698fi; done
4699
4700EOF
4701cat >> $CONFIG_STATUS <<EOF
4702
4703srcdir=${srcdir}
4704host=${host}
4705target=${target}
4706with_multisubdir=${with_multisubdir}
4707ac_configure_args="${multilib_arg} ${ac_configure_args}"
4708CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4709glibcpp_basedir=${glibcpp_basedir}
4710CC="${CC}"
4711CXX="${CXX}"
4712
4713EOF
4714cat >> $CONFIG_STATUS <<\EOF
4715test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4716if test -n "$CONFIG_FILES"; then
4717 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
4718 grep '^MULTISUBDIR =' Makefile >> src/Makefile
4719fi
4720exit 0
4721EOF
4722chmod +x $CONFIG_STATUS
4723rm -fr confdefs* $ac_clean_files
4724test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4725
4726
4727
4728blddir=`pwd`
4729# Generate mkcheck having execute privs
4730
4731
4732# Generate bits/c++config.h
4733# NB: This must be the first generated file as others include it. . .
4734
4735
4736# Generate bits/std_limits.h and src/limitsMEMBERS.cc
4737
4738
4739# Generate bits/c++threads.h
4740
4741
4742# Generate bits/c++io.h and src/c++io.cc
4743
4744
b2dad0e3
BK
4745chmod +x $blddir/mkcheck
4746$srcdir/mkc++config $blddir $srcdir
4747$srcdir/mknumeric_limits $blddir $srcdir $xcompiling
4748cp $srcdir/config/$THREADH $blddir/bits/c++threads.h
4749cp $srcdir/config/$CSTDIO_H $blddir/bits/c++io.h
4750cp $srcdir/config/$CSTDIO_CC $blddir/src/c++io.cc
4751
4752
4753
4754
4755
4756