]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/configure
Makefile.am (string_sources): Simplify...
[gcc.git] / libstdc++-v3 / configure
CommitLineData
b2dad0e3
BK
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19ac_help="$ac_help
20 --enable-multilib build hella library versions (default)"
21ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32ac_help="$ac_help
3840fa2a 33 --disable-libtool-lock avoid locking (might break parallel builds)"
b2dad0e3
BK
34ac_help="$ac_help
35 --enable-debug extra debugging, turn off optimization [default=no]"
36ac_help="$ac_help
37 --enable-cstdio enable GNU libio for target io package. (default)
38 --enable-cstdio=LIB use LIB target-speific io package."
39ac_help="$ac_help
5b80666b 40 --enable-long-long turns on 'long long' [default=yes]"
99246c90 41ac_help="$ac_help
d0d88ce3
BK
42 --enable-cshadow-headers construct "shadowed" C header files for
43 g++ [default=no]"
b2dad0e3
BK
44ac_help="$ac_help
45 --enable-threads enable thread usage for target GCC.
46 --enable-threads=LIB use LIB thread package for target GCC."
dcfa0bc8
PE
47ac_help="$ac_help
48 --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
32a4595e 49 [default=none]"
b2dad0e3
BK
50
51# Initialize some variables set by options.
52# The variables have the same names as the options, with
53# dashes changed to underlines.
54build=NONE
55cache_file=./config.cache
56exec_prefix=NONE
57host=NONE
58no_create=
59nonopt=NONE
60no_recursion=
61prefix=NONE
62program_prefix=NONE
63program_suffix=NONE
64program_transform_name=s,x,x,
65silent=
66site=
67srcdir=
68target=NONE
69verbose=
70x_includes=NONE
71x_libraries=NONE
72bindir='${exec_prefix}/bin'
73sbindir='${exec_prefix}/sbin'
74libexecdir='${exec_prefix}/libexec'
75datadir='${prefix}/share'
76sysconfdir='${prefix}/etc'
77sharedstatedir='${prefix}/com'
78localstatedir='${prefix}/var'
79libdir='${exec_prefix}/lib'
80includedir='${prefix}/include'
81oldincludedir='/usr/include'
82infodir='${prefix}/info'
83mandir='${prefix}/man'
84
85# Initialize some other variables.
86subdirs=
87MFLAGS= MAKEFLAGS=
88SHELL=${CONFIG_SHELL-/bin/sh}
89# Maximum number of lines to put in a shell here document.
90ac_max_here_lines=12
91
92ac_prev=
93for ac_option
94do
95
96 # If the previous option needs an argument, assign it.
97 if test -n "$ac_prev"; then
98 eval "$ac_prev=\$ac_option"
99 ac_prev=
100 continue
101 fi
102
103 case "$ac_option" in
104 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
105 *) ac_optarg= ;;
106 esac
107
108 # Accept the important Cygnus configure options, so we can diagnose typos.
109
110 case "$ac_option" in
111
112 -bindir | --bindir | --bindi | --bind | --bin | --bi)
113 ac_prev=bindir ;;
114 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
115 bindir="$ac_optarg" ;;
116
117 -build | --build | --buil | --bui | --bu)
118 ac_prev=build ;;
119 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
120 build="$ac_optarg" ;;
121
122 -cache-file | --cache-file | --cache-fil | --cache-fi \
123 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
124 ac_prev=cache_file ;;
125 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
126 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
127 cache_file="$ac_optarg" ;;
128
129 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
130 ac_prev=datadir ;;
131 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
132 | --da=*)
133 datadir="$ac_optarg" ;;
134
135 -disable-* | --disable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
137 # Reject names that are not valid shell variable names.
138 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 eval "enable_${ac_feature}=no" ;;
143
144 -enable-* | --enable-*)
145 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
146 # Reject names that are not valid shell variable names.
147 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
148 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
149 fi
150 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151 case "$ac_option" in
152 *=*) ;;
153 *) ac_optarg=yes ;;
154 esac
155 eval "enable_${ac_feature}='$ac_optarg'" ;;
156
157 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
158 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
159 | --exec | --exe | --ex)
160 ac_prev=exec_prefix ;;
161 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
162 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
163 | --exec=* | --exe=* | --ex=*)
164 exec_prefix="$ac_optarg" ;;
165
166 -gas | --gas | --ga | --g)
167 # Obsolete; use --with-gas.
168 with_gas=yes ;;
169
170 -help | --help | --hel | --he)
171 # Omit some internal or obsolete options to make the list less imposing.
172 # This message is too long to be a string in the A/UX 3.1 sh.
173 cat << EOF
174Usage: configure [options] [host]
175Options: [defaults in brackets after descriptions]
176Configuration:
177 --cache-file=FILE cache test results in FILE
178 --help print this message
179 --no-create do not create output files
180 --quiet, --silent do not print \`checking...' messages
181 --version print the version of autoconf that created configure
182Directory and file names:
183 --prefix=PREFIX install architecture-independent files in PREFIX
184 [$ac_default_prefix]
185 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
186 [same as prefix]
187 --bindir=DIR user executables in DIR [EPREFIX/bin]
188 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
189 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
190 --datadir=DIR read-only architecture-independent data in DIR
191 [PREFIX/share]
192 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
193 --sharedstatedir=DIR modifiable architecture-independent data in DIR
194 [PREFIX/com]
195 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
196 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
197 --includedir=DIR C header files in DIR [PREFIX/include]
198 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
199 --infodir=DIR info documentation in DIR [PREFIX/info]
200 --mandir=DIR man documentation in DIR [PREFIX/man]
201 --srcdir=DIR find the sources in DIR [configure dir or ..]
202 --program-prefix=PREFIX prepend PREFIX to installed program names
203 --program-suffix=SUFFIX append SUFFIX to installed program names
204 --program-transform-name=PROGRAM
205 run sed PROGRAM on installed program names
206EOF
207 cat << EOF
208Host type:
209 --build=BUILD configure for building on BUILD [BUILD=HOST]
210 --host=HOST configure for HOST [guessed]
211 --target=TARGET configure for TARGET [TARGET=HOST]
212Features and packages:
213 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
214 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
215 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
216 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
217 --x-includes=DIR X include files are in DIR
218 --x-libraries=DIR X library files are in DIR
219EOF
220 if test -n "$ac_help"; then
221 echo "--enable and --with options recognized:$ac_help"
222 fi
223 exit 0 ;;
224
225 -host | --host | --hos | --ho)
226 ac_prev=host ;;
227 -host=* | --host=* | --hos=* | --ho=*)
228 host="$ac_optarg" ;;
229
230 -includedir | --includedir | --includedi | --included | --include \
231 | --includ | --inclu | --incl | --inc)
232 ac_prev=includedir ;;
233 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
234 | --includ=* | --inclu=* | --incl=* | --inc=*)
235 includedir="$ac_optarg" ;;
236
237 -infodir | --infodir | --infodi | --infod | --info | --inf)
238 ac_prev=infodir ;;
239 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
240 infodir="$ac_optarg" ;;
241
242 -libdir | --libdir | --libdi | --libd)
243 ac_prev=libdir ;;
244 -libdir=* | --libdir=* | --libdi=* | --libd=*)
245 libdir="$ac_optarg" ;;
246
247 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
248 | --libexe | --libex | --libe)
249 ac_prev=libexecdir ;;
250 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
251 | --libexe=* | --libex=* | --libe=*)
252 libexecdir="$ac_optarg" ;;
253
254 -localstatedir | --localstatedir | --localstatedi | --localstated \
255 | --localstate | --localstat | --localsta | --localst \
256 | --locals | --local | --loca | --loc | --lo)
257 ac_prev=localstatedir ;;
258 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
259 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
260 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
261 localstatedir="$ac_optarg" ;;
262
263 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
264 ac_prev=mandir ;;
265 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
266 mandir="$ac_optarg" ;;
267
268 -nfp | --nfp | --nf)
269 # Obsolete; use --without-fp.
270 with_fp=no ;;
271
272 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273 | --no-cr | --no-c)
274 no_create=yes ;;
275
276 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
278 no_recursion=yes ;;
279
280 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
281 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
282 | --oldin | --oldi | --old | --ol | --o)
283 ac_prev=oldincludedir ;;
284 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
285 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
286 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
287 oldincludedir="$ac_optarg" ;;
288
289 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
290 ac_prev=prefix ;;
291 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
292 prefix="$ac_optarg" ;;
293
294 -program-prefix | --program-prefix | --program-prefi | --program-pref \
295 | --program-pre | --program-pr | --program-p)
296 ac_prev=program_prefix ;;
297 -program-prefix=* | --program-prefix=* | --program-prefi=* \
298 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
299 program_prefix="$ac_optarg" ;;
300
301 -program-suffix | --program-suffix | --program-suffi | --program-suff \
302 | --program-suf | --program-su | --program-s)
303 ac_prev=program_suffix ;;
304 -program-suffix=* | --program-suffix=* | --program-suffi=* \
305 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
306 program_suffix="$ac_optarg" ;;
307
308 -program-transform-name | --program-transform-name \
309 | --program-transform-nam | --program-transform-na \
310 | --program-transform-n | --program-transform- \
311 | --program-transform | --program-transfor \
312 | --program-transfo | --program-transf \
313 | --program-trans | --program-tran \
314 | --progr-tra | --program-tr | --program-t)
315 ac_prev=program_transform_name ;;
316 -program-transform-name=* | --program-transform-name=* \
317 | --program-transform-nam=* | --program-transform-na=* \
318 | --program-transform-n=* | --program-transform-=* \
319 | --program-transform=* | --program-transfor=* \
320 | --program-transfo=* | --program-transf=* \
321 | --program-trans=* | --program-tran=* \
322 | --progr-tra=* | --program-tr=* | --program-t=*)
323 program_transform_name="$ac_optarg" ;;
324
325 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
326 | -silent | --silent | --silen | --sile | --sil)
327 silent=yes ;;
328
329 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
330 ac_prev=sbindir ;;
331 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
332 | --sbi=* | --sb=*)
333 sbindir="$ac_optarg" ;;
334
335 -sharedstatedir | --sharedstatedir | --sharedstatedi \
336 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
337 | --sharedst | --shareds | --shared | --share | --shar \
338 | --sha | --sh)
339 ac_prev=sharedstatedir ;;
340 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
341 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
342 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
343 | --sha=* | --sh=*)
344 sharedstatedir="$ac_optarg" ;;
345
346 -site | --site | --sit)
347 ac_prev=site ;;
348 -site=* | --site=* | --sit=*)
349 site="$ac_optarg" ;;
350
351 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
352 ac_prev=srcdir ;;
353 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
354 srcdir="$ac_optarg" ;;
355
356 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
357 | --syscon | --sysco | --sysc | --sys | --sy)
358 ac_prev=sysconfdir ;;
359 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
360 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
361 sysconfdir="$ac_optarg" ;;
362
363 -target | --target | --targe | --targ | --tar | --ta | --t)
364 ac_prev=target ;;
365 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
366 target="$ac_optarg" ;;
367
368 -v | -verbose | --verbose | --verbos | --verbo | --verb)
369 verbose=yes ;;
370
371 -version | --version | --versio | --versi | --vers)
372 echo "configure generated by autoconf version 2.13"
373 exit 0 ;;
374
375 -with-* | --with-*)
376 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
377 # Reject names that are not valid shell variable names.
378 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
379 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
380 fi
381 ac_package=`echo $ac_package| sed 's/-/_/g'`
382 case "$ac_option" in
383 *=*) ;;
384 *) ac_optarg=yes ;;
385 esac
386 eval "with_${ac_package}='$ac_optarg'" ;;
387
388 -without-* | --without-*)
389 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
390 # Reject names that are not valid shell variable names.
391 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 eval "with_${ac_package}=no" ;;
396
397 --x)
398 # Obsolete; use --with-x.
399 with_x=yes ;;
400
401 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
402 | --x-incl | --x-inc | --x-in | --x-i)
403 ac_prev=x_includes ;;
404 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
405 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
406 x_includes="$ac_optarg" ;;
407
408 -x-libraries | --x-libraries | --x-librarie | --x-librari \
409 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
410 ac_prev=x_libraries ;;
411 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
412 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
413 x_libraries="$ac_optarg" ;;
414
415 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
416 ;;
417
418 *)
419 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
420 echo "configure: warning: $ac_option: invalid host type" 1>&2
421 fi
422 if test "x$nonopt" != xNONE; then
423 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
424 fi
425 nonopt="$ac_option"
426 ;;
427
428 esac
429done
430
431if test -n "$ac_prev"; then
432 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
433fi
434
435trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
436
437# File descriptor usage:
438# 0 standard input
439# 1 file creation
440# 2 errors and warnings
441# 3 some systems may open it to /dev/tty
442# 4 used on the Kubota Titan
443# 6 checking for... messages and results
444# 5 compiler messages saved in config.log
445if test "$silent" = yes; then
446 exec 6>/dev/null
447else
448 exec 6>&1
449fi
450exec 5>./config.log
451
452echo "\
453This file contains any messages produced by compilers while
454running configure, to aid debugging if configure makes a mistake.
455" 1>&5
456
457# Strip out --no-create and --no-recursion so they do not pile up.
458# Also quote any args containing shell metacharacters.
459ac_configure_args=
460for ac_arg
461do
462 case "$ac_arg" in
463 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
464 | --no-cr | --no-c) ;;
465 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
466 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
467 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
468 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
469 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
470 esac
471done
472
473# NLS nuisances.
474# Only set these to C if already set. These must not be set unconditionally
475# because not all systems understand e.g. LANG=C (notably SCO).
476# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
477# Non-C LC_CTYPE values break the ctype check.
478if test "${LANG+set}" = set; then LANG=C; export LANG; fi
479if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
480if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
481if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
482
483# confdefs.h avoids OS command line length limits that DEFS can exceed.
484rm -rf conftest* confdefs.h
485# AIX cpp loses on an empty file, so make sure it contains at least a newline.
486echo > confdefs.h
487
488# A filename unique to this package, relative to the directory that
489# configure is in, which we can look for to find out if srcdir is correct.
490ac_unique_file=src/complex.cc
491
492# Find the source files, if location was not specified.
493if test -z "$srcdir"; then
494 ac_srcdir_defaulted=yes
495 # Try the directory containing this script, then its parent.
496 ac_prog=$0
497 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
498 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
499 srcdir=$ac_confdir
500 if test ! -r $srcdir/$ac_unique_file; then
501 srcdir=..
502 fi
503else
504 ac_srcdir_defaulted=no
505fi
506if test ! -r $srcdir/$ac_unique_file; then
507 if test "$ac_srcdir_defaulted" = yes; then
508 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
509 else
510 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
511 fi
512fi
513srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
514
515# Prefer explicitly selected file to automatically selected ones.
e95706d5
BK
516if test -z "$CONFIG_SITE"; then
517 if test "x$prefix" != xNONE; then
518 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
519 else
520 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
b2dad0e3
BK
521 fi
522fi
523for ac_site_file in $CONFIG_SITE; do
524 if test -r "$ac_site_file"; then
525 echo "loading site script $ac_site_file"
526 . "$ac_site_file"
527 fi
528done
529
530if test -r "$cache_file"; then
531 echo "loading cache $cache_file"
532 . $cache_file
533else
534 echo "creating cache $cache_file"
535 > $cache_file
536fi
537
538ac_ext=c
539# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540ac_cpp='$CPP $CPPFLAGS'
541ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543cross_compiling=$ac_cv_prog_cc_cross
544
545ac_exeext=
546ac_objext=o
547if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
548 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
549 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
550 ac_n= ac_c='
551' ac_t=' '
552 else
553 ac_n=-n ac_c= ac_t=
554 fi
555else
556 ac_n= ac_c='\c' ac_t=
557fi
558
559
560ac_aux_dir=
561for ac_dir in .. $srcdir/..; do
562 if test -f $ac_dir/install-sh; then
563 ac_aux_dir=$ac_dir
564 ac_install_sh="$ac_aux_dir/install-sh -c"
565 break
566 elif test -f $ac_dir/install.sh; then
567 ac_aux_dir=$ac_dir
568 ac_install_sh="$ac_aux_dir/install.sh -c"
569 break
570 fi
571done
572if test -z "$ac_aux_dir"; then
573 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
574fi
575ac_config_guess=$ac_aux_dir/config.guess
576ac_config_sub=$ac_aux_dir/config.sub
577ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
578
579
580# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
581
582# Do some error checking and defaulting for the host and target type.
583# The inputs are:
584# configure --host=HOST --target=TARGET --build=BUILD NONOPT
585#
586# The rules are:
587# 1. You are not allowed to specify --host, --target, and nonopt at the
588# same time.
589# 2. Host defaults to nonopt.
590# 3. If nonopt is not specified, then host defaults to the current host,
591# as determined by config.guess.
592# 4. Target and build default to nonopt.
593# 5. If nonopt is not specified, then target and build default to host.
594
595# The aliases save the names the user supplied, while $host etc.
596# will get canonicalized.
597case $host---$target---$nonopt in
598NONE---*---* | *---NONE---* | *---*---NONE) ;;
599*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
600esac
601
602
603# Make sure we can run config.sub.
604if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
605else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
606fi
607
608echo $ac_n "checking host system type""... $ac_c" 1>&6
6c820cf2 609echo "configure:610: checking host system type" >&5
b2dad0e3
BK
610
611host_alias=$host
612case "$host_alias" in
613NONE)
614 case $nonopt in
615 NONE)
616 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
617 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
618 fi ;;
619 *) host_alias=$nonopt ;;
620 esac ;;
621esac
622
623host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
624host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
627echo "$ac_t""$host" 1>&6
628
629echo $ac_n "checking target system type""... $ac_c" 1>&6
6c820cf2 630echo "configure:631: checking target system type" >&5
b2dad0e3
BK
631
632target_alias=$target
633case "$target_alias" in
634NONE)
635 case $nonopt in
636 NONE) target_alias=$host_alias ;;
637 *) target_alias=$nonopt ;;
638 esac ;;
639esac
640
641target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
642target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
645echo "$ac_t""$target" 1>&6
646
647echo $ac_n "checking build system type""... $ac_c" 1>&6
6c820cf2 648echo "configure:649: checking build system type" >&5
b2dad0e3
BK
649
650build_alias=$build
651case "$build_alias" in
652NONE)
653 case $nonopt in
654 NONE) build_alias=$host_alias ;;
655 *) build_alias=$nonopt ;;
656 esac ;;
657esac
658
659build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
660build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
663echo "$ac_t""$build" 1>&6
664
665test "$host_alias" != "$target_alias" &&
666 test "$program_prefix$program_suffix$program_transform_name" = \
667 NONENONEs,x,x, &&
668 program_prefix=${target_alias}-
669
670
671# We use these options to decide which functions to include.
672# Check whether --with-target-subdir or --without-target-subdir was given.
673if test "${with_target_subdir+set}" = set; then
674 withval="$with_target_subdir"
675 :
676fi
677
678# Check whether --with-cross-host or --without-cross-host was given.
679if test "${with_cross_host+set}" = set; then
680 withval="$with_cross_host"
681 :
682fi
683
684
685# Find a good install program. We prefer a C program (faster),
686# so one script is as good as another. But avoid the broken or
687# incompatible versions:
688# SysV /etc/install, /usr/sbin/install
689# SunOS /usr/etc/install
690# IRIX /sbin/install
691# AIX /bin/install
692# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
693# AFS /usr/afsws/bin/install, which mishandles nonexistent args
694# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
695# ./install, which can be erroneously created by make from ./install.sh.
696echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
6c820cf2 697echo "configure:698: checking for a BSD compatible install" >&5
b2dad0e3
BK
698if test -z "$INSTALL"; then
699if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
701else
702 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
703 for ac_dir in $PATH; do
704 # Account for people who put trailing slashes in PATH elements.
705 case "$ac_dir/" in
706 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
707 *)
708 # OSF1 and SCO ODT 3.0 have their own names for install.
709 # Don't use installbsd from OSF since it installs stuff as root
710 # by default.
711 for ac_prog in ginstall scoinst install; do
712 if test -f $ac_dir/$ac_prog; then
713 if test $ac_prog = install &&
714 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
715 # AIX install. It has an incompatible calling convention.
716 :
717 else
718 ac_cv_path_install="$ac_dir/$ac_prog -c"
719 break 2
720 fi
721 fi
722 done
723 ;;
724 esac
725 done
726 IFS="$ac_save_IFS"
727
728fi
729 if test "${ac_cv_path_install+set}" = set; then
730 INSTALL="$ac_cv_path_install"
731 else
732 # As a last resort, use the slow shell script. We don't cache a
733 # path for INSTALL within a source directory, because that will
734 # break other packages using the cache if that directory is
735 # removed, or if the path is relative.
736 INSTALL="$ac_install_sh"
737 fi
738fi
739echo "$ac_t""$INSTALL" 1>&6
740
741# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
742# It thinks the first close brace ends the variable substitution.
743test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
744
745test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
746
747test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
748
749echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
6c820cf2 750echo "configure:751: checking whether build environment is sane" >&5
b2dad0e3
BK
751# Just in case
752sleep 1
753echo timestamp > conftestfile
754# Do `set' in a subshell so we don't clobber the current shell's
755# arguments. Must try -L first in case configure is actually a
756# symlink; some systems play weird games with the mod time of symlinks
757# (eg FreeBSD returns the mod time of the symlink's containing
758# directory).
759if (
760 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
761 if test "$*" = "X"; then
762 # -L didn't work.
763 set X `ls -t $srcdir/configure conftestfile`
764 fi
765 if test "$*" != "X $srcdir/configure conftestfile" \
766 && test "$*" != "X conftestfile $srcdir/configure"; then
767
768 # If neither matched, then we have a broken ls. This can happen
769 # if, for instance, CONFIG_SHELL is bash and it inherits a
770 # broken ls alias from the environment. This has actually
771 # happened. Such a system could not be considered "sane".
772 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
773alias in your environment" 1>&2; exit 1; }
774 fi
775
776 test "$2" = conftestfile
777 )
778then
779 # Ok.
780 :
781else
782 { echo "configure: error: newly created file is older than distributed files!
783Check your system clock" 1>&2; exit 1; }
784fi
785rm -f conftest*
786echo "$ac_t""yes" 1>&6
787if test "$program_transform_name" = s,x,x,; then
788 program_transform_name=
789else
790 # Double any \ or $. echo might interpret backslashes.
791 cat <<\EOF_SED > conftestsed
792s,\\,\\\\,g; s,\$,$$,g
793EOF_SED
794 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
795 rm -f conftestsed
796fi
797test "$program_prefix" != NONE &&
798 program_transform_name="s,^,${program_prefix},; $program_transform_name"
799# Use a double $ so make ignores it.
800test "$program_suffix" != NONE &&
801 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
802
803# sed with no file args requires a program.
804test "$program_transform_name" = "" && program_transform_name="s,x,x,"
805
806echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
6c820cf2 807echo "configure:808: checking whether ${MAKE-make} sets \${MAKE}" >&5
b2dad0e3
BK
808set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
809if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
810 echo $ac_n "(cached) $ac_c" 1>&6
811else
812 cat > conftestmake <<\EOF
813all:
814 @echo 'ac_maketemp="${MAKE}"'
815EOF
816# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
817eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
818if test -n "$ac_maketemp"; then
819 eval ac_cv_prog_make_${ac_make}_set=yes
820else
821 eval ac_cv_prog_make_${ac_make}_set=no
822fi
823rm -f conftestmake
824fi
825if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
826 echo "$ac_t""yes" 1>&6
827 SET_MAKE=
828else
829 echo "$ac_t""no" 1>&6
830 SET_MAKE="MAKE=${MAKE-make}"
831fi
832
833if test $host != $build; then
834 ac_tool_prefix=${host_alias}-
835else
836 ac_tool_prefix=
837fi
838
839echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
6c820cf2 840echo "configure:841: checking for Cygwin environment" >&5
b2dad0e3
BK
841if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843else
844 cat > conftest.$ac_ext <<EOF
6c820cf2 845#line 846 "configure"
b2dad0e3
BK
846#include "confdefs.h"
847
848int main() {
849
850#ifndef __CYGWIN__
851#define __CYGWIN__ __CYGWIN32__
852#endif
853return __CYGWIN__;
854; return 0; }
855EOF
6c820cf2 856if { (eval echo configure:857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
857 rm -rf conftest*
858 ac_cv_cygwin=yes
859else
860 echo "configure: failed program was:" >&5
861 cat conftest.$ac_ext >&5
862 rm -rf conftest*
863 ac_cv_cygwin=no
864fi
865rm -f conftest*
866rm -f conftest*
867fi
868
869echo "$ac_t""$ac_cv_cygwin" 1>&6
870CYGWIN=
871test "$ac_cv_cygwin" = yes && CYGWIN=yes
872echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
6c820cf2 873echo "configure:874: checking for mingw32 environment" >&5
b2dad0e3
BK
874if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
876else
877 cat > conftest.$ac_ext <<EOF
6c820cf2 878#line 879 "configure"
b2dad0e3
BK
879#include "confdefs.h"
880
881int main() {
882return __MINGW32__;
883; return 0; }
884EOF
6c820cf2 885if { (eval echo configure:886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
886 rm -rf conftest*
887 ac_cv_mingw32=yes
888else
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 ac_cv_mingw32=no
893fi
894rm -f conftest*
895rm -f conftest*
896fi
897
898echo "$ac_t""$ac_cv_mingw32" 1>&6
899MINGW32=
900test "$ac_cv_mingw32" = yes && MINGW32=yes
901
902 # Check whether --enable-multilib or --disable-multilib was given.
903if test "${enable_multilib+set}" = set; then
904 enableval="$enable_multilib"
905 case "${enableval}" in
906 yes) multilib=yes ;;
907 no) multilib=no ;;
908 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
909 esac
910else
911 multilib=yes
912fi
913
914 if test "${srcdir}" = "."; then
915 if test "${with_target_subdir}" != "."; then
916 glibcpp_basedir="${srcdir}/${with_multisrctop}../."
917 else
918 glibcpp_basedir="${srcdir}/${with_multisrctop}."
919 fi
920 else
921 glibcpp_basedir="${srcdir}/."
922 fi
923
924
925
926# Make sure we can run config.sub.
927if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
928else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929fi
930
931echo $ac_n "checking host system type""... $ac_c" 1>&6
6c820cf2 932echo "configure:933: checking host system type" >&5
b2dad0e3
BK
933
934host_alias=$host
935case "$host_alias" in
936NONE)
937 case $nonopt in
938 NONE)
939 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
940 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
941 fi ;;
942 *) host_alias=$nonopt ;;
943 esac ;;
944esac
945
946host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
947host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
948host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
949host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
950echo "$ac_t""$host" 1>&6
951
952
953
954PACKAGE=libstdc++
955
956VERSION=2.90.8
957
958if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
959 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
960fi
961cat >> confdefs.h <<EOF
962#define PACKAGE "$PACKAGE"
963EOF
964
965cat >> confdefs.h <<EOF
966#define VERSION "$VERSION"
967EOF
968
969
970
971missing_dir=`cd $ac_aux_dir && pwd`
972echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
6c820cf2 973echo "configure:974: checking for working aclocal" >&5
b2dad0e3
BK
974# Run test in a subshell; some versions of sh will print an error if
975# an executable is not found, even if stderr is redirected.
976# Redirect stdin to placate older versions of autoconf. Sigh.
977if (aclocal --version) < /dev/null > /dev/null 2>&1; then
978 ACLOCAL=aclocal
979 echo "$ac_t""found" 1>&6
980else
981 ACLOCAL="$missing_dir/missing aclocal"
982 echo "$ac_t""missing" 1>&6
983fi
984
985echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
6c820cf2 986echo "configure:987: checking for working autoconf" >&5
b2dad0e3
BK
987# Run test in a subshell; some versions of sh will print an error if
988# an executable is not found, even if stderr is redirected.
989# Redirect stdin to placate older versions of autoconf. Sigh.
990if (autoconf --version) < /dev/null > /dev/null 2>&1; then
991 AUTOCONF=autoconf
992 echo "$ac_t""found" 1>&6
993else
994 AUTOCONF="$missing_dir/missing autoconf"
995 echo "$ac_t""missing" 1>&6
996fi
997
998echo $ac_n "checking for working automake""... $ac_c" 1>&6
6c820cf2 999echo "configure:1000: checking for working automake" >&5
b2dad0e3
BK
1000# Run test in a subshell; some versions of sh will print an error if
1001# an executable is not found, even if stderr is redirected.
1002# Redirect stdin to placate older versions of autoconf. Sigh.
1003if (automake --version) < /dev/null > /dev/null 2>&1; then
1004 AUTOMAKE=automake
1005 echo "$ac_t""found" 1>&6
1006else
1007 AUTOMAKE="$missing_dir/missing automake"
1008 echo "$ac_t""missing" 1>&6
1009fi
1010
1011echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
6c820cf2 1012echo "configure:1013: checking for working autoheader" >&5
b2dad0e3
BK
1013# Run test in a subshell; some versions of sh will print an error if
1014# an executable is not found, even if stderr is redirected.
1015# Redirect stdin to placate older versions of autoconf. Sigh.
1016if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1017 AUTOHEADER=autoheader
1018 echo "$ac_t""found" 1>&6
1019else
1020 AUTOHEADER="$missing_dir/missing autoheader"
1021 echo "$ac_t""missing" 1>&6
1022fi
1023
1024echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
6c820cf2 1025echo "configure:1026: checking for working makeinfo" >&5
b2dad0e3
BK
1026# Run test in a subshell; some versions of sh will print an error if
1027# an executable is not found, even if stderr is redirected.
1028# Redirect stdin to placate older versions of autoconf. Sigh.
1029if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1030 MAKEINFO=makeinfo
1031 echo "$ac_t""found" 1>&6
1032else
1033 MAKEINFO="$missing_dir/missing makeinfo"
1034 echo "$ac_t""missing" 1>&6
1035fi
1036
1037
1038
1039# FIXME: We temporarily define our own version of AC_PROG_CC. This is
1040# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1041# are probably using a cross compiler, which will not be able to fully
1042# link an executable. This should really be fixed in autoconf
1043# itself.
1044
1045
1046
1047
1048# Extract the first word of "gcc", so it can be a program name with args.
1049set dummy gcc; ac_word=$2
1050echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1051echo "configure:1052: checking for $ac_word" >&5
b2dad0e3
BK
1052if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1054else
1055 if test -n "$CC"; then
1056 ac_cv_prog_CC="$CC" # Let the user override the test.
1057else
1058 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1059 ac_dummy="$PATH"
1060 for ac_dir in $ac_dummy; do
1061 test -z "$ac_dir" && ac_dir=.
1062 if test -f $ac_dir/$ac_word; then
1063 ac_cv_prog_CC="gcc"
1064 break
1065 fi
1066 done
1067 IFS="$ac_save_ifs"
1068fi
1069fi
1070CC="$ac_cv_prog_CC"
1071if test -n "$CC"; then
1072 echo "$ac_t""$CC" 1>&6
1073else
1074 echo "$ac_t""no" 1>&6
1075fi
1076
1077if test -z "$CC"; then
1078 # Extract the first word of "cc", so it can be a program name with args.
1079set dummy cc; ac_word=$2
1080echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1081echo "configure:1082: checking for $ac_word" >&5
b2dad0e3
BK
1082if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1084else
1085 if test -n "$CC"; then
1086 ac_cv_prog_CC="$CC" # Let the user override the test.
1087else
1088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1089 ac_prog_rejected=no
1090 ac_dummy="$PATH"
1091 for ac_dir in $ac_dummy; do
1092 test -z "$ac_dir" && ac_dir=.
1093 if test -f $ac_dir/$ac_word; then
1094 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1095 ac_prog_rejected=yes
1096 continue
1097 fi
1098 ac_cv_prog_CC="cc"
1099 break
1100 fi
1101 done
1102 IFS="$ac_save_ifs"
1103if test $ac_prog_rejected = yes; then
1104 # We found a bogon in the path, so make sure we never use it.
1105 set dummy $ac_cv_prog_CC
1106 shift
1107 if test $# -gt 0; then
1108 # We chose a different compiler from the bogus one.
1109 # However, it has the same basename, so the bogon will be chosen
1110 # first if we set CC to just the basename; use the full file name.
1111 shift
1112 set dummy "$ac_dir/$ac_word" "$@"
1113 shift
1114 ac_cv_prog_CC="$@"
1115 fi
1116fi
1117fi
1118fi
1119CC="$ac_cv_prog_CC"
1120if test -n "$CC"; then
1121 echo "$ac_t""$CC" 1>&6
1122else
1123 echo "$ac_t""no" 1>&6
1124fi
1125
1126 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1127fi
1128
1129echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
6c820cf2 1130echo "configure:1131: checking whether we are using GNU C" >&5
b2dad0e3
BK
1131if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 cat > conftest.c <<EOF
1135#ifdef __GNUC__
1136 yes;
1137#endif
1138EOF
6c820cf2 1139if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b2dad0e3
BK
1140 ac_cv_prog_gcc=yes
1141else
1142 ac_cv_prog_gcc=no
1143fi
1144fi
1145
1146echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1147
1148if test $ac_cv_prog_gcc = yes; then
1149 GCC=yes
1150 ac_test_CFLAGS="${CFLAGS+set}"
1151 ac_save_CFLAGS="$CFLAGS"
1152 CFLAGS=
1153 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
6c820cf2 1154echo "configure:1155: checking whether ${CC-cc} accepts -g" >&5
b2dad0e3
BK
1155if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157else
1158 echo 'void f(){}' > conftest.c
1159if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1160 ac_cv_prog_cc_g=yes
1161else
1162 ac_cv_prog_cc_g=no
1163fi
1164rm -f conftest*
1165
1166fi
1167
1168echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1169 if test "$ac_test_CFLAGS" = set; then
1170 CFLAGS="$ac_save_CFLAGS"
1171 elif test $ac_cv_prog_cc_g = yes; then
1172 CFLAGS="-g -O2"
1173 else
1174 CFLAGS="-O2"
1175 fi
1176else
1177 GCC=
1178 test "${CFLAGS+set}" = set || CFLAGS="-g"
1179fi
1180
1181
1182# Likewise for AC_PROG_CXX.
1183
1184
1185
1186for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1187do
1188# Extract the first word of "$ac_prog", so it can be a program name with args.
1189set dummy $ac_prog; ac_word=$2
1190echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1191echo "configure:1192: checking for $ac_word" >&5
b2dad0e3
BK
1192if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1193 echo $ac_n "(cached) $ac_c" 1>&6
1194else
1195 if test -n "$CXX"; then
1196 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1197else
1198 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201 test -z "$ac_dir" && ac_dir=.
1202 if test -f $ac_dir/$ac_word; then
1203 ac_cv_prog_CXX="$ac_prog"
1204 break
1205 fi
1206 done
1207 IFS="$ac_save_ifs"
1208fi
1209fi
1210CXX="$ac_cv_prog_CXX"
1211if test -n "$CXX"; then
1212 echo "$ac_t""$CXX" 1>&6
1213else
1214 echo "$ac_t""no" 1>&6
1215fi
1216
1217test -n "$CXX" && break
1218done
1219test -n "$CXX" || CXX="gcc"
1220
1221test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1222
1223echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
6c820cf2 1224echo "configure:1225: checking whether we are using GNU C++" >&5
b2dad0e3
BK
1225if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1227else
1228 cat > conftest.C <<EOF
1229#ifdef __GNUC__
1230 yes;
1231#endif
1232EOF
6c820cf2 1233if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b2dad0e3
BK
1234 ac_cv_prog_gxx=yes
1235else
1236 ac_cv_prog_gxx=no
1237fi
1238fi
1239
1240echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1241
1242if test $ac_cv_prog_gxx = yes; then
1243 GXX=yes
1244 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1245 ac_save_CXXFLAGS="$CXXFLAGS"
1246 CXXFLAGS=
1247 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
6c820cf2 1248echo "configure:1249: checking whether ${CXX-g++} accepts -g" >&5
b2dad0e3
BK
1249if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 echo 'void f(){}' > conftest.cc
1253if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1254 ac_cv_prog_cxx_g=yes
1255else
1256 ac_cv_prog_cxx_g=no
1257fi
1258rm -f conftest*
1259
1260fi
1261
1262echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1263 if test "$ac_test_CXXFLAGS" = set; then
1264 CXXFLAGS="$ac_save_CXXFLAGS"
1265 elif test $ac_cv_prog_cxx_g = yes; then
1266 CXXFLAGS="-g -O2"
1267 else
1268 CXXFLAGS="-O2"
1269 fi
1270else
1271 GXX=
1272 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1273fi
1274
1275
1276# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
1277# run it explicitly here, it will be run implicitly before
1278# LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1279# be run before AC_CANONICAL_HOST.
1280echo $ac_n "checking build system type""... $ac_c" 1>&6
6c820cf2 1281echo "configure:1282: checking build system type" >&5
b2dad0e3
BK
1282
1283build_alias=$build
1284case "$build_alias" in
1285NONE)
1286 case $nonopt in
1287 NONE) build_alias=$host_alias ;;
1288 *) build_alias=$nonopt ;;
1289 esac ;;
1290esac
1291
1292build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1293build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296echo "$ac_t""$build" 1>&6
1297
1298
1299# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1300set dummy ${ac_tool_prefix}as; ac_word=$2
1301echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1302echo "configure:1303: checking for $ac_word" >&5
b2dad0e3
BK
1303if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 if test -n "$AS"; then
1307 ac_cv_prog_AS="$AS" # Let the user override the test.
1308else
1309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1310 ac_dummy="$PATH"
1311 for ac_dir in $ac_dummy; do
1312 test -z "$ac_dir" && ac_dir=.
1313 if test -f $ac_dir/$ac_word; then
1314 ac_cv_prog_AS="${ac_tool_prefix}as"
1315 break
1316 fi
1317 done
1318 IFS="$ac_save_ifs"
1319 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1320fi
1321fi
1322AS="$ac_cv_prog_AS"
1323if test -n "$AS"; then
1324 echo "$ac_t""$AS" 1>&6
1325else
1326 echo "$ac_t""no" 1>&6
1327fi
1328
1329
1330
1331# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1332set dummy ${ac_tool_prefix}ar; ac_word=$2
1333echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1334echo "configure:1335: checking for $ac_word" >&5
b2dad0e3
BK
1335if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 if test -n "$AR"; then
1339 ac_cv_prog_AR="$AR" # Let the user override the test.
1340else
1341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1342 ac_dummy="$PATH"
1343 for ac_dir in $ac_dummy; do
1344 test -z "$ac_dir" && ac_dir=.
1345 if test -f $ac_dir/$ac_word; then
1346 ac_cv_prog_AR="${ac_tool_prefix}ar"
1347 break
1348 fi
1349 done
1350 IFS="$ac_save_ifs"
1351 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1352fi
1353fi
1354AR="$ac_cv_prog_AR"
1355if test -n "$AR"; then
1356 echo "$ac_t""$AR" 1>&6
1357else
1358 echo "$ac_t""no" 1>&6
1359fi
1360
1361
1362
1363# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1364set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1365echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1366echo "configure:1367: checking for $ac_word" >&5
b2dad0e3
BK
1367if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1368 echo $ac_n "(cached) $ac_c" 1>&6
1369else
1370 if test -n "$RANLIB"; then
1371 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1372else
1373 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1374 ac_dummy="$PATH"
1375 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 if test -f $ac_dir/$ac_word; then
1378 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1379 break
1380 fi
1381 done
1382 IFS="$ac_save_ifs"
1383fi
1384fi
1385RANLIB="$ac_cv_prog_RANLIB"
1386if test -n "$RANLIB"; then
1387 echo "$ac_t""$RANLIB" 1>&6
1388else
1389 echo "$ac_t""no" 1>&6
1390fi
1391
1392
1393if test -z "$ac_cv_prog_RANLIB"; then
1394if test -n "$ac_tool_prefix"; then
1395 # Extract the first word of "ranlib", so it can be a program name with args.
1396set dummy ranlib; ac_word=$2
1397echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1398echo "configure:1399: checking for $ac_word" >&5
b2dad0e3
BK
1399if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402 if test -n "$RANLIB"; then
1403 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1404else
1405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408 test -z "$ac_dir" && ac_dir=.
1409 if test -f $ac_dir/$ac_word; then
1410 ac_cv_prog_RANLIB="ranlib"
1411 break
1412 fi
1413 done
1414 IFS="$ac_save_ifs"
1415 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1416fi
1417fi
1418RANLIB="$ac_cv_prog_RANLIB"
1419if test -n "$RANLIB"; then
1420 echo "$ac_t""$RANLIB" 1>&6
1421else
1422 echo "$ac_t""no" 1>&6
1423fi
1424
1425else
1426 RANLIB=":"
1427fi
1428fi
1429
1430
1431# Find a good install program. We prefer a C program (faster),
1432# so one script is as good as another. But avoid the broken or
1433# incompatible versions:
1434# SysV /etc/install, /usr/sbin/install
1435# SunOS /usr/etc/install
1436# IRIX /sbin/install
1437# AIX /bin/install
1438# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1439# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1440# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1441# ./install, which can be erroneously created by make from ./install.sh.
1442echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
6c820cf2 1443echo "configure:1444: checking for a BSD compatible install" >&5
b2dad0e3
BK
1444if test -z "$INSTALL"; then
1445if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1447else
1448 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1449 for ac_dir in $PATH; do
1450 # Account for people who put trailing slashes in PATH elements.
1451 case "$ac_dir/" in
1452 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1453 *)
1454 # OSF1 and SCO ODT 3.0 have their own names for install.
1455 # Don't use installbsd from OSF since it installs stuff as root
1456 # by default.
1457 for ac_prog in ginstall scoinst install; do
1458 if test -f $ac_dir/$ac_prog; then
1459 if test $ac_prog = install &&
1460 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1461 # AIX install. It has an incompatible calling convention.
1462 :
1463 else
1464 ac_cv_path_install="$ac_dir/$ac_prog -c"
1465 break 2
1466 fi
1467 fi
1468 done
1469 ;;
1470 esac
1471 done
1472 IFS="$ac_save_IFS"
1473
1474fi
1475 if test "${ac_cv_path_install+set}" = set; then
1476 INSTALL="$ac_cv_path_install"
1477 else
1478 # As a last resort, use the slow shell script. We don't cache a
1479 # path for INSTALL within a source directory, because that will
1480 # break other packages using the cache if that directory is
1481 # removed, or if the path is relative.
1482 INSTALL="$ac_install_sh"
1483 fi
1484fi
1485echo "$ac_t""$INSTALL" 1>&6
1486
1487# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1488# It thinks the first close brace ends the variable substitution.
1489test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1490
1491test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1492
1493test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1494
1495
1496echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6c820cf2 1497echo "configure:1498: checking whether to enable maintainer-specific portions of Makefiles" >&5
b2dad0e3
BK
1498 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1499if test "${enable_maintainer_mode+set}" = set; then
1500 enableval="$enable_maintainer_mode"
1501 USE_MAINTAINER_MODE=$enableval
1502else
1503 USE_MAINTAINER_MODE=no
1504fi
1505
1506 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1507
1508
1509if test $USE_MAINTAINER_MODE = yes; then
1510 MAINTAINER_MODE_TRUE=
1511 MAINTAINER_MODE_FALSE='#'
1512else
1513 MAINTAINER_MODE_TRUE='#'
1514 MAINTAINER_MODE_FALSE=
1515fi
1516 MAINT=$MAINTAINER_MODE_TRUE
1517
1518
1519
1520# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1521# at least currently, we never actually build a program, so we never
1522# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1523# fails, because we are probably configuring with a cross compiler
1524# which cant create executables. So we include AC_EXEEXT to keep
1525# automake happy, but we dont execute it, since we dont care about
1526# the result.
1527if false; then
1528
1529
1530echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
6c820cf2 1531echo "configure:1532: checking for executable suffix" >&5
b2dad0e3
BK
1532if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1533 echo $ac_n "(cached) $ac_c" 1>&6
1534else
1535 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1536 ac_cv_exeext=.exe
1537else
1538 rm -f conftest*
1539 echo 'int main () { return 0; }' > conftest.$ac_ext
1540 ac_cv_exeext=
6c820cf2 1541 if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b2dad0e3
BK
1542 for file in conftest.*; do
1543 case $file in
6c820cf2 1544 *.c | *.o | *.obj) ;;
b2dad0e3
BK
1545 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1546 esac
1547 done
1548 else
1549 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1550 fi
1551 rm -f conftest*
1552 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1553fi
1554fi
1555
1556EXEEXT=""
1557test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1558echo "$ac_t""${ac_cv_exeext}" 1>&6
1559ac_exeext=$EXEEXT
1560
1561fi
1562
1563# configure.host sets the following important variables
1564# glibcpp_cflags - host specific C compiler flags
1565# glibcpp_cxxflags - host specific C++ compiler flags
1566
1567glibcpp_cflags=
1568glibcpp_cxxflags=
1569
1570. ${glibcpp_basedir}/configure.host
1571
1572case ${glibcpp_basedir} in
1573/* | A-Za-z:/\\*) libgcj_flagbasedir=${glibcpp_basedir} ;;
1574*) glibcpp_flagbasedir='$(top_builddir)/'${glibcpp_basedir} ;;
1575esac
1576
1577GLIBCPP_CFLAGS="${glibcpp_cflags}"
1578GLIBCPP_CXXFLAGS="${glibcpp_cxxflags}"
1579
1580
1581
3840fa2a 1582
b2dad0e3
BK
1583# Check whether --enable-shared or --disable-shared was given.
1584if test "${enable_shared+set}" = set; then
1585 enableval="$enable_shared"
1586 p=${PACKAGE-default}
1587case "$enableval" in
1588yes) enable_shared=yes ;;
1589no) enable_shared=no ;;
1590*)
1591 enable_shared=no
1592 # Look at the argument we got. We use all the common list separators.
1593 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1594 for pkg in $enableval; do
1595 if test "X$pkg" = "X$p"; then
1596 enable_shared=yes
1597 fi
1598 done
1599 IFS="$ac_save_ifs"
1600 ;;
1601esac
1602else
1603 enable_shared=yes
1604fi
1605
1606# Check whether --enable-static or --disable-static was given.
1607if test "${enable_static+set}" = set; then
1608 enableval="$enable_static"
1609 p=${PACKAGE-default}
1610case "$enableval" in
1611yes) enable_static=yes ;;
1612no) enable_static=no ;;
1613*)
1614 enable_static=no
1615 # Look at the argument we got. We use all the common list separators.
1616 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1617 for pkg in $enableval; do
1618 if test "X$pkg" = "X$p"; then
1619 enable_static=yes
1620 fi
1621 done
1622 IFS="$ac_save_ifs"
1623 ;;
1624esac
1625else
1626 enable_static=yes
1627fi
1628
1629# Check whether --enable-fast-install or --disable-fast-install was given.
1630if test "${enable_fast_install+set}" = set; then
1631 enableval="$enable_fast_install"
1632 p=${PACKAGE-default}
1633case "$enableval" in
1634yes) enable_fast_install=yes ;;
1635no) enable_fast_install=no ;;
1636*)
1637 enable_fast_install=no
1638 # Look at the argument we got. We use all the common list separators.
1639 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1640 for pkg in $enableval; do
1641 if test "X$pkg" = "X$p"; then
1642 enable_fast_install=yes
1643 fi
1644 done
1645 IFS="$ac_save_ifs"
1646 ;;
1647esac
1648else
1649 enable_fast_install=yes
1650fi
1651
1652# Extract the first word of "ranlib", so it can be a program name with args.
1653set dummy ranlib; ac_word=$2
1654echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6c820cf2 1655echo "configure:1656: checking for $ac_word" >&5
b2dad0e3
BK
1656if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1658else
1659 if test -n "$RANLIB"; then
1660 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1661else
1662 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1663 ac_dummy="$PATH"
1664 for ac_dir in $ac_dummy; do
1665 test -z "$ac_dir" && ac_dir=.
1666 if test -f $ac_dir/$ac_word; then
1667 ac_cv_prog_RANLIB="ranlib"
1668 break
1669 fi
1670 done
1671 IFS="$ac_save_ifs"
1672 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1673fi
1674fi
1675RANLIB="$ac_cv_prog_RANLIB"
1676if test -n "$RANLIB"; then
1677 echo "$ac_t""$RANLIB" 1>&6
1678else
1679 echo "$ac_t""no" 1>&6
1680fi
1681
1682# Check whether --with-gnu-ld or --without-gnu-ld was given.
1683if test "${with_gnu_ld+set}" = set; then
1684 withval="$with_gnu_ld"
1685 test "$withval" = no || with_gnu_ld=yes
1686else
1687 with_gnu_ld=no
1688fi
1689
1690ac_prog=ld
1691if test "$ac_cv_prog_gcc" = yes; then
1692 # Check if gcc -print-prog-name=ld gives a path.
1693 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
6c820cf2 1694echo "configure:1695: checking for ld used by GCC" >&5
b2dad0e3
BK
1695 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1696 case "$ac_prog" in
1697 # Accept absolute paths.
3840fa2a 1698 [\\/]* | [A-Za-z]:[\\/]*)
b2dad0e3
BK
1699 re_direlt='/[^/][^/]*/\.\./'
1700 # Canonicalize the path of ld
1701 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1702 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1703 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1704 done
1705 test -z "$LD" && LD="$ac_prog"
1706 ;;
1707 "")
1708 # If it fails, then pretend we aren't using GCC.
1709 ac_prog=ld
1710 ;;
1711 *)
1712 # If it is relative, then search for the first ld in PATH.
1713 with_gnu_ld=unknown
1714 ;;
1715 esac
1716elif test "$with_gnu_ld" = yes; then
1717 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
6c820cf2 1718echo "configure:1719: checking for GNU ld" >&5
b2dad0e3
BK
1719else
1720 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
6c820cf2 1721echo "configure:1722: checking for non-GNU ld" >&5
b2dad0e3
BK
1722fi
1723if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1725else
1726 if test -z "$LD"; then
3840fa2a 1727 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
b2dad0e3
BK
1728 for ac_dir in $PATH; do
1729 test -z "$ac_dir" && ac_dir=.
3840fa2a 1730 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
b2dad0e3
BK
1731 ac_cv_path_LD="$ac_dir/$ac_prog"
1732 # Check to see if the program is GNU ld. I'd rather use --version,
1733 # but apparently some GNU ld's only accept -v.
1734 # Break only if it was the GNU/non-GNU ld that we prefer.
1735 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1736 test "$with_gnu_ld" != no && break
1737 else
1738 test "$with_gnu_ld" != yes && break
1739 fi
1740 fi
1741 done
1742 IFS="$ac_save_ifs"
1743else
1744 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1745fi
1746fi
1747
1748LD="$ac_cv_path_LD"
1749if test -n "$LD"; then
1750 echo "$ac_t""$LD" 1>&6
1751else
1752 echo "$ac_t""no" 1>&6
1753fi
1754test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1755echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
6c820cf2 1756echo "configure:1757: checking if the linker ($LD) is GNU ld" >&5
b2dad0e3
BK
1757if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759else
1760 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1761if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1762 ac_cv_prog_gnu_ld=yes
1763else
1764 ac_cv_prog_gnu_ld=no
1765fi
1766fi
1767
1768echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1769
1770
1771echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
6c820cf2 1772echo "configure:1773: checking for BSD-compatible nm" >&5
b2dad0e3
BK
1773if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 if test -n "$NM"; then
1777 # Let the user override the test.
1778 ac_cv_path_NM="$NM"
1779else
3840fa2a 1780 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
b2dad0e3
BK
1781 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1782 test -z "$ac_dir" && ac_dir=.
3840fa2a 1783 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
b2dad0e3
BK
1784 # Check to see if the nm accepts a BSD-compat flag.
1785 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1786 # nm: unknown option "B" ignored
1787 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1788 ac_cv_path_NM="$ac_dir/nm -B"
1789 break
1790 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1791 ac_cv_path_NM="$ac_dir/nm -p"
1792 break
1793 else
1794 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1795 continue # so that we can try to find one that supports BSD flags
1796 fi
1797 fi
1798 done
1799 IFS="$ac_save_ifs"
1800 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1801fi
1802fi
1803
1804NM="$ac_cv_path_NM"
1805echo "$ac_t""$NM" 1>&6
1806
1807echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
6c820cf2 1808echo "configure:1809: checking whether ln -s works" >&5
b2dad0e3
BK
1809if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811else
1812 rm -f conftestdata
1813if ln -s X conftestdata 2>/dev/null
1814then
1815 rm -f conftestdata
1816 ac_cv_prog_LN_S="ln -s"
1817else
1818 ac_cv_prog_LN_S=ln
1819fi
1820fi
1821LN_S="$ac_cv_prog_LN_S"
1822if test "$ac_cv_prog_LN_S" = "ln -s"; then
1823 echo "$ac_t""yes" 1>&6
1824else
1825 echo "$ac_t""no" 1>&6
1826fi
1827
1828
3840fa2a
BK
1829case "$target" in
1830NONE) lt_target="$host" ;;
1831*) lt_target="$target" ;;
1832esac
1833
b2dad0e3
BK
1834# Check for any special flags to pass to ltconfig.
1835libtool_flags="--cache-file=$cache_file"
1836test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1837test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1838test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1839test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1840test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3840fa2a
BK
1841libtool_flags="$libtool_flags --enable-dlopen"
1842
1843# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1844if test "${enable_libtool_lock+set}" = set; then
1845 enableval="$enable_libtool_lock"
1846 :
1847fi
1848
1849test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1850test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
b2dad0e3
BK
1851
1852# Some flags need to be propagated to the compiler or linker for good
1853# libtool support.
3840fa2a 1854case "$lt_target" in
b2dad0e3
BK
1855*-*-irix6*)
1856 # Find out which ABI we are using.
6c820cf2
BC
1857 echo '#line 1858 "configure"' > conftest.$ac_ext
1858 if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
1859 case "`/usr/bin/file conftest.o`" in
1860 *32-bit*)
1861 LD="${LD-ld} -32"
1862 ;;
1863 *N32*)
1864 LD="${LD-ld} -n32"
1865 ;;
1866 *64-bit*)
1867 LD="${LD-ld} -64"
1868 ;;
1869 esac
1870 fi
1871 rm -rf conftest*
1872 ;;
1873
1874*-*-sco3.2v5*)
1875 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1876 SAVE_CFLAGS="$CFLAGS"
1877 CFLAGS="$CFLAGS -belf"
1878 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
6c820cf2 1879echo "configure:1880: checking whether the C compiler needs -belf" >&5
b2dad0e3
BK
1880if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
1882else
1883 cat > conftest.$ac_ext <<EOF
6c820cf2 1884#line 1885 "configure"
b2dad0e3
BK
1885#include "confdefs.h"
1886
1887int main() {
1888
1889; return 0; }
1890EOF
6c820cf2 1891if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
1892 rm -rf conftest*
1893 lt_cv_cc_needs_belf=yes
1894else
1895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
1897 rm -rf conftest*
1898 lt_cv_cc_needs_belf=no
1899fi
1900rm -f conftest*
1901fi
1902
1903echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1904 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1905 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1906 CFLAGS="$SAVE_CFLAGS"
1907 fi
1908 ;;
1909
1910
1911esac
1912
1913
1914# Save cache, so that ltconfig can load it
1915cat > confcache <<\EOF
1916# This file is a shell script that caches the results of configure
1917# tests run on this system so they can be shared between configure
1918# scripts and configure runs. It is not useful on other systems.
1919# If it contains results you don't want to keep, you may remove or edit it.
1920#
1921# By default, configure uses ./config.cache as the cache file,
1922# creating it if it does not exist already. You can give configure
1923# the --cache-file=FILE option to use a different cache file; that is
1924# what configure does when it calls configure scripts in
1925# subdirectories, so they share the cache.
1926# Giving --cache-file=/dev/null disables caching, for debugging configure.
1927# config.status only pays attention to the cache file if you give it the
1928# --recheck option to rerun configure.
1929#
1930EOF
1931# The following way of writing the cache mishandles newlines in values,
1932# but we know of no workaround that is simple, portable, and efficient.
1933# So, don't put newlines in cache variables' values.
1934# Ultrix sh set writes to stderr and can't be redirected directly,
1935# and sets the high bit in the cache file unless we assign to the vars.
1936(set) 2>&1 |
1937 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1938 *ac_space=\ *)
1939 # `set' does not quote correctly, so add quotes (double-quote substitution
1940 # turns \\\\ into \\, and sed turns \\ into \).
1941 sed -n \
1942 -e "s/'/'\\\\''/g" \
1943 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1944 ;;
1945 *)
1946 # `set' quotes correctly as required by POSIX, so do not add quotes.
1947 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1948 ;;
1949 esac >> confcache
1950if cmp -s $cache_file confcache; then
1951 :
1952else
1953 if test -w $cache_file; then
1954 echo "updating cache $cache_file"
1955 cat confcache > $cache_file
1956 else
1957 echo "not updating unwritable cache $cache_file"
1958 fi
1959fi
1960rm -f confcache
1961
1962
1963# Actually configure libtool. ac_aux_dir is where install-sh is found.
1964CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3840fa2a
BK
1965LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1966LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1967DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
b2dad0e3 1968${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3840fa2a 1969$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
b2dad0e3
BK
1970|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1971
1972# Reload cache, that may have been modified by ltconfig
1973if test -r "$cache_file"; then
1974 echo "loading cache $cache_file"
1975 . $cache_file
1976else
1977 echo "creating cache $cache_file"
1978 > $cache_file
1979fi
1980
1981
1982# This can be used to rebuild libtool when needed
1983LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1984
1985# Always use our own libtool.
1986LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1987
1988# Redirect the config.log output again, so that the ltconfig log is not
1989# clobbered by the next message.
1990exec 5>>./config.log
1991
1992
1993
1994
1995
1996# Check for c++ or library specific bits that don't require linking.
c470c17d
BK
1997echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1998echo "configure:1999: checking how to run the C preprocessor" >&5
1999# On Suns, sometimes $CPP names a directory.
2000if test -n "$CPP" && test -d "$CPP"; then
2001 CPP=
2002fi
2003if test -z "$CPP"; then
2004if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
b2dad0e3
BK
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006else
c470c17d
BK
2007 # This must be in double quotes, not single quotes, because CPP may get
2008 # substituted into the Makefile and "${CC-cc}" will confuse make.
2009 CPP="${CC-cc} -E"
2010 # On the NeXT, cc -E runs the code through the compiler's parser,
2011 # not just through cpp.
b2dad0e3 2012 cat > conftest.$ac_ext <<EOF
c470c17d 2013#line 2014 "configure"
b2dad0e3 2014#include "confdefs.h"
c470c17d
BK
2015#include <assert.h>
2016Syntax Error
b2dad0e3
BK
2017EOF
2018ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 2019{ (eval echo configure:2020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2020ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2021if test -z "$ac_err"; then
2022 :
2023else
2024 echo "$ac_err" >&5
2025 echo "configure: failed program was:" >&5
2026 cat conftest.$ac_ext >&5
2027 rm -rf conftest*
c470c17d
BK
2028 CPP="${CC-cc} -E -traditional-cpp"
2029 cat > conftest.$ac_ext <<EOF
2030#line 2031 "configure"
2031#include "confdefs.h"
2032#include <assert.h>
2033Syntax Error
2034EOF
2035ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2036{ (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2037ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2038if test -z "$ac_err"; then
2039 :
2040else
2041 echo "$ac_err" >&5
2042 echo "configure: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 rm -rf conftest*
2045 CPP="${CC-cc} -nologo -E"
2046 cat > conftest.$ac_ext <<EOF
2047#line 2048 "configure"
2048#include "confdefs.h"
2049#include <assert.h>
2050Syntax Error
2051EOF
2052ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2053{ (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2054ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2055if test -z "$ac_err"; then
2056 :
2057else
2058 echo "$ac_err" >&5
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 CPP=/lib/cpp
b2dad0e3
BK
2063fi
2064rm -f conftest*
2065fi
c470c17d 2066rm -f conftest*
b2dad0e3 2067fi
c470c17d
BK
2068rm -f conftest*
2069 ac_cv_prog_CPP="$CPP"
2070fi
2071 CPP="$ac_cv_prog_CPP"
2072else
2073 ac_cv_prog_CPP="$CPP"
2074fi
2075echo "$ac_t""$CPP" 1>&6
b2dad0e3 2076
a4e99046 2077
b2dad0e3 2078
d3a12960 2079 # Sanity check that g++ is capable of dealing with v-3.
5b80666b 2080 echo $ac_n "checking for g++ that will successfully compile this code""... $ac_c" 1>&6
c470c17d 2081echo "configure:2082: checking for g++ that will successfully compile this code" >&5
b2dad0e3 2082 cat > conftest.$ac_ext <<EOF
c470c17d 2083#line 2084 "configure"
b2dad0e3
BK
2084#include "confdefs.h"
2085
2086 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
2087 ok
2088 #endif
2089
2090EOF
2091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2092 egrep "ok" >/dev/null 2>&1; then
2093 rm -rf conftest*
2094 gpp_satisfactory=yes
2095else
2096 rm -rf conftest*
2097 { echo "configure: error: "please upgrade to gcc-2.95 or above"" 1>&2; exit 1; }
2098fi
2099rm -f conftest*
2100
2101 echo "$ac_t""$gpp_satisfactory" 1>&6
2102
b2dad0e3
BK
2103
2104 echo $ac_n "checking for cpu primitives directory""... $ac_c" 1>&6
c470c17d
BK
2105echo "configure:2106: checking for cpu primitives directory" >&5
2106 CPU_FLAGS=
b2dad0e3
BK
2107 case "$target_cpu" in
2108 alpha*)
2109 cpu_include_dir="config/cpu/alpha"
2110 ;;
2111 arm*)
2112 cpu_include_dir="config/cpu/arm"
2113 ;;
bf93f43b 2114 i386)
b2dad0e3 2115 cpu_include_dir="config/cpu/i386"
bf93f43b
BK
2116 ;;
2117 i486 | i586 | i686 | i786)
2118 cpu_include_dir="config/cpu/i486"
b2dad0e3
BK
2119 ;;
2120 powerpc | rs6000)
2121 cpu_include_dir="config/cpu/powerpc"
c470c17d 2122 CPU_FLAGS='-mcpu=powerpc'
b2dad0e3
BK
2123 ;;
2124 sparc64 | ultrasparc)
2125 cpu_include_dir="config/cpu/sparc/sparc64"
2126 ;;
2127 sparc*)
2128 cpu_include_dir="config/cpu/sparc/sparc32"
2129 ;;
2130 *)
2131 cpu_include_dir="config/cpu/generic"
2132 ;;
2133 esac
2134 echo "$ac_t""$cpu_include_dir" 1>&6
2135
cde28f0d 2136
b2dad0e3
BK
2137
2138
2139# Enable all the crazy c++ stuff.
2140# Check whether --enable-debug or --disable-debug was given.
2141if test "${enable_debug+set}" = set; then
2142 enableval="$enable_debug"
2143 case "$enableval" in
2144 yes) enable_debug=yes ;;
2145 no) enable_debug=no ;;
2146 *) { echo "configure: error: Unknown argument to enable/disable extra debugging" 1>&2; exit 1; } ;;
2147 esac
2148else
2149 enable_debug=no
2150fi
2151case "$enable_debug" in
cde28f0d 2152 yes)
c470c17d 2153 DEBUG_FLAGS='-O0 -ggdb'
cde28f0d 2154 ;;
f3b004d8 2155 no)
c470c17d 2156 DEBUG_FLAGS='-g'
f3b004d8 2157 ;;
b2dad0e3
BK
2158esac
2159
2160
2161
2162 echo $ac_n "checking for cstdio to use""... $ac_c" 1>&6
c470c17d 2163echo "configure:2164: checking for cstdio to use" >&5
b2dad0e3
BK
2164 # Check whether --enable-cstdio or --disable-cstdio was given.
2165if test "${enable_cstdio+set}" = set; then
2166 enableval="$enable_cstdio"
2167 if test x$enable_cstdio = xno; then
2168 enable_cstdio=libio
2169 fi
2170else
2171 enable_cstdio=libio
2172fi
2173
2174
2175 enable_cstdio_flag=$enable_cstdio
2176
2177 case x${enable_cstdio_flag} in
2178 xlibio | x | xno | xnone | xyes)
2179 # default
2180 CSTDIO_H=c_io_libio.h
2181 CSTDIO_CC=c_io_libio.cc
2182 echo "$ac_t""libio" 1>&6
2183
2184 # see if we are on a system with libio native (ie, linux)
2185 ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
2186echo $ac_n "checking for libio.h""... $ac_c" 1>&6
c470c17d 2187echo "configure:2188: checking for libio.h" >&5
b2dad0e3
BK
2188if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2189 echo $ac_n "(cached) $ac_c" 1>&6
2190else
2191 cat > conftest.$ac_ext <<EOF
c470c17d 2192#line 2193 "configure"
b2dad0e3
BK
2193#include "confdefs.h"
2194#include <libio.h>
2195EOF
2196ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 2197{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2198ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2199if test -z "$ac_err"; then
2200 rm -rf conftest*
2201 eval "ac_cv_header_$ac_safe=yes"
2202else
2203 echo "$ac_err" >&5
2204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2206 rm -rf conftest*
2207 eval "ac_cv_header_$ac_safe=no"
2208fi
2209rm -f conftest*
2210fi
2211if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2212 echo "$ac_t""yes" 1>&6
2213 has_libio=yes
2214else
2215 echo "$ac_t""no" 1>&6
2216has_libio=no
2217fi
2218
2219 if test $has_libio = "yes"; then
2220 BUILD_LIBIO_INCLUDE=
2221 need_libio=no
2222 else
2223 BUILD_LIBIO_INCLUDE='-I../libio'
2224 need_libio=yes
2225 fi
2226
f3b004d8
BK
2227
2228 # see if the _G_config.h header needs to be built.
2229 # NB: This replaces the _G_CONFIG_H machinery in libio-v2
2230 ac_safe=`echo "_G_config.h" | sed 'y%./+-%__p_%'`
2231echo $ac_n "checking for _G_config.h""... $ac_c" 1>&6
c470c17d 2232echo "configure:2233: checking for _G_config.h" >&5
f3b004d8
BK
2233if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235else
2236 cat > conftest.$ac_ext <<EOF
c470c17d 2237#line 2238 "configure"
f3b004d8
BK
2238#include "confdefs.h"
2239#include <_G_config.h>
2240EOF
2241ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 2242{ (eval echo configure:2243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
f3b004d8
BK
2243ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2244if test -z "$ac_err"; then
2245 rm -rf conftest*
2246 eval "ac_cv_header_$ac_safe=yes"
2247else
2248 echo "$ac_err" >&5
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -rf conftest*
2252 eval "ac_cv_header_$ac_safe=no"
2253fi
2254rm -f conftest*
2255fi
2256if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2257 echo "$ac_t""yes" 1>&6
2258 has_gconf_h=yes
2259else
2260 echo "$ac_t""no" 1>&6
2261has_gconf_h=no
2262fi
2263
2264
2265
2266if test "$has_gconf_h" = no; then
2267 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE=
2268 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE='#'
2269else
2270 GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE='#'
2271 GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE=
2272fi
b2dad0e3
BK
2273 ;;
2274 xwince)
2275 CSTDIO_H=c_io_wince.h
2276 CSTDIO_CC=c_io_wince.cc
2277 echo "$ac_t""wince" 1>&6
2278
2279 need_libio=no
2280 BUILD_LIBIO_INCLUDE=
2281
2282 ;;
2283 *)
2284 echo "$enable_cstdio is an unknown io package" 1>&2
2285 exit 1
2286 ;;
2287 esac
2288
2289
2290
2291
2292if test "$need_libio" = yes; then
2293 GLIBCPP_NEED_LIBIO_TRUE=
2294 GLIBCPP_NEED_LIBIO_FALSE='#'
2295else
2296 GLIBCPP_NEED_LIBIO_TRUE='#'
2297 GLIBCPP_NEED_LIBIO_FALSE=
2298fi
2299
209fe19b 2300
209fe19b
BK
2301 # Check whether --enable-long-long or --disable-long-long was given.
2302if test "${enable_long_long+set}" = set; then
2303 enableval="$enable_long_long"
2304 case "$enableval" in
2305 yes) enable_long_long=yes ;;
2306 no) enable_long_long=no ;;
2307 *) { echo "configure: error: Unknown argument to enable/disable long long" 1>&2; exit 1; } ;;
2308 esac
2309else
2310 enable_long_long=yes
2311fi
2312
2313 # Check for the existance of functions used if long long is enabled.
0137be2d 2314 echo $ac_n "checking for strtoll""... $ac_c" 1>&6
c470c17d 2315echo "configure:2316: checking for strtoll" >&5
0137be2d
PE
2316if eval "test \"`echo '$''{'ac_cv_func_strtoll'+set}'`\" = set"; then
2317 echo $ac_n "(cached) $ac_c" 1>&6
2318else
2319 cat > conftest.$ac_ext <<EOF
c470c17d 2320#line 2321 "configure"
0137be2d
PE
2321#include "confdefs.h"
2322/* System header to define __stub macros and hopefully few prototypes,
2323 which can conflict with char strtoll(); below. */
2324#include <assert.h>
2325/* Override any gcc2 internal prototype to avoid an error. */
2326/* We use char because int might match the return type of a gcc2
2327 builtin and then its argument prototype would still apply. */
2328char strtoll();
2329
2330int main() {
2331
2332/* The GNU C library defines this for functions which it implements
2333 to always fail with ENOSYS. Some functions are actually named
2334 something starting with __ and the normal name is an alias. */
2335#if defined (__stub_strtoll) || defined (__stub___strtoll)
2336choke me
2337#else
2338strtoll();
2339#endif
2340
2341; return 0; }
2342EOF
c470c17d 2343if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0137be2d
PE
2344 rm -rf conftest*
2345 eval "ac_cv_func_strtoll=yes"
2346else
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
2349 rm -rf conftest*
2350 eval "ac_cv_func_strtoll=no"
2351fi
2352rm -f conftest*
2353fi
2354
2355if eval "test \"`echo '$ac_cv_func_'strtoll`\" = yes"; then
2356 echo "$ac_t""yes" 1>&6
2357 :
2358else
2359 echo "$ac_t""no" 1>&6
209fe19b 2360ac_strtoll=no
0137be2d
PE
2361fi
2362
209fe19b 2363 echo $ac_n "checking for strtoull""... $ac_c" 1>&6
c470c17d 2364echo "configure:2365: checking for strtoull" >&5
209fe19b
BK
2365if eval "test \"`echo '$''{'ac_cv_func_strtoull'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
b2dad0e3 2367else
209fe19b 2368 cat > conftest.$ac_ext <<EOF
c470c17d 2369#line 2370 "configure"
209fe19b
BK
2370#include "confdefs.h"
2371/* System header to define __stub macros and hopefully few prototypes,
2372 which can conflict with char strtoull(); below. */
2373#include <assert.h>
2374/* Override any gcc2 internal prototype to avoid an error. */
2375/* We use char because int might match the return type of a gcc2
2376 builtin and then its argument prototype would still apply. */
2377char strtoull();
2378
2379int main() {
2380
2381/* The GNU C library defines this for functions which it implements
2382 to always fail with ENOSYS. Some functions are actually named
2383 something starting with __ and the normal name is an alias. */
2384#if defined (__stub_strtoull) || defined (__stub___strtoull)
2385choke me
2386#else
2387strtoull();
2388#endif
2389
2390; return 0; }
2391EOF
c470c17d 2392if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
209fe19b
BK
2393 rm -rf conftest*
2394 eval "ac_cv_func_strtoull=yes"
2395else
2396 echo "configure: failed program was:" >&5
2397 cat conftest.$ac_ext >&5
2398 rm -rf conftest*
2399 eval "ac_cv_func_strtoull=no"
b2dad0e3 2400fi
209fe19b
BK
2401rm -f conftest*
2402fi
2403
2404if eval "test \"`echo '$ac_cv_func_'strtoull`\" = yes"; then
2405 echo "$ac_t""yes" 1>&6
2406 :
2407else
2408 echo "$ac_t""no" 1>&6
2409ac_strtoull=no
2410fi
2411
2412
3840fa2a 2413 echo $ac_n "checking for enabled long long""... $ac_c" 1>&6
c470c17d 2414echo "configure:2415: checking for enabled long long" >&5
209fe19b 2415 if test x"$ac_strtoll" = xno || test x"$ac_strtoull" = xno; then
3840fa2a
BK
2416 enable_long_long=no;
2417 fi;
d0d88ce3 2418 echo "$ac_t""$enable_long_long" 1>&6
3840fa2a 2419
b2dad0e3
BK
2420 case "$enable_long_long" in
2421 yes) cat >> confdefs.h <<\EOF
2422#define _GLIBCPP_USE_LONG_LONG 1
2423EOF
2424
2425 ;;
2426 esac
2427
d0d88ce3 2428echo $ac_n "checking for enabled cshadow headers""... $ac_c" 1>&6
c470c17d 2429echo "configure:2430: checking for enabled cshadow headers" >&5
d0d88ce3
BK
2430# Check whether --enable-cshadow-headers or --disable-cshadow-headers was given.
2431if test "${enable_cshadow_headers+set}" = set; then
2432 enableval="$enable_cshadow_headers"
99246c90 2433 case "$enableval" in
d0d88ce3
BK
2434 yes) enable_cshadow_headers=yes
2435 ;;
2436 no) enable_cshadow_headers=no
2437 ;;
2438 *) { echo "configure: error: Unknown argument to enable/disable shadowed C headers" 1>&2; exit 1; }
2439 ;;
99246c90
PE
2440 esac
2441else
d0d88ce3 2442 enable_cshadow_headers=no
99246c90 2443fi
d0d88ce3
BK
2444echo "$ac_t""$enable_cshadow_headers" 1>&6
2445case "$enable_cshadow_headers" in
99246c90 2446 yes)
e95706d5 2447 CSHADOWFLAGS="-D_GNU_SOURCE"
5b80666b 2448 CSHADOW_INCLUDES=" -I$srcdir/shadow -I$blddir/cshadow"
99246c90
PE
2449 ;;
2450 no)
5b80666b
BK
2451 CSHADOWFLAGS=""
2452 CSHADOW_INCLUDES=""
99246c90
PE
2453 ;;
2454esac
2455
2456
b2dad0e3 2457
5b80666b
BK
2458
2459
2460if test "$enable_cshadow_headers" = yes; then
2461 GLIBCPP_USE_CSHADOW_TRUE=
2462 GLIBCPP_USE_CSHADOW_FALSE='#'
2463else
2464 GLIBCPP_USE_CSHADOW_TRUE='#'
2465 GLIBCPP_USE_CSHADOW_FALSE=
2466fi
2467
2468
b2dad0e3 2469 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
c470c17d 2470echo "configure:2471: checking for threads package to use" >&5
b2dad0e3
BK
2471 # Check whether --enable-threads or --disable-threads was given.
2472if test "${enable_threads+set}" = set; then
2473 enableval="$enable_threads"
2474 if test x$enable_threads = xno; then
2475 enable_threads=''
2476 fi
2477else
2478 enable_threads=''
2479fi
2480
2481
2482 enable_threads_flag=$enable_threads
2483
2484 case x${enable_threads_flag} in
2485 x | xno | xnone)
2486 # No threads
2487 target_thread_file='single'
2488 ;;
2489 xyes)
2490 # default
2491 target_thread_file=''
2492 ;;
2493 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2494 xsolaris | xwin32 | xdce | xvxworks)
2495 target_thread_file=$enable_threads_flag
2496 ;;
2497 *)
2498 echo "$enable_threads is an unknown thread package" 1>&2
2499 exit 1
2500 ;;
2501 esac
2502
2503 case "$target_thread_file" in
2504 no | none | single)
2505 THREADS=none
2506 ;;
2507 posix | pthreads)
2508 THREADS=posix
2509 case "$host" in
2510 *-*-linux*)
2511 ;;
2512 esac
2513 ;;
2514 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
2515 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
2516 ;;
2517 *)
2518 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
2519 ;;
2520 esac
2521 echo "$ac_t""$THREADS" 1>&6
2522
2523 THREADLIBS=
2524 THREADINCS=
2525 THREADDEPS=
2526 THREADOBJS=
2527 THREADH=
2528 THREADSPEC=
2529 case "$THREADS" in
2530 posix)
2531 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2532echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
c470c17d 2533echo "configure:2534: checking for pthread.h" >&5
b2dad0e3
BK
2534if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 cat > conftest.$ac_ext <<EOF
c470c17d 2538#line 2539 "configure"
b2dad0e3
BK
2539#include "confdefs.h"
2540#include <pthread.h>
2541EOF
2542ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 2543{ (eval echo configure:2544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2544ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2545if test -z "$ac_err"; then
2546 rm -rf conftest*
2547 eval "ac_cv_header_$ac_safe=yes"
2548else
2549 echo "$ac_err" >&5
2550 echo "configure: failed program was:" >&5
2551 cat conftest.$ac_ext >&5
2552 rm -rf conftest*
2553 eval "ac_cv_header_$ac_safe=no"
2554fi
2555rm -f conftest*
2556fi
2557if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2558 echo "$ac_t""yes" 1>&6
2559 have_pthread_h=yes
2560else
2561 echo "$ac_t""no" 1>&6
2562have_pthread_h=
2563fi
2564
2565 THREADLIBS=-lpthread
2566 THREADSPEC=-lpthread
2567 THREADH=threads-posix.h
2568 ;;
2569 none)
2570 THREADH=threads-no.h
2571 ;;
2572 esac
2573
2574
2575
2576
2577
2578
b2dad0e3 2579#GLIBCPP_ENABLE_RELIBGCC([../..])
dcfa0bc8
PE
2580# Check whether --enable-cxx-flags or --disable-cxx-flags was given.
2581if test "${enable_cxx_flags+set}" = set; then
2582 enableval="$enable_cxx_flags"
2583 case "x$enableval" in
2584 xyes) { echo "configure: error: --enable-cxx-flags needs compiler flags as arguments" 1>&2; exit 1; } ;;
32a4595e 2585 xno|x) enable_cxx_flags='' ;;
dcfa0bc8
PE
2586 *) enable_cxx_flags="$enableval" ;;
2587 esac
2588else
32a4595e 2589 enable_cxx_flags='none'
dcfa0bc8 2590fi
32a4595e 2591if test "$enable_cxx_flags" = "none"; then enable_cxx_flags=''; fi
dcfa0bc8
PE
2592if test -n "$enable_cxx_flags"; then
2593 for f in $enable_cxx_flags; do
2594 case "$f" in
991a40fc 2595 -fhonor-std) ;;
dcfa0bc8
PE
2596 -*) ;;
2597 *) # and we're trying to pass /what/ exactly?
2598 { echo "configure: error: compiler flags start with a -" 1>&2; exit 1; } ;;
2599 esac
2600 done
2601fi
2602EXTRA_CXX_FLAGS="$enable_cxx_flags"
2603
2604
b2dad0e3 2605
cde28f0d 2606
b2dad0e3
BK
2607if test -n "$with_cross_host"; then
2608
2609 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
2610 # may not work correctly, because the compiler may not be able to
2611 # link executables.
2612
2613 xcompiling=1
2614 NATIVE=no
2615 # If Canadian cross, then don't pick up tools from the build
2616 # directory.
2617 if test "$build" != "$with_cross_host"; then
2618 CANADIAN=yes
2619 NULL_TARGET=yes
2620 else
2621 CANADIAN=no
2622 NULL_TARGET=no
2623 fi
2624
2625 case "$target_alias" in
2626 *-wince-*)
2627 # Configure for Microsoft Windows CE, or whatever they are
2628 # currently calling it.
2629 cat >> confdefs.h <<\EOF
2630#define HAVE_FLOAT_H 1
2631EOF
2632
2633
2634 cat >> confdefs.h <<\EOF
2635#define HAVE__FINITE 1
2636EOF
2637
2638 cat >> confdefs.h <<\EOF
2639#define HAVE__ISNAN 1
2640EOF
2641
2642 cat >> confdefs.h <<\EOF
2643#define HAVE__COPYSIGN 1
2644EOF
2645
2646 cat >> confdefs.h <<\EOF
2647#define HAVE__FPCLASS 1
2648EOF
2649
2650 cat >> confdefs.h <<\EOF
2651#define HAVE_MODF 1
2652EOF
2653
2654
2655 ctype_include_dir="config/wince"
2656
2657
2658 cat >> confdefs.h <<\EOF
2659#define _GLIBCPP_NEED_MBSTATE_T 1
2660EOF
2661
2662
2663 cat >> confdefs.h <<\EOF
2664#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2665EOF
2666
2667 cat >> confdefs.h <<\EOF
2668#define _GLIBCPP_BUGGY_COMPLEX 1
2669EOF
2670
2671 ;;
2672 *)
2673 # We assume newlib. This lets us hard-code the functions we know
2674 # we'll have.
2675 cat >> confdefs.h <<\EOF
2676#define HAVE_FINITE 1
2677EOF
2678
2679 cat >> confdefs.h <<\EOF
2680#define HAVE_ISNAN 1
2681EOF
2682
2683 cat >> confdefs.h <<\EOF
2684#define HAVE_ISNANF 1
2685EOF
2686
2687 cat >> confdefs.h <<\EOF
2688#define HAVE_ISINF 1
2689EOF
2690
2691 cat >> confdefs.h <<\EOF
2692#define HAVE_ISINFF 1
2693EOF
2694
2695
2696 ctype_include_dir="config/newlib"
2697
2698
2699 cat >> confdefs.h <<\EOF
2700#define _GLIBCPP_NEED_MBSTATE_T 1
2701EOF
2702
2703
2704 cat >> confdefs.h <<\EOF
2705#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
2706EOF
2707
2708 cat >> confdefs.h <<\EOF
2709#define _GLIBCPP_BUGGY_COMPLEX 1
2710EOF
2711
2712 # need to ceck for faster f versions of math functions, ie sinf?
2713 ;;
2714 esac
2715else
2716
2717 # We are being configured natively. We can do more elaborate tests
2718 # that include AC_TRY_COMPILE now, as the linker is assumed to be
2719 # working.
2720
2721 xcompiling=0
2722 NATIVE=yes
2723 CANADIAN=no
2724 NULL_TARGET=no
2725
2726 # Check for available headers.
2727 for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
2728 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h
2729do
2730ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2731echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c470c17d 2732echo "configure:2733: checking for $ac_hdr" >&5
b2dad0e3
BK
2733if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2734 echo $ac_n "(cached) $ac_c" 1>&6
2735else
2736 cat > conftest.$ac_ext <<EOF
c470c17d 2737#line 2738 "configure"
b2dad0e3
BK
2738#include "confdefs.h"
2739#include <$ac_hdr>
2740EOF
2741ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 2742{ (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
2743ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2744if test -z "$ac_err"; then
2745 rm -rf conftest*
2746 eval "ac_cv_header_$ac_safe=yes"
2747else
2748 echo "$ac_err" >&5
2749 echo "configure: failed program was:" >&5
2750 cat conftest.$ac_ext >&5
2751 rm -rf conftest*
2752 eval "ac_cv_header_$ac_safe=no"
2753fi
2754rm -f conftest*
2755fi
2756if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2757 echo "$ac_t""yes" 1>&6
2758 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2759 cat >> confdefs.h <<EOF
2760#define $ac_tr_hdr 1
2761EOF
2762
2763else
2764 echo "$ac_t""no" 1>&6
2765fi
2766done
2767
2768
2769
c470c17d
BK
2770 # All these tests are for C++; save the language and the compiler flags.
2771 # The CXXFLAGS thing is suspicious, but based on similar bits
2772 # found in GLIBCPP_CONFIGURE.
2773
2774 ac_ext=C
2775# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2776ac_cpp='$CXXCPP $CPPFLAGS'
2777ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2778ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2779cross_compiling=$ac_cv_prog_cxx_cross
2780
2781 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2782 ac_save_CXXFLAGS="$CXXFLAGS"
2783 WERROR='-Werror'
2784
2785 # Check for pragma system_header.
2786 echo $ac_n "checking for g++ that supports pragma system_header""... $ac_c" 1>&6
2787echo "configure:2788: checking for g++ that supports pragma system_header" >&5
2788 CXXFLAGS='-Wunknown-pragmas -Werror'
2789 cat > conftest.$ac_ext <<EOF
2790#line 2791 "configure"
2791#include "confdefs.h"
2792#pragma system_header
2793int main() {
2794int foo;
2795
2796; return 0; }
2797EOF
2798if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2799 rm -rf conftest*
2800 ac_newpragma=yes
2801else
2802 echo "configure: failed program was:" >&5
2803 cat conftest.$ac_ext >&5
2804 rm -rf conftest*
2805 ac_newpragma=no
2806fi
2807rm -f conftest*
2808 if test "$ac_test_CXXFLAGS" = set; then
2809 CXXFLAGS="$ac_save_CXXFLAGS"
2810 else
2811 # this is the suspicious part
2812 CXXFLAGS=''
2813 fi
2814 if test "$ac_newpragma" = "no"; then
2815 WERROR="$WERROR -Wno-unknown-pragmas"
2816 fi
2817 echo "$ac_t""$ac_newpragma" 1>&6
2818
2819 # Check for more sophisticated diagnostic control.
2820 echo $ac_n "checking for g++ that supports -fdiagnostics-show-location=once""... $ac_c" 1>&6
2821echo "configure:2822: checking for g++ that supports -fdiagnostics-show-location=once" >&5
2822 CXXFLAGS='-fdiagnostics-show-location=once'
2823 cat > conftest.$ac_ext <<EOF
2824#line 2825 "configure"
2825#include "confdefs.h"
2826
2827int main() {
2828int foo;
2829
2830; return 0; }
2831EOF
2832if { (eval echo configure:2833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2833 rm -rf conftest*
2834 ac_gabydiags=yes
2835else
2836 echo "configure: failed program was:" >&5
2837 cat conftest.$ac_ext >&5
2838 rm -rf conftest*
2839 ac_gabydiags=no
2840fi
2841rm -f conftest*
2842 if test "$ac_test_CXXFLAGS" = set; then
2843 CXXFLAGS="$ac_save_CXXFLAGS"
2844 else
2845 # this is the suspicious part
2846 CXXFLAGS=''
2847 fi
2848 if test "$ac_gabydiags" = "yes"; then
2849 WFMT_FLAGS='-fdiagnostics-show-location=once'
2850 fi
2851 echo "$ac_t""$ac_gabydiags" 1>&6
2852
2853 # Check for -ffunction-sections -fdata-sections
2854 echo $ac_n "checking for g++ that supports -ffunction-sections -fdata-sections""... $ac_c" 1>&6
2855echo "configure:2856: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
2856 CXXFLAGS='-ffunction-sections -fdata-sections'
2857 cat > conftest.$ac_ext <<EOF
2858#line 2859 "configure"
2859#include "confdefs.h"
2860
2861int main() {
2862int foo;
2863
2864; return 0; }
2865EOF
2866if { (eval echo configure:2867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2867 rm -rf conftest*
2868 ac_fdsections=yes
2869else
2870 echo "configure: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 rm -rf conftest*
2873 ac_fdsections=no
2874fi
2875rm -f conftest*
2876 if test "$ac_test_CXXFLAGS" = set; then
2877 CXXFLAGS="$ac_save_CXXFLAGS"
2878 else
2879 # this is the suspicious part
2880 CXXFLAGS=''
2881 fi
2882 if test "$ac_fdsections" = "yes"; then
2883 SECTION_FLAGS='-ffunction-sections -fdata-sections'
2884 fi
2885 echo "$ac_t""$ac_fdsections" 1>&6
2886
2887 ac_ext=c
2888# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2889ac_cpp='$CPP $CPPFLAGS'
2890ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2891ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2892cross_compiling=$ac_cv_prog_cc_cross
2893
2894
2895
2896
2897
2898
2899 # All these tests are for C++; save the language and the compiler flags.
2900 # The CXXFLAGS thing is suspicious, but based on similar bits
2901 # found in GLIBCPP_CONFIGURE.
2902
2903 ac_ext=C
2904# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2905ac_cpp='$CXXCPP $CPPFLAGS'
2906ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2907ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2908cross_compiling=$ac_cv_prog_cxx_cross
2909
2910
2911 # Check for -Wl,--gc-sections
2912 echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
2913echo "configure:2914: checking for ld that supports -Wl,--gc-sections" >&5
2914 CXXFLAGS='-Wl,--gc-sections'
2915 cat > conftest.$ac_ext <<EOF
2916#line 2917 "configure"
2917#include "confdefs.h"
2918
2919int main() {
2920int foo;
2921
2922; return 0; }
2923EOF
2924if { (eval echo configure:2925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2925 rm -rf conftest*
2926 ac_sectionLDflags=yes
2927else
2928 echo "configure: failed program was:" >&5
2929 cat conftest.$ac_ext >&5
2930 rm -rf conftest*
2931 ac_sectionLFflags=no
2932fi
2933rm -f conftest*
2934 if test "$ac_test_CXXFLAGS" = set; then
2935 CXXFLAGS="$ac_save_CXXFLAGS"
2936 else
2937 # this is the suspicious part
2938 CXXFLAGS=''
2939 fi
2940 if test "$ac_sectionLDflags" = "yes"; then
2941 SECTION_LDFLAGS='-Wl,--gc-sections'
2942 fi
2943 echo "$ac_t""$ac_sectionLDflags" 1>&6
2944
2945 ac_ext=c
2946# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2947ac_cpp='$CPP $CPPFLAGS'
2948ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2949ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2950cross_compiling=$ac_cv_prog_cc_cross
2951
2952
2953
2954
b2dad0e3
BK
2955
2956 echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6
c470c17d 2957echo "configure:2958: checking for GNU C++ __complex__ support" >&5
b2dad0e3
BK
2958 if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then
2959 echo $ac_n "(cached) $ac_c" 1>&6
2960else
2961
2962
2963 ac_ext=C
2964# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2965ac_cpp='$CXXCPP $CPPFLAGS'
2966ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2967ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2968cross_compiling=$ac_cv_prog_cxx_cross
2969
2970 cat > conftest.$ac_ext <<EOF
c470c17d 2971#line 2972 "configure"
b2dad0e3
BK
2972#include "confdefs.h"
2973struct dcomplex { __complex__ double x; }; \
2974 dcomplex f(const dcomplex& x) { return dcomplex(x); }
2975int main() {
2976\
2977 dcomplex x; f(x);
2978; return 0; }
2979EOF
c470c17d 2980if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
2981 rm -rf conftest*
2982 glibcpp_cv_complex=ok
2983else
2984 echo "configure: failed program was:" >&5
2985 cat conftest.$ac_ext >&5
2986 rm -rf conftest*
2987 glibcpp_cv_complex=buggy
2988
2989fi
2990rm -f conftest*
2991 ac_ext=c
2992# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2993ac_cpp='$CPP $CPPFLAGS'
2994ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2995ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2996cross_compiling=$ac_cv_prog_cc_cross
2997
2998
2999fi
3000
3001 echo "$ac_t""$glibcpp_cv_complex" 1>&6
3002 if test $glibcpp_cv_complex = buggy; then
3003 cat >> confdefs.h <<\EOF
3004#define _GLIBCPP_BUGGY_COMPLEX 1
3005EOF
3006
3007 fi
3008
3009
3010
3011 echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6
c470c17d 3012echo "configure:3013: checking for GNU C++ __complex__ float support" >&5
b2dad0e3
BK
3013 if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
3014 echo $ac_n "(cached) $ac_c" 1>&6
3015else
3016
3017
3018 ac_ext=C
3019# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3020ac_cpp='$CXXCPP $CPPFLAGS'
3021ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3022ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3023cross_compiling=$ac_cv_prog_cxx_cross
3024
3025 rm -f conftest.h
3026 cat > conftest.h <<EOB
3027 //
3028 // Check for buggy __complex__ that causes ICE in most versions of egcs
3029 // and gcc-2.95.x on certain platforms (eg., x86-win32).
3030 //
3031 // See http://egcs.cygnus.com/ml/gcc-bugs/1999-07/msg00845.html for
3032 // more info on the bug itself.
3033 //
3034 struct
3035 float_complex
3036 {
3037 __complex__ float m_value;
3038 float_complex (float = 0.0f, float = 0.0f);
3039 float_complex (__complex__ float val) : m_value (val) {}
3040 float_complex foo (const float_complex &val)
3041 { return float_complex (~val.m_value); }
3042 };
3043EOB
3044 cat > conftest.$ac_ext <<EOF
c470c17d 3045#line 3046 "configure"
b2dad0e3
BK
3046#include "confdefs.h"
3047#include "conftest.h"
3048int main() {
3049
3050; return 0; }
3051EOF
c470c17d 3052if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
3053 rm -rf conftest*
3054 glibcpp_cv_float_complex=ok
3055else
3056 echo "configure: failed program was:" >&5
3057 cat conftest.$ac_ext >&5
3058 rm -rf conftest*
3059 glibcpp_cv_float_complex=buggy
3060
3061fi
3062rm -f conftest*
3063 ac_ext=c
3064# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3065ac_cpp='$CPP $CPPFLAGS'
3066ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3067ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3068cross_compiling=$ac_cv_prog_cc_cross
3069
3070
3071fi
3072
3073 echo "$ac_t""$glibcpp_cv_float_complex" 1>&6
3074 if test $glibcpp_cv_float_complex = buggy; then
3075 cat >> confdefs.h <<\EOF
3076#define _GLIBCPP_BUGGY_FLOAT_COMPLEX 1
3077EOF
3078
3079 fi
3080
3081
54fa7415
SK
3082
3083 ac_ext=C
3084# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3085ac_cpp='$CXXCPP $CPPFLAGS'
3086ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3087ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3088cross_compiling=$ac_cv_prog_cxx_cross
3089
3090 echo $ac_n "checking for __builtin_acos""... $ac_c" 1>&6
c470c17d 3091echo "configure:3092: checking for __builtin_acos" >&5
b2dad0e3 3092 cat > conftest.$ac_ext <<EOF
c470c17d 3093#line 3094 "configure"
b2dad0e3
BK
3094#include "confdefs.h"
3095#include <math.h>
3096int main() {
54fa7415 3097 __builtin_acos(0.0);
b2dad0e3
BK
3098; return 0; }
3099EOF
c470c17d 3100if { (eval echo configure:3101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3101 rm -rf conftest*
54fa7415 3102 use_builtin_acos=yes
b2dad0e3
BK
3103else
3104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
3106 rm -rf conftest*
54fa7415 3107 use_builtin_acos=no
b2dad0e3
BK
3108fi
3109rm -f conftest*
54fa7415
SK
3110 echo "$ac_t""$use_builtin_acos" 1>&6
3111 if test $use_builtin_acos = "yes"; then
b2dad0e3 3112 cat >> confdefs.h <<\EOF
54fa7415 3113#define HAVE_BUILTIN_ACOS 1
b2dad0e3
BK
3114EOF
3115
3116 fi
54fa7415 3117 echo $ac_n "checking for __builtin_acosf""... $ac_c" 1>&6
c470c17d 3118echo "configure:3119: checking for __builtin_acosf" >&5
b2dad0e3 3119 cat > conftest.$ac_ext <<EOF
c470c17d 3120#line 3121 "configure"
b2dad0e3
BK
3121#include "confdefs.h"
3122#include <math.h>
3123int main() {
54fa7415 3124 __builtin_acosf(0.0);
b2dad0e3
BK
3125; return 0; }
3126EOF
c470c17d 3127if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3128 rm -rf conftest*
54fa7415 3129 use_builtin_acosf=yes
b2dad0e3
BK
3130else
3131 echo "configure: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 rm -rf conftest*
54fa7415 3134 use_builtin_acosf=no
b2dad0e3
BK
3135fi
3136rm -f conftest*
54fa7415
SK
3137 echo "$ac_t""$use_builtin_acosf" 1>&6
3138 if test $use_builtin_acosf = "yes"; then
b2dad0e3 3139 cat >> confdefs.h <<\EOF
54fa7415 3140#define HAVE_BUILTIN_ACOSF 1
b2dad0e3
BK
3141EOF
3142
3143 fi
54fa7415 3144 echo $ac_n "checking for __builtin_acosl""... $ac_c" 1>&6
c470c17d 3145echo "configure:3146: checking for __builtin_acosl" >&5
b2dad0e3 3146 cat > conftest.$ac_ext <<EOF
c470c17d 3147#line 3148 "configure"
b2dad0e3
BK
3148#include "confdefs.h"
3149#include <math.h>
3150int main() {
54fa7415 3151 __builtin_acosl(0.0);
b2dad0e3
BK
3152; return 0; }
3153EOF
c470c17d 3154if { (eval echo configure:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3155 rm -rf conftest*
54fa7415 3156 use_builtin_acosl=yes
b2dad0e3
BK
3157else
3158 echo "configure: failed program was:" >&5
3159 cat conftest.$ac_ext >&5
3160 rm -rf conftest*
54fa7415 3161 use_builtin_acosl=no
b2dad0e3
BK
3162fi
3163rm -f conftest*
54fa7415
SK
3164 echo "$ac_t""$use_builtin_acosl" 1>&6
3165 if test $use_builtin_acosl = "yes"; then
b2dad0e3 3166 cat >> confdefs.h <<\EOF
54fa7415 3167#define HAVE_BUILTIN_ACOSL 1
b2dad0e3
BK
3168EOF
3169
3170 fi
54fa7415 3171 echo $ac_n "checking for __builtin_asin""... $ac_c" 1>&6
c470c17d 3172echo "configure:3173: checking for __builtin_asin" >&5
b2dad0e3 3173 cat > conftest.$ac_ext <<EOF
c470c17d 3174#line 3175 "configure"
b2dad0e3
BK
3175#include "confdefs.h"
3176#include <math.h>
3177int main() {
54fa7415 3178 __builtin_asin(0.0);
b2dad0e3
BK
3179; return 0; }
3180EOF
c470c17d 3181if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3182 rm -rf conftest*
54fa7415 3183 use_builtin_asin=yes
b2dad0e3
BK
3184else
3185 echo "configure: failed program was:" >&5
3186 cat conftest.$ac_ext >&5
3187 rm -rf conftest*
54fa7415 3188 use_builtin_asin=no
b2dad0e3
BK
3189fi
3190rm -f conftest*
54fa7415
SK
3191 echo "$ac_t""$use_builtin_asin" 1>&6
3192 if test $use_builtin_asin = "yes"; then
b2dad0e3 3193 cat >> confdefs.h <<\EOF
54fa7415 3194#define HAVE_BUILTIN_ASIN 1
b2dad0e3
BK
3195EOF
3196
3197 fi
54fa7415 3198 echo $ac_n "checking for __builtin_asinf""... $ac_c" 1>&6
c470c17d 3199echo "configure:3200: checking for __builtin_asinf" >&5
54fa7415 3200 cat > conftest.$ac_ext <<EOF
c470c17d 3201#line 3202 "configure"
b2dad0e3 3202#include "confdefs.h"
54fa7415 3203#include <math.h>
b2dad0e3 3204int main() {
54fa7415 3205 __builtin_asinf(0.0);
b2dad0e3
BK
3206; return 0; }
3207EOF
c470c17d 3208if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3209 rm -rf conftest*
54fa7415 3210 use_builtin_asinf=yes
b2dad0e3
BK
3211else
3212 echo "configure: failed program was:" >&5
3213 cat conftest.$ac_ext >&5
3214 rm -rf conftest*
54fa7415 3215 use_builtin_asinf=no
b2dad0e3
BK
3216fi
3217rm -f conftest*
54fa7415
SK
3218 echo "$ac_t""$use_builtin_asinf" 1>&6
3219 if test $use_builtin_asinf = "yes"; then
3220 cat >> confdefs.h <<\EOF
3221#define HAVE_BUILTIN_ASINF 1
3222EOF
b2dad0e3 3223
54fa7415
SK
3224 fi
3225 echo $ac_n "checking for __builtin_asinl""... $ac_c" 1>&6
c470c17d 3226echo "configure:3227: checking for __builtin_asinl" >&5
b2dad0e3 3227 cat > conftest.$ac_ext <<EOF
c470c17d 3228#line 3229 "configure"
b2dad0e3 3229#include "confdefs.h"
54fa7415
SK
3230#include <math.h>
3231int main() {
3232 __builtin_asinl(0.0);
3233; return 0; }
b2dad0e3 3234EOF
c470c17d 3235if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3236 rm -rf conftest*
54fa7415 3237 use_builtin_asinl=yes
b2dad0e3 3238else
b2dad0e3
BK
3239 echo "configure: failed program was:" >&5
3240 cat conftest.$ac_ext >&5
3241 rm -rf conftest*
54fa7415 3242 use_builtin_asinl=no
b2dad0e3
BK
3243fi
3244rm -f conftest*
54fa7415
SK
3245 echo "$ac_t""$use_builtin_asinl" 1>&6
3246 if test $use_builtin_asinl = "yes"; then
3247 cat >> confdefs.h <<\EOF
3248#define HAVE_BUILTIN_ASINL 1
b2dad0e3 3249EOF
b2dad0e3 3250
54fa7415
SK
3251 fi
3252 echo $ac_n "checking for __builtin_atan""... $ac_c" 1>&6
c470c17d 3253echo "configure:3254: checking for __builtin_atan" >&5
b2dad0e3 3254 cat > conftest.$ac_ext <<EOF
c470c17d 3255#line 3256 "configure"
b2dad0e3 3256#include "confdefs.h"
54fa7415 3257#include <math.h>
b2dad0e3 3258int main() {
54fa7415 3259 __builtin_atan(0.0);
b2dad0e3
BK
3260; return 0; }
3261EOF
c470c17d 3262if { (eval echo configure:3263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3263 rm -rf conftest*
54fa7415 3264 use_builtin_atan=yes
b2dad0e3
BK
3265else
3266 echo "configure: failed program was:" >&5
3267 cat conftest.$ac_ext >&5
3268 rm -rf conftest*
54fa7415 3269 use_builtin_atan=no
b2dad0e3
BK
3270fi
3271rm -f conftest*
54fa7415
SK
3272 echo "$ac_t""$use_builtin_atan" 1>&6
3273 if test $use_builtin_atan = "yes"; then
3274 cat >> confdefs.h <<\EOF
3275#define HAVE_BUILTIN_ATAN 1
b2dad0e3 3276EOF
b2dad0e3 3277
54fa7415
SK
3278 fi
3279 echo $ac_n "checking for __builtin_atanf""... $ac_c" 1>&6
c470c17d 3280echo "configure:3281: checking for __builtin_atanf" >&5
b2dad0e3 3281 cat > conftest.$ac_ext <<EOF
c470c17d 3282#line 3283 "configure"
b2dad0e3 3283#include "confdefs.h"
54fa7415 3284#include <math.h>
b2dad0e3 3285int main() {
54fa7415 3286 __builtin_atanf(0.0);
b2dad0e3
BK
3287; return 0; }
3288EOF
c470c17d 3289if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3290 rm -rf conftest*
54fa7415 3291 use_builtin_atanf=yes
b2dad0e3
BK
3292else
3293 echo "configure: failed program was:" >&5
3294 cat conftest.$ac_ext >&5
3295 rm -rf conftest*
54fa7415 3296 use_builtin_atanf=no
b2dad0e3
BK
3297fi
3298rm -f conftest*
54fa7415
SK
3299 echo "$ac_t""$use_builtin_atanf" 1>&6
3300 if test $use_builtin_atanf = "yes"; then
3301 cat >> confdefs.h <<\EOF
3302#define HAVE_BUILTIN_ATANF 1
3303EOF
b2dad0e3 3304
54fa7415
SK
3305 fi
3306 echo $ac_n "checking for __builtin_atanl""... $ac_c" 1>&6
c470c17d 3307echo "configure:3308: checking for __builtin_atanl" >&5
b2dad0e3 3308 cat > conftest.$ac_ext <<EOF
c470c17d 3309#line 3310 "configure"
b2dad0e3 3310#include "confdefs.h"
54fa7415 3311#include <math.h>
b2dad0e3 3312int main() {
54fa7415 3313 __builtin_atanl(0.0);
b2dad0e3
BK
3314; return 0; }
3315EOF
c470c17d 3316if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3317 rm -rf conftest*
54fa7415 3318 use_builtin_atanl=yes
b2dad0e3
BK
3319else
3320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
3322 rm -rf conftest*
54fa7415 3323 use_builtin_atanl=no
b2dad0e3
BK
3324fi
3325rm -f conftest*
54fa7415
SK
3326 echo "$ac_t""$use_builtin_atanl" 1>&6
3327 if test $use_builtin_atanl = "yes"; then
3328 cat >> confdefs.h <<\EOF
3329#define HAVE_BUILTIN_ATANL 1
b2dad0e3 3330EOF
b2dad0e3 3331
54fa7415
SK
3332 fi
3333 echo $ac_n "checking for __builtin_atan2""... $ac_c" 1>&6
c470c17d 3334echo "configure:3335: checking for __builtin_atan2" >&5
b2dad0e3 3335 cat > conftest.$ac_ext <<EOF
c470c17d 3336#line 3337 "configure"
b2dad0e3 3337#include "confdefs.h"
54fa7415 3338#include <math.h>
b2dad0e3 3339int main() {
5ae55a2e 3340 __builtin_atan2(0.0, 0.0);
b2dad0e3
BK
3341; return 0; }
3342EOF
c470c17d 3343if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3 3344 rm -rf conftest*
54fa7415 3345 use_builtin_atan2=yes
b2dad0e3
BK
3346else
3347 echo "configure: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 rm -rf conftest*
54fa7415
SK
3350 use_builtin_atan2=no
3351fi
3352rm -f conftest*
3353 echo "$ac_t""$use_builtin_atan2" 1>&6
3354 if test $use_builtin_atan2 = "yes"; then
3355 cat >> confdefs.h <<\EOF
3356#define HAVE_BUILTIN_ATAN2 1
3357EOF
3358
3359 fi
3360 echo $ac_n "checking for __builtin_atan2f""... $ac_c" 1>&6
c470c17d 3361echo "configure:3362: checking for __builtin_atan2f" >&5
54fa7415 3362 cat > conftest.$ac_ext <<EOF
c470c17d 3363#line 3364 "configure"
54fa7415
SK
3364#include "confdefs.h"
3365#include <math.h>
3366int main() {
5ae55a2e 3367 __builtin_atan2f(0.0, 0.0);
54fa7415
SK
3368; return 0; }
3369EOF
c470c17d 3370if { (eval echo configure:3371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3371 rm -rf conftest*
3372 use_builtin_atan2f=yes
3373else
3374 echo "configure: failed program was:" >&5
3375 cat conftest.$ac_ext >&5
3376 rm -rf conftest*
3377 use_builtin_atan2f=no
3378fi
3379rm -f conftest*
3380 echo "$ac_t""$use_builtin_atan2f" 1>&6
3381 if test $use_builtin_atan2f = "yes"; then
3382 cat >> confdefs.h <<\EOF
3383#define HAVE_BUILTIN_ATAN2F 1
3384EOF
3385
3386 fi
3387 echo $ac_n "checking for __builtin_atan2l""... $ac_c" 1>&6
c470c17d 3388echo "configure:3389: checking for __builtin_atan2l" >&5
54fa7415 3389 cat > conftest.$ac_ext <<EOF
c470c17d 3390#line 3391 "configure"
54fa7415
SK
3391#include "confdefs.h"
3392#include <math.h>
3393int main() {
5ae55a2e 3394 __builtin_atan2l(0.0, 0.0);
54fa7415
SK
3395; return 0; }
3396EOF
c470c17d 3397if { (eval echo configure:3398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3398 rm -rf conftest*
3399 use_builtin_atan2l=yes
3400else
3401 echo "configure: failed program was:" >&5
3402 cat conftest.$ac_ext >&5
3403 rm -rf conftest*
3404 use_builtin_atan2l=no
3405fi
3406rm -f conftest*
3407 echo "$ac_t""$use_builtin_atan2l" 1>&6
3408 if test $use_builtin_atan2l = "yes"; then
3409 cat >> confdefs.h <<\EOF
3410#define HAVE_BUILTIN_ATAN2L 1
3411EOF
3412
3413 fi
3414 echo $ac_n "checking for __builtin_ceil""... $ac_c" 1>&6
c470c17d 3415echo "configure:3416: checking for __builtin_ceil" >&5
54fa7415 3416 cat > conftest.$ac_ext <<EOF
c470c17d 3417#line 3418 "configure"
54fa7415
SK
3418#include "confdefs.h"
3419#include <math.h>
3420int main() {
3421 __builtin_fceil(0.0);
3422; return 0; }
3423EOF
c470c17d 3424if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3425 rm -rf conftest*
3426 use_builtin_ceil=yes
3427else
3428 echo "configure: failed program was:" >&5
3429 cat conftest.$ac_ext >&5
3430 rm -rf conftest*
3431 use_builtin_ceil=no
3432fi
3433rm -f conftest*
3434 echo "$ac_t""$use_builtin_ceil" 1>&6
3435 if test $use_builtin_ceil = "yes"; then
3436 cat >> confdefs.h <<\EOF
3437#define HAVE_BUILTIN_CEIL 1
3438EOF
3439
3440 fi
3441 echo $ac_n "checking for __builtin_ceilf""... $ac_c" 1>&6
c470c17d 3442echo "configure:3443: checking for __builtin_ceilf" >&5
54fa7415 3443 cat > conftest.$ac_ext <<EOF
c470c17d 3444#line 3445 "configure"
54fa7415
SK
3445#include "confdefs.h"
3446#include <math.h>
3447int main() {
3448 __builtin_ceilf(0.0);
3449; return 0; }
3450EOF
c470c17d 3451if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3452 rm -rf conftest*
3453 use_builtin_ceilf=yes
3454else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
3458 use_builtin_ceilf=no
3459fi
3460rm -f conftest*
3461 echo "$ac_t""$use_builtin_ceilf" 1>&6
3462 if test $use_builtin_ceilf = "yes"; then
3463 cat >> confdefs.h <<\EOF
3464#define HAVE_BUILTIN_CEILF 1
3465EOF
3466
3467 fi
3468 echo $ac_n "checking for __builtin_ceill""... $ac_c" 1>&6
c470c17d 3469echo "configure:3470: checking for __builtin_ceill" >&5
54fa7415 3470 cat > conftest.$ac_ext <<EOF
c470c17d 3471#line 3472 "configure"
54fa7415
SK
3472#include "confdefs.h"
3473#include <math.h>
3474int main() {
3475 __builtin_ceill(0.0);
3476; return 0; }
3477EOF
c470c17d 3478if { (eval echo configure:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3479 rm -rf conftest*
3480 use_builtin_ceill=yes
3481else
3482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
3484 rm -rf conftest*
3485 use_builtin_ceill=no
3486fi
3487rm -f conftest*
3488 echo "$ac_t""$use_builtin_ceill" 1>&6
3489 if test $use_builtin_ceill = "yes"; then
3490 cat >> confdefs.h <<\EOF
3491#define HAVE_BUILTIN_CEILL 1
3492EOF
3493
3494 fi
3495 echo $ac_n "checking for __builtin_cos""... $ac_c" 1>&6
c470c17d 3496echo "configure:3497: checking for __builtin_cos" >&5
54fa7415 3497 cat > conftest.$ac_ext <<EOF
c470c17d 3498#line 3499 "configure"
54fa7415
SK
3499#include "confdefs.h"
3500#include <math.h>
3501int main() {
3502 __builtin_cos(0.0);
3503; return 0; }
3504EOF
c470c17d 3505if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3506 rm -rf conftest*
3507 use_builtin_cos=yes
3508else
3509 echo "configure: failed program was:" >&5
3510 cat conftest.$ac_ext >&5
3511 rm -rf conftest*
3512 use_builtin_cos=no
3513fi
3514rm -f conftest*
3515 echo "$ac_t""$use_builtin_cos" 1>&6
3516 if test $use_builtin_cos = "yes"; then
3517 cat >> confdefs.h <<\EOF
3518#define HAVE_BUILTIN_COS 1
3519EOF
3520
3521 fi
3522 echo $ac_n "checking for __builtin_cosf""... $ac_c" 1>&6
c470c17d 3523echo "configure:3524: checking for __builtin_cosf" >&5
54fa7415 3524 cat > conftest.$ac_ext <<EOF
c470c17d 3525#line 3526 "configure"
54fa7415
SK
3526#include "confdefs.h"
3527#include <math.h>
3528int main() {
3529 __builtin_cosf(0.0);
3530; return 0; }
3531EOF
c470c17d 3532if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3533 rm -rf conftest*
3534 use_builtin_cosf=yes
3535else
3536 echo "configure: failed program was:" >&5
3537 cat conftest.$ac_ext >&5
3538 rm -rf conftest*
3539 use_builtin_cosf=no
3540fi
3541rm -f conftest*
3542 echo "$ac_t""$use_builtin_cosf" 1>&6
3543 if test $use_builtin_cosf = "yes"; then
3544 cat >> confdefs.h <<\EOF
3545#define HAVE_BUILTIN_COSF 1
3546EOF
3547
3548 fi
3549 echo $ac_n "checking for __builtin_cosl""... $ac_c" 1>&6
c470c17d 3550echo "configure:3551: checking for __builtin_cosl" >&5
54fa7415 3551 cat > conftest.$ac_ext <<EOF
c470c17d 3552#line 3553 "configure"
54fa7415
SK
3553#include "confdefs.h"
3554#include <math.h>
3555int main() {
3556 __builtin_cosl(0.0);
3557; return 0; }
3558EOF
c470c17d 3559if { (eval echo configure:3560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3560 rm -rf conftest*
3561 use_builtin_cosl=yes
3562else
3563 echo "configure: failed program was:" >&5
3564 cat conftest.$ac_ext >&5
3565 rm -rf conftest*
3566 use_builtin_cosl=no
3567fi
3568rm -f conftest*
3569 echo "$ac_t""$use_builtin_cosl" 1>&6
3570 if test $use_builtin_cosl = "yes"; then
3571 cat >> confdefs.h <<\EOF
3572#define HAVE_BUILTIN_COSL 1
3573EOF
3574
3575 fi
3576 echo $ac_n "checking for __builtin_cosh""... $ac_c" 1>&6
c470c17d 3577echo "configure:3578: checking for __builtin_cosh" >&5
54fa7415 3578 cat > conftest.$ac_ext <<EOF
c470c17d 3579#line 3580 "configure"
54fa7415
SK
3580#include "confdefs.h"
3581#include <math.h>
3582int main() {
3583 __builtin_cosh(0.0);
3584; return 0; }
3585EOF
c470c17d 3586if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3587 rm -rf conftest*
3588 use_builtin_cosh=yes
3589else
3590 echo "configure: failed program was:" >&5
3591 cat conftest.$ac_ext >&5
3592 rm -rf conftest*
3593 use_builtin_cosh=no
3594fi
3595rm -f conftest*
3596 echo "$ac_t""$use_builtin_cosh" 1>&6
3597 if test $use_builtin_cosh = "yes"; then
3598 cat >> confdefs.h <<\EOF
3599#define HAVE_BUILTIN_COSH 1
3600EOF
3601
3602 fi
3603 echo $ac_n "checking for __builtin_coshf""... $ac_c" 1>&6
c470c17d 3604echo "configure:3605: checking for __builtin_coshf" >&5
54fa7415 3605 cat > conftest.$ac_ext <<EOF
c470c17d 3606#line 3607 "configure"
54fa7415
SK
3607#include "confdefs.h"
3608#include <math.h>
3609int main() {
3610 __builtin_coshf(0.0);
3611; return 0; }
3612EOF
c470c17d 3613if { (eval echo configure:3614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3614 rm -rf conftest*
3615 use_builtin_coshf=yes
3616else
3617 echo "configure: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3619 rm -rf conftest*
3620 use_builtin_coshf=no
3621fi
3622rm -f conftest*
3623 echo "$ac_t""$use_builtin_coshf" 1>&6
3624 if test $use_builtin_coshf = "yes"; then
3625 cat >> confdefs.h <<\EOF
3626#define HAVE_BUILTIN_COSHF 1
3627EOF
3628
3629 fi
3630 echo $ac_n "checking for __builtin_coshl""... $ac_c" 1>&6
c470c17d 3631echo "configure:3632: checking for __builtin_coshl" >&5
54fa7415 3632 cat > conftest.$ac_ext <<EOF
c470c17d 3633#line 3634 "configure"
54fa7415
SK
3634#include "confdefs.h"
3635#include <math.h>
3636int main() {
3637 __builtin_coshl(0.0);
3638; return 0; }
3639EOF
c470c17d 3640if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3641 rm -rf conftest*
3642 use_builtin_coshl=yes
3643else
3644 echo "configure: failed program was:" >&5
3645 cat conftest.$ac_ext >&5
3646 rm -rf conftest*
3647 use_builtin_coshl=no
3648fi
3649rm -f conftest*
3650 echo "$ac_t""$use_builtin_coshl" 1>&6
3651 if test $use_builtin_coshl = "yes"; then
3652 cat >> confdefs.h <<\EOF
3653#define HAVE_BUILTIN_COSHL 1
3654EOF
3655
3656 fi
3657 echo $ac_n "checking for __builtin_exp""... $ac_c" 1>&6
c470c17d 3658echo "configure:3659: checking for __builtin_exp" >&5
54fa7415 3659 cat > conftest.$ac_ext <<EOF
c470c17d 3660#line 3661 "configure"
54fa7415
SK
3661#include "confdefs.h"
3662#include <math.h>
3663int main() {
3664 __builtin_exp(0.0);
3665; return 0; }
3666EOF
c470c17d 3667if { (eval echo configure:3668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3668 rm -rf conftest*
3669 use_builtin_exp=yes
3670else
3671 echo "configure: failed program was:" >&5
3672 cat conftest.$ac_ext >&5
3673 rm -rf conftest*
3674 use_builtin_exp=no
3675fi
3676rm -f conftest*
3677 echo "$ac_t""$use_builtin_exp" 1>&6
3678 if test $use_builtin_exp = "yes"; then
3679 cat >> confdefs.h <<\EOF
3680#define HAVE_BUILTIN_EXP 1
3681EOF
3682
3683 fi
3684 echo $ac_n "checking for __builtin_expf""... $ac_c" 1>&6
c470c17d 3685echo "configure:3686: checking for __builtin_expf" >&5
54fa7415 3686 cat > conftest.$ac_ext <<EOF
c470c17d 3687#line 3688 "configure"
54fa7415
SK
3688#include "confdefs.h"
3689#include <math.h>
3690int main() {
3691 __builtin_expf(0.0);
3692; return 0; }
3693EOF
c470c17d 3694if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3695 rm -rf conftest*
3696 use_builtin_expf=yes
3697else
3698 echo "configure: failed program was:" >&5
3699 cat conftest.$ac_ext >&5
3700 rm -rf conftest*
3701 use_builtin_expf=no
3702fi
3703rm -f conftest*
3704 echo "$ac_t""$use_builtin_expf" 1>&6
3705 if test $use_builtin_expf = "yes"; then
3706 cat >> confdefs.h <<\EOF
3707#define HAVE_BUILTIN_EXPF 1
3708EOF
3709
3710 fi
3711 echo $ac_n "checking for __builtin_expl""... $ac_c" 1>&6
c470c17d 3712echo "configure:3713: checking for __builtin_expl" >&5
54fa7415 3713 cat > conftest.$ac_ext <<EOF
c470c17d 3714#line 3715 "configure"
54fa7415
SK
3715#include "confdefs.h"
3716#include <math.h>
3717int main() {
3718 __builtin_expl(0.0);
3719; return 0; }
3720EOF
c470c17d 3721if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3722 rm -rf conftest*
3723 use_builtin_expl=yes
3724else
3725 echo "configure: failed program was:" >&5
3726 cat conftest.$ac_ext >&5
3727 rm -rf conftest*
3728 use_builtin_expl=no
3729fi
3730rm -f conftest*
3731 echo "$ac_t""$use_builtin_expl" 1>&6
3732 if test $use_builtin_expl = "yes"; then
3733 cat >> confdefs.h <<\EOF
3734#define HAVE_BUILTIN_EXPL 1
3735EOF
3736
3737 fi
3738 echo $ac_n "checking for __builtin_fabs""... $ac_c" 1>&6
c470c17d 3739echo "configure:3740: checking for __builtin_fabs" >&5
54fa7415 3740 cat > conftest.$ac_ext <<EOF
c470c17d 3741#line 3742 "configure"
54fa7415
SK
3742#include "confdefs.h"
3743#include <math.h>
3744int main() {
3745 __builtin_fabs(0.0);
3746; return 0; }
3747EOF
c470c17d 3748if { (eval echo configure:3749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3749 rm -rf conftest*
3750 use_builtin_fabs=yes
3751else
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3754 rm -rf conftest*
3755 use_builtin_fabs=no
3756fi
3757rm -f conftest*
3758 echo "$ac_t""$use_builtin_fabs" 1>&6
3759 if test $use_builtin_fabs = "yes"; then
3760 cat >> confdefs.h <<\EOF
3761#define HAVE_BUILTIN_FABS 1
3762EOF
3763
3764 fi
3765 echo $ac_n "checking for __builtin_fabsf""... $ac_c" 1>&6
c470c17d 3766echo "configure:3767: checking for __builtin_fabsf" >&5
54fa7415 3767 cat > conftest.$ac_ext <<EOF
c470c17d 3768#line 3769 "configure"
54fa7415
SK
3769#include "confdefs.h"
3770#include <math.h>
3771int main() {
3772 __builtin_fabsf(0.0);
3773; return 0; }
3774EOF
c470c17d 3775if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3776 rm -rf conftest*
3777 use_builtin_fabsf=yes
3778else
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781 rm -rf conftest*
3782 use_builtin_fabsf=no
3783fi
3784rm -f conftest*
3785 echo "$ac_t""$use_builtin_fabsf" 1>&6
3786 if test $use_builtin_fabsf = "yes"; then
3787 cat >> confdefs.h <<\EOF
3788#define HAVE_BUILTIN_FABSF 1
3789EOF
3790
3791 fi
3792 echo $ac_n "checking for __builtin_fabsl""... $ac_c" 1>&6
c470c17d 3793echo "configure:3794: checking for __builtin_fabsl" >&5
54fa7415 3794 cat > conftest.$ac_ext <<EOF
c470c17d 3795#line 3796 "configure"
54fa7415
SK
3796#include "confdefs.h"
3797#include <math.h>
3798int main() {
3799 __builtin_fabsl(0.0);
3800; return 0; }
3801EOF
c470c17d 3802if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3803 rm -rf conftest*
3804 use_builtin_fabsl=yes
3805else
3806 echo "configure: failed program was:" >&5
3807 cat conftest.$ac_ext >&5
3808 rm -rf conftest*
3809 use_builtin_fabsl=no
3810fi
3811rm -f conftest*
3812 echo "$ac_t""$use_builtin_fabsl" 1>&6
3813 if test $use_builtin_fabsl = "yes"; then
3814 cat >> confdefs.h <<\EOF
3815#define HAVE_BUILTIN_FABSL 1
3816EOF
3817
3818 fi
3819 echo $ac_n "checking for __builtin_floor""... $ac_c" 1>&6
c470c17d 3820echo "configure:3821: checking for __builtin_floor" >&5
54fa7415 3821 cat > conftest.$ac_ext <<EOF
c470c17d 3822#line 3823 "configure"
54fa7415
SK
3823#include "confdefs.h"
3824#include <math.h>
3825int main() {
5ae55a2e 3826 __builtin_floor(0.0);
54fa7415
SK
3827; return 0; }
3828EOF
c470c17d 3829if { (eval echo configure:3830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3830 rm -rf conftest*
3831 use_builtin_floor=yes
3832else
3833 echo "configure: failed program was:" >&5
3834 cat conftest.$ac_ext >&5
3835 rm -rf conftest*
3836 use_builtin_floor=no
3837fi
3838rm -f conftest*
3839 echo "$ac_t""$use_builtin_floor" 1>&6
3840 if test $use_builtin_floor = "yes"; then
3841 cat >> confdefs.h <<\EOF
3842#define HAVE_BUILTIN_FLOOR 1
3843EOF
3844
3845 fi
3846 echo $ac_n "checking for __builtin_floorf""... $ac_c" 1>&6
c470c17d 3847echo "configure:3848: checking for __builtin_floorf" >&5
54fa7415 3848 cat > conftest.$ac_ext <<EOF
c470c17d 3849#line 3850 "configure"
54fa7415
SK
3850#include "confdefs.h"
3851#include <math.h>
3852int main() {
3853 __builtin_floorf(0.0);
3854; return 0; }
3855EOF
c470c17d 3856if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3857 rm -rf conftest*
3858 use_builtin_floorf=yes
3859else
3860 echo "configure: failed program was:" >&5
3861 cat conftest.$ac_ext >&5
3862 rm -rf conftest*
3863 use_builtin_floorf=no
3864fi
3865rm -f conftest*
3866 echo "$ac_t""$use_builtin_floorf" 1>&6
3867 if test $use_builtin_floorf = "yes"; then
3868 cat >> confdefs.h <<\EOF
3869#define HAVE_BUILTIN_FLOORF 1
3870EOF
3871
3872 fi
3873 echo $ac_n "checking for __builtin_floorl""... $ac_c" 1>&6
c470c17d 3874echo "configure:3875: checking for __builtin_floorl" >&5
54fa7415 3875 cat > conftest.$ac_ext <<EOF
c470c17d 3876#line 3877 "configure"
54fa7415
SK
3877#include "confdefs.h"
3878#include <math.h>
3879int main() {
3880 __builtin_floorl(0.0);
3881; return 0; }
3882EOF
c470c17d 3883if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3884 rm -rf conftest*
3885 use_builtin_floorl=yes
3886else
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889 rm -rf conftest*
3890 use_builtin_floorl=no
3891fi
3892rm -f conftest*
3893 echo "$ac_t""$use_builtin_floorl" 1>&6
3894 if test $use_builtin_floorl = "yes"; then
3895 cat >> confdefs.h <<\EOF
3896#define HAVE_BUILTIN_FLOORL 1
3897EOF
3898
3899 fi
5ae55a2e 3900 echo $ac_n "checking for __builtin_fmod""... $ac_c" 1>&6
c470c17d 3901echo "configure:3902: checking for __builtin_fmod" >&5
54fa7415 3902 cat > conftest.$ac_ext <<EOF
c470c17d 3903#line 3904 "configure"
54fa7415
SK
3904#include "confdefs.h"
3905#include <math.h>
3906int main() {
5ae55a2e 3907 __builtin_fmod(0.0, 0.0);
54fa7415
SK
3908; return 0; }
3909EOF
c470c17d 3910if { (eval echo configure:3911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ae55a2e
BK
3911 rm -rf conftest*
3912 use_builtin_fmod=yes
3913else
3914 echo "configure: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3916 rm -rf conftest*
3917 use_builtin_fmod=no
3918fi
3919rm -f conftest*
3920 echo "$ac_t""$use_builtin_fmod" 1>&6
3921 if test $use_builtin_fmod = "yes"; then
3922 cat >> confdefs.h <<\EOF
3923#define HAVE_BUILTIN_FMOD 1
3924EOF
3925
3926 fi
3927 echo $ac_n "checking for __builtin_fmodf""... $ac_c" 1>&6
c470c17d 3928echo "configure:3929: checking for __builtin_fmodf" >&5
5ae55a2e 3929 cat > conftest.$ac_ext <<EOF
c470c17d 3930#line 3931 "configure"
5ae55a2e
BK
3931#include "confdefs.h"
3932#include <math.h>
3933int main() {
3934 __builtin_fmodf(0.0, 0.0);
3935; return 0; }
3936EOF
c470c17d 3937if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ae55a2e
BK
3938 rm -rf conftest*
3939 use_builtin_fmodf=yes
3940else
3941 echo "configure: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 rm -rf conftest*
3944 use_builtin_fmodf=no
3945fi
3946rm -f conftest*
3947 echo "$ac_t""$use_builtin_fmodf" 1>&6
3948 if test $use_builtin_fmodf = "yes"; then
3949 cat >> confdefs.h <<\EOF
3950#define HAVE_BUILTIN_FMODF 1
3951EOF
3952
3953 fi
3954 echo $ac_n "checking for __builtin_fmodl""... $ac_c" 1>&6
c470c17d 3955echo "configure:3956: checking for __builtin_fmodl" >&5
5ae55a2e 3956 cat > conftest.$ac_ext <<EOF
c470c17d 3957#line 3958 "configure"
5ae55a2e
BK
3958#include "confdefs.h"
3959#include <math.h>
3960int main() {
3961 __builtin_fmodl(0.0, 0.0);
3962; return 0; }
3963EOF
c470c17d 3964if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ae55a2e
BK
3965 rm -rf conftest*
3966 use_builtin_fmodl=yes
3967else
3968 echo "configure: failed program was:" >&5
3969 cat conftest.$ac_ext >&5
3970 rm -rf conftest*
3971 use_builtin_fmodl=no
3972fi
3973rm -f conftest*
3974 echo "$ac_t""$use_builtin_fmodl" 1>&6
3975 if test $use_builtin_fmodl = "yes"; then
3976 cat >> confdefs.h <<\EOF
3977#define HAVE_BUILTIN_FMODL 1
3978EOF
3979
3980 fi
3981 echo $ac_n "checking for __builtin_frexp""... $ac_c" 1>&6
c470c17d 3982echo "configure:3983: checking for __builtin_frexp" >&5
5ae55a2e 3983 cat > conftest.$ac_ext <<EOF
c470c17d 3984#line 3985 "configure"
5ae55a2e
BK
3985#include "confdefs.h"
3986#include <math.h>
3987int main() {
3988 __builtin_frexp(0.0, 0);
3989; return 0; }
3990EOF
c470c17d 3991if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
3992 rm -rf conftest*
3993 use_builtin_frexp=yes
3994else
3995 echo "configure: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
3997 rm -rf conftest*
3998 use_builtin_frexp=no
3999fi
4000rm -f conftest*
4001 echo "$ac_t""$use_builtin_frexp" 1>&6
4002 if test $use_builtin_frexp = "yes"; then
4003 cat >> confdefs.h <<\EOF
4004#define HAVE_BUILTIN_FREXP 1
4005EOF
4006
4007 fi
4008 echo $ac_n "checking for __builtin_frexpf""... $ac_c" 1>&6
c470c17d 4009echo "configure:4010: checking for __builtin_frexpf" >&5
54fa7415 4010 cat > conftest.$ac_ext <<EOF
c470c17d 4011#line 4012 "configure"
54fa7415
SK
4012#include "confdefs.h"
4013#include <math.h>
4014int main() {
5ae55a2e 4015 __builtin_frexpf(0.0, 0);
54fa7415
SK
4016; return 0; }
4017EOF
c470c17d 4018if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4019 rm -rf conftest*
4020 use_builtin_frexpf=yes
4021else
4022 echo "configure: failed program was:" >&5
4023 cat conftest.$ac_ext >&5
4024 rm -rf conftest*
4025 use_builtin_frexpf=no
4026fi
4027rm -f conftest*
4028 echo "$ac_t""$use_builtin_frexpf" 1>&6
4029 if test $use_builtin_frexpf = "yes"; then
4030 cat >> confdefs.h <<\EOF
4031#define HAVE_BUILTIN_FREXPF 1
4032EOF
4033
4034 fi
4035 echo $ac_n "checking for __builtin_frexpl""... $ac_c" 1>&6
c470c17d 4036echo "configure:4037: checking for __builtin_frexpl" >&5
54fa7415 4037 cat > conftest.$ac_ext <<EOF
c470c17d 4038#line 4039 "configure"
54fa7415
SK
4039#include "confdefs.h"
4040#include <math.h>
4041int main() {
5ae55a2e 4042 __builtin_frexpl(0.0, 0);
54fa7415
SK
4043; return 0; }
4044EOF
c470c17d 4045if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4046 rm -rf conftest*
4047 use_builtin_frexpl=yes
4048else
4049 echo "configure: failed program was:" >&5
4050 cat conftest.$ac_ext >&5
4051 rm -rf conftest*
4052 use_builtin_frexpl=no
4053fi
4054rm -f conftest*
4055 echo "$ac_t""$use_builtin_frexpl" 1>&6
4056 if test $use_builtin_frexpl = "yes"; then
4057 cat >> confdefs.h <<\EOF
4058#define HAVE_BUILTIN_FREXPL 1
4059EOF
4060
4061 fi
4062 echo $ac_n "checking for __builtin_ldexp""... $ac_c" 1>&6
c470c17d 4063echo "configure:4064: checking for __builtin_ldexp" >&5
54fa7415 4064 cat > conftest.$ac_ext <<EOF
c470c17d 4065#line 4066 "configure"
54fa7415
SK
4066#include "confdefs.h"
4067#include <math.h>
4068int main() {
5ae55a2e 4069 __builtin_ldexp(0.0, 0);
54fa7415
SK
4070; return 0; }
4071EOF
c470c17d 4072if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4073 rm -rf conftest*
4074 use_builtin_ldexp=yes
4075else
4076 echo "configure: failed program was:" >&5
4077 cat conftest.$ac_ext >&5
4078 rm -rf conftest*
4079 use_builtin_ldexp=no
4080fi
4081rm -f conftest*
4082 echo "$ac_t""$use_builtin_ldexp" 1>&6
4083 if test $use_builtin_ldexp = "yes"; then
4084 cat >> confdefs.h <<\EOF
4085#define HAVE_BUILTIN_LDEXP 1
4086EOF
4087
4088 fi
4089 echo $ac_n "checking for __builtin_ldexpf""... $ac_c" 1>&6
c470c17d 4090echo "configure:4091: checking for __builtin_ldexpf" >&5
54fa7415 4091 cat > conftest.$ac_ext <<EOF
c470c17d 4092#line 4093 "configure"
54fa7415
SK
4093#include "confdefs.h"
4094#include <math.h>
4095int main() {
5ae55a2e 4096 __builtin_ldexpf(0.0, 0);
54fa7415
SK
4097; return 0; }
4098EOF
c470c17d 4099if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4100 rm -rf conftest*
4101 use_builtin_ldexpf=yes
4102else
4103 echo "configure: failed program was:" >&5
4104 cat conftest.$ac_ext >&5
4105 rm -rf conftest*
4106 use_builtin_ldexpf=no
4107fi
4108rm -f conftest*
4109 echo "$ac_t""$use_builtin_ldexpf" 1>&6
4110 if test $use_builtin_ldexpf = "yes"; then
4111 cat >> confdefs.h <<\EOF
4112#define HAVE_BUILTIN_LDEXPF 1
4113EOF
4114
4115 fi
4116 echo $ac_n "checking for __builtin_ldexpl""... $ac_c" 1>&6
c470c17d 4117echo "configure:4118: checking for __builtin_ldexpl" >&5
54fa7415 4118 cat > conftest.$ac_ext <<EOF
c470c17d 4119#line 4120 "configure"
54fa7415
SK
4120#include "confdefs.h"
4121#include <math.h>
4122int main() {
5ae55a2e 4123 __builtin_ldexpl(0.0, 0);
54fa7415
SK
4124; return 0; }
4125EOF
c470c17d 4126if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4127 rm -rf conftest*
4128 use_builtin_ldexpl=yes
4129else
4130 echo "configure: failed program was:" >&5
4131 cat conftest.$ac_ext >&5
4132 rm -rf conftest*
4133 use_builtin_ldexpl=no
4134fi
4135rm -f conftest*
4136 echo "$ac_t""$use_builtin_ldexpl" 1>&6
4137 if test $use_builtin_ldexpl = "yes"; then
4138 cat >> confdefs.h <<\EOF
4139#define HAVE_BUILTIN_LDEXPL 1
4140EOF
4141
4142 fi
4143 echo $ac_n "checking for __builtin_log""... $ac_c" 1>&6
c470c17d 4144echo "configure:4145: checking for __builtin_log" >&5
54fa7415 4145 cat > conftest.$ac_ext <<EOF
c470c17d 4146#line 4147 "configure"
54fa7415
SK
4147#include "confdefs.h"
4148#include <math.h>
4149int main() {
4150 __builtin_log(0.0);
4151; return 0; }
4152EOF
c470c17d 4153if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4154 rm -rf conftest*
4155 use_builtin_log=yes
4156else
4157 echo "configure: failed program was:" >&5
4158 cat conftest.$ac_ext >&5
4159 rm -rf conftest*
4160 use_builtin_log=no
4161fi
4162rm -f conftest*
4163 echo "$ac_t""$use_builtin_log" 1>&6
4164 if test $use_builtin_log = "yes"; then
4165 cat >> confdefs.h <<\EOF
4166#define HAVE_BUILTIN_LOG 1
4167EOF
4168
4169 fi
4170 echo $ac_n "checking for __builtin_logf""... $ac_c" 1>&6
c470c17d 4171echo "configure:4172: checking for __builtin_logf" >&5
54fa7415 4172 cat > conftest.$ac_ext <<EOF
c470c17d 4173#line 4174 "configure"
54fa7415
SK
4174#include "confdefs.h"
4175#include <math.h>
4176int main() {
4177 __builtin_logf(0.0);
4178; return 0; }
4179EOF
c470c17d 4180if { (eval echo configure:4181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4181 rm -rf conftest*
4182 use_builtin_logf=yes
4183else
4184 echo "configure: failed program was:" >&5
4185 cat conftest.$ac_ext >&5
4186 rm -rf conftest*
4187 use_builtin_logf=no
4188fi
4189rm -f conftest*
4190 echo "$ac_t""$use_builtin_logf" 1>&6
4191 if test $use_builtin_logf = "yes"; then
4192 cat >> confdefs.h <<\EOF
4193#define HAVE_BUILTIN_LOGF 1
4194EOF
4195
4196 fi
4197 echo $ac_n "checking for __builtin_logl""... $ac_c" 1>&6
c470c17d 4198echo "configure:4199: checking for __builtin_logl" >&5
54fa7415 4199 cat > conftest.$ac_ext <<EOF
c470c17d 4200#line 4201 "configure"
54fa7415
SK
4201#include "confdefs.h"
4202#include <math.h>
4203int main() {
4204 __builtin_logl(0.0);
4205; return 0; }
4206EOF
c470c17d 4207if { (eval echo configure:4208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4208 rm -rf conftest*
4209 use_builtin_logl=yes
4210else
4211 echo "configure: failed program was:" >&5
4212 cat conftest.$ac_ext >&5
4213 rm -rf conftest*
4214 use_builtin_logl=no
4215fi
4216rm -f conftest*
4217 echo "$ac_t""$use_builtin_logl" 1>&6
4218 if test $use_builtin_logl = "yes"; then
4219 cat >> confdefs.h <<\EOF
4220#define HAVE_BUILTIN_LOGL 1
4221EOF
4222
4223 fi
4224 echo $ac_n "checking for __builtin_log10""... $ac_c" 1>&6
c470c17d 4225echo "configure:4226: checking for __builtin_log10" >&5
54fa7415 4226 cat > conftest.$ac_ext <<EOF
c470c17d 4227#line 4228 "configure"
54fa7415
SK
4228#include "confdefs.h"
4229#include <math.h>
4230int main() {
4231 __builtin_log10(0.0);
4232; return 0; }
4233EOF
c470c17d 4234if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4235 rm -rf conftest*
4236 use_builtin_log10=yes
4237else
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 rm -rf conftest*
4241 use_builtin_log10=no
4242fi
4243rm -f conftest*
4244 echo "$ac_t""$use_builtin_log10" 1>&6
4245 if test $use_builtin_log10 = "yes"; then
4246 cat >> confdefs.h <<\EOF
4247#define HAVE_BUILTIN_LOG10 1
4248EOF
4249
4250 fi
4251 echo $ac_n "checking for __builtin_log10f""... $ac_c" 1>&6
c470c17d 4252echo "configure:4253: checking for __builtin_log10f" >&5
54fa7415 4253 cat > conftest.$ac_ext <<EOF
c470c17d 4254#line 4255 "configure"
54fa7415
SK
4255#include "confdefs.h"
4256#include <math.h>
4257int main() {
4258 __builtin_log10f(0.0);
4259; return 0; }
4260EOF
c470c17d 4261if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4262 rm -rf conftest*
4263 use_builtin_log10f=yes
4264else
4265 echo "configure: failed program was:" >&5
4266 cat conftest.$ac_ext >&5
4267 rm -rf conftest*
4268 use_builtin_log10f=no
4269fi
4270rm -f conftest*
4271 echo "$ac_t""$use_builtin_log10f" 1>&6
4272 if test $use_builtin_log10f = "yes"; then
4273 cat >> confdefs.h <<\EOF
4274#define HAVE_BUILTIN_LOG10F 1
4275EOF
4276
4277 fi
4278 echo $ac_n "checking for __builtin_log10l""... $ac_c" 1>&6
c470c17d 4279echo "configure:4280: checking for __builtin_log10l" >&5
54fa7415 4280 cat > conftest.$ac_ext <<EOF
c470c17d 4281#line 4282 "configure"
54fa7415
SK
4282#include "confdefs.h"
4283#include <math.h>
4284int main() {
4285 __builtin_log10l(0.0);
4286; return 0; }
4287EOF
c470c17d 4288if { (eval echo configure:4289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4289 rm -rf conftest*
4290 use_builtin_log10l=yes
4291else
4292 echo "configure: failed program was:" >&5
4293 cat conftest.$ac_ext >&5
4294 rm -rf conftest*
4295 use_builtin_log10l=no
4296fi
4297rm -f conftest*
4298 echo "$ac_t""$use_builtin_log10l" 1>&6
4299 if test $use_builtin_log10l = "yes"; then
4300 cat >> confdefs.h <<\EOF
4301#define HAVE_BUILTIN_LOG10L 1
4302EOF
4303
4304 fi
4305 echo $ac_n "checking for __builtin_modf""... $ac_c" 1>&6
c470c17d 4306echo "configure:4307: checking for __builtin_modf" >&5
54fa7415 4307 cat > conftest.$ac_ext <<EOF
c470c17d 4308#line 4309 "configure"
54fa7415
SK
4309#include "confdefs.h"
4310#include <math.h>
4311int main() {
5ae55a2e 4312 __builtin_modf(0.0, 0);
54fa7415
SK
4313; return 0; }
4314EOF
c470c17d 4315if { (eval echo configure:4316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4316 rm -rf conftest*
4317 use_builtin_modf=yes
4318else
4319 echo "configure: failed program was:" >&5
4320 cat conftest.$ac_ext >&5
4321 rm -rf conftest*
4322 use_builtin_modf=no
4323fi
4324rm -f conftest*
4325 echo "$ac_t""$use_builtin_modf" 1>&6
4326 if test $use_builtin_modf = "yes"; then
4327 cat >> confdefs.h <<\EOF
4328#define HAVE_BUILTIN_MODF 1
4329EOF
4330
4331 fi
4332 echo $ac_n "checking for __builtin_modff""... $ac_c" 1>&6
c470c17d 4333echo "configure:4334: checking for __builtin_modff" >&5
54fa7415 4334 cat > conftest.$ac_ext <<EOF
c470c17d 4335#line 4336 "configure"
54fa7415
SK
4336#include "confdefs.h"
4337#include <math.h>
4338int main() {
5ae55a2e 4339 __builtin_modff(0.0, 0);
54fa7415
SK
4340; return 0; }
4341EOF
c470c17d 4342if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4343 rm -rf conftest*
4344 use_builtin_modff=yes
4345else
4346 echo "configure: failed program was:" >&5
4347 cat conftest.$ac_ext >&5
4348 rm -rf conftest*
4349 use_builtin_modff=no
4350fi
4351rm -f conftest*
4352 echo "$ac_t""$use_builtin_modff" 1>&6
4353 if test $use_builtin_modff = "yes"; then
4354 cat >> confdefs.h <<\EOF
4355#define HAVE_BUILTIN_MODFF 1
4356EOF
4357
4358 fi
4359 echo $ac_n "checking for __builtin_modfl""... $ac_c" 1>&6
c470c17d 4360echo "configure:4361: checking for __builtin_modfl" >&5
54fa7415 4361 cat > conftest.$ac_ext <<EOF
c470c17d 4362#line 4363 "configure"
54fa7415
SK
4363#include "confdefs.h"
4364#include <math.h>
4365int main() {
5ae55a2e 4366 __builtin_modfl(0.0, 0);
54fa7415
SK
4367; return 0; }
4368EOF
c470c17d 4369if { (eval echo configure:4370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4370 rm -rf conftest*
4371 use_builtin_modfl=yes
4372else
4373 echo "configure: failed program was:" >&5
4374 cat conftest.$ac_ext >&5
4375 rm -rf conftest*
4376 use_builtin_modfl=no
4377fi
4378rm -f conftest*
4379 echo "$ac_t""$use_builtin_modfl" 1>&6
4380 if test $use_builtin_modfl = "yes"; then
4381 cat >> confdefs.h <<\EOF
4382#define HAVE_BUILTIN_MODFL 1
4383EOF
4384
4385 fi
4386 echo $ac_n "checking for __builtin_pow""... $ac_c" 1>&6
c470c17d 4387echo "configure:4388: checking for __builtin_pow" >&5
54fa7415 4388 cat > conftest.$ac_ext <<EOF
c470c17d 4389#line 4390 "configure"
54fa7415
SK
4390#include "confdefs.h"
4391#include <math.h>
4392int main() {
5ae55a2e 4393 __builtin_pow(0.0, 0.0);
54fa7415
SK
4394; return 0; }
4395EOF
c470c17d 4396if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4397 rm -rf conftest*
4398 use_builtin_pow=yes
4399else
4400 echo "configure: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
4402 rm -rf conftest*
4403 use_builtin_pow=no
4404fi
4405rm -f conftest*
4406 echo "$ac_t""$use_builtin_pow" 1>&6
4407 if test $use_builtin_pow = "yes"; then
4408 cat >> confdefs.h <<\EOF
4409#define HAVE_BUILTIN_POW 1
4410EOF
4411
4412 fi
4413 echo $ac_n "checking for __builtin_powf""... $ac_c" 1>&6
c470c17d 4414echo "configure:4415: checking for __builtin_powf" >&5
54fa7415 4415 cat > conftest.$ac_ext <<EOF
c470c17d 4416#line 4417 "configure"
54fa7415
SK
4417#include "confdefs.h"
4418#include <math.h>
4419int main() {
5ae55a2e 4420 __builtin_powf(0.0, 0.0);
54fa7415
SK
4421; return 0; }
4422EOF
c470c17d 4423if { (eval echo configure:4424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4424 rm -rf conftest*
4425 use_builtin_powf=yes
4426else
4427 echo "configure: failed program was:" >&5
4428 cat conftest.$ac_ext >&5
4429 rm -rf conftest*
4430 use_builtin_powf=no
4431fi
4432rm -f conftest*
4433 echo "$ac_t""$use_builtin_powf" 1>&6
4434 if test $use_builtin_powf = "yes"; then
4435 cat >> confdefs.h <<\EOF
4436#define HAVE_BUILTIN_POWF 1
4437EOF
4438
4439 fi
4440 echo $ac_n "checking for __builtin_powl""... $ac_c" 1>&6
c470c17d 4441echo "configure:4442: checking for __builtin_powl" >&5
54fa7415 4442 cat > conftest.$ac_ext <<EOF
c470c17d 4443#line 4444 "configure"
54fa7415
SK
4444#include "confdefs.h"
4445#include <math.h>
4446int main() {
5ae55a2e 4447 __builtin_powl(0.0, 0.0);
54fa7415
SK
4448; return 0; }
4449EOF
c470c17d 4450if { (eval echo configure:4451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4451 rm -rf conftest*
4452 use_builtin_powl=yes
4453else
4454 echo "configure: failed program was:" >&5
4455 cat conftest.$ac_ext >&5
4456 rm -rf conftest*
4457 use_builtin_powl=no
4458fi
4459rm -f conftest*
4460 echo "$ac_t""$use_builtin_powl" 1>&6
4461 if test $use_builtin_powl = "yes"; then
4462 cat >> confdefs.h <<\EOF
4463#define HAVE_BUILTIN_POWL 1
4464EOF
4465
4466 fi
4467 echo $ac_n "checking for __builtin_sin""... $ac_c" 1>&6
c470c17d 4468echo "configure:4469: checking for __builtin_sin" >&5
54fa7415 4469 cat > conftest.$ac_ext <<EOF
c470c17d 4470#line 4471 "configure"
54fa7415
SK
4471#include "confdefs.h"
4472#include <math.h>
4473int main() {
4474 __builtin_sin(0.0);
4475; return 0; }
4476EOF
c470c17d 4477if { (eval echo configure:4478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4478 rm -rf conftest*
4479 use_builtin_sin=yes
4480else
4481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
4484 use_builtin_sin=no
4485fi
4486rm -f conftest*
4487 echo "$ac_t""$use_builtin_sin" 1>&6
4488 if test $use_builtin_sin = "yes"; then
4489 cat >> confdefs.h <<\EOF
4490#define HAVE_BUILTIN_SIN 1
4491EOF
4492
4493 fi
4494 echo $ac_n "checking for __builtin_sinf""... $ac_c" 1>&6
c470c17d 4495echo "configure:4496: checking for __builtin_sinf" >&5
54fa7415 4496 cat > conftest.$ac_ext <<EOF
c470c17d 4497#line 4498 "configure"
54fa7415
SK
4498#include "confdefs.h"
4499#include <math.h>
4500int main() {
4501 __builtin_sinf(0.0);
4502; return 0; }
4503EOF
c470c17d 4504if { (eval echo configure:4505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4505 rm -rf conftest*
4506 use_builtin_sinf=yes
4507else
4508 echo "configure: failed program was:" >&5
4509 cat conftest.$ac_ext >&5
4510 rm -rf conftest*
4511 use_builtin_sinf=no
4512fi
4513rm -f conftest*
4514 echo "$ac_t""$use_builtin_sinf" 1>&6
4515 if test $use_builtin_sinf = "yes"; then
4516 cat >> confdefs.h <<\EOF
4517#define HAVE_BUILTIN_SINF 1
4518EOF
4519
4520 fi
4521 echo $ac_n "checking for __builtin_sinl""... $ac_c" 1>&6
c470c17d 4522echo "configure:4523: checking for __builtin_sinl" >&5
54fa7415 4523 cat > conftest.$ac_ext <<EOF
c470c17d 4524#line 4525 "configure"
54fa7415
SK
4525#include "confdefs.h"
4526#include <math.h>
4527int main() {
4528 __builtin_sinl(0.0);
4529; return 0; }
4530EOF
c470c17d 4531if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4532 rm -rf conftest*
4533 use_builtin_sinl=yes
4534else
4535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4537 rm -rf conftest*
4538 use_builtin_sinl=no
4539fi
4540rm -f conftest*
4541 echo "$ac_t""$use_builtin_sinl" 1>&6
4542 if test $use_builtin_sinl = "yes"; then
4543 cat >> confdefs.h <<\EOF
4544#define HAVE_BUILTIN_SINL 1
4545EOF
4546
4547 fi
4548 echo $ac_n "checking for __builtin_sinh""... $ac_c" 1>&6
c470c17d 4549echo "configure:4550: checking for __builtin_sinh" >&5
54fa7415 4550 cat > conftest.$ac_ext <<EOF
c470c17d 4551#line 4552 "configure"
54fa7415
SK
4552#include "confdefs.h"
4553#include <math.h>
4554int main() {
4555 __builtin_sinh(0.0);
4556; return 0; }
4557EOF
c470c17d 4558if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4559 rm -rf conftest*
4560 use_builtin_sinh=yes
4561else
4562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 rm -rf conftest*
4565 use_builtin_sinh=no
4566fi
4567rm -f conftest*
4568 echo "$ac_t""$use_builtin_sinh" 1>&6
4569 if test $use_builtin_sinh = "yes"; then
4570 cat >> confdefs.h <<\EOF
4571#define HAVE_BUILTIN_SINH 1
4572EOF
4573
4574 fi
4575 echo $ac_n "checking for __builtin_sinhf""... $ac_c" 1>&6
c470c17d 4576echo "configure:4577: checking for __builtin_sinhf" >&5
54fa7415 4577 cat > conftest.$ac_ext <<EOF
c470c17d 4578#line 4579 "configure"
54fa7415
SK
4579#include "confdefs.h"
4580#include <math.h>
4581int main() {
4582 __builtin_sinhf(0.0);
4583; return 0; }
4584EOF
c470c17d 4585if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4586 rm -rf conftest*
4587 use_builtin_sinhf=yes
4588else
4589 echo "configure: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 rm -rf conftest*
4592 use_builtin_sinhf=no
4593fi
4594rm -f conftest*
4595 echo "$ac_t""$use_builtin_sinhf" 1>&6
4596 if test $use_builtin_sinhf = "yes"; then
4597 cat >> confdefs.h <<\EOF
4598#define HAVE_BUILTIN_SINHF 1
4599EOF
4600
4601 fi
4602 echo $ac_n "checking for __builtin_sinhl""... $ac_c" 1>&6
c470c17d 4603echo "configure:4604: checking for __builtin_sinhl" >&5
54fa7415 4604 cat > conftest.$ac_ext <<EOF
c470c17d 4605#line 4606 "configure"
54fa7415
SK
4606#include "confdefs.h"
4607#include <math.h>
4608int main() {
4609 __builtin_sinhl(0.0);
4610; return 0; }
4611EOF
c470c17d 4612if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4613 rm -rf conftest*
4614 use_builtin_sinhl=yes
4615else
4616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618 rm -rf conftest*
4619 use_builtin_sinhl=no
4620fi
4621rm -f conftest*
4622 echo "$ac_t""$use_builtin_sinhl" 1>&6
4623 if test $use_builtin_sinhl = "yes"; then
4624 cat >> confdefs.h <<\EOF
4625#define HAVE_BUILTIN_SINHL 1
4626EOF
4627
4628 fi
4629 echo $ac_n "checking for __builtin_sqrt""... $ac_c" 1>&6
c470c17d 4630echo "configure:4631: checking for __builtin_sqrt" >&5
54fa7415 4631 cat > conftest.$ac_ext <<EOF
c470c17d 4632#line 4633 "configure"
54fa7415
SK
4633#include "confdefs.h"
4634#include <math.h>
4635int main() {
4636 __builtin_fsqrt(0.0);
4637; return 0; }
4638EOF
c470c17d 4639if { (eval echo configure:4640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4640 rm -rf conftest*
4641 use_builtin_sqrt=yes
4642else
4643 echo "configure: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
4645 rm -rf conftest*
4646 use_builtin_sqrt=no
4647fi
4648rm -f conftest*
4649 echo "$ac_t""$use_builtin_sqrt" 1>&6
4650 if test $use_builtin_sqrt = "yes"; then
4651 cat >> confdefs.h <<\EOF
4652#define HAVE_BUILTIN_SQRT 1
4653EOF
4654
4655 fi
4656 echo $ac_n "checking for __builtin_sqrtf""... $ac_c" 1>&6
c470c17d 4657echo "configure:4658: checking for __builtin_sqrtf" >&5
54fa7415 4658 cat > conftest.$ac_ext <<EOF
c470c17d 4659#line 4660 "configure"
54fa7415
SK
4660#include "confdefs.h"
4661#include <math.h>
4662int main() {
4663 __builtin_sqrtf(0.0);
4664; return 0; }
4665EOF
c470c17d 4666if { (eval echo configure:4667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4667 rm -rf conftest*
4668 use_builtin_sqrtf=yes
4669else
4670 echo "configure: failed program was:" >&5
4671 cat conftest.$ac_ext >&5
4672 rm -rf conftest*
4673 use_builtin_sqrtf=no
4674fi
4675rm -f conftest*
4676 echo "$ac_t""$use_builtin_sqrtf" 1>&6
4677 if test $use_builtin_sqrtf = "yes"; then
4678 cat >> confdefs.h <<\EOF
4679#define HAVE_BUILTIN_SQRTF 1
4680EOF
4681
4682 fi
4683 echo $ac_n "checking for __builtin_sqrtl""... $ac_c" 1>&6
c470c17d 4684echo "configure:4685: checking for __builtin_sqrtl" >&5
54fa7415 4685 cat > conftest.$ac_ext <<EOF
c470c17d 4686#line 4687 "configure"
54fa7415
SK
4687#include "confdefs.h"
4688#include <math.h>
4689int main() {
4690 __builtin_sqrtl(0.0);
4691; return 0; }
4692EOF
c470c17d 4693if { (eval echo configure:4694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4694 rm -rf conftest*
4695 use_builtin_sqrtl=yes
4696else
4697 echo "configure: failed program was:" >&5
4698 cat conftest.$ac_ext >&5
4699 rm -rf conftest*
4700 use_builtin_sqrtl=no
4701fi
4702rm -f conftest*
4703 echo "$ac_t""$use_builtin_sqrtl" 1>&6
4704 if test $use_builtin_sqrtl = "yes"; then
4705 cat >> confdefs.h <<\EOF
4706#define HAVE_BUILTIN_SQRTL 1
4707EOF
4708
4709 fi
4710 echo $ac_n "checking for __builtin_tan""... $ac_c" 1>&6
c470c17d 4711echo "configure:4712: checking for __builtin_tan" >&5
54fa7415 4712 cat > conftest.$ac_ext <<EOF
c470c17d 4713#line 4714 "configure"
54fa7415
SK
4714#include "confdefs.h"
4715#include <math.h>
4716int main() {
4717 __builtin_tan(0.0);
4718; return 0; }
4719EOF
c470c17d 4720if { (eval echo configure:4721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4721 rm -rf conftest*
4722 use_builtin_tan=yes
4723else
4724 echo "configure: failed program was:" >&5
4725 cat conftest.$ac_ext >&5
4726 rm -rf conftest*
4727 use_builtin_tan=no
4728fi
4729rm -f conftest*
4730 echo "$ac_t""$use_builtin_tan" 1>&6
4731 if test $use_builtin_tan = "yes"; then
4732 cat >> confdefs.h <<\EOF
4733#define HAVE_BUILTIN_TAN 1
4734EOF
4735
4736 fi
4737 echo $ac_n "checking for __builtin_tanf""... $ac_c" 1>&6
c470c17d 4738echo "configure:4739: checking for __builtin_tanf" >&5
54fa7415 4739 cat > conftest.$ac_ext <<EOF
c470c17d 4740#line 4741 "configure"
54fa7415
SK
4741#include "confdefs.h"
4742#include <math.h>
4743int main() {
4744 __builtin_tanf(0.0);
4745; return 0; }
4746EOF
c470c17d 4747if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4748 rm -rf conftest*
4749 use_builtin_tanf=yes
4750else
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
4754 use_builtin_tanf=no
4755fi
4756rm -f conftest*
4757 echo "$ac_t""$use_builtin_tanf" 1>&6
4758 if test $use_builtin_tanf = "yes"; then
4759 cat >> confdefs.h <<\EOF
4760#define HAVE_BUILTIN_TANF 1
4761EOF
4762
4763 fi
4764 echo $ac_n "checking for __builtin_tanl""... $ac_c" 1>&6
c470c17d 4765echo "configure:4766: checking for __builtin_tanl" >&5
54fa7415 4766 cat > conftest.$ac_ext <<EOF
c470c17d 4767#line 4768 "configure"
54fa7415
SK
4768#include "confdefs.h"
4769#include <math.h>
4770int main() {
4771 __builtin_tanl(0.0);
4772; return 0; }
4773EOF
c470c17d 4774if { (eval echo configure:4775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4775 rm -rf conftest*
4776 use_builtin_tanl=yes
4777else
4778 echo "configure: failed program was:" >&5
4779 cat conftest.$ac_ext >&5
4780 rm -rf conftest*
4781 use_builtin_tanl=no
4782fi
4783rm -f conftest*
4784 echo "$ac_t""$use_builtin_tanl" 1>&6
4785 if test $use_builtin_tanl = "yes"; then
4786 cat >> confdefs.h <<\EOF
4787#define HAVE_BUILTIN_TANL 1
4788EOF
4789
4790 fi
4791 echo $ac_n "checking for __builtin_tanh""... $ac_c" 1>&6
c470c17d 4792echo "configure:4793: checking for __builtin_tanh" >&5
54fa7415 4793 cat > conftest.$ac_ext <<EOF
c470c17d 4794#line 4795 "configure"
54fa7415
SK
4795#include "confdefs.h"
4796#include <math.h>
4797int main() {
4798 __builtin_tanh(0.0);
4799; return 0; }
4800EOF
c470c17d 4801if { (eval echo configure:4802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4802 rm -rf conftest*
4803 use_builtin_tanh=yes
4804else
4805 echo "configure: failed program was:" >&5
4806 cat conftest.$ac_ext >&5
4807 rm -rf conftest*
4808 use_builtin_tanh=no
4809fi
4810rm -f conftest*
4811 echo "$ac_t""$use_builtin_tanh" 1>&6
4812 if test $use_builtin_tanh = "yes"; then
4813 cat >> confdefs.h <<\EOF
4814#define HAVE_BUILTIN_TANH 1
4815EOF
4816
4817 fi
4818 echo $ac_n "checking for __builtin_tanhf""... $ac_c" 1>&6
c470c17d 4819echo "configure:4820: checking for __builtin_tanhf" >&5
54fa7415 4820 cat > conftest.$ac_ext <<EOF
c470c17d 4821#line 4822 "configure"
54fa7415
SK
4822#include "confdefs.h"
4823#include <math.h>
4824int main() {
4825 __builtin_tanhf(0.0);
4826; return 0; }
4827EOF
c470c17d 4828if { (eval echo configure:4829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4829 rm -rf conftest*
4830 use_builtin_tanhf=yes
4831else
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 rm -rf conftest*
4835 use_builtin_tanhf=no
4836fi
4837rm -f conftest*
4838 echo "$ac_t""$use_builtin_tanhf" 1>&6
4839 if test $use_builtin_tanhf = "yes"; then
4840 cat >> confdefs.h <<\EOF
4841#define HAVE_BUILTIN_TANHF 1
4842EOF
4843
4844 fi
4845 echo $ac_n "checking for __builtin_tanhl""... $ac_c" 1>&6
c470c17d 4846echo "configure:4847: checking for __builtin_tanhl" >&5
54fa7415 4847 cat > conftest.$ac_ext <<EOF
c470c17d 4848#line 4849 "configure"
54fa7415
SK
4849#include "confdefs.h"
4850#include <math.h>
4851int main() {
4852 __builtin_tanhl(0.0);
4853; return 0; }
4854EOF
c470c17d 4855if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
54fa7415
SK
4856 rm -rf conftest*
4857 use_builtin_tanhl=yes
4858else
4859 echo "configure: failed program was:" >&5
4860 cat conftest.$ac_ext >&5
4861 rm -rf conftest*
4862 use_builtin_tanhl=no
4863fi
4864rm -f conftest*
4865 echo "$ac_t""$use_builtin_tanhl" 1>&6
4866 if test $use_builtin_tanhl = "yes"; then
4867 cat >> confdefs.h <<\EOF
4868#define HAVE_BUILTIN_TANHL 1
4869EOF
4870
4871 fi
4872 ac_ext=c
4873# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4874ac_cpp='$CPP $CPPFLAGS'
4875ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4876ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4877cross_compiling=$ac_cv_prog_cc_cross
4878
4879
4880
4881 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
c470c17d 4882echo "configure:4883: checking for sin in -lm" >&5
54fa7415
SK
4883ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4884if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4885 echo $ac_n "(cached) $ac_c" 1>&6
4886else
4887 ac_save_LIBS="$LIBS"
4888LIBS="-lm $LIBS"
4889cat > conftest.$ac_ext <<EOF
c470c17d 4890#line 4891 "configure"
54fa7415
SK
4891#include "confdefs.h"
4892/* Override any gcc2 internal prototype to avoid an error. */
4893/* We use char because int might match the return type of a gcc2
4894 builtin and then its argument prototype would still apply. */
4895char sin();
4896
4897int main() {
4898sin()
4899; return 0; }
4900EOF
c470c17d 4901if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
54fa7415
SK
4902 rm -rf conftest*
4903 eval "ac_cv_lib_$ac_lib_var=yes"
4904else
4905 echo "configure: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
4907 rm -rf conftest*
4908 eval "ac_cv_lib_$ac_lib_var=no"
4909fi
4910rm -f conftest*
4911LIBS="$ac_save_LIBS"
4912
4913fi
4914if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4915 echo "$ac_t""yes" 1>&6
4916 libm="-lm"
4917else
4918 echo "$ac_t""no" 1>&6
4919fi
4920
4921 save_LIBS="$LIBS"
4922 LIBS="$LIBS $libm"
4923
4924 for ac_hdr in complex.h
4925do
4926ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4927echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c470c17d 4928echo "configure:4929: checking for $ac_hdr" >&5
54fa7415
SK
4929if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4930 echo $ac_n "(cached) $ac_c" 1>&6
4931else
4932 cat > conftest.$ac_ext <<EOF
c470c17d 4933#line 4934 "configure"
54fa7415
SK
4934#include "confdefs.h"
4935#include <$ac_hdr>
4936EOF
4937ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 4938{ (eval echo configure:4939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
54fa7415
SK
4939ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4940if test -z "$ac_err"; then
4941 rm -rf conftest*
4942 eval "ac_cv_header_$ac_safe=yes"
4943else
4944 echo "$ac_err" >&5
4945 echo "configure: failed program was:" >&5
4946 cat conftest.$ac_ext >&5
4947 rm -rf conftest*
4948 eval "ac_cv_header_$ac_safe=no"
4949fi
4950rm -f conftest*
4951fi
4952if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4953 echo "$ac_t""yes" 1>&6
4954 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4955 cat >> confdefs.h <<EOF
4956#define $ac_tr_hdr 1
4957EOF
4958
4959else
4960 echo "$ac_t""no" 1>&6
4961fi
4962done
4963
4964 for ac_func in ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
4965 clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
4966 ctan ctanf ctanh ctanhf \
4967 carg cargf nan hypot hypotf atan2f expf copysignf
4968do
4969echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 4970echo "configure:4971: checking for $ac_func" >&5
54fa7415
SK
4971if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4972 echo $ac_n "(cached) $ac_c" 1>&6
4973else
4974 cat > conftest.$ac_ext <<EOF
c470c17d 4975#line 4976 "configure"
54fa7415
SK
4976#include "confdefs.h"
4977/* System header to define __stub macros and hopefully few prototypes,
4978 which can conflict with char $ac_func(); below. */
4979#include <assert.h>
4980/* Override any gcc2 internal prototype to avoid an error. */
4981/* We use char because int might match the return type of a gcc2
4982 builtin and then its argument prototype would still apply. */
4983char $ac_func();
4984
4985int main() {
4986
4987/* The GNU C library defines this for functions which it implements
4988 to always fail with ENOSYS. Some functions are actually named
4989 something starting with __ and the normal name is an alias. */
4990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4991choke me
4992#else
4993$ac_func();
4994#endif
4995
4996; return 0; }
4997EOF
c470c17d 4998if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
54fa7415
SK
4999 rm -rf conftest*
5000 eval "ac_cv_func_$ac_func=yes"
5001else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5004 rm -rf conftest*
5005 eval "ac_cv_func_$ac_func=no"
5006fi
5007rm -f conftest*
5008fi
5009
5010if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5011 echo "$ac_t""yes" 1>&6
5012 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5013 cat >> confdefs.h <<EOF
5014#define $ac_tr_func 1
5015EOF
5016
5017else
5018 echo "$ac_t""no" 1>&6
5019LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
5020fi
5021done
5022
5023
5024
5025 USE_LONG_DOUBLE=no
5026 echo $ac_n "checking for copysignl""... $ac_c" 1>&6
c470c17d 5027echo "configure:5028: checking for copysignl" >&5
54fa7415
SK
5028if eval "test \"`echo '$''{'ac_cv_func_copysignl'+set}'`\" = set"; then
5029 echo $ac_n "(cached) $ac_c" 1>&6
5030else
5031 cat > conftest.$ac_ext <<EOF
c470c17d 5032#line 5033 "configure"
54fa7415
SK
5033#include "confdefs.h"
5034/* System header to define __stub macros and hopefully few prototypes,
5035 which can conflict with char copysignl(); below. */
5036#include <assert.h>
5037/* Override any gcc2 internal prototype to avoid an error. */
5038/* We use char because int might match the return type of a gcc2
5039 builtin and then its argument prototype would still apply. */
5040char copysignl();
5041
5042int main() {
5043
5044/* The GNU C library defines this for functions which it implements
5045 to always fail with ENOSYS. Some functions are actually named
5046 something starting with __ and the normal name is an alias. */
5047#if defined (__stub_copysignl) || defined (__stub___copysignl)
5048choke me
5049#else
5050copysignl();
5051#endif
5052
5053; return 0; }
5054EOF
c470c17d 5055if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
54fa7415
SK
5056 rm -rf conftest*
5057 eval "ac_cv_func_copysignl=yes"
5058else
5059 echo "configure: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5061 rm -rf conftest*
5062 eval "ac_cv_func_copysignl=no"
5063fi
5064rm -f conftest*
5065fi
5066
5067if eval "test \"`echo '$ac_cv_func_'copysignl`\" = yes"; then
5068 echo "$ac_t""yes" 1>&6
5069 USE_LONG_DOUBLE=yes
5070 for ac_func in ccoshl ccosl cexpl cpowl csinhl csinl \
5071 csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l
5072do
5073echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5074echo "configure:5075: checking for $ac_func" >&5
54fa7415
SK
5075if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5076 echo $ac_n "(cached) $ac_c" 1>&6
5077else
5078 cat > conftest.$ac_ext <<EOF
c470c17d 5079#line 5080 "configure"
54fa7415
SK
5080#include "confdefs.h"
5081/* System header to define __stub macros and hopefully few prototypes,
5082 which can conflict with char $ac_func(); below. */
5083#include <assert.h>
5084/* Override any gcc2 internal prototype to avoid an error. */
5085/* We use char because int might match the return type of a gcc2
5086 builtin and then its argument prototype would still apply. */
5087char $ac_func();
5088
5089int main() {
5090
5091/* The GNU C library defines this for functions which it implements
5092 to always fail with ENOSYS. Some functions are actually named
5093 something starting with __ and the normal name is an alias. */
5094#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5095choke me
5096#else
5097$ac_func();
5098#endif
5099
5100; return 0; }
5101EOF
c470c17d 5102if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
54fa7415
SK
5103 rm -rf conftest*
5104 eval "ac_cv_func_$ac_func=yes"
5105else
5106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5108 rm -rf conftest*
5109 eval "ac_cv_func_$ac_func=no"
5110fi
5111rm -f conftest*
5112fi
5113
5114if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5115 echo "$ac_t""yes" 1>&6
5116 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5117 cat >> confdefs.h <<EOF
5118#define $ac_tr_func 1
5119EOF
5120
5121else
5122 echo "$ac_t""no" 1>&6
5123LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
5124fi
5125done
5126
5127
5128else
5129 echo "$ac_t""no" 1>&6
5130fi
5131
5132
5133
6c820cf2
BC
5134 for ac_func in cosf fabsf sinf sqrtf
5135do
5136echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5137echo "configure:5138: checking for $ac_func" >&5
6c820cf2
BC
5138if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5139 echo $ac_n "(cached) $ac_c" 1>&6
5140else
5141 cat > conftest.$ac_ext <<EOF
c470c17d 5142#line 5143 "configure"
6c820cf2
BC
5143#include "confdefs.h"
5144/* System header to define __stub macros and hopefully few prototypes,
5145 which can conflict with char $ac_func(); below. */
5146#include <assert.h>
5147/* Override any gcc2 internal prototype to avoid an error. */
5148/* We use char because int might match the return type of a gcc2
5149 builtin and then its argument prototype would still apply. */
5150char $ac_func();
5151
5152int main() {
5153
5154/* The GNU C library defines this for functions which it implements
5155 to always fail with ENOSYS. Some functions are actually named
5156 something starting with __ and the normal name is an alias. */
5157#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5158choke me
5159#else
5160$ac_func();
5161#endif
5162
5163; return 0; }
5164EOF
c470c17d 5165if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6c820cf2
BC
5166 rm -rf conftest*
5167 eval "ac_cv_func_$ac_func=yes"
5168else
5169 echo "configure: failed program was:" >&5
5170 cat conftest.$ac_ext >&5
5171 rm -rf conftest*
5172 eval "ac_cv_func_$ac_func=no"
5173fi
5174rm -f conftest*
5175fi
5176
5177if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5178 echo "$ac_t""yes" 1>&6
5179 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5180 cat >> confdefs.h <<EOF
5181#define $ac_tr_func 1
5182EOF
5183
5184else
5185 echo "$ac_t""no" 1>&6
5186LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
5187fi
5188done
5189
5190
5191 for ac_func in isnan isnanf isnanl isinf isinff isinfl copysign copysignl \
5192 acosf acosl asinf asinl atanf atanl atan2f atan2l ceilf ceill cosl \
5ae55a2e
BK
5193 coshf coshl expf expl fabsl floorf floorl fmodf fmodl frexpf frexpl ldexpf \
5194 ldexpl logf logl log10f log10l modff modfl powf powl sinl sinhf \
6c820cf2 5195 sinhl sqrtl tanf tanl tanhf tanhl strtof strtold sincos sincosf \
54fa7415
SK
5196 sincosl finite finitef finitel fqfinite fpclass qfpclass
5197do
5198echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5199echo "configure:5200: checking for $ac_func" >&5
54fa7415
SK
5200if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5201 echo $ac_n "(cached) $ac_c" 1>&6
5202else
5203 cat > conftest.$ac_ext <<EOF
c470c17d 5204#line 5205 "configure"
54fa7415
SK
5205#include "confdefs.h"
5206/* System header to define __stub macros and hopefully few prototypes,
5207 which can conflict with char $ac_func(); below. */
5208#include <assert.h>
5209/* Override any gcc2 internal prototype to avoid an error. */
5210/* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
5212char $ac_func();
5213
5214int main() {
5215
5216/* The GNU C library defines this for functions which it implements
5217 to always fail with ENOSYS. Some functions are actually named
5218 something starting with __ and the normal name is an alias. */
5219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5220choke me
5221#else
5222$ac_func();
5223#endif
5224
5225; return 0; }
5226EOF
c470c17d 5227if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
54fa7415
SK
5228 rm -rf conftest*
5229 eval "ac_cv_func_$ac_func=yes"
5230else
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233 rm -rf conftest*
5234 eval "ac_cv_func_$ac_func=no"
b2dad0e3
BK
5235fi
5236rm -f conftest*
5237fi
5238
5239if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5240 echo "$ac_t""yes" 1>&6
5241 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5242 cat >> confdefs.h <<EOF
5243#define $ac_tr_func 1
5244EOF
5245
5246else
5247 echo "$ac_t""no" 1>&6
5248fi
5249done
5250
5251
5252#Some runtimes have these functions with a preceding underscore. Please
5253# keep this sync'd with the one above. And if you add any new symbol,
5254# please add the corresponding block in the @BOTTOM@ section of
5255# acconfig.h.
54fa7415
SK
5256
5257 for ac_func in _isnan _isnanf _isnanl _isinf _isinff _isinfl _copysign \
5258 _copysignl _acosf _acosl _asinf _asinl _atanf _atanl _atan2f _atan2l \
5259 _ceilf _ceill _cosf _cosl _coshf _coshl _expf _expl _fabsf _fabsl \
5ae55a2e
BK
5260 _floorf _floorl _fmodf _fmodl _frexpf _frexpl _ldexpf _ldexpl _logf _logl \
5261 _log10f _log10l _modff _modfl _powf _powl _sinf _sinl _sinhf _sinhl \
5262 _sqrtf _sqrtl _tanf _tanl _tanhf _tanhl _strtof _strtold _sincos _sincosf \
5263 _sincosl _finite _finitef _finitel _fqfinite _fpclass _qfpclass
b2dad0e3
BK
5264do
5265echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5266echo "configure:5267: checking for $ac_func" >&5
b2dad0e3
BK
5267if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5268 echo $ac_n "(cached) $ac_c" 1>&6
5269else
5270 cat > conftest.$ac_ext <<EOF
c470c17d 5271#line 5272 "configure"
b2dad0e3
BK
5272#include "confdefs.h"
5273/* System header to define __stub macros and hopefully few prototypes,
5274 which can conflict with char $ac_func(); below. */
5275#include <assert.h>
5276/* Override any gcc2 internal prototype to avoid an error. */
5277/* We use char because int might match the return type of a gcc2
5278 builtin and then its argument prototype would still apply. */
5279char $ac_func();
5280
5281int main() {
5282
5283/* The GNU C library defines this for functions which it implements
5284 to always fail with ENOSYS. Some functions are actually named
5285 something starting with __ and the normal name is an alias. */
5286#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5287choke me
5288#else
5289$ac_func();
5290#endif
5291
5292; return 0; }
5293EOF
c470c17d 5294if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
5295 rm -rf conftest*
5296 eval "ac_cv_func_$ac_func=yes"
5297else
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 rm -rf conftest*
5301 eval "ac_cv_func_$ac_func=no"
5302fi
5303rm -f conftest*
5304fi
5305
5306if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5307 echo "$ac_t""yes" 1>&6
5308 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5309 cat >> confdefs.h <<EOF
5310#define $ac_tr_func 1
5311EOF
5312
5313else
5314 echo "$ac_t""no" 1>&6
5315fi
5316done
5317
5318
5319LIBS="$save_LIBS"
5320
5321
3840fa2a
BK
5322
5323 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
b2dad0e3 5324echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
c470c17d 5325echo "configure:5326: checking for wchar.h" >&5
b2dad0e3
BK
5326if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5327 echo $ac_n "(cached) $ac_c" 1>&6
5328else
5329 cat > conftest.$ac_ext <<EOF
c470c17d 5330#line 5331 "configure"
b2dad0e3
BK
5331#include "confdefs.h"
5332#include <wchar.h>
5333EOF
5334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 5335{ (eval echo configure:5336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
5336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5337if test -z "$ac_err"; then
5338 rm -rf conftest*
5339 eval "ac_cv_header_$ac_safe=yes"
5340else
5341 echo "$ac_err" >&5
5342 echo "configure: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5344 rm -rf conftest*
5345 eval "ac_cv_header_$ac_safe=no"
5346fi
5347rm -f conftest*
5348fi
5349if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5350 echo "$ac_t""yes" 1>&6
3840fa2a
BK
5351 ac_has_wchar_h=yes
5352else
5353 echo "$ac_t""no" 1>&6
5354ac_has_wchar_h=no
5355fi
5356
5357 ac_safe=`echo "wctype.h" | sed 'y%./+-%__p_%'`
5358echo $ac_n "checking for wctype.h""... $ac_c" 1>&6
c470c17d 5359echo "configure:5360: checking for wctype.h" >&5
3840fa2a
BK
5360if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5361 echo $ac_n "(cached) $ac_c" 1>&6
5362else
b2dad0e3 5363 cat > conftest.$ac_ext <<EOF
c470c17d 5364#line 5365 "configure"
3840fa2a
BK
5365#include "confdefs.h"
5366#include <wctype.h>
5367EOF
5368ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 5369{ (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3840fa2a
BK
5370ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5371if test -z "$ac_err"; then
5372 rm -rf conftest*
5373 eval "ac_cv_header_$ac_safe=yes"
5374else
5375 echo "$ac_err" >&5
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 rm -rf conftest*
5379 eval "ac_cv_header_$ac_safe=no"
5380fi
5381rm -f conftest*
5382fi
5383if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5384 echo "$ac_t""yes" 1>&6
5385 ac_has_wctype_h=yes
5386else
5387 echo "$ac_t""no" 1>&6
5388ac_has_wctype_h=no
5389fi
5390
5391
5392 if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
5393
5394 echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
c470c17d 5395echo "configure:5396: checking for mbstate_t" >&5
3840fa2a 5396 cat > conftest.$ac_ext <<EOF
c470c17d 5397#line 5398 "configure"
b2dad0e3
BK
5398#include "confdefs.h"
5399#include <wchar.h>
5400int main() {
5401mbstate_t teststate;
5402; return 0; }
5403EOF
c470c17d 5404if { (eval echo configure:5405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5405 rm -rf conftest*
5406 use_native_mbstatet=yes
5407else
5408 echo "configure: failed program was:" >&5
5409 cat conftest.$ac_ext >&5
5410 rm -rf conftest*
5411 use_native_mbstatet=no
5412fi
5413rm -f conftest*
3840fa2a
BK
5414 echo "$ac_t""$use_native_mbstatet" 1>&6
5415 if test x"$use_native_mbstatet" = xno; then
5416 cat >> confdefs.h <<\EOF
b2dad0e3
BK
5417#define _GLIBCPP_NEED_MBSTATE_T 1
5418EOF
5419
3840fa2a 5420 fi
b2dad0e3 5421
3840fa2a 5422 echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
c470c17d 5423echo "configure:5424: checking for WCHAR_MIN and WCHAR_MAX" >&5
3840fa2a 5424 cat > conftest.$ac_ext <<EOF
c470c17d 5425#line 5426 "configure"
b2dad0e3
BK
5426#include "confdefs.h"
5427#include <wchar.h>
5428int main() {
5429int i = WCHAR_MIN; int j = WCHAR_MAX;
5430; return 0; }
5431EOF
c470c17d 5432if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5433 rm -rf conftest*
5434 has_wchar_minmax=yes
5435else
5436 echo "configure: failed program was:" >&5
5437 cat conftest.$ac_ext >&5
5438 rm -rf conftest*
5439 has_wchar_minmax=no
5440fi
5441rm -f conftest*
3840fa2a 5442 echo "$ac_t""$has_wchar_minmax" 1>&6
b2dad0e3 5443
3840fa2a 5444 echo $ac_n "checking for WEOF""... $ac_c" 1>&6
c470c17d 5445echo "configure:5446: checking for WEOF" >&5
3840fa2a 5446 cat > conftest.$ac_ext <<EOF
c470c17d 5447#line 5448 "configure"
b2dad0e3
BK
5448#include "confdefs.h"
5449
3840fa2a
BK
5450 #include <wchar.h>
5451 #include <stddef.h>
b2dad0e3
BK
5452int main() {
5453wint_t i = WEOF;
5454; return 0; }
5455EOF
c470c17d 5456if { (eval echo configure:5457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5457 rm -rf conftest*
5458 has_weof=yes
5459else
5460 echo "configure: failed program was:" >&5
5461 cat conftest.$ac_ext >&5
5462 rm -rf conftest*
5463 has_weof=no
5464fi
5465rm -f conftest*
3840fa2a 5466 echo "$ac_t""$has_weof" 1>&6
b2dad0e3 5467
3840fa2a 5468 for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
b2dad0e3
BK
5469do
5470echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5471echo "configure:5472: checking for $ac_func" >&5
b2dad0e3
BK
5472if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5473 echo $ac_n "(cached) $ac_c" 1>&6
5474else
5475 cat > conftest.$ac_ext <<EOF
c470c17d 5476#line 5477 "configure"
b2dad0e3
BK
5477#include "confdefs.h"
5478/* System header to define __stub macros and hopefully few prototypes,
5479 which can conflict with char $ac_func(); below. */
5480#include <assert.h>
5481/* Override any gcc2 internal prototype to avoid an error. */
5482/* We use char because int might match the return type of a gcc2
5483 builtin and then its argument prototype would still apply. */
5484char $ac_func();
5485
5486int main() {
5487
5488/* The GNU C library defines this for functions which it implements
5489 to always fail with ENOSYS. Some functions are actually named
5490 something starting with __ and the normal name is an alias. */
5491#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5492choke me
5493#else
5494$ac_func();
5495#endif
5496
5497; return 0; }
5498EOF
c470c17d 5499if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
5500 rm -rf conftest*
5501 eval "ac_cv_func_$ac_func=yes"
5502else
5503 echo "configure: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 rm -rf conftest*
5506 eval "ac_cv_func_$ac_func=no"
5507fi
5508rm -f conftest*
5509fi
5510
5511if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5512 echo "$ac_t""yes" 1>&6
5513 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5514 cat >> confdefs.h <<EOF
5515#define $ac_tr_func 1
5516EOF
3840fa2a 5517 ac_wfuncs=yes
b2dad0e3
BK
5518else
5519 echo "$ac_t""no" 1>&6
3840fa2a 5520ac_wfuncs=no
b2dad0e3
BK
5521fi
5522done
5523
5524
3840fa2a 5525 echo $ac_n "checking for ISO C9X wchar_t support""... $ac_c" 1>&6
c470c17d 5526echo "configure:5527: checking for ISO C9X wchar_t support" >&5
3840fa2a
BK
5527 if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes && test x"$ac_wfuncs" = xyes; then
5528 ac_isoC9X_wchar_t=yes
5529 else
5530 ac_isoC9X_wchar_t=no
5531 fi
5532 echo "$ac_t""$ac_isoC9X_wchar_t" 1>&6
b2dad0e3 5533
3840fa2a
BK
5534 ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
5535echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
c470c17d 5536echo "configure:5537: checking for iconv.h" >&5
3840fa2a
BK
5537if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5539else
5540 cat > conftest.$ac_ext <<EOF
c470c17d 5541#line 5542 "configure"
3840fa2a
BK
5542#include "confdefs.h"
5543#include <iconv.h>
b2dad0e3 5544EOF
3840fa2a 5545ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 5546{ (eval echo configure:5547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3840fa2a
BK
5547ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5548if test -z "$ac_err"; then
5549 rm -rf conftest*
5550 eval "ac_cv_header_$ac_safe=yes"
5551else
5552 echo "$ac_err" >&5
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 rm -rf conftest*
5556 eval "ac_cv_header_$ac_safe=no"
5557fi
5558rm -f conftest*
5559fi
5560if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5561 echo "$ac_t""yes" 1>&6
5562 ac_has_iconv_h=yes
b2dad0e3
BK
5563else
5564 echo "$ac_t""no" 1>&6
3840fa2a
BK
5565ac_has_iconv_h=no
5566fi
b2dad0e3 5567
3840fa2a
BK
5568 for ac_func in iconv_open iconv_close iconv
5569do
5570echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 5571echo "configure:5572: checking for $ac_func" >&5
3840fa2a
BK
5572if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5573 echo $ac_n "(cached) $ac_c" 1>&6
5574else
5575 cat > conftest.$ac_ext <<EOF
c470c17d 5576#line 5577 "configure"
3840fa2a
BK
5577#include "confdefs.h"
5578/* System header to define __stub macros and hopefully few prototypes,
5579 which can conflict with char $ac_func(); below. */
5580#include <assert.h>
5581/* Override any gcc2 internal prototype to avoid an error. */
5582/* We use char because int might match the return type of a gcc2
5583 builtin and then its argument prototype would still apply. */
5584char $ac_func();
5585
5586int main() {
5587
5588/* The GNU C library defines this for functions which it implements
5589 to always fail with ENOSYS. Some functions are actually named
5590 something starting with __ and the normal name is an alias. */
5591#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5592choke me
5593#else
5594$ac_func();
5595#endif
5596
5597; return 0; }
b2dad0e3 5598EOF
c470c17d 5599if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3840fa2a
BK
5600 rm -rf conftest*
5601 eval "ac_cv_func_$ac_func=yes"
5602else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
5606 eval "ac_cv_func_$ac_func=no"
5607fi
5608rm -f conftest*
5609fi
b2dad0e3 5610
3840fa2a
BK
5611if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5612 echo "$ac_t""yes" 1>&6
5613 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5614 cat >> confdefs.h <<EOF
5615#define $ac_tr_func 1
5616EOF
5617 ac_XPG2funcs=yes
5618else
5619 echo "$ac_t""no" 1>&6
5620ac_XPG2funcs=no
b2dad0e3 5621fi
3840fa2a
BK
5622done
5623
5624
5625 echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
c470c17d 5626echo "configure:5627: checking for XPG2 wchar_t support" >&5
3840fa2a
BK
5627 if test x"$ac_has_iconv_h" = xyes && test x"$ac_XPG2funcs" = xyes; then
5628 ac_XPG2_wchar_t=yes
5629 else
5630 ac_XPG2_wchar_t=no
5631 fi
5632 echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
5633
5634 echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
c470c17d 5635echo "configure:5636: checking for enabled wchar_t specializations" >&5
3840fa2a
BK
5636 if test x"$ac_isoC9X_wchar_t" = xyes && test x"$ac_XPG2_wchar_t" = xyes; then
5637 libinst_wstring_la="libinst-wstring.la"
5638 cat >> confdefs.h <<\EOF
5639#define _GLIBCPP_USE_WCHAR_T 1
5640EOF
5641
5642 echo "$ac_t"""yes"" 1>&6
5643 else
5644 libinst_wstring_la=""
5645 echo "$ac_t"""no"" 1>&6
5646 fi
5647
b2dad0e3 5648
3840fa2a
BK
5649 else
5650 echo "configure: warning: <wchar.h> not found" 1>&2
5651 cat >> confdefs.h <<\EOF
5652#define _GLIBCPP_NEED_MBSTATE_T 1
5653EOF
5654
5655 fi
b2dad0e3
BK
5656
5657
5658 ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
5659echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
c470c17d 5660echo "configure:5661: checking for ctype.h" >&5
b2dad0e3
BK
5661if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5662 echo $ac_n "(cached) $ac_c" 1>&6
5663else
5664 cat > conftest.$ac_ext <<EOF
c470c17d 5665#line 5666 "configure"
b2dad0e3
BK
5666#include "confdefs.h"
5667#include <ctype.h>
5668EOF
5669ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 5670{ (eval echo configure:5671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
5671ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5672if test -z "$ac_err"; then
5673 rm -rf conftest*
5674 eval "ac_cv_header_$ac_safe=yes"
5675else
5676 echo "$ac_err" >&5
5677 echo "configure: failed program was:" >&5
5678 cat conftest.$ac_ext >&5
5679 rm -rf conftest*
5680 eval "ac_cv_header_$ac_safe=no"
5681fi
5682rm -f conftest*
5683fi
5684if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5685 echo "$ac_t""yes" 1>&6
5686
5687
5688 ctype_default=yes
5689
8445e42a 5690 echo $ac_n "checking <ctype> for gnu-linux ""... $ac_c" 1>&6
c470c17d 5691echo "configure:5692: checking <ctype> for gnu-linux " >&5
b2dad0e3 5692 cat > conftest.$ac_ext <<EOF
c470c17d 5693#line 5694 "configure"
b2dad0e3
BK
5694#include "confdefs.h"
5695#include <ctype.h>
5696int main() {
5697int
5698 foo (int a)
5699 { return _ISspace + _ISprint + _IScntrl + _ISupper + _ISlower + _ISalpha \
5700 + _ISdigit + _ISpunct + _ISxdigit + _ISalnum + _ISgraph \
5701 + __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}
5702; return 0; }
5703EOF
c470c17d 5704if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5705 rm -rf conftest*
5706 \
5707 ctype_linux=yes
5708else
5709 echo "configure: failed program was:" >&5
5710 cat conftest.$ac_ext >&5
5711 rm -rf conftest*
5712 ctype_linux=no
5713fi
5714rm -f conftest*
5715 echo "$ac_t""$ctype_linux" 1>&6
5716 if test $ctype_linux = "yes"; then
5717 ctype_include_dir="config/gnu-linux"
5718 ctype_default=no
5719 fi
5720
65dd21b7
LR
5721 if test $ctype_default = "yes"; then
5722 echo $ac_n "checking <ctype> for freebsd 4.0 ""... $ac_c" 1>&6
c470c17d 5723echo "configure:5724: checking <ctype> for freebsd 4.0 " >&5
7b267e3e 5724 cat > conftest.$ac_ext <<EOF
c470c17d 5725#line 5726 "configure"
7b267e3e
BK
5726#include "confdefs.h"
5727#include <ctype.h>
5728int main() {
5729int
5730 foo (int a)
5731 { return _CTYPE_S + _CTYPE_R + _CTYPE_C + _CTYPE_U + _CTYPE_L + _CTYPE_A \
5732 + _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;}
5733; return 0; }
5734EOF
c470c17d 5735if { (eval echo configure:5736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7b267e3e
BK
5736 rm -rf conftest*
5737 \
5738 ctype_bsd=yes
5739else
5740 echo "configure: failed program was:" >&5
5741 cat conftest.$ac_ext >&5
5742 rm -rf conftest*
5743 ctype_bsd=no
5744fi
5745rm -f conftest*
5746 echo "$ac_t""$ctype_bsd" 1>&6
5747 if test $ctype_bsd = "yes"; then
5748 ctype_include_dir="config/bsd"
5749 ctype_default=no
65dd21b7 5750 fi
7b267e3e
BK
5751 fi
5752
65dd21b7
LR
5753 if test $ctype_default = "yes"; then
5754 echo $ac_n "checking <ctype> for freebsd 3.4 ""... $ac_c" 1>&6
c470c17d 5755echo "configure:5756: checking <ctype> for freebsd 3.4 " >&5
6ad50467 5756 cat > conftest.$ac_ext <<EOF
c470c17d 5757#line 5758 "configure"
6ad50467
BK
5758#include "confdefs.h"
5759#include <ctype.h>
5760int main() {
5761int
5762 foo (int a)
5763 { return _S + _R + _C + _U + _L + _A \
5764 + _D + _P + _X + _G + __istype (a, 0);}
5765; return 0; }
5766EOF
c470c17d 5767if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6ad50467
BK
5768 rm -rf conftest*
5769 \
5770 ctype_freebsd34=yes
5771else
5772 echo "configure: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 rm -rf conftest*
5775 ctype_freebsd34=no
5776fi
5777rm -f conftest*
5778 echo "$ac_t""$ctype_freebsd34" 1>&6
5779 if test $ctype_freebsd34 = "yes"; then
5780 ctype_include_dir="config/bsd"
5781 ctype_default=no
65dd21b7 5782 fi
6ad50467
BK
5783 fi
5784
b2dad0e3 5785 if test $ctype_default = "yes"; then
8445e42a 5786 echo $ac_n "checking <ctype> for solaris 2.6,7,8 ""... $ac_c" 1>&6
c470c17d 5787echo "configure:5788: checking <ctype> for solaris 2.6,7,8 " >&5
b2dad0e3 5788 cat > conftest.$ac_ext <<EOF
c470c17d 5789#line 5790 "configure"
b2dad0e3
BK
5790#include "confdefs.h"
5791#include <ctype.h>
5792int main() {
5793int
5794 foo (int a)
5795 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
5796 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
5797 + __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}
5798; return 0; }
5799EOF
c470c17d 5800if { (eval echo configure:5801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5801 rm -rf conftest*
5802 \
5803 ctype_solaris=yes
5804else
5805 echo "configure: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5807 rm -rf conftest*
5808 ctype_solaris=no
5809fi
5810rm -f conftest*
5811 echo "$ac_t""$ctype_solaris" 1>&6
5812
5813 if test $ctype_solaris = "yes"; then
5814 echo $ac_n "checking for version""... $ac_c" 1>&6
c470c17d 5815echo "configure:5816: checking for version" >&5
b2dad0e3
BK
5816 ac_ext=C
5817# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5818ac_cpp='$CXXCPP $CPPFLAGS'
5819ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5820ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5821cross_compiling=$ac_cv_prog_cxx_cross
5822
5823 cat > conftest.$ac_ext <<EOF
c470c17d 5824#line 5825 "configure"
b2dad0e3
BK
5825#include "confdefs.h"
5826#include <ctype.h>
5827int main() {
5828typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;
5829; return 0; }
5830EOF
c470c17d 5831if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5832 rm -rf conftest*
5833 \
5834 ctype_solaris26=yes
5835else
5836 echo "configure: failed program was:" >&5
5837 cat conftest.$ac_ext >&5
5838 rm -rf conftest*
5839 ctype_solaris26=no
5840fi
5841rm -f conftest*
5842 ac_ext=c
5843# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5844ac_cpp='$CPP $CPPFLAGS'
5845ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5846ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5847cross_compiling=$ac_cv_prog_cc_cross
5848
5849 if test $ctype_solaris26 = "yes"; then
5850 ctype_include_dir="config/solaris/solaris2.6"
5851 echo "$ac_t"""solaris2.6"" 1>&6
5852 ctype_default=no
5853 else
5854 ctype_include_dir="config/solaris/solaris2.7"
32a4595e 5855 echo "$ac_t"""solaris2.7,8"" 1>&6
b2dad0e3
BK
5856 ctype_default=no
5857 fi
5858 fi
5859 fi
5860
5861 if test $ctype_default = "yes"; then
8445e42a 5862 echo $ac_n "checking <ctype> for solaris 2.5.1 ""... $ac_c" 1>&6
c470c17d 5863echo "configure:5864: checking <ctype> for solaris 2.5.1 " >&5
b2dad0e3 5864 cat > conftest.$ac_ext <<EOF
c470c17d 5865#line 5866 "configure"
b2dad0e3
BK
5866#include "confdefs.h"
5867#include <ctype.h>
5868int main() {
5869int
5870 foo (int a)
5871 { return _U + _L + _N + _S + _P + _C + _X + _B \
5872 + __ctype[a];}
5873; return 0; }
5874EOF
c470c17d 5875if { (eval echo configure:5876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5876 rm -rf conftest*
5877 \
5878 ctype_solaris25=yes
5879else
5880 echo "configure: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 rm -rf conftest*
5883 ctype_solaris25=no
5884fi
5885rm -f conftest*
5886 echo "$ac_t""$ctype_solaris25" 1>&6
5887 if test $ctype_solaris25 = "yes"; then
5888 ctype_include_dir="config/solaris/solaris2.5"
5889 ctype_default=no
5890 fi
5891 fi
5892
5893 if test $ctype_default = "yes"; then
8445e42a 5894 echo $ac_n "checking <ctype> for aix ""... $ac_c" 1>&6
c470c17d 5895echo "configure:5896: checking <ctype> for aix " >&5
b2dad0e3 5896 cat > conftest.$ac_ext <<EOF
c470c17d 5897#line 5898 "configure"
b2dad0e3
BK
5898#include "confdefs.h"
5899#include <ctype.h>
5900int main() {
5901int
5902 foo (int a)
5903 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
5904 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
5905 + _VALC('a') + _IS('c', 0);}
5906; return 0; }
5907EOF
c470c17d 5908if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5909 rm -rf conftest*
5910 \
5911 ctype_aix=yes
5912else
5913 echo "configure: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 rm -rf conftest*
5916 ctype_aix=no
5917fi
5918rm -f conftest*
5919 echo "$ac_t""$ctype_aix" 1>&6
5920 if test $ctype_aix = "yes"; then
5921 ctype_include_dir="config/aix"
5922 ctype_default=no
5923 fi
5924 fi
5925
5926 if test $ctype_default = "yes"; then
8445e42a 5927 echo $ac_n "checking <ctype> for newlib ""... $ac_c" 1>&6
c470c17d 5928echo "configure:5929: checking <ctype> for newlib " >&5
b2dad0e3 5929 cat > conftest.$ac_ext <<EOF
c470c17d 5930#line 5931 "configure"
b2dad0e3
BK
5931#include "confdefs.h"
5932#include <ctype.h>
5933int main() {
5934int
5935 foo (int a)
5936 { return _U + _L + _N + _S + _P + _C + _X + _B \
5937 + _ctype_[a];}
5938; return 0; }
5939EOF
c470c17d 5940if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2dad0e3
BK
5941 rm -rf conftest*
5942 \
5943 ctype_newlib=yes
5944else
5945 echo "configure: failed program was:" >&5
5946 cat conftest.$ac_ext >&5
5947 rm -rf conftest*
5948 ctype_newlib=no
5949fi
5950rm -f conftest*
5951 echo "$ac_t""$ctype_newlib" 1>&6
5952 if test $ctype_newlib = "yes"; then
5953 ctype_include_dir="config/newlib"
5954 ctype_default=no
5955 fi
5956 fi
5957
5958 if test $ctype_default = "yes"; then
5959 ctype_include_dir="config/generic"
5960 echo "configure: warning: "Using default ctype headers."" 1>&2
5961 fi
5962
5963
5964else
5965 echo "$ac_t""no" 1>&6
5966fi
5967
5968
5969
5970 for ac_hdr in unistd.h
5971do
5972ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5973echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
c470c17d 5974echo "configure:5975: checking for $ac_hdr" >&5
b2dad0e3
BK
5975if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5976 echo $ac_n "(cached) $ac_c" 1>&6
5977else
5978 cat > conftest.$ac_ext <<EOF
c470c17d 5979#line 5980 "configure"
b2dad0e3
BK
5980#include "confdefs.h"
5981#include <$ac_hdr>
5982EOF
5983ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c470c17d 5984{ (eval echo configure:5985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2dad0e3
BK
5985ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5986if test -z "$ac_err"; then
5987 rm -rf conftest*
5988 eval "ac_cv_header_$ac_safe=yes"
5989else
5990 echo "$ac_err" >&5
5991 echo "configure: failed program was:" >&5
5992 cat conftest.$ac_ext >&5
5993 rm -rf conftest*
5994 eval "ac_cv_header_$ac_safe=no"
5995fi
5996rm -f conftest*
5997fi
5998if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5999 echo "$ac_t""yes" 1>&6
6000 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6001 cat >> confdefs.h <<EOF
6002#define $ac_tr_hdr 1
6003EOF
6004
6005else
6006 echo "$ac_t""no" 1>&6
6007fi
6008done
6009
6010for ac_func in getpagesize
6011do
6012echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
c470c17d 6013echo "configure:6014: checking for $ac_func" >&5
b2dad0e3
BK
6014if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6015 echo $ac_n "(cached) $ac_c" 1>&6
6016else
6017 cat > conftest.$ac_ext <<EOF
c470c17d 6018#line 6019 "configure"
b2dad0e3
BK
6019#include "confdefs.h"
6020/* System header to define __stub macros and hopefully few prototypes,
6021 which can conflict with char $ac_func(); below. */
6022#include <assert.h>
6023/* Override any gcc2 internal prototype to avoid an error. */
6024/* We use char because int might match the return type of a gcc2
6025 builtin and then its argument prototype would still apply. */
6026char $ac_func();
6027
6028int main() {
6029
6030/* The GNU C library defines this for functions which it implements
6031 to always fail with ENOSYS. Some functions are actually named
6032 something starting with __ and the normal name is an alias. */
6033#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6034choke me
6035#else
6036$ac_func();
6037#endif
6038
6039; return 0; }
6040EOF
c470c17d 6041if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
6042 rm -rf conftest*
6043 eval "ac_cv_func_$ac_func=yes"
6044else
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 eval "ac_cv_func_$ac_func=no"
6049fi
6050rm -f conftest*
6051fi
6052
6053if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6054 echo "$ac_t""yes" 1>&6
6055 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6056 cat >> confdefs.h <<EOF
6057#define $ac_tr_func 1
6058EOF
6059
6060else
6061 echo "$ac_t""no" 1>&6
6062fi
6063done
6064
6065echo $ac_n "checking for working mmap""... $ac_c" 1>&6
c470c17d 6066echo "configure:6067: checking for working mmap" >&5
b2dad0e3
BK
6067if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6068 echo $ac_n "(cached) $ac_c" 1>&6
6069else
6070 if test "$cross_compiling" = yes; then
6071 ac_cv_func_mmap_fixed_mapped=no
6072else
6073 cat > conftest.$ac_ext <<EOF
c470c17d 6074#line 6075 "configure"
b2dad0e3
BK
6075#include "confdefs.h"
6076
6077/* Thanks to Mike Haertel and Jim Avera for this test.
6078 Here is a matrix of mmap possibilities:
6079 mmap private not fixed
6080 mmap private fixed at somewhere currently unmapped
6081 mmap private fixed at somewhere already mapped
6082 mmap shared not fixed
6083 mmap shared fixed at somewhere currently unmapped
6084 mmap shared fixed at somewhere already mapped
6085 For private mappings, we should verify that changes cannot be read()
6086 back from the file, nor mmap's back from the file at a different
6087 address. (There have been systems where private was not correctly
6088 implemented like the infamous i386 svr4.0, and systems where the
6089 VM page cache was not coherent with the filesystem buffer cache
6090 like early versions of FreeBSD and possibly contemporary NetBSD.)
6091 For shared mappings, we should conversely verify that changes get
6092 propogated back to all the places they're supposed to be.
6093
6094 Grep wants private fixed already mapped.
6095 The main things grep needs to know about mmap are:
6096 * does it exist and is it safe to write into the mmap'd area
6097 * how to use it (BSD variants) */
6098#include <sys/types.h>
6099#include <fcntl.h>
6100#include <sys/mman.h>
6101
6102/* This mess was copied from the GNU getpagesize.h. */
6103#ifndef HAVE_GETPAGESIZE
6104# ifdef HAVE_UNISTD_H
6105# include <unistd.h>
6106# endif
6107
6108/* Assume that all systems that can run configure have sys/param.h. */
6109# ifndef HAVE_SYS_PARAM_H
6110# define HAVE_SYS_PARAM_H 1
6111# endif
6112
6113# ifdef _SC_PAGESIZE
6114# define getpagesize() sysconf(_SC_PAGESIZE)
6115# else /* no _SC_PAGESIZE */
6116# ifdef HAVE_SYS_PARAM_H
6117# include <sys/param.h>
6118# ifdef EXEC_PAGESIZE
6119# define getpagesize() EXEC_PAGESIZE
6120# else /* no EXEC_PAGESIZE */
6121# ifdef NBPG
6122# define getpagesize() NBPG * CLSIZE
6123# ifndef CLSIZE
6124# define CLSIZE 1
6125# endif /* no CLSIZE */
6126# else /* no NBPG */
6127# ifdef NBPC
6128# define getpagesize() NBPC
6129# else /* no NBPC */
6130# ifdef PAGESIZE
6131# define getpagesize() PAGESIZE
6132# endif /* PAGESIZE */
6133# endif /* no NBPC */
6134# endif /* no NBPG */
6135# endif /* no EXEC_PAGESIZE */
6136# else /* no HAVE_SYS_PARAM_H */
6137# define getpagesize() 8192 /* punt totally */
6138# endif /* no HAVE_SYS_PARAM_H */
6139# endif /* no _SC_PAGESIZE */
6140
6141#endif /* no HAVE_GETPAGESIZE */
6142
6143#ifdef __cplusplus
6144extern "C" { void *malloc(unsigned); }
6145#else
6146char *malloc();
6147#endif
6148
6149int
6150main()
6151{
6152 char *data, *data2, *data3;
6153 int i, pagesize;
6154 int fd;
6155
6156 pagesize = getpagesize();
6157
6158 /*
6159 * First, make a file with some known garbage in it.
6160 */
6161 data = malloc(pagesize);
6162 if (!data)
6163 exit(1);
6164 for (i = 0; i < pagesize; ++i)
6165 *(data + i) = rand();
6166 umask(0);
6167 fd = creat("conftestmmap", 0600);
6168 if (fd < 0)
6169 exit(1);
6170 if (write(fd, data, pagesize) != pagesize)
6171 exit(1);
6172 close(fd);
6173
6174 /*
6175 * Next, try to mmap the file at a fixed address which
6176 * already has something else allocated at it. If we can,
6177 * also make sure that we see the same garbage.
6178 */
6179 fd = open("conftestmmap", O_RDWR);
6180 if (fd < 0)
6181 exit(1);
6182 data2 = malloc(2 * pagesize);
6183 if (!data2)
6184 exit(1);
6185 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6186 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6187 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6188 exit(1);
6189 for (i = 0; i < pagesize; ++i)
6190 if (*(data + i) != *(data2 + i))
6191 exit(1);
6192
6193 /*
6194 * Finally, make sure that changes to the mapped area
6195 * do not percolate back to the file as seen by read().
6196 * (This is a bug on some variants of i386 svr4.0.)
6197 */
6198 for (i = 0; i < pagesize; ++i)
6199 *(data2 + i) = *(data2 + i) + 1;
6200 data3 = malloc(pagesize);
6201 if (!data3)
6202 exit(1);
6203 if (read(fd, data3, pagesize) != pagesize)
6204 exit(1);
6205 for (i = 0; i < pagesize; ++i)
6206 if (*(data + i) != *(data3 + i))
6207 exit(1);
6208 close(fd);
6209 unlink("conftestmmap");
6210 exit(0);
6211}
6212
6213EOF
c470c17d 6214if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
b2dad0e3
BK
6215then
6216 ac_cv_func_mmap_fixed_mapped=yes
6217else
6218 echo "configure: failed program was:" >&5
6219 cat conftest.$ac_ext >&5
6220 rm -fr conftest*
6221 ac_cv_func_mmap_fixed_mapped=no
6222fi
6223rm -fr conftest*
6224fi
6225
6226fi
6227
6228echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6229if test $ac_cv_func_mmap_fixed_mapped = yes; then
6230 cat >> confdefs.h <<\EOF
6231#define HAVE_MMAP 1
6232EOF
6233
6234fi
6235
6236fi
6237
6238
6239
6240if test "$CANADIAN" = yes; then
6241 CANADIAN_TRUE=
6242 CANADIAN_FALSE='#'
6243else
6244 CANADIAN_TRUE='#'
6245 CANADIAN_FALSE=
6246fi
6247
6248
6249if test "$NULL_TARGET" = yes; then
6250 NULL_TARGET_TRUE=
6251 NULL_TARGET_FALSE='#'
6252else
6253 NULL_TARGET_TRUE='#'
6254 NULL_TARGET_FALSE=
6255fi
6256
6257
6258if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
6259 NATIVE_TRUE=
6260 NATIVE_FALSE='#'
6261else
6262 NATIVE_TRUE='#'
6263 NATIVE_FALSE=
6264fi
6265
6266
6267if test -z "$with_cross_host"; then
6268 USE_LIBDIR_TRUE=
6269 USE_LIBDIR_FALSE='#'
6270else
6271 USE_LIBDIR_TRUE='#'
6272 USE_LIBDIR_FALSE=
6273fi
6274
6275if test $ac_cv_header_locale_h = yes; then
6276 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
c470c17d 6277echo "configure:6278: checking for LC_MESSAGES" >&5
b2dad0e3
BK
6278if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6279 echo $ac_n "(cached) $ac_c" 1>&6
6280else
6281 cat > conftest.$ac_ext <<EOF
c470c17d 6282#line 6283 "configure"
b2dad0e3
BK
6283#include "confdefs.h"
6284#include <locale.h>
6285int main() {
6286return LC_MESSAGES
6287; return 0; }
6288EOF
c470c17d 6289if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b2dad0e3
BK
6290 rm -rf conftest*
6291 ac_cv_val_LC_MESSAGES=yes
6292else
6293 echo "configure: failed program was:" >&5
6294 cat conftest.$ac_ext >&5
6295 rm -rf conftest*
6296 ac_cv_val_LC_MESSAGES=no
6297fi
6298rm -f conftest*
6299fi
6300
6301echo "$ac_t""$ac_cv_val_LC_MESSAGES" 1>&6
6302 if test $ac_cv_val_LC_MESSAGES = yes; then
6303 cat >> confdefs.h <<\EOF
6304#define HAVE_LC_MESSAGES 1
6305EOF
6306
6307 fi
6308 fi
6309
6310
6311# Sanity checking & User-visible messages.
6312# Checks down here, otherwise they get scrolled off before
6313# the user will notice.
6314if test "$enable_namespaces" = "yes" && test "$enable_libgcc_rebuild" = "no"
6315then
6316 echo "configure: warning: libgcc.a will not match mangled symbols unless it is rebuilt" 1>&2
6317fi
6318if test "$enable_namespaces" = "no" && test "$enable_libgcc_rebuild" != "no"
6319then
6320 # Other things besides namespaces can make this true as well, but none
6321 # of them are done automatically... yet
6322 echo "configure: warning: no point in rebuilding libgcc.a if namespaces aren't used" 1>&2
6323fi
6324
6325
6326if test "${multilib}" = "yes"; then
6327 multilib_arg="--enable-multilib"
6328else
6329 multilib_arg=
6330fi
6331
6332
6333# Generate the various Makefiles, include files, and scripts.
6334
6335# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
6336# so that multilib installs will end up installed in the correct
6337# place. To work around this not being passed down from config-ml.in
6338# -> top_srcdir/Makefile.am -> top_srcdir/src/Makefile.am, manually
6339# append it here.
6340
6341trap '' 1 2 15
6342cat > confcache <<\EOF
6343# This file is a shell script that caches the results of configure
6344# tests run on this system so they can be shared between configure
6345# scripts and configure runs. It is not useful on other systems.
6346# If it contains results you don't want to keep, you may remove or edit it.
6347#
6348# By default, configure uses ./config.cache as the cache file,
6349# creating it if it does not exist already. You can give configure
6350# the --cache-file=FILE option to use a different cache file; that is
6351# what configure does when it calls configure scripts in
6352# subdirectories, so they share the cache.
6353# Giving --cache-file=/dev/null disables caching, for debugging configure.
6354# config.status only pays attention to the cache file if you give it the
6355# --recheck option to rerun configure.
6356#
6357EOF
6358# The following way of writing the cache mishandles newlines in values,
6359# but we know of no workaround that is simple, portable, and efficient.
6360# So, don't put newlines in cache variables' values.
6361# Ultrix sh set writes to stderr and can't be redirected directly,
6362# and sets the high bit in the cache file unless we assign to the vars.
6363(set) 2>&1 |
6364 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6365 *ac_space=\ *)
6366 # `set' does not quote correctly, so add quotes (double-quote substitution
6367 # turns \\\\ into \\, and sed turns \\ into \).
6368 sed -n \
6369 -e "s/'/'\\\\''/g" \
6370 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6371 ;;
6372 *)
6373 # `set' quotes correctly as required by POSIX, so do not add quotes.
6374 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6375 ;;
6376 esac >> confcache
6377if cmp -s $cache_file confcache; then
6378 :
6379else
6380 if test -w $cache_file; then
6381 echo "updating cache $cache_file"
6382 cat confcache > $cache_file
6383 else
6384 echo "not updating unwritable cache $cache_file"
6385 fi
6386fi
6387rm -f confcache
6388
6389trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6390
6391test "x$prefix" = xNONE && prefix=$ac_default_prefix
6392# Let make expand exec_prefix.
6393test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6394
6395# Any assignment to VPATH causes Sun make to only execute
6396# the first set of double-colon rules, so remove it if not needed.
6397# If there is a colon in the path, we need to keep it.
6398if test "x$srcdir" = x.; then
6399 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6400fi
6401
6402trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6403
6404DEFS=-DHAVE_CONFIG_H
6405
6406# Without the "./", some shells look in PATH for config.status.
6407: ${CONFIG_STATUS=./config.status}
6408
6409echo creating $CONFIG_STATUS
6410rm -f $CONFIG_STATUS
6411cat > $CONFIG_STATUS <<EOF
6412#! /bin/sh
6413# Generated automatically by configure.
6414# Run this file to recreate the current configuration.
6415# This directory was configured as follows,
6416# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6417#
6418# $0 $ac_configure_args
6419#
6420# Compiler output produced by configure, useful for debugging
6421# configure, is in ./config.log if it exists.
6422
6423ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6424for ac_option
6425do
6426 case "\$ac_option" in
6427 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6428 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6429 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6430 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6431 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6432 exit 0 ;;
6433 -help | --help | --hel | --he | --h)
6434 echo "\$ac_cs_usage"; exit 0 ;;
6435 *) echo "\$ac_cs_usage"; exit 1 ;;
6436 esac
6437done
6438
6439ac_given_srcdir=$srcdir
6440ac_given_INSTALL="$INSTALL"
6441
6442trap 'rm -fr `echo "mkcheck Makefile src/Makefile math/Makefile libio/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6443EOF
6444cat >> $CONFIG_STATUS <<EOF
6445
6446# Protect against being on the right side of a sed subst in config.status.
6447sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6448 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6449$ac_vpsub
6450$extrasub
6451s%@SHELL@%$SHELL%g
6452s%@CFLAGS@%$CFLAGS%g
6453s%@CPPFLAGS@%$CPPFLAGS%g
6454s%@CXXFLAGS@%$CXXFLAGS%g
6455s%@FFLAGS@%$FFLAGS%g
6456s%@DEFS@%$DEFS%g
6457s%@LDFLAGS@%$LDFLAGS%g
6458s%@LIBS@%$LIBS%g
6459s%@exec_prefix@%$exec_prefix%g
6460s%@prefix@%$prefix%g
6461s%@program_transform_name@%$program_transform_name%g
6462s%@bindir@%$bindir%g
6463s%@sbindir@%$sbindir%g
6464s%@libexecdir@%$libexecdir%g
6465s%@datadir@%$datadir%g
6466s%@sysconfdir@%$sysconfdir%g
6467s%@sharedstatedir@%$sharedstatedir%g
6468s%@localstatedir@%$localstatedir%g
6469s%@libdir@%$libdir%g
6470s%@includedir@%$includedir%g
6471s%@oldincludedir@%$oldincludedir%g
6472s%@infodir@%$infodir%g
6473s%@mandir@%$mandir%g
6474s%@host@%$host%g
6475s%@host_alias@%$host_alias%g
6476s%@host_cpu@%$host_cpu%g
6477s%@host_vendor@%$host_vendor%g
6478s%@host_os@%$host_os%g
6479s%@target@%$target%g
6480s%@target_alias@%$target_alias%g
6481s%@target_cpu@%$target_cpu%g
6482s%@target_vendor@%$target_vendor%g
6483s%@target_os@%$target_os%g
6484s%@build@%$build%g
6485s%@build_alias@%$build_alias%g
6486s%@build_cpu@%$build_cpu%g
6487s%@build_vendor@%$build_vendor%g
6488s%@build_os@%$build_os%g
6489s%@glibcpp_basedir@%$glibcpp_basedir%g
6490s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6491s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6492s%@INSTALL_DATA@%$INSTALL_DATA%g
6493s%@PACKAGE@%$PACKAGE%g
6494s%@VERSION@%$VERSION%g
6495s%@ACLOCAL@%$ACLOCAL%g
6496s%@AUTOCONF@%$AUTOCONF%g
6497s%@AUTOMAKE@%$AUTOMAKE%g
6498s%@AUTOHEADER@%$AUTOHEADER%g
6499s%@MAKEINFO@%$MAKEINFO%g
6500s%@SET_MAKE@%$SET_MAKE%g
6501s%@CC@%$CC%g
6502s%@CXX@%$CXX%g
6503s%@AS@%$AS%g
6504s%@AR@%$AR%g
6505s%@RANLIB@%$RANLIB%g
6506s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6507s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6508s%@MAINT@%$MAINT%g
6509s%@EXEEXT@%$EXEEXT%g
6510s%@GLIBCPP_CFLAGS@%$GLIBCPP_CFLAGS%g
6511s%@GLIBCPP_CXXFLAGS@%$GLIBCPP_CXXFLAGS%g
6512s%@LN_S@%$LN_S%g
6513s%@LIBTOOL@%$LIBTOOL%g
a4e99046 6514s%@CPP@%$CPP%g
c470c17d
BK
6515s%@cpu_include_dir@%$cpu_include_dir%g
6516s%@CPU_FLAGS@%$CPU_FLAGS%g
6517s%@DEBUG_FLAGS@%$DEBUG_FLAGS%g
b2dad0e3 6518s%@BUILD_LIBIO_INCLUDE@%$BUILD_LIBIO_INCLUDE%g
f3b004d8
BK
6519s%@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE%g
6520s%@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@%$GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE%g
b2dad0e3
BK
6521s%@CSTDIO_H@%$CSTDIO_H%g
6522s%@CSTDIO_CC@%$CSTDIO_CC%g
6523s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g
6524s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g
5b80666b
BK
6525s%@CSHADOWFLAGS@%$CSHADOWFLAGS%g
6526s%@CSHADOW_INCLUDES@%$CSHADOW_INCLUDES%g
6527s%@GLIBCPP_USE_CSHADOW_TRUE@%$GLIBCPP_USE_CSHADOW_TRUE%g
6528s%@GLIBCPP_USE_CSHADOW_FALSE@%$GLIBCPP_USE_CSHADOW_FALSE%g
b2dad0e3
BK
6529s%@THREADLIBS@%$THREADLIBS%g
6530s%@THREADINCS@%$THREADINCS%g
6531s%@THREADDEPS@%$THREADDEPS%g
6532s%@THREADOBJS@%$THREADOBJS%g
6533s%@THREADSPEC@%$THREADSPEC%g
dcfa0bc8 6534s%@EXTRA_CXX_FLAGS@%$EXTRA_CXX_FLAGS%g
b2dad0e3 6535s%@ctype_include_dir@%$ctype_include_dir%g
c470c17d
BK
6536s%@WERROR@%$WERROR%g
6537s%@WFMT_FLAGS@%$WFMT_FLAGS%g
6538s%@SECTION_FLAGS@%$SECTION_FLAGS%g
6539s%@SECTION_LDFLAGS@%$SECTION_LDFLAGS%g
b2dad0e3
BK
6540s%@LIBMATHOBJS@%$LIBMATHOBJS%g
6541s%@USE_LONG_DOUBLE@%$USE_LONG_DOUBLE%g
5d89258a 6542s%@libinst_wstring_la@%$libinst_wstring_la%g
b2dad0e3
BK
6543s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
6544s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
6545s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
6546s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
6547s%@NATIVE_TRUE@%$NATIVE_TRUE%g
6548s%@NATIVE_FALSE@%$NATIVE_FALSE%g
6549s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
6550s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
6551
6552CEOF
6553EOF
6554
6555cat >> $CONFIG_STATUS <<\EOF
6556
6557# Split the substitutions into bite-sized pieces for seds with
6558# small command number limits, like on Digital OSF/1 and HP-UX.
6559ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6560ac_file=1 # Number of current file.
6561ac_beg=1 # First line for current file.
6562ac_end=$ac_max_sed_cmds # Line after last line for current file.
6563ac_more_lines=:
6564ac_sed_cmds=""
6565while $ac_more_lines; do
6566 if test $ac_beg -gt 1; then
6567 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6568 else
6569 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6570 fi
6571 if test ! -s conftest.s$ac_file; then
6572 ac_more_lines=false
6573 rm -f conftest.s$ac_file
6574 else
6575 if test -z "$ac_sed_cmds"; then
6576 ac_sed_cmds="sed -f conftest.s$ac_file"
6577 else
6578 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6579 fi
6580 ac_file=`expr $ac_file + 1`
6581 ac_beg=$ac_end
6582 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6583 fi
6584done
6585if test -z "$ac_sed_cmds"; then
6586 ac_sed_cmds=cat
6587fi
6588EOF
6589
6590cat >> $CONFIG_STATUS <<EOF
6591
6592CONFIG_FILES=\${CONFIG_FILES-"mkcheck Makefile src/Makefile math/Makefile libio/Makefile"}
6593EOF
6594cat >> $CONFIG_STATUS <<\EOF
6595for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6596 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6597 case "$ac_file" in
6598 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6599 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6600 *) ac_file_in="${ac_file}.in" ;;
6601 esac
6602
6603 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6604
6605 # Remove last slash and all that follows it. Not all systems have dirname.
6606 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6607 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6608 # The file is in a subdirectory.
6609 test ! -d "$ac_dir" && mkdir "$ac_dir"
6610 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6611 # A "../" for each directory in $ac_dir_suffix.
6612 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6613 else
6614 ac_dir_suffix= ac_dots=
6615 fi
6616
6617 case "$ac_given_srcdir" in
6618 .) srcdir=.
6619 if test -z "$ac_dots"; then top_srcdir=.
6620 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6621 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6622 *) # Relative path.
6623 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6624 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6625 esac
6626
6627 case "$ac_given_INSTALL" in
6628 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6629 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6630 esac
6631
6632 echo creating "$ac_file"
6633 rm -f "$ac_file"
6634 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6635 case "$ac_file" in
6636 *Makefile*) ac_comsub="1i\\
6637# $configure_input" ;;
6638 *) ac_comsub= ;;
6639 esac
6640
6641 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6642 sed -e "$ac_comsub
6643s%@configure_input@%$configure_input%g
6644s%@srcdir@%$srcdir%g
6645s%@top_srcdir@%$top_srcdir%g
6646s%@INSTALL@%$INSTALL%g
6647" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6648fi; done
6649rm -f conftest.s*
6650
6651# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6652# NAME is the cpp macro being defined and VALUE is the value it is being given.
6653#
6654# ac_d sets the value in "#define NAME VALUE" lines.
6655ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6656ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6657ac_dC='\3'
6658ac_dD='%g'
6659# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6660ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6661ac_uB='\([ ]\)%\1#\2define\3'
6662ac_uC=' '
6663ac_uD='\4%g'
6664# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6665ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6666ac_eB='$%\1#\2define\3'
6667ac_eC=' '
6668ac_eD='%g'
6669
6670if test "${CONFIG_HEADERS+set}" != set; then
6671EOF
6672cat >> $CONFIG_STATUS <<EOF
6673 CONFIG_HEADERS="config.h"
6674EOF
6675cat >> $CONFIG_STATUS <<\EOF
6676fi
6677for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6678 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6679 case "$ac_file" in
6680 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6681 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6682 *) ac_file_in="${ac_file}.in" ;;
6683 esac
6684
6685 echo creating $ac_file
6686
6687 rm -f conftest.frag conftest.in conftest.out
6688 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6689 cat $ac_file_inputs > conftest.in
6690
6691EOF
6692
6693# Transform confdefs.h into a sed script conftest.vals that substitutes
6694# the proper values into config.h.in to produce config.h. And first:
6695# Protect against being on the right side of a sed subst in config.status.
6696# Protect against being in an unquoted here document in config.status.
6697rm -f conftest.vals
6698cat > conftest.hdr <<\EOF
6699s/[\\&%]/\\&/g
6700s%[\\$`]%\\&%g
6701s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6702s%ac_d%ac_u%gp
6703s%ac_u%ac_e%gp
6704EOF
6705sed -n -f conftest.hdr confdefs.h > conftest.vals
6706rm -f conftest.hdr
6707
6708# This sed command replaces #undef with comments. This is necessary, for
6709# example, in the case of _POSIX_SOURCE, which is predefined and required
6710# on some systems where configure will not decide to define it.
6711cat >> conftest.vals <<\EOF
6712s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6713EOF
6714
6715# Break up conftest.vals because some shells have a limit on
6716# the size of here documents, and old seds have small limits too.
6717
6718rm -f conftest.tail
6719while :
6720do
6721 ac_lines=`grep -c . conftest.vals`
6722 # grep -c gives empty output for an empty file on some AIX systems.
6723 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6724 # Write a limited-size here document to conftest.frag.
6725 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6726 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6727 echo 'CEOF
6728 sed -f conftest.frag conftest.in > conftest.out
6729 rm -f conftest.in
6730 mv conftest.out conftest.in
6731' >> $CONFIG_STATUS
6732 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6733 rm -f conftest.vals
6734 mv conftest.tail conftest.vals
6735done
6736rm -f conftest.vals
6737
6738cat >> $CONFIG_STATUS <<\EOF
6739 rm -f conftest.frag conftest.h
6740 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6741 cat conftest.in >> conftest.h
6742 rm -f conftest.in
6743 if cmp -s $ac_file conftest.h 2>/dev/null; then
6744 echo "$ac_file is unchanged"
6745 rm -f conftest.h
6746 else
6747 # Remove last slash and all that follows it. Not all systems have dirname.
6748 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6749 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6750 # The file is in a subdirectory.
6751 test ! -d "$ac_dir" && mkdir "$ac_dir"
6752 fi
6753 rm -f $ac_file
6754 mv conftest.h $ac_file
6755 fi
6756fi; done
6757
6758EOF
6759cat >> $CONFIG_STATUS <<EOF
6760
6761srcdir=${srcdir}
6762host=${host}
6763target=${target}
6764with_multisubdir=${with_multisubdir}
6765ac_configure_args="${multilib_arg} ${ac_configure_args}"
6766CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6767glibcpp_basedir=${glibcpp_basedir}
6768CC="${CC}"
6769CXX="${CXX}"
6770
6771EOF
6772cat >> $CONFIG_STATUS <<\EOF
6773test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6774if test -n "$CONFIG_FILES"; then
6775 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
6776 grep '^MULTISUBDIR =' Makefile >> src/Makefile
6777fi
6778exit 0
6779EOF
6780chmod +x $CONFIG_STATUS
6781rm -fr confdefs* $ac_clean_files
6782test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6783
6784
6785
6786blddir=`pwd`
6787# Generate mkcheck having execute privs
6788
6789
6790# Generate bits/c++config.h
6791# NB: This must be the first generated file as others include it. . .
6792
6793
6794# Generate bits/std_limits.h and src/limitsMEMBERS.cc
6795
6796
6797# Generate bits/c++threads.h
6798
6799
6800# Generate bits/c++io.h and src/c++io.cc
6801
6802
b2dad0e3
BK
6803chmod +x $blddir/mkcheck
6804$srcdir/mkc++config $blddir $srcdir
6805$srcdir/mknumeric_limits $blddir $srcdir $xcompiling
6806cp $srcdir/config/$THREADH $blddir/bits/c++threads.h
6807cp $srcdir/config/$CSTDIO_H $blddir/bits/c++io.h
6808cp $srcdir/config/$CSTDIO_CC $blddir/src/c++io.cc
6809
6810
6811
6812
6813
6814
This page took 0.795981 seconds and 5 git commands to generate.