]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/configure
[multiple changes]
[thirdparty/gcc.git] / libstdc++-v3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17 ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19 ac_help="$ac_help
20 --enable-multilib build hella library versions (default)"
21 ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24 ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26 ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30 ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32 ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34 ac_help="$ac_help
35 --enable-debug extra debugging, turn off optimization [default=no]"
36 ac_help="$ac_help
37 --enable-cstdio enable GNU libio for target io package. (default)
38 --enable-cstdio=LIB use LIB target-speific io package."
39 ac_help="$ac_help
40 --enable-long-long turns on 'long long' [default=no]"
41 ac_help="$ac_help
42 --enable-cshadow-headers construct "shadowed" C header files for
43 g++ [default=no]"
44 ac_help="$ac_help
45 --enable-threads enable thread usage for target GCC.
46 --enable-threads=LIB use LIB thread package for target GCC."
47 ac_help="$ac_help
48 --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
49 [default=none]"
50
51 # Initialize some variables set by options.
52 # The variables have the same names as the options, with
53 # dashes changed to underlines.
54 build=NONE
55 cache_file=./config.cache
56 exec_prefix=NONE
57 host=NONE
58 no_create=
59 nonopt=NONE
60 no_recursion=
61 prefix=NONE
62 program_prefix=NONE
63 program_suffix=NONE
64 program_transform_name=s,x,x,
65 silent=
66 site=
67 srcdir=
68 target=NONE
69 verbose=
70 x_includes=NONE
71 x_libraries=NONE
72 bindir='${exec_prefix}/bin'
73 sbindir='${exec_prefix}/sbin'
74 libexecdir='${exec_prefix}/libexec'
75 datadir='${prefix}/share'
76 sysconfdir='${prefix}/etc'
77 sharedstatedir='${prefix}/com'
78 localstatedir='${prefix}/var'
79 libdir='${exec_prefix}/lib'
80 includedir='${prefix}/include'
81 oldincludedir='/usr/include'
82 infodir='${prefix}/info'
83 mandir='${prefix}/man'
84
85 # Initialize some other variables.
86 subdirs=
87 MFLAGS= MAKEFLAGS=
88 SHELL=${CONFIG_SHELL-/bin/sh}
89 # Maximum number of lines to put in a shell here document.
90 ac_max_here_lines=12
91
92 ac_prev=
93 for ac_option
94 do
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
174 Usage: configure [options] [host]
175 Options: [defaults in brackets after descriptions]
176 Configuration:
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
182 Directory 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
206 EOF
207 cat << EOF
208 Host 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]
212 Features 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
219 EOF
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
429 done
430
431 if test -n "$ac_prev"; then
432 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
433 fi
434
435 trap '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
445 if test "$silent" = yes; then
446 exec 6>/dev/null
447 else
448 exec 6>&1
449 fi
450 exec 5>./config.log
451
452 echo "\
453 This file contains any messages produced by compilers while
454 running 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.
459 ac_configure_args=
460 for ac_arg
461 do
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
471 done
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.
478 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
479 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
480 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
481 if 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.
484 rm -rf conftest* confdefs.h
485 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
486 echo > 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.
490 ac_unique_file=src/complex.cc
491
492 # Find the source files, if location was not specified.
493 if 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
503 else
504 ac_srcdir_defaulted=no
505 fi
506 if 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
512 fi
513 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
514
515 # Prefer explicitly selected file to automatically selected ones.
516 if 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
522 fi
523 for 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
528 done
529
530 if test -r "$cache_file"; then
531 echo "loading cache $cache_file"
532 . $cache_file
533 else
534 echo "creating cache $cache_file"
535 > $cache_file
536 fi
537
538 ac_ext=c
539 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540 ac_cpp='$CPP $CPPFLAGS'
541 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543 cross_compiling=$ac_cv_prog_cc_cross
544
545 ac_exeext=
546 ac_objext=o
547 if (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
555 else
556 ac_n= ac_c='\c' ac_t=
557 fi
558
559
560 ac_aux_dir=
561 for 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
571 done
572 if test -z "$ac_aux_dir"; then
573 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
574 fi
575 ac_config_guess=$ac_aux_dir/config.guess
576 ac_config_sub=$ac_aux_dir/config.sub
577 ac_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.
597 case $host---$target---$nonopt in
598 NONE---*---* | *---NONE---* | *---*---NONE) ;;
599 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
600 esac
601
602
603 # Make sure we can run config.sub.
604 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
605 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
606 fi
607
608 echo $ac_n "checking host system type""... $ac_c" 1>&6
609 echo "configure:610: checking host system type" >&5
610
611 host_alias=$host
612 case "$host_alias" in
613 NONE)
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 ;;
621 esac
622
623 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
624 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
627 echo "$ac_t""$host" 1>&6
628
629 echo $ac_n "checking target system type""... $ac_c" 1>&6
630 echo "configure:631: checking target system type" >&5
631
632 target_alias=$target
633 case "$target_alias" in
634 NONE)
635 case $nonopt in
636 NONE) target_alias=$host_alias ;;
637 *) target_alias=$nonopt ;;
638 esac ;;
639 esac
640
641 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
642 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
645 echo "$ac_t""$target" 1>&6
646
647 echo $ac_n "checking build system type""... $ac_c" 1>&6
648 echo "configure:649: checking build system type" >&5
649
650 build_alias=$build
651 case "$build_alias" in
652 NONE)
653 case $nonopt in
654 NONE) build_alias=$host_alias ;;
655 *) build_alias=$nonopt ;;
656 esac ;;
657 esac
658
659 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
660 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
663 echo "$ac_t""$build" 1>&6
664
665 test "$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.
673 if test "${with_target_subdir+set}" = set; then
674 withval="$with_target_subdir"
675 :
676 fi
677
678 # Check whether --with-cross-host or --without-cross-host was given.
679 if test "${with_cross_host+set}" = set; then
680 withval="$with_cross_host"
681 :
682 fi
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.
696 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
697 echo "configure:698: checking for a BSD compatible install" >&5
698 if test -z "$INSTALL"; then
699 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
701 else
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
728 fi
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
738 fi
739 echo "$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.
743 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
744
745 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
746
747 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
748
749 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
750 echo "configure:751: checking whether build environment is sane" >&5
751 # Just in case
752 sleep 1
753 echo 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).
759 if (
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
773 alias in your environment" 1>&2; exit 1; }
774 fi
775
776 test "$2" = conftestfile
777 )
778 then
779 # Ok.
780 :
781 else
782 { echo "configure: error: newly created file is older than distributed files!
783 Check your system clock" 1>&2; exit 1; }
784 fi
785 rm -f conftest*
786 echo "$ac_t""yes" 1>&6
787 if test "$program_transform_name" = s,x,x,; then
788 program_transform_name=
789 else
790 # Double any \ or $. echo might interpret backslashes.
791 cat <<\EOF_SED > conftestsed
792 s,\\,\\\\,g; s,\$,$$,g
793 EOF_SED
794 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
795 rm -f conftestsed
796 fi
797 test "$program_prefix" != NONE &&
798 program_transform_name="s,^,${program_prefix},; $program_transform_name"
799 # Use a double $ so make ignores it.
800 test "$program_suffix" != NONE &&
801 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
802
803 # sed with no file args requires a program.
804 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
805
806 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
807 echo "configure:808: checking whether ${MAKE-make} sets \${MAKE}" >&5
808 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
809 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
811 else
812 cat > conftestmake <<\EOF
813 all:
814 @echo 'ac_maketemp="${MAKE}"'
815 EOF
816 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
817 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
818 if test -n "$ac_maketemp"; then
819 eval ac_cv_prog_make_${ac_make}_set=yes
820 else
821 eval ac_cv_prog_make_${ac_make}_set=no
822 fi
823 rm -f conftestmake
824 fi
825 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
826 echo "$ac_t""yes" 1>&6
827 SET_MAKE=
828 else
829 echo "$ac_t""no" 1>&6
830 SET_MAKE="MAKE=${MAKE-make}"
831 fi
832
833 if test $host != $build; then
834 ac_tool_prefix=${host_alias}-
835 else
836 ac_tool_prefix=
837 fi
838
839 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
840 echo "configure:841: checking for Cygwin environment" >&5
841 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843 else
844 cat > conftest.$ac_ext <<EOF
845 #line 846 "configure"
846 #include "confdefs.h"
847
848 int main() {
849
850 #ifndef __CYGWIN__
851 #define __CYGWIN__ __CYGWIN32__
852 #endif
853 return __CYGWIN__;
854 ; return 0; }
855 EOF
856 if { (eval echo configure:857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
857 rm -rf conftest*
858 ac_cv_cygwin=yes
859 else
860 echo "configure: failed program was:" >&5
861 cat conftest.$ac_ext >&5
862 rm -rf conftest*
863 ac_cv_cygwin=no
864 fi
865 rm -f conftest*
866 rm -f conftest*
867 fi
868
869 echo "$ac_t""$ac_cv_cygwin" 1>&6
870 CYGWIN=
871 test "$ac_cv_cygwin" = yes && CYGWIN=yes
872 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
873 echo "configure:874: checking for mingw32 environment" >&5
874 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
876 else
877 cat > conftest.$ac_ext <<EOF
878 #line 879 "configure"
879 #include "confdefs.h"
880
881 int main() {
882 return __MINGW32__;
883 ; return 0; }
884 EOF
885 if { (eval echo configure:886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
886 rm -rf conftest*
887 ac_cv_mingw32=yes
888 else
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 ac_cv_mingw32=no
893 fi
894 rm -f conftest*
895 rm -f conftest*
896 fi
897
898 echo "$ac_t""$ac_cv_mingw32" 1>&6
899 MINGW32=
900 test "$ac_cv_mingw32" = yes && MINGW32=yes
901
902 # Check whether --enable-multilib or --disable-multilib was given.
903 if 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
910 else
911 multilib=yes
912 fi
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.
927 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
928 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929 fi
930
931 echo $ac_n "checking host system type""... $ac_c" 1>&6
932 echo "configure:933: checking host system type" >&5
933
934 host_alias=$host
935 case "$host_alias" in
936 NONE)
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 ;;
944 esac
945
946 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
947 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
948 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
949 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
950 echo "$ac_t""$host" 1>&6
951
952
953
954 PACKAGE=libstdc++
955
956 VERSION=2.90.8
957
958 if 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; }
960 fi
961 cat >> confdefs.h <<EOF
962 #define PACKAGE "$PACKAGE"
963 EOF
964
965 cat >> confdefs.h <<EOF
966 #define VERSION "$VERSION"
967 EOF
968
969
970
971 missing_dir=`cd $ac_aux_dir && pwd`
972 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
973 echo "configure:974: checking for working aclocal" >&5
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.
977 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
978 ACLOCAL=aclocal
979 echo "$ac_t""found" 1>&6
980 else
981 ACLOCAL="$missing_dir/missing aclocal"
982 echo "$ac_t""missing" 1>&6
983 fi
984
985 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
986 echo "configure:987: checking for working autoconf" >&5
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.
990 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
991 AUTOCONF=autoconf
992 echo "$ac_t""found" 1>&6
993 else
994 AUTOCONF="$missing_dir/missing autoconf"
995 echo "$ac_t""missing" 1>&6
996 fi
997
998 echo $ac_n "checking for working automake""... $ac_c" 1>&6
999 echo "configure:1000: checking for working automake" >&5
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.
1003 if (automake --version) < /dev/null > /dev/null 2>&1; then
1004 AUTOMAKE=automake
1005 echo "$ac_t""found" 1>&6
1006 else
1007 AUTOMAKE="$missing_dir/missing automake"
1008 echo "$ac_t""missing" 1>&6
1009 fi
1010
1011 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1012 echo "configure:1013: checking for working autoheader" >&5
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.
1016 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1017 AUTOHEADER=autoheader
1018 echo "$ac_t""found" 1>&6
1019 else
1020 AUTOHEADER="$missing_dir/missing autoheader"
1021 echo "$ac_t""missing" 1>&6
1022 fi
1023
1024 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1025 echo "configure:1026: checking for working makeinfo" >&5
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.
1029 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1030 MAKEINFO=makeinfo
1031 echo "$ac_t""found" 1>&6
1032 else
1033 MAKEINFO="$missing_dir/missing makeinfo"
1034 echo "$ac_t""missing" 1>&6
1035 fi
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.
1049 set dummy gcc; ac_word=$2
1050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1051 echo "configure:1052: checking for $ac_word" >&5
1052 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1054 else
1055 if test -n "$CC"; then
1056 ac_cv_prog_CC="$CC" # Let the user override the test.
1057 else
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"
1068 fi
1069 fi
1070 CC="$ac_cv_prog_CC"
1071 if test -n "$CC"; then
1072 echo "$ac_t""$CC" 1>&6
1073 else
1074 echo "$ac_t""no" 1>&6
1075 fi
1076
1077 if test -z "$CC"; then
1078 # Extract the first word of "cc", so it can be a program name with args.
1079 set dummy cc; ac_word=$2
1080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1081 echo "configure:1082: checking for $ac_word" >&5
1082 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085 if test -n "$CC"; then
1086 ac_cv_prog_CC="$CC" # Let the user override the test.
1087 else
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"
1103 if 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
1116 fi
1117 fi
1118 fi
1119 CC="$ac_cv_prog_CC"
1120 if test -n "$CC"; then
1121 echo "$ac_t""$CC" 1>&6
1122 else
1123 echo "$ac_t""no" 1>&6
1124 fi
1125
1126 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1127 fi
1128
1129 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1130 echo "configure:1131: checking whether we are using GNU C" >&5
1131 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133 else
1134 cat > conftest.c <<EOF
1135 #ifdef __GNUC__
1136 yes;
1137 #endif
1138 EOF
1139 if { 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
1140 ac_cv_prog_gcc=yes
1141 else
1142 ac_cv_prog_gcc=no
1143 fi
1144 fi
1145
1146 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1147
1148 if 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
1154 echo "configure:1155: checking whether ${CC-cc} accepts -g" >&5
1155 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158 echo 'void f(){}' > conftest.c
1159 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1160 ac_cv_prog_cc_g=yes
1161 else
1162 ac_cv_prog_cc_g=no
1163 fi
1164 rm -f conftest*
1165
1166 fi
1167
1168 echo "$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
1176 else
1177 GCC=
1178 test "${CFLAGS+set}" = set || CFLAGS="-g"
1179 fi
1180
1181
1182 # Likewise for AC_PROG_CXX.
1183
1184
1185
1186 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1187 do
1188 # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1191 echo "configure:1192: checking for $ac_word" >&5
1192 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1193 echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195 if test -n "$CXX"; then
1196 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1197 else
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"
1208 fi
1209 fi
1210 CXX="$ac_cv_prog_CXX"
1211 if test -n "$CXX"; then
1212 echo "$ac_t""$CXX" 1>&6
1213 else
1214 echo "$ac_t""no" 1>&6
1215 fi
1216
1217 test -n "$CXX" && break
1218 done
1219 test -n "$CXX" || CXX="gcc"
1220
1221 test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1222
1223 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1224 echo "configure:1225: checking whether we are using GNU C++" >&5
1225 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228 cat > conftest.C <<EOF
1229 #ifdef __GNUC__
1230 yes;
1231 #endif
1232 EOF
1233 if { 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
1234 ac_cv_prog_gxx=yes
1235 else
1236 ac_cv_prog_gxx=no
1237 fi
1238 fi
1239
1240 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1241
1242 if 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
1248 echo "configure:1249: checking whether ${CXX-g++} accepts -g" >&5
1249 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252 echo 'void f(){}' > conftest.cc
1253 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1254 ac_cv_prog_cxx_g=yes
1255 else
1256 ac_cv_prog_cxx_g=no
1257 fi
1258 rm -f conftest*
1259
1260 fi
1261
1262 echo "$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
1270 else
1271 GXX=
1272 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1273 fi
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.
1280 echo $ac_n "checking build system type""... $ac_c" 1>&6
1281 echo "configure:1282: checking build system type" >&5
1282
1283 build_alias=$build
1284 case "$build_alias" in
1285 NONE)
1286 case $nonopt in
1287 NONE) build_alias=$host_alias ;;
1288 *) build_alias=$nonopt ;;
1289 esac ;;
1290 esac
1291
1292 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1293 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296 echo "$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.
1300 set dummy ${ac_tool_prefix}as; ac_word=$2
1301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_word" >&5
1303 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306 if test -n "$AS"; then
1307 ac_cv_prog_AS="$AS" # Let the user override the test.
1308 else
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"
1320 fi
1321 fi
1322 AS="$ac_cv_prog_AS"
1323 if test -n "$AS"; then
1324 echo "$ac_t""$AS" 1>&6
1325 else
1326 echo "$ac_t""no" 1>&6
1327 fi
1328
1329
1330
1331 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1332 set dummy ${ac_tool_prefix}ar; ac_word=$2
1333 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1334 echo "configure:1335: checking for $ac_word" >&5
1335 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337 else
1338 if test -n "$AR"; then
1339 ac_cv_prog_AR="$AR" # Let the user override the test.
1340 else
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"
1352 fi
1353 fi
1354 AR="$ac_cv_prog_AR"
1355 if test -n "$AR"; then
1356 echo "$ac_t""$AR" 1>&6
1357 else
1358 echo "$ac_t""no" 1>&6
1359 fi
1360
1361
1362
1363 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1364 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1366 echo "configure:1367: checking for $ac_word" >&5
1367 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1368 echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370 if test -n "$RANLIB"; then
1371 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1372 else
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"
1383 fi
1384 fi
1385 RANLIB="$ac_cv_prog_RANLIB"
1386 if test -n "$RANLIB"; then
1387 echo "$ac_t""$RANLIB" 1>&6
1388 else
1389 echo "$ac_t""no" 1>&6
1390 fi
1391
1392
1393 if test -z "$ac_cv_prog_RANLIB"; then
1394 if test -n "$ac_tool_prefix"; then
1395 # Extract the first word of "ranlib", so it can be a program name with args.
1396 set dummy ranlib; ac_word=$2
1397 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1398 echo "configure:1399: checking for $ac_word" >&5
1399 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401 else
1402 if test -n "$RANLIB"; then
1403 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1404 else
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=":"
1416 fi
1417 fi
1418 RANLIB="$ac_cv_prog_RANLIB"
1419 if test -n "$RANLIB"; then
1420 echo "$ac_t""$RANLIB" 1>&6
1421 else
1422 echo "$ac_t""no" 1>&6
1423 fi
1424
1425 else
1426 RANLIB=":"
1427 fi
1428 fi
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.
1442 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1443 echo "configure:1444: checking for a BSD compatible install" >&5
1444 if test -z "$INSTALL"; then
1445 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1447 else
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
1474 fi
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
1484 fi
1485 echo "$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.
1489 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1490
1491 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1492
1493 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1494
1495
1496 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1497 echo "configure:1498: checking whether to enable maintainer-specific portions of Makefiles" >&5
1498 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1499 if test "${enable_maintainer_mode+set}" = set; then
1500 enableval="$enable_maintainer_mode"
1501 USE_MAINTAINER_MODE=$enableval
1502 else
1503 USE_MAINTAINER_MODE=no
1504 fi
1505
1506 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1507
1508
1509 if test $USE_MAINTAINER_MODE = yes; then
1510 MAINTAINER_MODE_TRUE=
1511 MAINTAINER_MODE_FALSE='#'
1512 else
1513 MAINTAINER_MODE_TRUE='#'
1514 MAINTAINER_MODE_FALSE=
1515 fi
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.
1527 if false; then
1528
1529
1530 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1531 echo "configure:1532: checking for executable suffix" >&5
1532 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1533 echo $ac_n "(cached) $ac_c" 1>&6
1534 else
1535 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1536 ac_cv_exeext=.exe
1537 else
1538 rm -f conftest*
1539 echo 'int main () { return 0; }' > conftest.$ac_ext
1540 ac_cv_exeext=
1541 if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
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
1553 fi
1554 fi
1555
1556 EXEEXT=""
1557 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1558 echo "$ac_t""${ac_cv_exeext}" 1>&6
1559 ac_exeext=$EXEEXT
1560
1561 fi
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
1567 glibcpp_cflags=
1568 glibcpp_cxxflags=
1569
1570 . ${glibcpp_basedir}/configure.host
1571
1572 case ${glibcpp_basedir} in
1573 /* | A-Za-z:/\\*) libgcj_flagbasedir=${glibcpp_basedir} ;;
1574 *) glibcpp_flagbasedir='$(top_builddir)/'${glibcpp_basedir} ;;
1575 esac
1576
1577 GLIBCPP_CFLAGS="${glibcpp_cflags}"
1578 GLIBCPP_CXXFLAGS="${glibcpp_cxxflags}"
1579
1580
1581
1582
1583 # Check whether --enable-shared or --disable-shared was given.
1584 if test "${enable_shared+set}" = set; then
1585 enableval="$enable_shared"
1586 p=${PACKAGE-default}
1587 case "$enableval" in
1588 yes) enable_shared=yes ;;
1589 no) 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 ;;
1601 esac
1602 else
1603 enable_shared=yes
1604 fi
1605
1606 # Check whether --enable-static or --disable-static was given.
1607 if test "${enable_static+set}" = set; then
1608 enableval="$enable_static"
1609 p=${PACKAGE-default}
1610 case "$enableval" in
1611 yes) enable_static=yes ;;
1612 no) 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 ;;
1624 esac
1625 else
1626 enable_static=yes
1627 fi
1628
1629 # Check whether --enable-fast-install or --disable-fast-install was given.
1630 if test "${enable_fast_install+set}" = set; then
1631 enableval="$enable_fast_install"
1632 p=${PACKAGE-default}
1633 case "$enableval" in
1634 yes) enable_fast_install=yes ;;
1635 no) 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 ;;
1647 esac
1648 else
1649 enable_fast_install=yes
1650 fi
1651
1652 # Extract the first word of "ranlib", so it can be a program name with args.
1653 set dummy ranlib; ac_word=$2
1654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_word" >&5
1656 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659 if test -n "$RANLIB"; then
1660 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1661 else
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=":"
1673 fi
1674 fi
1675 RANLIB="$ac_cv_prog_RANLIB"
1676 if test -n "$RANLIB"; then
1677 echo "$ac_t""$RANLIB" 1>&6
1678 else
1679 echo "$ac_t""no" 1>&6
1680 fi
1681
1682 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1683 if test "${with_gnu_ld+set}" = set; then
1684 withval="$with_gnu_ld"
1685 test "$withval" = no || with_gnu_ld=yes
1686 else
1687 with_gnu_ld=no
1688 fi
1689
1690 ac_prog=ld
1691 if 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
1694 echo "configure:1695: checking for ld used by GCC" >&5
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
1716 elif test "$with_gnu_ld" = yes; then
1717 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1718 echo "configure:1719: checking for GNU ld" >&5
1719 else
1720 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1721 echo "configure:1722: checking for non-GNU ld" >&5
1722 fi
1723 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1725 else
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"
1743 else
1744 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1745 fi
1746 fi
1747
1748 LD="$ac_cv_path_LD"
1749 if test -n "$LD"; then
1750 echo "$ac_t""$LD" 1>&6
1751 else
1752 echo "$ac_t""no" 1>&6
1753 fi
1754 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1755 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1756 echo "configure:1757: checking if the linker ($LD) is GNU ld" >&5
1757 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759 else
1760 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1761 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1762 ac_cv_prog_gnu_ld=yes
1763 else
1764 ac_cv_prog_gnu_ld=no
1765 fi
1766 fi
1767
1768 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1769
1770
1771 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1772 echo "configure:1773: checking for BSD-compatible nm" >&5
1773 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776 if test -n "$NM"; then
1777 # Let the user override the test.
1778 ac_cv_path_NM="$NM"
1779 else
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
1801 fi
1802 fi
1803
1804 NM="$ac_cv_path_NM"
1805 echo "$ac_t""$NM" 1>&6
1806
1807 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1808 echo "configure:1809: checking whether ln -s works" >&5
1809 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812 rm -f conftestdata
1813 if ln -s X conftestdata 2>/dev/null
1814 then
1815 rm -f conftestdata
1816 ac_cv_prog_LN_S="ln -s"
1817 else
1818 ac_cv_prog_LN_S=ln
1819 fi
1820 fi
1821 LN_S="$ac_cv_prog_LN_S"
1822 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1823 echo "$ac_t""yes" 1>&6
1824 else
1825 echo "$ac_t""no" 1>&6
1826 fi
1827
1828
1829 case "$target" in
1830 NONE) lt_target="$host" ;;
1831 *) lt_target="$target" ;;
1832 esac
1833
1834 # Check for any special flags to pass to ltconfig.
1835 libtool_flags="--cache-file=$cache_file"
1836 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1837 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1838 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1839 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1840 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1841 libtool_flags="$libtool_flags --enable-dlopen"
1842
1843 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1844 if test "${enable_libtool_lock+set}" = set; then
1845 enableval="$enable_libtool_lock"
1846 :
1847 fi
1848
1849 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1850 test 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.
1854 case "$lt_target" in
1855 *-*-irix6*)
1856 # Find out which ABI we are using.
1857 echo '#line 1858 "configure"' > conftest.$ac_ext
1858 if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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
1879 echo "configure:1880: checking whether the C compiler needs -belf" >&5
1880 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883 cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886
1887 int main() {
1888
1889 ; return 0; }
1890 EOF
1891 if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1892 rm -rf conftest*
1893 lt_cv_cc_needs_belf=yes
1894 else
1895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
1897 rm -rf conftest*
1898 lt_cv_cc_needs_belf=no
1899 fi
1900 rm -f conftest*
1901 fi
1902
1903 echo "$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
1911 esac
1912
1913
1914 # Save cache, so that ltconfig can load it
1915 cat > 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 #
1930 EOF
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
1950 if cmp -s $cache_file confcache; then
1951 :
1952 else
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
1959 fi
1960 rm -f confcache
1961
1962
1963 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1964 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1965 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1966 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1967 DLLTOOL="$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
1973 if test -r "$cache_file"; then
1974 echo "loading cache $cache_file"
1975 . $cache_file
1976 else
1977 echo "creating cache $cache_file"
1978 > $cache_file
1979 fi
1980
1981
1982 # This can be used to rebuild libtool when needed
1983 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1984
1985 # Always use our own libtool.
1986 LIBTOOL='$(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.
1990 exec 5>>./config.log
1991
1992
1993
1994
1995
1996 # Check for c++ or library specific bits that don't require linking.
1997 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1998 echo "configure:1999: checking how to run the C++ preprocessor" >&5
1999 if test -z "$CXXCPP"; then
2000 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002 else
2003 ac_ext=C
2004 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2005 ac_cpp='$CXXCPP $CPPFLAGS'
2006 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2007 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2008 cross_compiling=$ac_cv_prog_cxx_cross
2009 CXXCPP="${CXX-g++} -E"
2010 cat > conftest.$ac_ext <<EOF
2011 #line 2012 "configure"
2012 #include "confdefs.h"
2013 #include <stdlib.h>
2014 EOF
2015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2016 { (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2018 if test -z "$ac_err"; then
2019 :
2020 else
2021 echo "$ac_err" >&5
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -rf conftest*
2025 CXXCPP=/lib/cpp
2026 fi
2027 rm -f conftest*
2028 ac_cv_prog_CXXCPP="$CXXCPP"
2029 ac_ext=C
2030 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2031 ac_cpp='$CXXCPP $CPPFLAGS'
2032 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2033 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2034 cross_compiling=$ac_cv_prog_cxx_cross
2035 fi
2036 fi
2037 CXXCPP="$ac_cv_prog_CXXCPP"
2038 echo "$ac_t""$CXXCPP" 1>&6
2039
2040
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.
2047 ac_cpp='$CXXCPP $CPPFLAGS'
2048 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2049 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2050 cross_compiling=$ac_cv_prog_cxx_cross
2051
2052 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2053 ac_save_CXXFLAGS="$CXXFLAGS"
2054 WERROR='-Werror'
2055
2056 # Sanity check that g++ is capable of dealing with v-3.
2057 echo $ac_n "checking for g++ that will successfullly compile this code""... $ac_c" 1>&6
2058 echo "configure:2059: checking for g++ that will successfullly compile this code" >&5
2059 cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2062
2063 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
2064 ok
2065 #endif
2066
2067 EOF
2068 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2069 egrep "ok" >/dev/null 2>&1; then
2070 rm -rf conftest*
2071 gpp_satisfactory=yes
2072 else
2073 rm -rf conftest*
2074 { echo "configure: error: "please upgrade to gcc-2.95 or above"" 1>&2; exit 1; }
2075 fi
2076 rm -f conftest*
2077
2078 echo "$ac_t""$gpp_satisfactory" 1>&6
2079
2080 # Check for pragma system_header.
2081 echo $ac_n "checking for g++ that supports pragma system_header""... $ac_c" 1>&6
2082 echo "configure:2083: checking for g++ that supports pragma system_header" >&5
2083 CXXFLAGS='-Wunknown-pragmas -Werror'
2084 cat > conftest.$ac_ext <<EOF
2085 #line 2086 "configure"
2086 #include "confdefs.h"
2087 #pragma system_header
2088 int main() {
2089 int foo;
2090
2091 ; return 0; }
2092 EOF
2093 if { (eval echo configure:2094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2094 rm -rf conftest*
2095 ac_newpragma=yes
2096 else
2097 echo "configure: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 rm -rf conftest*
2100 ac_newpragma=no
2101 fi
2102 rm -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
2109 if test "$ac_newpragma" = "no"; then
2110 WERROR="$WERROR -Wno-unknown-pragmas"
2111 fi
2112 echo "$ac_t""$ac_newpragma" 1>&6
2113
2114 # Check for more sophisticated diagnostic control.
2115 echo $ac_n "checking for g++ that supports -fdiagnostics-show-location=once""... $ac_c" 1>&6
2116 echo "configure:2117: checking for g++ that supports -fdiagnostics-show-location=once" >&5
2117 CXXFLAGS='-fdiagnostics-show-location=once'
2118 cat > conftest.$ac_ext <<EOF
2119 #line 2120 "configure"
2120 #include "confdefs.h"
2121
2122 int main() {
2123 int foo;
2124
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2128 rm -rf conftest*
2129 ac_gabydiags=yes
2130 else
2131 echo "configure: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
2133 rm -rf conftest*
2134 ac_gabydiags=no
2135 fi
2136 rm -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
2144 FMTFLAGS='-fdiagnostics-show-location=once'
2145 fi
2146 echo "$ac_t""$ac_gabydiags" 1>&6
2147
2148 ac_ext=c
2149 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2150 ac_cpp='$CPP $CPPFLAGS'
2151 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2152 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2153 cross_compiling=$ac_cv_prog_cc_cross
2154
2155
2156
2157
2158
2159 echo $ac_n "checking for cpu primitives directory""... $ac_c" 1>&6
2160 echo "configure:2161: checking for cpu primitives directory" >&5
2161 CPUFLAGS=
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 ;;
2169 i386)
2170 cpu_include_dir="config/cpu/i386"
2171 ;;
2172 i486 | i586 | i686 | i786)
2173 cpu_include_dir="config/cpu/i486"
2174 ;;
2175 powerpc | rs6000)
2176 cpu_include_dir="config/cpu/powerpc"
2177 CPUFLAGS='-mcpu=powerpc'
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
2191
2192
2193
2194 # Enable all the crazy c++ stuff.
2195 # Check whether --enable-debug or --disable-debug was given.
2196 if 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
2203 else
2204 enable_debug=no
2205 fi
2206 case "$enable_debug" in
2207 yes)
2208 DEBUGFLAGS='-O0 -ggdb'
2209 ;;
2210 no)
2211 DEBUGFLAGS='-g'
2212 ;;
2213 esac
2214
2215
2216 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2217 echo "configure:2218: checking how to run the C preprocessor" >&5
2218 # On Suns, sometimes $CPP names a directory.
2219 if test -n "$CPP" && test -d "$CPP"; then
2220 CPP=
2221 fi
2222 if test -z "$CPP"; then
2223 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2224 echo $ac_n "(cached) $ac_c" 1>&6
2225 else
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
2232 #line 2233 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235 Syntax Error
2236 EOF
2237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2238 { (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2240 if test -z "$ac_err"; then
2241 :
2242 else
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
2249 #line 2250 "configure"
2250 #include "confdefs.h"
2251 #include <assert.h>
2252 Syntax Error
2253 EOF
2254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2255 { (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2257 if test -z "$ac_err"; then
2258 :
2259 else
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
2266 #line 2267 "configure"
2267 #include "confdefs.h"
2268 #include <assert.h>
2269 Syntax Error
2270 EOF
2271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2272 { (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2274 if test -z "$ac_err"; then
2275 :
2276 else
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
2282 fi
2283 rm -f conftest*
2284 fi
2285 rm -f conftest*
2286 fi
2287 rm -f conftest*
2288 ac_cv_prog_CPP="$CPP"
2289 fi
2290 CPP="$ac_cv_prog_CPP"
2291 else
2292 ac_cv_prog_CPP="$CPP"
2293 fi
2294 echo "$ac_t""$CPP" 1>&6
2295
2296
2297 echo $ac_n "checking for cstdio to use""... $ac_c" 1>&6
2298 echo "configure:2299: checking for cstdio to use" >&5
2299 # Check whether --enable-cstdio or --disable-cstdio was given.
2300 if test "${enable_cstdio+set}" = set; then
2301 enableval="$enable_cstdio"
2302 if test x$enable_cstdio = xno; then
2303 enable_cstdio=libio
2304 fi
2305 else
2306 enable_cstdio=libio
2307 fi
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_%'`
2321 echo $ac_n "checking for libio.h""... $ac_c" 1>&6
2322 echo "configure:2323: checking for libio.h" >&5
2323 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2324 echo $ac_n "(cached) $ac_c" 1>&6
2325 else
2326 cat > conftest.$ac_ext <<EOF
2327 #line 2328 "configure"
2328 #include "confdefs.h"
2329 #include <libio.h>
2330 EOF
2331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2332 { (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334 if test -z "$ac_err"; then
2335 rm -rf conftest*
2336 eval "ac_cv_header_$ac_safe=yes"
2337 else
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"
2343 fi
2344 rm -f conftest*
2345 fi
2346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2347 echo "$ac_t""yes" 1>&6
2348 has_libio=yes
2349 else
2350 echo "$ac_t""no" 1>&6
2351 has_libio=no
2352 fi
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
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_%'`
2366 echo $ac_n "checking for _G_config.h""... $ac_c" 1>&6
2367 echo "configure:2368: checking for _G_config.h" >&5
2368 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370 else
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374 #include <_G_config.h>
2375 EOF
2376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2377 { (eval echo configure:2378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2379 if test -z "$ac_err"; then
2380 rm -rf conftest*
2381 eval "ac_cv_header_$ac_safe=yes"
2382 else
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"
2388 fi
2389 rm -f conftest*
2390 fi
2391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2392 echo "$ac_t""yes" 1>&6
2393 has_gconf_h=yes
2394 else
2395 echo "$ac_t""no" 1>&6
2396 has_gconf_h=no
2397 fi
2398
2399
2400
2401 if test "$has_gconf_h" = no; then
2402 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE=
2403 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE='#'
2404 else
2405 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE='#'
2406 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE=
2407 fi
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
2427 if test "$need_libio" = yes; then
2428 GLIBCPP_NEED_LIBIO_TRUE=
2429 GLIBCPP_NEED_LIBIO_FALSE='#'
2430 else
2431 GLIBCPP_NEED_LIBIO_TRUE='#'
2432 GLIBCPP_NEED_LIBIO_FALSE=
2433 fi
2434
2435 echo $ac_n "checking for enabled long long""... $ac_c" 1>&6
2436 echo "configure:2437: checking for enabled long long" >&5
2437 # Check whether --enable-long-long or --disable-long-long was given.
2438 if 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
2445 else
2446 enable_long_long=no
2447 fi
2448 echo "$ac_t""$enable_long_long" 1>&6
2449 case "$enable_long_long" in
2450 yes) cat >> confdefs.h <<\EOF
2451 #define _GLIBCPP_USE_LONG_LONG 1
2452 EOF
2453
2454 ;;
2455 esac
2456
2457 echo $ac_n "checking for enabled cshadow headers""... $ac_c" 1>&6
2458 echo "configure:2459: checking for enabled cshadow headers" >&5
2459 # Check whether --enable-cshadow-headers or --disable-cshadow-headers was given.
2460 if test "${enable_cshadow_headers+set}" = set; then
2461 enableval="$enable_cshadow_headers"
2462 case "$enableval" in
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 ;;
2469 esac
2470 else
2471 enable_cshadow_headers=no
2472 fi
2473 echo "$ac_t""$enable_cshadow_headers" 1>&6
2474 case "$enable_cshadow_headers" in
2475 yes)
2476 SHADOW_INCLUDES="-I$srcdir/shadow -I$blddir/cshadow"
2477 $srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
2478 ;;
2479 no)
2480 SHADOW_INCLUDES=''
2481 ;;
2482 esac
2483 # SHADOW_INCLUDES is currently not used anywhere in the source
2484
2485
2486
2487 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
2488 echo "configure:2489: checking for threads package to use" >&5
2489 # Check whether --enable-threads or --disable-threads was given.
2490 if test "${enable_threads+set}" = set; then
2491 enableval="$enable_threads"
2492 if test x$enable_threads = xno; then
2493 enable_threads=''
2494 fi
2495 else
2496 enable_threads=''
2497 fi
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_%'`
2550 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2551 echo "configure:2552: checking for pthread.h" >&5
2552 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2554 else
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2558 #include <pthread.h>
2559 EOF
2560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2561 { (eval echo configure:2562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2563 if test -z "$ac_err"; then
2564 rm -rf conftest*
2565 eval "ac_cv_header_$ac_safe=yes"
2566 else
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"
2572 fi
2573 rm -f conftest*
2574 fi
2575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2576 echo "$ac_t""yes" 1>&6
2577 have_pthread_h=yes
2578 else
2579 echo "$ac_t""no" 1>&6
2580 have_pthread_h=
2581 fi
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
2597 #GLIBCPP_ENABLE_RELIBGCC([../..])
2598 # Check whether --enable-cxx-flags or --disable-cxx-flags was given.
2599 if 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; } ;;
2603 xno|x) enable_cxx_flags='' ;;
2604 *) enable_cxx_flags="$enableval" ;;
2605 esac
2606 else
2607 enable_cxx_flags='none'
2608 fi
2609 if test "$enable_cxx_flags" = "none"; then enable_cxx_flags=''; fi
2610 if test -n "$enable_cxx_flags"; then
2611 for f in $enable_cxx_flags; do
2612 case "$f" in
2613 -fhonor-std) ;;
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
2619 fi
2620 EXTRA_CXX_FLAGS="$enable_cxx_flags"
2621
2622
2623
2624
2625 if 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
2649 EOF
2650
2651
2652 cat >> confdefs.h <<\EOF
2653 #define HAVE__FINITE 1
2654 EOF
2655
2656 cat >> confdefs.h <<\EOF
2657 #define HAVE__ISNAN 1
2658 EOF
2659
2660 cat >> confdefs.h <<\EOF
2661 #define HAVE__COPYSIGN 1
2662 EOF
2663
2664 cat >> confdefs.h <<\EOF
2665 #define HAVE__FPCLASS 1
2666 EOF
2667
2668 cat >> confdefs.h <<\EOF
2669 #define HAVE_MODF 1
2670 EOF
2671
2672
2673 ctype_include_dir="config/wince"
2674
2675
2676 cat >> confdefs.h <<\EOF
2677 #define _GLIBCPP_NEED_MBSTATE_T 1
2678 EOF
2679
2680
2681 cat >> confdefs.h <<\EOF
2682 #define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2683 EOF
2684
2685 cat >> confdefs.h <<\EOF
2686 #define _GLIBCPP_BUGGY_COMPLEX 1
2687 EOF
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
2695 EOF
2696
2697 cat >> confdefs.h <<\EOF
2698 #define HAVE_ISNAN 1
2699 EOF
2700
2701 cat >> confdefs.h <<\EOF
2702 #define HAVE_ISNANF 1
2703 EOF
2704
2705 cat >> confdefs.h <<\EOF
2706 #define HAVE_ISINF 1
2707 EOF
2708
2709 cat >> confdefs.h <<\EOF
2710 #define HAVE_ISINFF 1
2711 EOF
2712
2713
2714 ctype_include_dir="config/newlib"
2715
2716
2717 cat >> confdefs.h <<\EOF
2718 #define _GLIBCPP_NEED_MBSTATE_T 1
2719 EOF
2720
2721
2722 cat >> confdefs.h <<\EOF
2723 #define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2724 EOF
2725
2726 cat >> confdefs.h <<\EOF
2727 #define _GLIBCPP_BUGGY_COMPLEX 1
2728 EOF
2729
2730 # need to ceck for faster f versions of math functions, ie sinf?
2731 ;;
2732 esac
2733 else
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
2747 do
2748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2750 echo "configure:2751: checking for $ac_hdr" >&5
2751 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2752 echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754 cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757 #include <$ac_hdr>
2758 EOF
2759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2760 { (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2762 if test -z "$ac_err"; then
2763 rm -rf conftest*
2764 eval "ac_cv_header_$ac_safe=yes"
2765 else
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"
2771 fi
2772 rm -f conftest*
2773 fi
2774 if 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
2779 EOF
2780
2781 else
2782 echo "$ac_t""no" 1>&6
2783 fi
2784 done
2785
2786
2787
2788
2789 echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6
2790 echo "configure:2791: checking for GNU C++ __complex__ support" >&5
2791 if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794
2795
2796 ac_ext=C
2797 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2798 ac_cpp='$CXXCPP $CPPFLAGS'
2799 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2800 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2801 cross_compiling=$ac_cv_prog_cxx_cross
2802
2803 cat > conftest.$ac_ext <<EOF
2804 #line 2805 "configure"
2805 #include "confdefs.h"
2806 struct dcomplex { __complex__ double x; }; \
2807 dcomplex f(const dcomplex& x) { return dcomplex(x); }
2808 int main() {
2809 \
2810 dcomplex x; f(x);
2811 ; return 0; }
2812 EOF
2813 if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2814 rm -rf conftest*
2815 glibcpp_cv_complex=ok
2816 else
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2819 rm -rf conftest*
2820 glibcpp_cv_complex=buggy
2821
2822 fi
2823 rm -f conftest*
2824 ac_ext=c
2825 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2826 ac_cpp='$CPP $CPPFLAGS'
2827 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2828 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2829 cross_compiling=$ac_cv_prog_cc_cross
2830
2831
2832 fi
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
2838 EOF
2839
2840 fi
2841
2842
2843
2844 echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6
2845 echo "configure:2846: checking for GNU C++ __complex__ float support" >&5
2846 if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
2847 echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849
2850
2851 ac_ext=C
2852 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2853 ac_cpp='$CXXCPP $CPPFLAGS'
2854 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2855 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2856 cross_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 };
2876 EOB
2877 cat > conftest.$ac_ext <<EOF
2878 #line 2879 "configure"
2879 #include "confdefs.h"
2880 #include "conftest.h"
2881 int main() {
2882
2883 ; return 0; }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2886 rm -rf conftest*
2887 glibcpp_cv_float_complex=ok
2888 else
2889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
2891 rm -rf conftest*
2892 glibcpp_cv_float_complex=buggy
2893
2894 fi
2895 rm -f conftest*
2896 ac_ext=c
2897 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2898 ac_cpp='$CPP $CPPFLAGS'
2899 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2900 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2901 cross_compiling=$ac_cv_prog_cc_cross
2902
2903
2904 fi
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
2910 EOF
2911
2912 fi
2913
2914
2915 echo $ac_n "checking for __builtin_sinf""... $ac_c" 1>&6
2916 echo "configure:2917: checking for __builtin_sinf" >&5
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #include <math.h>
2921 int main() {
2922 float foo(void) { __builtin_sinf(0.0); }
2923 ; return 0; }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2926 rm -rf conftest*
2927 use_builtin_sinf=yes
2928 else
2929 echo "configure: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 rm -rf conftest*
2932 use_builtin_sinf=no
2933 fi
2934 rm -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
2939 EOF
2940
2941 fi
2942
2943 echo $ac_n "checking for __builtin_cosf""... $ac_c" 1>&6
2944 echo "configure:2945: checking for __builtin_cosf" >&5
2945 cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #include <math.h>
2949 int main() {
2950 float foo(void) { __builtin_cosf(0.0); }
2951 ; return 0; }
2952 EOF
2953 if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2954 rm -rf conftest*
2955 use_builtin_cosf=yes
2956 else
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 use_builtin_cosf=no
2961 fi
2962 rm -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
2967 EOF
2968
2969 fi
2970
2971 echo $ac_n "checking for __builtin_fabsf""... $ac_c" 1>&6
2972 echo "configure:2973: checking for __builtin_fabsf" >&5
2973 cat > conftest.$ac_ext <<EOF
2974 #line 2975 "configure"
2975 #include "confdefs.h"
2976 #include <math.h>
2977 int main() {
2978 float foo(void) { __builtin_fabsf(0.0); }
2979 ; return 0; }
2980 EOF
2981 if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2982 rm -rf conftest*
2983 use_builtin_fabsf=yes
2984 else
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 use_builtin_fabsf=no
2989 fi
2990 rm -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
2995 EOF
2996
2997 fi
2998
2999 echo $ac_n "checking for __builtin_sqrtf""... $ac_c" 1>&6
3000 echo "configure:3001: checking for __builtin_sqrtf" >&5
3001 cat > conftest.$ac_ext <<EOF
3002 #line 3003 "configure"
3003 #include "confdefs.h"
3004 #include <math.h>
3005 int main() {
3006 float foo(void) { __builtin_sqrtf(0.0); }
3007 ; return 0; }
3008 EOF
3009 if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3010 rm -rf conftest*
3011 use_builtin_sqrtf=yes
3012 else
3013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -rf conftest*
3016 use_builtin_sqrtf=no
3017 fi
3018 rm -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
3023 EOF
3024
3025 fi
3026
3027
3028 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
3029 echo "configure:3030: checking for sin in -lm" >&5
3030 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
3031 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3032 echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034 ac_save_LIBS="$LIBS"
3035 LIBS="-lm $LIBS"
3036 cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
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. */
3042 char sin();
3043
3044 int main() {
3045 sin()
3046 ; return 0; }
3047 EOF
3048 if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3049 rm -rf conftest*
3050 eval "ac_cv_lib_$ac_lib_var=yes"
3051 else
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"
3056 fi
3057 rm -f conftest*
3058 LIBS="$ac_save_LIBS"
3059
3060 fi
3061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3062 echo "$ac_t""yes" 1>&6
3063 libm="-lm"
3064 else
3065 echo "$ac_t""no" 1>&6
3066 fi
3067
3068 save_LIBS="$LIBS"
3069 LIBS="$LIBS $libm"
3070
3071 for ac_hdr in complex.h
3072 do
3073 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3074 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3075 echo "configure:3076: checking for $ac_hdr" >&5
3076 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079 cat > conftest.$ac_ext <<EOF
3080 #line 3081 "configure"
3081 #include "confdefs.h"
3082 #include <$ac_hdr>
3083 EOF
3084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3085 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087 if test -z "$ac_err"; then
3088 rm -rf conftest*
3089 eval "ac_cv_header_$ac_safe=yes"
3090 else
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"
3096 fi
3097 rm -f conftest*
3098 fi
3099 if 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
3104 EOF
3105
3106 else
3107 echo "$ac_t""no" 1>&6
3108 fi
3109 done
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
3115 do
3116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3117 echo "configure:3118: checking for $ac_func" >&5
3118 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3119 echo $ac_n "(cached) $ac_c" 1>&6
3120 else
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
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. */
3130 char $ac_func();
3131
3132 int 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)
3138 choke me
3139 #else
3140 $ac_func();
3141 #endif
3142
3143 ; return 0; }
3144 EOF
3145 if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3146 rm -rf conftest*
3147 eval "ac_cv_func_$ac_func=yes"
3148 else
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"
3153 fi
3154 rm -f conftest*
3155 fi
3156
3157 if 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
3162 EOF
3163
3164 else
3165 echo "$ac_t""no" 1>&6
3166 LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
3167 fi
3168 done
3169
3170
3171
3172 USE_LONG_DOUBLE=no
3173 echo $ac_n "checking for copysignl""... $ac_c" 1>&6
3174 echo "configure:3175: checking for copysignl" >&5
3175 if eval "test \"`echo '$''{'ac_cv_func_copysignl'+set}'`\" = set"; then
3176 echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178 cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181 /* System header to define __stub macros and hopefully few prototypes,
3182 which can conflict with char copysignl(); below. */
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. */
3187 char copysignl();
3188
3189 int 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. */
3194 #if defined (__stub_copysignl) || defined (__stub___copysignl)
3195 choke me
3196 #else
3197 copysignl();
3198 #endif
3199
3200 ; return 0; }
3201 EOF
3202 if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3203 rm -rf conftest*
3204 eval "ac_cv_func_copysignl=yes"
3205 else
3206 echo "configure: failed program was:" >&5
3207 cat conftest.$ac_ext >&5
3208 rm -rf conftest*
3209 eval "ac_cv_func_copysignl=no"
3210 fi
3211 rm -f conftest*
3212 fi
3213
3214 if eval "test \"`echo '$ac_cv_func_'copysignl`\" = yes"; then
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
3219 do
3220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3221 echo "configure:3222: checking for $ac_func" >&5
3222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3223 echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
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. */
3234 char $ac_func();
3235
3236 int 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)
3242 choke me
3243 #else
3244 $ac_func();
3245 #endif
3246
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3250 rm -rf conftest*
3251 eval "ac_cv_func_$ac_func=yes"
3252 else
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"
3257 fi
3258 rm -f conftest*
3259 fi
3260
3261 if 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
3266 EOF
3267
3268 else
3269 echo "$ac_t""no" 1>&6
3270 LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
3271 fi
3272 done
3273
3274
3275 else
3276 echo "$ac_t""no" 1>&6
3277 fi
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
3285 do
3286 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3287 echo "configure:3288: checking for $ac_func" >&5
3288 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3289 echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291 cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
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. */
3300 char $ac_func();
3301
3302 int 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)
3308 choke me
3309 #else
3310 $ac_func();
3311 #endif
3312
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3316 rm -rf conftest*
3317 eval "ac_cv_func_$ac_func=yes"
3318 else
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"
3323 fi
3324 rm -f conftest*
3325 fi
3326
3327 if 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
3332 EOF
3333
3334 else
3335 echo "$ac_t""no" 1>&6
3336 fi
3337 done
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.
3344 for 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
3348 do
3349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_func" >&5
3351 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354 cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
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. */
3363 char $ac_func();
3364
3365 int 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)
3371 choke me
3372 #else
3373 $ac_func();
3374 #endif
3375
3376 ; return 0; }
3377 EOF
3378 if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3379 rm -rf conftest*
3380 eval "ac_cv_func_$ac_func=yes"
3381 else
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"
3386 fi
3387 rm -f conftest*
3388 fi
3389
3390 if 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
3395 EOF
3396
3397 else
3398 echo "$ac_t""no" 1>&6
3399 fi
3400 done
3401
3402
3403 LIBS="$save_LIBS"
3404
3405
3406 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
3407 echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
3408 echo "configure:3409: checking for wchar.h" >&5
3409 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3410 echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412 cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <wchar.h>
3416 EOF
3417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3418 { (eval echo configure:3419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3420 if test -z "$ac_err"; then
3421 rm -rf conftest*
3422 eval "ac_cv_header_$ac_safe=yes"
3423 else
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"
3429 fi
3430 rm -f conftest*
3431 fi
3432 if 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
3436 echo "configure:3437: checking for native mbstate_t" >&5
3437 cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <wchar.h>
3441 int main() {
3442 mbstate_t teststate;
3443 ; return 0; }
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3446 rm -rf conftest*
3447 use_native_mbstatet=yes
3448 else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -rf conftest*
3452 use_native_mbstatet=no
3453 fi
3454 rm -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
3459 EOF
3460
3461 fi
3462
3463 echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
3464 echo "configure:3465: checking for WCHAR_MIN and WCHAR_MAX" >&5
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <wchar.h>
3469 int main() {
3470 int i = WCHAR_MIN; int j = WCHAR_MAX;
3471 ; return 0; }
3472 EOF
3473 if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3474 rm -rf conftest*
3475 has_wchar_minmax=yes
3476 else
3477 echo "configure: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 rm -rf conftest*
3480 has_wchar_minmax=no
3481 fi
3482 rm -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
3487 EOF
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
3494 echo "configure:3495: checking for WEOF" >&5
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3497 "configure"
3497 #include "confdefs.h"
3498
3499 #include <wchar.h>
3500 #include <stddef.h>
3501 int main() {
3502 wint_t i = WEOF;
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506 rm -rf conftest*
3507 has_weof=yes
3508 else
3509 echo "configure: failed program was:" >&5
3510 cat conftest.$ac_ext >&5
3511 rm -rf conftest*
3512 has_weof=no
3513 fi
3514 rm -f conftest*
3515 echo "$ac_t""$has_weof" 1>&6
3516
3517 for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
3518 do
3519 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3520 echo "configure:3521: checking for $ac_func" >&5
3521 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3522 echo $ac_n "(cached) $ac_c" 1>&6
3523 else
3524 cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
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. */
3533 char $ac_func();
3534
3535 int 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)
3541 choke me
3542 #else
3543 $ac_func();
3544 #endif
3545
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3549 rm -rf conftest*
3550 eval "ac_cv_func_$ac_func=yes"
3551 else
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"
3556 fi
3557 rm -f conftest*
3558 fi
3559
3560 if 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
3565 EOF
3566
3567 else
3568 echo "$ac_t""no" 1>&6
3569 LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"
3570 fi
3571 done
3572
3573
3574
3575
3576 echo $ac_n "checking for wide character support""... $ac_c" 1>&6
3577 echo "configure:3578: checking for wide character support" >&5
3578 if test $has_weof = "yes" && test $has_wchar_minmax = "yes"; then
3579 libinst_wstring_la="libinst-wstring.la"
3580 cat >> confdefs.h <<\EOF
3581 #define _GLIBCPP_USE_WCHAR_T 1
3582 EOF
3583
3584 echo "$ac_t""ok" 1>&6
3585 else
3586 libinst_wstring_la=""
3587 echo "$ac_t"""not specializing for wchar_t"" 1>&6
3588 fi
3589
3590 else
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
3596 EOF
3597
3598
3599 fi
3600
3601
3602
3603 ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
3604 echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
3605 echo "configure:3606: checking for ctype.h" >&5
3606 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3607 echo $ac_n "(cached) $ac_c" 1>&6
3608 else
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 #include <ctype.h>
3613 EOF
3614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3615 { (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3617 if test -z "$ac_err"; then
3618 rm -rf conftest*
3619 eval "ac_cv_header_$ac_safe=yes"
3620 else
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"
3626 fi
3627 rm -f conftest*
3628 fi
3629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3630 echo "$ac_t""yes" 1>&6
3631
3632
3633 ctype_default=yes
3634
3635 echo $ac_n "checking <ctype> for gnu-linux ""... $ac_c" 1>&6
3636 echo "configure:3637: checking <ctype> for gnu-linux " >&5
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include <ctype.h>
3641 int main() {
3642 int
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; }
3648 EOF
3649 if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3650 rm -rf conftest*
3651 \
3652 ctype_linux=yes
3653 else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 ctype_linux=no
3658 fi
3659 rm -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
3666 if test $ctype_default = "yes"; then
3667 echo $ac_n "checking <ctype> for freebsd 4.0 ""... $ac_c" 1>&6
3668 echo "configure:3669: checking <ctype> for freebsd 4.0 " >&5
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <ctype.h>
3673 int main() {
3674 int
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; }
3679 EOF
3680 if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3681 rm -rf conftest*
3682 \
3683 ctype_bsd=yes
3684 else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
3688 ctype_bsd=no
3689 fi
3690 rm -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
3695 fi
3696 fi
3697
3698 if test $ctype_default = "yes"; then
3699 echo $ac_n "checking <ctype> for freebsd 3.4 ""... $ac_c" 1>&6
3700 echo "configure:3701: checking <ctype> for freebsd 3.4 " >&5
3701 cat > conftest.$ac_ext <<EOF
3702 #line 3703 "configure"
3703 #include "confdefs.h"
3704 #include <ctype.h>
3705 int main() {
3706 int
3707 foo (int a)
3708 { return _S + _R + _C + _U + _L + _A \
3709 + _D + _P + _X + _G + __istype (a, 0);}
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713 rm -rf conftest*
3714 \
3715 ctype_freebsd34=yes
3716 else
3717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -rf conftest*
3720 ctype_freebsd34=no
3721 fi
3722 rm -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
3727 fi
3728 fi
3729
3730 if test $ctype_default = "yes"; then
3731 echo $ac_n "checking <ctype> for solaris 2.6,7,8 ""... $ac_c" 1>&6
3732 echo "configure:3733: checking <ctype> for solaris 2.6,7,8 " >&5
3733 cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736 #include <ctype.h>
3737 int main() {
3738 int
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; }
3744 EOF
3745 if { (eval echo configure:3746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3746 rm -rf conftest*
3747 \
3748 ctype_solaris=yes
3749 else
3750 echo "configure: failed program was:" >&5
3751 cat conftest.$ac_ext >&5
3752 rm -rf conftest*
3753 ctype_solaris=no
3754 fi
3755 rm -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
3760 echo "configure:3761: checking for version" >&5
3761 ac_ext=C
3762 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3763 ac_cpp='$CXXCPP $CPPFLAGS'
3764 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3765 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3766 cross_compiling=$ac_cv_prog_cxx_cross
3767
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 #include <ctype.h>
3772 int main() {
3773 typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
3774 ; return 0; }
3775 EOF
3776 if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3777 rm -rf conftest*
3778 \
3779 ctype_solaris26=yes
3780 else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 rm -rf conftest*
3784 ctype_solaris26=no
3785 fi
3786 rm -f conftest*
3787 ac_ext=c
3788 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3789 ac_cpp='$CPP $CPPFLAGS'
3790 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3791 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3792 cross_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"
3800 echo "$ac_t"""solaris2.7,8"" 1>&6
3801 ctype_default=no
3802 fi
3803 fi
3804 fi
3805
3806 if test $ctype_default = "yes"; then
3807 echo $ac_n "checking <ctype> for solaris 2.5.1 ""... $ac_c" 1>&6
3808 echo "configure:3809: checking <ctype> for solaris 2.5.1 " >&5
3809 cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <ctype.h>
3813 int main() {
3814 int
3815 foo (int a)
3816 { return _U + _L + _N + _S + _P + _C + _X + _B \
3817 + __ctype[a];}
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821 rm -rf conftest*
3822 \
3823 ctype_solaris25=yes
3824 else
3825 echo "configure: failed program was:" >&5
3826 cat conftest.$ac_ext >&5
3827 rm -rf conftest*
3828 ctype_solaris25=no
3829 fi
3830 rm -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
3839 echo $ac_n "checking <ctype> for aix ""... $ac_c" 1>&6
3840 echo "configure:3841: checking <ctype> for aix " >&5
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 #include <ctype.h>
3845 int main() {
3846 int
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; }
3852 EOF
3853 if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3854 rm -rf conftest*
3855 \
3856 ctype_aix=yes
3857 else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -rf conftest*
3861 ctype_aix=no
3862 fi
3863 rm -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
3872 echo $ac_n "checking <ctype> for newlib ""... $ac_c" 1>&6
3873 echo "configure:3874: checking <ctype> for newlib " >&5
3874 cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 #include <ctype.h>
3878 int main() {
3879 int
3880 foo (int a)
3881 { return _U + _L + _N + _S + _P + _C + _X + _B \
3882 + _ctype_[a];}
3883 ; return 0; }
3884 EOF
3885 if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3886 rm -rf conftest*
3887 \
3888 ctype_newlib=yes
3889 else
3890 echo "configure: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3892 rm -rf conftest*
3893 ctype_newlib=no
3894 fi
3895 rm -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
3909 else
3910 echo "$ac_t""no" 1>&6
3911 fi
3912
3913
3914
3915 for ac_hdr in unistd.h
3916 do
3917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3919 echo "configure:3920: checking for $ac_hdr" >&5
3920 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3921 echo $ac_n "(cached) $ac_c" 1>&6
3922 else
3923 cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3926 #include <$ac_hdr>
3927 EOF
3928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3929 { (eval echo configure:3930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3931 if test -z "$ac_err"; then
3932 rm -rf conftest*
3933 eval "ac_cv_header_$ac_safe=yes"
3934 else
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"
3940 fi
3941 rm -f conftest*
3942 fi
3943 if 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
3948 EOF
3949
3950 else
3951 echo "$ac_t""no" 1>&6
3952 fi
3953 done
3954
3955 for ac_func in getpagesize
3956 do
3957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3958 echo "configure:3959: checking for $ac_func" >&5
3959 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3960 echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962 cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
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. */
3971 char $ac_func();
3972
3973 int 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)
3979 choke me
3980 #else
3981 $ac_func();
3982 #endif
3983
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3987 rm -rf conftest*
3988 eval "ac_cv_func_$ac_func=yes"
3989 else
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"
3994 fi
3995 rm -f conftest*
3996 fi
3997
3998 if 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
4003 EOF
4004
4005 else
4006 echo "$ac_t""no" 1>&6
4007 fi
4008 done
4009
4010 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4011 echo "configure:4012: checking for working mmap" >&5
4012 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4013 echo $ac_n "(cached) $ac_c" 1>&6
4014 else
4015 if test "$cross_compiling" = yes; then
4016 ac_cv_func_mmap_fixed_mapped=no
4017 else
4018 cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
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
4089 extern "C" { void *malloc(unsigned); }
4090 #else
4091 char *malloc();
4092 #endif
4093
4094 int
4095 main()
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
4158 EOF
4159 if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4160 then
4161 ac_cv_func_mmap_fixed_mapped=yes
4162 else
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
4167 fi
4168 rm -fr conftest*
4169 fi
4170
4171 fi
4172
4173 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4174 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4175 cat >> confdefs.h <<\EOF
4176 #define HAVE_MMAP 1
4177 EOF
4178
4179 fi
4180
4181 fi
4182
4183
4184
4185 if test "$CANADIAN" = yes; then
4186 CANADIAN_TRUE=
4187 CANADIAN_FALSE='#'
4188 else
4189 CANADIAN_TRUE='#'
4190 CANADIAN_FALSE=
4191 fi
4192
4193
4194 if test "$NULL_TARGET" = yes; then
4195 NULL_TARGET_TRUE=
4196 NULL_TARGET_FALSE='#'
4197 else
4198 NULL_TARGET_TRUE='#'
4199 NULL_TARGET_FALSE=
4200 fi
4201
4202
4203 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
4204 NATIVE_TRUE=
4205 NATIVE_FALSE='#'
4206 else
4207 NATIVE_TRUE='#'
4208 NATIVE_FALSE=
4209 fi
4210
4211
4212 if test -z "$with_cross_host"; then
4213 USE_LIBDIR_TRUE=
4214 USE_LIBDIR_FALSE='#'
4215 else
4216 USE_LIBDIR_TRUE='#'
4217 USE_LIBDIR_FALSE=
4218 fi
4219
4220 if test $ac_cv_header_locale_h = yes; then
4221 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4222 echo "configure:4223: checking for LC_MESSAGES" >&5
4223 if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4224 echo $ac_n "(cached) $ac_c" 1>&6
4225 else
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 #include <locale.h>
4230 int main() {
4231 return LC_MESSAGES
4232 ; return 0; }
4233 EOF
4234 if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4235 rm -rf conftest*
4236 ac_cv_val_LC_MESSAGES=yes
4237 else
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 rm -rf conftest*
4241 ac_cv_val_LC_MESSAGES=no
4242 fi
4243 rm -f conftest*
4244 fi
4245
4246 echo "$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
4250 EOF
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.
4259 if test "$enable_namespaces" = "yes" && test "$enable_libgcc_rebuild" = "no"
4260 then
4261 echo "configure: warning: libgcc.a will not match mangled symbols unless it is rebuilt" 1>&2
4262 fi
4263 if test "$enable_namespaces" = "no" && test "$enable_libgcc_rebuild" != "no"
4264 then
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
4268 fi
4269
4270
4271 if test "${multilib}" = "yes"; then
4272 multilib_arg="--enable-multilib"
4273 else
4274 multilib_arg=
4275 fi
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
4286 trap '' 1 2 15
4287 cat > 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 #
4302 EOF
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
4322 if cmp -s $cache_file confcache; then
4323 :
4324 else
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
4331 fi
4332 rm -f confcache
4333
4334 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4335
4336 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4337 # Let make expand exec_prefix.
4338 test "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.
4343 if test "x$srcdir" = x.; then
4344 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4345 fi
4346
4347 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4348
4349 DEFS=-DHAVE_CONFIG_H
4350
4351 # Without the "./", some shells look in PATH for config.status.
4352 : ${CONFIG_STATUS=./config.status}
4353
4354 echo creating $CONFIG_STATUS
4355 rm -f $CONFIG_STATUS
4356 cat > $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
4368 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4369 for ac_option
4370 do
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
4382 done
4383
4384 ac_given_srcdir=$srcdir
4385 ac_given_INSTALL="$INSTALL"
4386
4387 trap 'rm -fr `echo "mkcheck Makefile src/Makefile math/Makefile libio/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4388 EOF
4389 cat >> $CONFIG_STATUS <<EOF
4390
4391 # Protect against being on the right side of a sed subst in config.status.
4392 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4393 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4394 $ac_vpsub
4395 $extrasub
4396 s%@SHELL@%$SHELL%g
4397 s%@CFLAGS@%$CFLAGS%g
4398 s%@CPPFLAGS@%$CPPFLAGS%g
4399 s%@CXXFLAGS@%$CXXFLAGS%g
4400 s%@FFLAGS@%$FFLAGS%g
4401 s%@DEFS@%$DEFS%g
4402 s%@LDFLAGS@%$LDFLAGS%g
4403 s%@LIBS@%$LIBS%g
4404 s%@exec_prefix@%$exec_prefix%g
4405 s%@prefix@%$prefix%g
4406 s%@program_transform_name@%$program_transform_name%g
4407 s%@bindir@%$bindir%g
4408 s%@sbindir@%$sbindir%g
4409 s%@libexecdir@%$libexecdir%g
4410 s%@datadir@%$datadir%g
4411 s%@sysconfdir@%$sysconfdir%g
4412 s%@sharedstatedir@%$sharedstatedir%g
4413 s%@localstatedir@%$localstatedir%g
4414 s%@libdir@%$libdir%g
4415 s%@includedir@%$includedir%g
4416 s%@oldincludedir@%$oldincludedir%g
4417 s%@infodir@%$infodir%g
4418 s%@mandir@%$mandir%g
4419 s%@host@%$host%g
4420 s%@host_alias@%$host_alias%g
4421 s%@host_cpu@%$host_cpu%g
4422 s%@host_vendor@%$host_vendor%g
4423 s%@host_os@%$host_os%g
4424 s%@target@%$target%g
4425 s%@target_alias@%$target_alias%g
4426 s%@target_cpu@%$target_cpu%g
4427 s%@target_vendor@%$target_vendor%g
4428 s%@target_os@%$target_os%g
4429 s%@build@%$build%g
4430 s%@build_alias@%$build_alias%g
4431 s%@build_cpu@%$build_cpu%g
4432 s%@build_vendor@%$build_vendor%g
4433 s%@build_os@%$build_os%g
4434 s%@glibcpp_basedir@%$glibcpp_basedir%g
4435 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4436 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4437 s%@INSTALL_DATA@%$INSTALL_DATA%g
4438 s%@PACKAGE@%$PACKAGE%g
4439 s%@VERSION@%$VERSION%g
4440 s%@ACLOCAL@%$ACLOCAL%g
4441 s%@AUTOCONF@%$AUTOCONF%g
4442 s%@AUTOMAKE@%$AUTOMAKE%g
4443 s%@AUTOHEADER@%$AUTOHEADER%g
4444 s%@MAKEINFO@%$MAKEINFO%g
4445 s%@SET_MAKE@%$SET_MAKE%g
4446 s%@CC@%$CC%g
4447 s%@CXX@%$CXX%g
4448 s%@AS@%$AS%g
4449 s%@AR@%$AR%g
4450 s%@RANLIB@%$RANLIB%g
4451 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
4452 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
4453 s%@MAINT@%$MAINT%g
4454 s%@EXEEXT@%$EXEEXT%g
4455 s%@GLIBCPP_CFLAGS@%$GLIBCPP_CFLAGS%g
4456 s%@GLIBCPP_CXXFLAGS@%$GLIBCPP_CXXFLAGS%g
4457 s%@LN_S@%$LN_S%g
4458 s%@LIBTOOL@%$LIBTOOL%g
4459 s%@CXXCPP@%$CXXCPP%g
4460 s%@WERROR@%$WERROR%g
4461 s%@FMTFLAGS@%$FMTFLAGS%g
4462 s%@cpu_include_dir@%$cpu_include_dir%g
4463 s%@CPUFLAGS@%$CPUFLAGS%g
4464 s%@DEBUGFLAGS@%$DEBUGFLAGS%g
4465 s%@CPP@%$CPP%g
4466 s%@BUILD_LIBIO_INCLUDE@%$BUILD_LIBIO_INCLUDE%g
4467 s%@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE%g
4468 s%@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE%g
4469 s%@CSTDIO_H@%$CSTDIO_H%g
4470 s%@CSTDIO_CC@%$CSTDIO_CC%g
4471 s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g
4472 s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g
4473 s%@SHADOW_INCLUDES@%$SHADOW_INCLUDES%g
4474 s%@THREADLIBS@%$THREADLIBS%g
4475 s%@THREADINCS@%$THREADINCS%g
4476 s%@THREADDEPS@%$THREADDEPS%g
4477 s%@THREADOBJS@%$THREADOBJS%g
4478 s%@THREADSPEC@%$THREADSPEC%g
4479 s%@EXTRA_CXX_FLAGS@%$EXTRA_CXX_FLAGS%g
4480 s%@ctype_include_dir@%$ctype_include_dir%g
4481 s%@LIBMATHOBJS@%$LIBMATHOBJS%g
4482 s%@USE_LONG_DOUBLE@%$USE_LONG_DOUBLE%g
4483 s%@LIBSTRINGOBJS@%$LIBSTRINGOBJS%g
4484 s%@libinst_wstring_la@%$libinst_wstring_la%g
4485 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
4486 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
4487 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
4488 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
4489 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
4490 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
4491 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
4492 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
4493
4494 CEOF
4495 EOF
4496
4497 cat >> $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.
4501 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4502 ac_file=1 # Number of current file.
4503 ac_beg=1 # First line for current file.
4504 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4505 ac_more_lines=:
4506 ac_sed_cmds=""
4507 while $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
4526 done
4527 if test -z "$ac_sed_cmds"; then
4528 ac_sed_cmds=cat
4529 fi
4530 EOF
4531
4532 cat >> $CONFIG_STATUS <<EOF
4533
4534 CONFIG_FILES=\${CONFIG_FILES-"mkcheck Makefile src/Makefile math/Makefile libio/Makefile"}
4535 EOF
4536 cat >> $CONFIG_STATUS <<\EOF
4537 for 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
4585 s%@configure_input@%$configure_input%g
4586 s%@srcdir@%$srcdir%g
4587 s%@top_srcdir@%$top_srcdir%g
4588 s%@INSTALL@%$INSTALL%g
4589 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4590 fi; done
4591 rm -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.
4597 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4598 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4599 ac_dC='\3'
4600 ac_dD='%g'
4601 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4602 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4603 ac_uB='\([ ]\)%\1#\2define\3'
4604 ac_uC=' '
4605 ac_uD='\4%g'
4606 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4607 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4608 ac_eB='$%\1#\2define\3'
4609 ac_eC=' '
4610 ac_eD='%g'
4611
4612 if test "${CONFIG_HEADERS+set}" != set; then
4613 EOF
4614 cat >> $CONFIG_STATUS <<EOF
4615 CONFIG_HEADERS="config.h"
4616 EOF
4617 cat >> $CONFIG_STATUS <<\EOF
4618 fi
4619 for 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
4633 EOF
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.
4639 rm -f conftest.vals
4640 cat > conftest.hdr <<\EOF
4641 s/[\\&%]/\\&/g
4642 s%[\\$`]%\\&%g
4643 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4644 s%ac_d%ac_u%gp
4645 s%ac_u%ac_e%gp
4646 EOF
4647 sed -n -f conftest.hdr confdefs.h > conftest.vals
4648 rm -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.
4653 cat >> conftest.vals <<\EOF
4654 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4655 EOF
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
4660 rm -f conftest.tail
4661 while :
4662 do
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
4677 done
4678 rm -f conftest.vals
4679
4680 cat >> $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
4698 fi; done
4699
4700 EOF
4701 cat >> $CONFIG_STATUS <<EOF
4702
4703 srcdir=${srcdir}
4704 host=${host}
4705 target=${target}
4706 with_multisubdir=${with_multisubdir}
4707 ac_configure_args="${multilib_arg} ${ac_configure_args}"
4708 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4709 glibcpp_basedir=${glibcpp_basedir}
4710 CC="${CC}"
4711 CXX="${CXX}"
4712
4713 EOF
4714 cat >> $CONFIG_STATUS <<\EOF
4715 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4716 if test -n "$CONFIG_FILES"; then
4717 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
4718 grep '^MULTISUBDIR =' Makefile >> src/Makefile
4719 fi
4720 exit 0
4721 EOF
4722 chmod +x $CONFIG_STATUS
4723 rm -fr confdefs* $ac_clean_files
4724 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4725
4726
4727
4728 blddir=`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
4745 chmod +x $blddir/mkcheck
4746 $srcdir/mkc++config $blddir $srcdir
4747 $srcdir/mknumeric_limits $blddir $srcdir $xcompiling
4748 cp $srcdir/config/$THREADH $blddir/bits/c++threads.h
4749 cp $srcdir/config/$CSTDIO_H $blddir/bits/c++io.h
4750 cp $srcdir/config/$CSTDIO_CC $blddir/src/c++io.cc
4751
4752
4753
4754
4755
4756