2 dnl Initialize configure bits.
4 dnl Define OPTLEVEL='-O2' if new inlining code present.
7 AC_DEFUN(GLIBCPP_CONFIGURE, [
8 dnl Default to --enable-multilib
9 AC_ARG_ENABLE(multilib,
10 [ --enable-multilib build hella library versions (default)],
11 [case "${enableval}" in
14 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
15 esac], [multilib=yes])dnl
17 glibcpp_basedir=$auxdir/$1/libstdc++-v3
18 AC_SUBST(glibcpp_basedir)
20 AM_INIT_AUTOMAKE(libstdc++, 2.92)
22 # Never versions of autoconf add an underscore to these functions.
23 # Prevent future problems ...
24 ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
25 ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
26 ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
27 ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
31 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
32 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
33 # are probably using a cross compiler, which will not be able to fully
34 # link an executable. This should really be fixed in autoconf
37 AC_DEFUN(LIB_AC_PROG_CC,
38 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
39 dnl Fool anybody using AC_PROG_CC.
40 AC_PROVIDE([AC_PROG_CC])
41 AC_CHECK_PROG(CC, gcc, gcc)
42 if test -z "$CC"; then
43 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
44 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
49 if test $ac_cv_prog_gcc = yes; then
51 dnl Check whether -g works, even if CFLAGS is set, in case the package
52 dnl plays around with CFLAGS (such as to build both debugging and
53 dnl normal versions of a library), tasteless as that idea is.
54 ac_test_CFLAGS="${CFLAGS+set}"
55 ac_save_CFLAGS="$CFLAGS"
58 if test "$ac_test_CFLAGS" = set; then
59 CFLAGS="$ac_save_CFLAGS"
60 elif test $ac_cv_prog_cc_g = yes; then
67 test "${CFLAGS+set}" = set || CFLAGS="-g"
73 # Can't just call these here as g++ requires libstc++ to be built....
76 # Likewise for AC_PROG_CXX.
77 AC_DEFUN(LIB_AC_PROG_CXX,
78 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
79 dnl Fool anybody using AC_PROG_CXX.
80 AC_PROVIDE([AC_PROG_CXX])
81 # Use glibcpp_CXX so that we do not cause CXX to be cached with the
82 # flags that come in CXX while configuring libstdc++. They're different
83 # from those used for all other target libraries. If CXX is set in
84 # the environment, respect that here.
86 AC_CHECK_PROGS(glibcpp_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
89 test -z "$glibcpp_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
93 if test $ac_cv_prog_gxx = yes; then
95 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
96 dnl plays around with CXXFLAGS (such as to build both debugging and
97 dnl normal versions of a library), tasteless as that idea is.
98 ac_test_CXXFLAGS="${CXXFLAGS+set}"
99 ac_save_CXXFLAGS="$CXXFLAGS"
102 if test "$ac_test_CXXFLAGS" = set; then
103 CXXFLAGS="$ac_save_CXXFLAGS"
104 elif test $ac_cv_prog_cxx_g = yes; then
111 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
117 AC_CHECK_TOOL(AS, as)
118 AC_CHECK_TOOL(AR, ar)
119 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
124 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
125 # at least currently, we never actually build a program, so we never
126 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
127 # fails, because we are probably configuring with a cross compiler
128 # which cant create executables. So we include AC_EXEEXT to keep
129 # automake happy, but we dont execute it, since we dont care about
132 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
133 # to nothing, so nothing would remain between `then' and `fi' if it
134 # were not for the `:' below.
139 . [$]{glibcpp_basedir}/configure.host
141 case [$]{glibcpp_basedir} in
142 /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
143 *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
146 # This does for the target what configure.host does for the host. In
147 # addition to possibly modifying the same flags, it also sets up symlinks.
153 dnl Check to see if g++ can compile this library, and if so, if any version-
154 dnl specific precautions need to be taken.
156 dnl GLIBCPP_CHECK_COMPILER_VERSION
157 AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
158 if test ! -f stamp-sanity-compiler; then
159 AC_MSG_CHECKING([for g++ that will successfully compile libstdc++-v3])
166 ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to GCC 3.0 or above]))
168 AC_MSG_RESULT($gpp_satisfactory)
169 touch stamp-sanity-compiler
175 dnl Test for newer compiler features, or features that are present in newer
176 dnl compiler version but not older compiler versions should be placed
179 dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
180 dnl new inlining code or the new system_header pragma will die on -Werror.
181 dnl Leave it out by default and use maint-mode to use it.
183 dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
184 dnl compiler supports it and the user has not requested debug mode.
186 dnl GLIBCPP_CHECK_COMPILER_FEATURES
187 AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
188 # All these tests are for C++; save the language and the compiler flags.
189 # The CXXFLAGS thing is suspicious, but based on similar bits
190 # found in GLIBCPP_CONFIGURE.
193 ac_test_CXXFLAGS="${CXXFLAGS+set}"
194 ac_save_CXXFLAGS="$CXXFLAGS"
196 # Check for maintainer-mode bits.
197 if test x"$USE_MAINTAINER_MODE" = xno; then
203 # Check for -ffunction-sections -fdata-sections
204 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
205 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
206 AC_TRY_COMPILE(, [int foo;
207 ], [ac_fdsections=yes], [ac_fdsections=no])
208 if test "$ac_test_CXXFLAGS" = set; then
209 CXXFLAGS="$ac_save_CXXFLAGS"
211 # this is the suspicious part
214 if test x"$ac_fdsections" = x"yes" && test x"$enable_debug" = x"no"; then
215 SECTION_FLAGS='-ffunction-sections -fdata-sections'
217 AC_MSG_RESULT($ac_fdsections)
221 AC_SUBST(SECTION_FLAGS)
226 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
227 dnl the native linker is in use, all variables will be defined to something
228 dnl safe (like an empty string).
230 dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
231 dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
233 dnl GLIBCPP_CHECK_LINKER_FEATURES
234 AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
235 # If we're not using GNU ld, then there's no point in even trying these
236 # tests. Check for that first. We should have already tested for gld
237 # by now (in libtool), but require it now just to be safe...
240 AC_REQUIRE([AC_PROG_LD])
243 if test "$ac_cv_prog_gnu_ld" = "notbroken"; then
244 # GNU ld it is! Joy and bunny rabbits!
246 # All these tests are for C++; save the language and the compiler flags.
247 # Need to do this so that g++ won't try to link in libstdc++
248 ac_test_CFLAGS="${CFLAGS+set}"
249 ac_save_CFLAGS="$CFLAGS"
250 CFLAGS='-x c++ -Wl,--gc-sections'
252 # Check for -Wl,--gc-sections
253 # XXX This test is broken at the moment, as symbols required for
254 # linking are now in libsupc++ (not built yet.....). In addition,
255 # this test has cored on solaris in the past. In addition,
256 # --gc-sections doesn't really work at the moment (keeps on discarding
257 # used sections, first .eh_frame and now some of the glibc sections for
258 # iconv). Bzzzzt. Thanks for playing, maybe next time.
259 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
267 ], [ac_sectionLDflags=yes],[ac_sectionLFflags=no], [ac_sectionLDflags=yes])
268 if test "$ac_test_CFLAGS" = set; then
269 CFLAGS="$ac_save_CFLAGS"
271 # this is the suspicious part
274 if test "$ac_sectionLDflags" = "yes"; then
275 SECTION_LDFLAGS='-Wl,--gc-sections'
277 AC_MSG_RESULT($ac_sectionLDflags)
280 # Set linker optimization flags.
281 if test x"$ac_cv_prog_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
282 OPT_LDFLAGS='-Wl,-O1'
285 AC_SUBST(SECTION_LDFLAGS)
286 AC_SUBST(OPT_LDFLAGS)
291 dnl Check to see if the (math function) argument passed is
292 dnl declared when using the c++ compiler
293 dnl ASSUMES argument is a math function with ONE parameter
295 dnl GLIBCPP_CHECK_MATH_DECL_1
296 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_1, [
297 AC_MSG_CHECKING([for $1 declaration])
298 if test x${glibcpp_cv_func_$1_use+set} != xset; then
299 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
302 AC_TRY_COMPILE([#include <math.h>
308 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
312 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
316 dnl Check to see if the (math function) argument passed is
317 dnl 1) declared when using the c++ compiler
318 dnl 2) has "C" linkage
319 dnl 3) if not, see if 1) and 2) for argument prepended with '_'
321 dnl Define HAVE_CARGF etc if "cargf" is declared and links
323 dnl argument 1 is name of function to check
325 dnl ASSUMES argument is a math function with ONE parameter
327 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
328 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
329 GLIBCPP_CHECK_MATH_DECL_1($1)
330 if test x$glibcpp_cv_func_$1_use = x"yes"; then
333 GLIBCPP_CHECK_MATH_DECL_1(_$1)
334 if test x$glibcpp_cv_func__$1_use = x"yes"; then
342 dnl Like GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
343 dnl of functions at once. It's an all-or-nothing check -- either
344 dnl HAVE_XYZ is defined for each of the functions, or for none of them.
345 dnl Doing it this way saves significant configure time.
346 AC_DEFUN(GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1, [
347 AC_MSG_CHECKING([for $1 functions])
348 AC_CACHE_VAL(glibcpp_cv_func_$2_use, [
351 AC_TRY_COMPILE([#include <math.h>],
352 [ `for x in $3; do echo "$x (0);"; done` ],
353 [glibcpp_cv_func_$2_use=yes],
354 [glibcpp_cv_func_$2_use=no])
356 AC_MSG_RESULT($glibcpp_cv_func_$2_use)
357 if test x$glibcpp_cv_func_$2_use = x"yes"; then
363 dnl Check to see if the (math function) argument passed is
364 dnl declared when using the c++ compiler
365 dnl ASSUMES argument is a math function with ONE parameter
367 dnl GLIBCPP_CHECK_MATH_DECL_2
368 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_2, [
369 AC_MSG_CHECKING([for $1 declaration])
370 if test x${glibcpp_cv_func_$1_use+set} != xset; then
371 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
374 AC_TRY_COMPILE([#include <math.h>],
376 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
380 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
384 dnl Check to see if the (math function) argument passed is
385 dnl 1) declared when using the c++ compiler
386 dnl 2) has "C" linkage
388 dnl Define HAVE_CARGF etc if "cargf" is declared and links
390 dnl argument 1 is name of function to check
392 dnl ASSUMES argument is a math function with TWO parameters
394 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
395 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
396 GLIBCPP_CHECK_MATH_DECL_2($1)
397 if test x$glibcpp_cv_func_$1_use = x"yes"; then
400 GLIBCPP_CHECK_MATH_DECL_2(_$1)
401 if test x$glibcpp_cv_func__$1_use = x"yes"; then
409 dnl Check to see if the (math function) argument passed is
410 dnl declared when using the c++ compiler
411 dnl ASSUMES argument is a math function with ONE parameter
413 dnl GLIBCPP_CHECK_MATH_DECL_3
414 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_3, [
415 AC_MSG_CHECKING([for $1 declaration])
416 if test x${glibcpp_cv_func_$1_use+set} != xset; then
417 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
420 AC_TRY_COMPILE([#include <math.h>],
422 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
426 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
430 dnl Check to see if the (math function) argument passed is
431 dnl 1) declared when using the c++ compiler
432 dnl 2) has "C" linkage
434 dnl Define HAVE_CARGF etc if "cargf" is declared and links
436 dnl argument 1 is name of function to check
438 dnl ASSUMES argument is a math function with THREE parameters
440 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
441 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
442 GLIBCPP_CHECK_MATH_DECL_3($1)
443 if test x$glibcpp_cv_func_$1_use = x"yes"; then
446 GLIBCPP_CHECK_MATH_DECL_3(_$1)
447 if test x$glibcpp_cv_func__$1_use = x"yes"; then
455 dnl Check to see if the (stdlib function) argument passed is
456 dnl 1) declared when using the c++ compiler
457 dnl 2) has "C" linkage
459 dnl argument 1 is name of function to check
461 dnl ASSUMES argument is a math function with TWO parameters
463 dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2
464 AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2, [
465 AC_MSG_CHECKING([for $1 declaration])
466 if test x${glibcpp_cv_func_$1_use+set} != xset; then
467 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
470 AC_TRY_COMPILE([#include <stdlib.h>],
472 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
476 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
477 if test x$glibcpp_cv_func_$1_use = x"yes"; then
484 dnl Because the builtins are picky picky picky about the arguments they take,
485 dnl do an explict linkage tests here.
486 dnl Check to see if the (math function) argument passed is
487 dnl 1) declared when using the c++ compiler
488 dnl 2) has "C" linkage
490 dnl Define HAVE_CARGF etc if "cargf" is declared and links
492 dnl argument 1 is name of function to check
494 dnl ASSUMES argument is a math function with ONE parameter
496 dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
497 AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
498 AC_MSG_CHECKING([for $1 declaration])
499 if test x${glibcpp_cv_func_$1_use+set} != xset; then
500 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
503 AC_TRY_COMPILE([#include <math.h>],
505 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
509 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
510 if test x$glibcpp_cv_func_$1_use = x"yes"; then
511 AC_MSG_CHECKING([for $1 linkage])
512 if test x${glibcpp_cv_func_$1_link+set} != xset; then
513 AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
514 AC_TRY_LINK([#include <math.h>],
516 [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
519 AC_MSG_RESULT($glibcpp_cv_func_$1_link)
520 if test x$glibcpp_cv_func_$1_link = x"yes"; then
521 ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
522 AC_DEFINE_UNQUOTED(${ac_tr_func})
529 dnl Check to see what builtin math functions are supported
531 dnl check for __builtin_abs
532 dnl check for __builtin_fabsf
533 dnl check for __builtin_fabs
534 dnl check for __builtin_fabl
535 dnl check for __builtin_labs
536 dnl check for __builtin_sqrtf
537 dnl check for __builtin_sqrtl
538 dnl check for __builtin_fsqrt
539 dnl check for __builtin_sinf
540 dnl check for __builtin_sin
541 dnl check for __builtin_sinl
542 dnl check for __builtin_cosf
543 dnl check for __builtin_cos
544 dnl check for __builtin_cosl
546 dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
547 AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
548 dnl Test for builtin math functions.
549 dnl These are made in gcc/c-common.c
550 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
551 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
552 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
553 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
554 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
556 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
557 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fsqrt)
558 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
560 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
561 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
562 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
564 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
565 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
566 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
568 dnl There is, without a doubt, a more elegant way to have these
569 dnl names exported so that they won't be stripped out of acconfig.h by
570 dnl autoheader. I leave this as an exercise to somebody less frustrated
571 dnl than I.... please email the libstdc++ list if you can figure out a
572 dnl more elegant approach (see autoconf/acgen.m4 and specifically
573 dnl AC_CHECK_FUNC for things to steal.)
575 if test x$dummyvar = x"yes"; then
576 AC_DEFINE(HAVE___BUILTIN_ABS)
577 AC_DEFINE(HAVE___BUILTIN_LABS)
578 AC_DEFINE(HAVE___BUILTIN_COS)
579 AC_DEFINE(HAVE___BUILTIN_COSF)
580 AC_DEFINE(HAVE___BUILTIN_COSL)
581 AC_DEFINE(HAVE___BUILTIN_FABS)
582 AC_DEFINE(HAVE___BUILTIN_FABSF)
583 AC_DEFINE(HAVE___BUILTIN_FABSL)
584 AC_DEFINE(HAVE___BUILTIN_SIN)
585 AC_DEFINE(HAVE___BUILTIN_SINF)
586 AC_DEFINE(HAVE___BUILTIN_SINL)
587 AC_DEFINE(HAVE___BUILTIN_FSQRT)
588 AC_DEFINE(HAVE___BUILTIN_SQRTF)
589 AC_DEFINE(HAVE___BUILTIN_SQRTL)
595 dnl Check to see what the underlying c library
596 dnl These checks need to do two things:
597 dnl 1) make sure the name is declared when using the c++ compiler
598 dnl 2) make sure the name has "C" linkage
599 dnl This might seem like overkill but experience has shown that it's not...
601 dnl Define HAVE_STRTOLD if "strtold" is declared and links
602 dnl Define HAVE_STRTOF if "strtof" is declared and links
603 dnl Define HAVE_DRAND48 if "drand48" is declared and links
605 dnl GLIBCPP_CHECK_STDLIB_SUPPORT
606 AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
607 ac_test_CXXFLAGS="${CXXFLAGS+set}"
608 ac_save_CXXFLAGS="$CXXFLAGS"
609 CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
611 AC_CHECK_FUNCS(strtof)
612 GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
613 AC_CHECK_FUNCS(drand48)
615 CXXFLAGS="$ac_save_CXXFLAGS"
620 dnl Check to see what the underlying c library or math library is like.
621 dnl These checks need to do two things:
622 dnl 1) make sure the name is declared when using the c++ compiler
623 dnl 2) make sure the name has "C" linkage
624 dnl This might seem like overkill but experience has shown that it's not...
626 dnl Define HAVE_CARGF etc if "cargf" is found.
628 dnl GLIBCPP_CHECK_MATH_SUPPORT
629 AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
630 ac_test_CXXFLAGS="${CXXFLAGS+set}"
631 ac_save_CXXFLAGS="$CXXFLAGS"
632 CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
635 AC_CHECK_LIB(m, sin, libm="-lm")
639 dnl Check to see if certain C math functions exist.
640 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
641 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
642 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
643 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
644 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
645 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
646 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
648 dnl Check to see if basic C math functions have float versions.
649 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
654 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
657 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
658 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
659 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
660 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
661 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
662 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
663 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
664 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
665 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
666 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
667 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
668 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
669 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
671 dnl Check to see if basic C math functions have long double versions.
672 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
677 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
680 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
681 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
682 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
683 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
684 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
685 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
686 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
687 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
688 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
689 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
690 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
691 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
692 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
693 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
694 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
695 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
697 dnl Some runtimes have these functions with a preceding underscore. Please
698 dnl keep this sync'd with the one above. And if you add any new symbol,
699 dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
700 dnl Check to see if certain C math functions exist.
702 dnl Check to see if basic C math functions have float versions.
703 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
705 _acosf _asinf _atanf \
707 _coshf _sinhf _tanhf)
708 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
712 dnl Check to see if basic C math functions have long double versions.
713 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
715 _acosl _asinl _atanl \
717 _coshl _sinhl _tanhl)
718 GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
723 CXXFLAGS="$ac_save_CXXFLAGS"
728 dnl Check to see if there is native support for complex
730 dnl Don't compile bits in math/* if native support exits.
732 dnl Define USE_COMPLEX_LONG_DOUBLE etc if "atan2l/copysignl" is found.
734 dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
735 AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
736 dnl Check for complex versions of math functions of platform.
737 AC_CHECK_LIB(m, main)
738 AC_REPLACE_MATHFUNCS(nan hypot hypotf atan2f expf copysignf)
740 dnl Compile the long double complex functions only if the function
741 dnl provides the non-complex long double functions that are needed.
742 dnl Currently this includes copysignl and atan2l, which should be
743 dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
744 USE_COMPLEX_LONG_DOUBLE=no
745 if test x$ac_cv_func_atan2l = x"yes" \
746 && test x$ac_cv_func_copysignl = x"yes"; then
747 USE_COMPLEX_LONG_DOUBLE=yes
748 AC_REPLACE_MATHFUNCS(hypotl signbitl)
751 AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
755 dnl Check to see what architecture and operating system we are compiling
756 dnl for. Also, if architecture- or OS-specific flags are required for
757 dnl compilation, pick them up here.
759 dnl GLIBCPP_CHECK_TARGET
760 AC_DEFUN(GLIBCPP_CHECK_TARGET, [
761 . [$]{glibcpp_basedir}/configure.target
762 AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
763 AC_MSG_RESULT(OS config directory is $os_include_dir)
764 AC_LINK_FILES($os_include_dir/bits/os_defines.h, include/bits/os_defines.h)
769 dnl Check to see if this target can enable the wchar_t parts of libstdc++.
770 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
771 dnl must have been previously checked.)
773 dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
774 dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
776 dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
777 AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
779 dnl Test wchar.h for mbstate_t, which is needed for char_traits and
780 dnl others even if wchar_t support is not on.
781 AC_MSG_CHECKING([for mbstate_t])
782 AC_TRY_COMPILE([#include <wchar.h>],
783 [mbstate_t teststate;],
784 have_mbstate_t=yes, have_mbstate_t=no)
785 AC_MSG_RESULT($have_mbstate_t)
786 if test x"$have_mbstate_t" = xyes; then
787 AC_DEFINE(HAVE_MBSTATE_T)
790 dnl Sanity check for existence of ISO C99 headers for extended encoding.
791 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
792 AC_CHECK_HEADER(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
794 dnl Only continue checking if the ISO C99 headers exist and support is on.
795 if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes \
796 && test x"$enable_c_mbchar" != xno; then
798 dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
799 dnl numeric_limits can instantiate type_traits<wchar_t>
800 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
801 AC_TRY_COMPILE([#include <wchar.h>],
802 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
803 has_wchar_minmax=yes, has_wchar_minmax=no)
804 AC_MSG_RESULT($has_wchar_minmax)
806 dnl Test wchar.h for WEOF, which is what we use to determine whether
807 dnl to specialize for char_traits<wchar_t> or not.
808 AC_MSG_CHECKING([for WEOF])
811 #include <stddef.h>],
813 has_weof=yes, has_weof=no)
814 AC_MSG_RESULT($has_weof)
816 dnl Tests for wide character functions used in char_traits<wchar_t>.
817 AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset \
818 wcsrtombs mbsrtowcs, ac_wfuncs=yes, ac_wfuncs=no)
820 dnl Do quick checks for things injected into std:: by the c_std headers.
821 AC_CHECK_FUNCS(fgetwc, fgetws)
823 AC_MSG_CHECKING([for ISO C99 wchar_t support])
824 if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
825 && test x"$ac_wfuncs" = xyes; then
826 ac_isoC99_wchar_t=yes
830 AC_MSG_RESULT($ac_isoC99_wchar_t)
832 dnl Use iconv for wchar_t to char conversions. As such, check for
833 dnl X/Open Portability Guide, version 2 features (XPG2).
834 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
835 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
837 dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
838 AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
840 LIBS="$LIBS $libiconv"
842 AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
843 ac_XPG2funcs=yes, ac_XPG2funcs=no)
847 AC_MSG_CHECKING([for XPG2 wchar_t support])
848 if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
849 && test x"$ac_XPG2funcs" = xyes; then
854 AC_MSG_RESULT($ac_XPG2_wchar_t)
856 dnl At the moment, only enable wchar_t specializations if all the
857 dnl above support is present.
858 AC_MSG_CHECKING([for enabled wchar_t specializations])
859 if test x"$ac_isoC99_wchar_t" = xyes \
860 && test x"$ac_XPG2_wchar_t" = xyes; then
861 AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
867 dnl Wide characters disabled by the user.
868 AC_MSG_WARN([wchar_t support disabled.])
874 dnl Check for special debugging mode; not for production use.
876 dnl GLIBCPP_ENABLE_DEBUG
877 dnl --enable-debug sets '-ggdb3 -O0'.
878 dnl --disable-debug sets '-g' and whatever optimization options the
879 dnl compiler can handle.
880 dnl + --enable-maintainer-mode automatically defaults this to on.
881 dnl + Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
882 dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
883 dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
884 dnl defaults to `no'.
885 AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
886 define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
888 changequote(<<, >>)dnl
889 << --enable-debug extra debugging, turn off optimization [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
891 [case "${enableval}" in
892 yes) enable_debug=yes ;;
893 no) enable_debug=no ;;
894 *) AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
896 enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
898 dnl Option parsed, now set things appropriately
899 case "${enable_debug}" in
901 DEBUG_FLAGS='-O0 -ggdb3'
907 AC_SUBST(DEBUG_FLAGS)
912 dnl Check for "unusual" flags to pass to the compiler while building.
914 dnl GLIBCPP_ENABLE_CXX_FLAGS
915 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
916 dnl experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
917 dnl Somehow this same set of flags must be passed when [re]building
919 dnl --disable-cxx-flags passes nothing.
920 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
921 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
922 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
923 dnl + Usage: GLIBCPP_ENABLE_CXX_FLAGS(default flags)
924 dnl If "default flags" is an empty string (or "none"), the effect is
925 dnl the same as --disable or --enable=no.
926 AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
927 define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
928 AC_ARG_ENABLE(cxx-flags,
929 changequote(<<, >>)dnl
930 << --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
931 [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
933 [case "x$enableval" in
935 AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
937 enable_cxx_flags='' ;;
939 enable_cxx_flags="$enableval" ;;
941 enable_cxx_flags='GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT')
943 dnl Thinko on my part during design. This kludge is the workaround.
944 if test "$enable_cxx_flags" = "none"; then
948 dnl Run through flags (either default or command-line) and set anything
949 dnl extra (e.g., #defines) that must accompany particular g++ options.
950 if test -n "$enable_cxx_flags"; then
951 for f in $enable_cxx_flags; do
955 *) # and we're trying to pass /what/ exactly?
956 AC_MSG_ERROR([compiler flags start with a -]) ;;
960 EXTRA_CXX_FLAGS="$enable_cxx_flags"
961 AC_SUBST(EXTRA_CXX_FLAGS)
966 dnl Check for which locale library to use: gnu or generic.
968 dnl GLIBCPP_ENABLE_CLOCALE
969 dnl --enable-clocale=gnu sets config/c_locale_gnu.cc and friends
970 dnl --enable-clocale=generic sets config/c_locale_generic.cc and friends
972 dnl default is generic
974 AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
975 AC_MSG_CHECKING([for clocale to use])
976 AC_ARG_ENABLE(clocale,
977 [ --enable-clocale enable model for target locale package.
978 --enable-clocale=MODEL use MODEL target-speific locale package. [default=generic]
980 if test x$enable_clocale = xno; then
981 enable_clocale=generic
983 enable_clocale=generic)
985 enable_clocale_flag=$enable_clocale
987 dnl Check if a valid locale package
988 case x${enable_clocale_flag} in
990 CLOCALE_H=config/c_locale_gnu.h
991 CLOCALE_CC=config/c_locale_gnu.cc
995 CLOCALE_H=config/c_locale_generic.h
996 CLOCALE_CC=config/c_locale_generic.cc
997 AC_MSG_RESULT(generic)
1000 echo "$enable_clocale is an unknown locale package" 1>&2
1005 AC_LINK_FILES($CLOCALE_H, include/bits/c++locale.h)
1006 AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
1011 dnl Check for which I/O library to use: libio, or something specific.
1013 dnl GLIBCPP_ENABLE_CSTDIO
1014 dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
1016 dnl default is stdio
1018 AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
1019 AC_MSG_CHECKING([for cstdio to use])
1020 AC_ARG_ENABLE(cstdio,
1021 [ --enable-cstdio enable stdio for target io package.
1022 --enable-cstdio=LIB use LIB target-speific io package. [default=stdio]
1024 if test x$enable_cstdio = xno; then
1027 enable_cstdio=stdio)
1029 enable_cstdio_flag=$enable_cstdio
1031 dnl Check if a valid I/O package
1032 case x${enable_cstdio_flag} in
1034 CSTDIO_H=config/c_io_libio.h
1035 BASIC_FILE_H=config/basic_file_libio.h
1036 BASIC_FILE_CC=config/basic_file_libio.cc
1037 AC_MSG_RESULT(libio)
1039 # see if we are on a system with libio native (ie, linux)
1040 AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
1042 # Need to check and see what version of glibc is being used. If
1043 # it's not glibc-2.2 or higher, then we'll need to go ahead and
1044 # compile most of libio for linux systems.
1045 if test x$has_libio = x"yes"; then
1048 AC_MSG_CHECKING([for glibc version >= 2.2])
1049 AC_EGREP_CPP([ok], [
1050 #include <features.h>
1051 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
1054 ], glibc_satisfactory=yes, glibc_satisfactory=no)
1055 AC_MSG_RESULT($glibc_satisfactory)
1059 # XXX at the moment, admit defeat and force the recompilation
1060 # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
1061 glibc_satisfactory=no
1063 if test x$glibc_satisfactory = x"yes"; then
1068 # bkoz XXX need to add checks to enable this
1069 # pme XXX here's a first pass at such a check
1070 if test x$enable_c_mbchar != xno; then
1078 # Using libio, but <libio.h> doesn't exist on the target system. . .
1080 # bkoz XXX need to add checks to enable this
1081 # pme XXX here's a first pass at such a check
1082 if test x$enable_c_mbchar != xno; then
1089 xstdio | x | xno | xnone | xyes)
1091 CSTDIO_H=config/c_io_stdio.h
1092 BASIC_FILE_H=config/basic_file_stdio.h
1093 BASIC_FILE_CC=config/basic_file_stdio.cc
1094 AC_MSG_RESULT(stdio)
1096 # We're not using stdio.
1101 echo "$enable_cstdio is an unknown io package" 1>&2
1105 AC_LINK_FILES($CSTDIO_H, include/bits/c++io.h)
1106 AC_LINK_FILES($BASIC_FILE_H, include/bits/basic_file_model.h)
1107 AC_LINK_FILES($BASIC_FILE_CC, src/basic_file.cc)
1109 # 2000-08-04 bkoz hack
1110 CCODECVT_C=config/c_io_libio_codecvt.c
1111 AC_LINK_FILES($CCODECVT_C, libio/c_codecvt.c)
1112 # 2000-08-04 bkoz hack
1114 AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
1115 test "$need_libio" = yes || test "$need_wlibio" = yes)
1116 AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
1117 AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
1118 if test "$need_libio" = yes || test "$need_wlibio" = yes; then
1119 libio_la=../libio/libio.la
1128 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1129 dnl We must stage the required headers so that they will be installed
1130 dnl with the library (unlike libgcc, the STL implementation is provided
1131 dnl solely within headers). Since we must not inject random user-space
1132 dnl macro names into user-provided C++ code, we first stage into <file>-in
1133 dnl and process to <file> with an output command. The reason for a two-
1134 dnl stage process here is to correctly handle $srcdir!=$objdir without
1135 dnl having to write complex code (the sed commands to clean the macro
1136 dnl namespace are complex and fragile enough as it is).
1138 AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
1139 AC_MSG_CHECKING([for thread model used by GCC])
1140 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
1141 AC_MSG_RESULT([$target_thread_file])
1143 AC_LINK_FILES(../gcc/gthr.h, include/bits/gthr.h-in)
1144 AC_LINK_FILES(../gcc/gthr-single.h, include/bits/gthr-single.h-in)
1145 AC_LINK_FILES(../gcc/gthr-$target_thread_file.h,
1146 include/bits/gthr-default.h-in)
1147 if test $target_thread_file != single; then
1148 AC_DEFINE(HAVE_GTHR_DEFAULT)
1149 AC_DEFINE(_GLIBCPP_SUPPORTS_WEAK, __GXX_WEAK__)
1151 AC_OUTPUT_COMMANDS([d=include/bits
1152 rm -f $d/gthr.h $d/gthr-single.h $d/gthr-default.h
1153 sed '/^#/s/\([A-Z_][A-Z_]*\)/_GLIBCPP_\1/g' <$d/gthr.h-in >$d/gthr.h
1154 sed 's/\(UNUSED\)/_GLIBCPP_\1/g' <$d/gthr-single.h-in \
1155 | sed 's/\(GCC[A-Z_]*_H\)/_GLIBCPP_\1/g' >$d/gthr-single.h
1156 sed 's/\(UNUSED\)/_GLIBCPP_\1/g' <$d/gthr-default.h-in \
1157 | sed 's/\(GCC[A-Z_]*_H\)/_GLIBCPP_\1/g' \
1158 | sed 's/\([A-Z_]*WEAK\)/_GLIBCPP_\1/g' >$d/gthr-default.h])
1163 dnl Check for exception handling support. If an explicit enable/disable
1164 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1165 dnl target may or may not support call frame exceptions.
1167 dnl GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
1168 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1169 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1171 dnl Define _GLIBCPP_SJLJ_EXCEPTIONS if the compiler is configured for it.
1173 AC_DEFUN(GLIBCPP_ENABLE_SJLJ_EXCEPTIONS, [
1174 AC_MSG_CHECKING([for exception model to use])
1177 AC_ARG_ENABLE(sjlj-exceptions,
1178 [ --enable-sjlj-exceptions force use of builtin_setjmp for exceptions],
1180 [dnl Botheration. Now we've got to detect the exception model.
1181 dnl Link tests against libgcc.a are problematic since -- at least
1182 dnl as of this writing -- we've not been given proper -L bits for
1183 dnl single-tree newlib and libgloss.
1185 dnl This is what AC_TRY_COMPILE would do if it didn't delete the
1186 dnl conftest files before we got a change to grep them first.
1187 cat > conftest.$ac_ext << EOF
1188 [#]line __oline__ "configure"
1197 old_CXXFLAGS="$CXXFLAGS"
1199 if AC_TRY_EVAL(ac_compile); then
1200 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1201 enable_sjlj_exceptions=yes
1202 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1203 enable_sjlj_exceptions=no
1206 CXXFLAGS="$old_CXXFLAGS"
1208 if test x$enable_sjlj_exceptions = xyes; then
1209 AC_DEFINE(_GLIBCPP_SJLJ_EXCEPTIONS, 1,
1210 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1211 ac_exception_model_name=sjlj
1212 elif test x$enable_sjlj_exceptions = xno; then
1213 ac_exception_model_name="call frame"
1215 AC_MSG_ERROR([unable to detect exception model])
1218 AC_MSG_RESULT($ac_exception_model_name)
1223 dnl Check for ISO/IEC 9899:1999 "C99" support.
1225 dnl GLIBCPP_ENABLE_C99
1226 dnl --enable-c99 defines _GLIBCPP_USE_C99
1227 dnl --disable-c99 leaves _GLIBCPP_USE_C99 undefined
1228 dnl + Usage: GLIBCPP_ENABLE_C99[(DEFAULT)]
1229 dnl Where DEFAULT is either `yes' or `no'. If omitted, it
1230 dnl defaults to `no'.
1231 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
1233 dnl GLIBCPP_ENABLE_C99
1234 AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
1235 define([GLIBCPP_ENABLE_C99_DEFAULT], ifelse($1, yes, yes, no))dnl
1238 changequote(<<, >>)dnl
1239 <<--enable-c99 turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
1240 changequote([, ])dnl
1241 [case "$enableval" in
1242 yes) enable_c99=yes ;;
1243 no) enable_c99=no ;;
1244 *) AC_MSG_ERROR([Unknown argument to enable/disable C99]) ;;
1246 enable_c99=GLIBCPP_ENABLE_C99_DEFAULT)dnl
1251 # Check for the existence of <math.h> functions used if C99 is enabled.
1253 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
1254 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
1255 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
1256 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
1257 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
1258 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
1259 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
1260 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
1261 AC_TRY_COMPILE([#include <math.h>],
1262 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
1263 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
1264 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
1265 AC_TRY_COMPILE([#include <math.h>],
1266 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
1267 AC_TRY_COMPILE([#include <math.h>],
1268 [isunordered(0.0,0.0);],, [ac_c99_math=no])
1269 AC_MSG_RESULT($ac_c99_math)
1271 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
1273 AC_MSG_CHECKING([for lldiv_t declaration])
1274 AC_CACHE_VAL(ac_c99_lldiv_t, [
1275 AC_TRY_COMPILE([#include <stdlib.h>],
1277 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
1279 AC_MSG_RESULT($ac_c99_lldiv_t)
1281 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
1282 AC_TRY_COMPILE([#include <stdlib.h>],
1283 [char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
1284 AC_TRY_COMPILE([#include <stdlib.h>],
1285 [char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
1286 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
1287 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
1288 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
1289 if test x"$ac_c99_lldiv_t" = x"no"; then
1292 AC_MSG_RESULT($ac_c99_stdlib)
1294 # Check for the existence of <wchar.h> functions used if C99 is enabled.
1296 AC_MSG_CHECKING([for ISO C99 support in <wchar.h>])
1297 AC_TRY_COMPILE([#include <wchar.h>],
1298 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
1299 AC_TRY_COMPILE([#include <wchar.h>],
1300 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
1301 AC_TRY_COMPILE([#include <wchar.h>],
1302 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
1303 AC_MSG_RESULT($ac_c99_wchar)
1305 AC_MSG_CHECKING([for enabled ISO C99 support])
1306 if test x"$ac_c99_math" = x"no" || test x"$ac_c99_wchar" = x"no" \
1307 || test x"$ac_c99_stdlib" = x"no"; then
1310 AC_MSG_RESULT($enable_c99)
1312 # Option parsed, now set things appropriately
1313 if test x"$enable_c99" = x"yes"; then
1314 AC_DEFINE(_GLIBCPP_USE_C99)
1322 dnl Check for template specializations for the 'long long' type extension.
1323 dnl NB: Must check for C99 support before calling _GLIBCPP_ENABLE_LONG_LONG
1325 dnl GLIBCPP_ENABLE_LONG_LONG
1326 dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
1327 dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
1328 dnl + Usage: GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
1329 dnl Where DEFAULT is either `yes' or `no'. If omitted, it
1330 dnl defaults to `no'.
1331 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1333 dnl GLIBCPP_ENABLE_LONG_LONG
1334 AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
1335 define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
1337 AC_ARG_ENABLE(long-long,
1338 changequote(<<, >>)dnl
1339 <<--enable-long-long turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
1340 changequote([, ])dnl
1341 [case "$enableval" in
1342 yes) enable_long_long=yes ;;
1343 no) enable_long_long=no ;;
1344 *) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
1346 enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
1348 # iostreams require strtoll, strtoull to compile. If the
1349 # GLIBCPP_ENABLE_C99 tests found these, and if C99 support is enabled,
1350 # go ahead and allow long long to be used.
1351 if test x"$enable_c99" = x"no"; then
1352 enable_long_long=no;
1355 # Option parsed, now set things appropriately
1356 AC_MSG_CHECKING([for enabled long long support])
1357 if test x"$enable_long_long" = xyes; then
1358 AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
1360 AC_MSG_RESULT($enable_long_long)
1365 dnl Check for what kind of C headers to use.
1367 dnl GLIBCPP_ENABLE_CHEADERS
1368 dnl --enable-cheaders= [does stuff].
1369 dnl --disable-cheaders [does not do anything, really].
1370 dnl + This will eventually need to be 'c_shadow' by default.
1371 dnl + Usage: GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
1372 dnl Where DEFAULT is either `c' or `c_std' or 'c_shadow'.
1373 dnl If ommitted, it defaults to `c_std'.
1374 AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
1375 define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
1376 AC_MSG_CHECKING([for c header strategy to use])
1377 AC_ARG_ENABLE(cheaders,
1378 changequote(<<, >>)dnl
1379 << --enable-cheaders construct "C" header files for g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
1381 [case "$enableval" in
1386 enable_cheaders=c_std
1389 enable_cheaders=c_shadow
1391 *) AC_MSG_ERROR([Unknown argument to enable/disable "C" headers])
1394 enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
1395 AC_MSG_RESULT($enable_cheaders)
1397 dnl Option parsed, now set things appropriately
1398 case "$enable_cheaders" in
1400 CSHADOW_FLAGS="-fno-builtin"
1401 C_INCLUDE_DIR='${top_srcdir}/include/c_shadow'
1402 AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
1406 C_INCLUDE_DIR='${top_srcdir}/include/c_std'
1410 C_INCLUDE_DIR='${top_srcdir}/include/c'
1414 AC_SUBST(CSHADOW_FLAGS)
1415 AC_SUBST(C_INCLUDE_DIR)
1416 AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cheaders" = c_shadow)
1421 dnl Check for wide character support. Has the same effect as the option
1422 dnl in gcc's configure, but in a form that autoconf can mess with.
1424 dnl GLIBCPP_ENABLE_C_MBCHAR
1425 dnl --enable-c-mbchar requests all the wchar_t stuff.
1426 dnl --disable-c-mbchar doesn't.
1427 dnl + Usage: GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
1428 dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
1429 dnl defaults to `no'.
1430 AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
1431 define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
1432 AC_ARG_ENABLE(c-mbchar,
1433 changequote(<<, >>)dnl
1434 << --enable-c-mbchar enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
1435 changequote([, ])dnl
1436 [case "$enableval" in
1437 yes) enable_c_mbchar=yes ;;
1438 no) enable_c_mbchar=no ;;
1439 *) AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
1441 enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
1442 dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1447 dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
1449 dnl GLIBCPP_INCLUDE_DIR
1451 dnl TOPLEVEL_INCLUDES
1452 dnl LIBMATH_INCLUDES
1453 dnl LIBSUPCXX_INCLUDES
1455 dnl CSHADOW_INCLUDES
1457 dnl GLIBCPP_EXPORT_INCLUDE
1458 AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
1459 # Root level of the include sources.
1460 GLIBCPP_INCLUDE_DIR='$(top_srcdir)/include'
1462 # Can either use include/c or include/c_std to grab "C" headers. This
1463 # variable is set to the include directory currently in use.
1464 # set with C_INCLUDE_DIR in GLIBCPP_ENABLE_CHEADERS
1466 # Passed down for canadian crosses.
1467 if test x"$CANADIAN" = xyes; then
1468 TOPLEVEL_INCLUDES='-I$(includedir)'
1471 LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
1473 LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
1475 #if GLIBCPP_NEED_LIBIO
1476 LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
1478 #LIBIO_INCLUDES='-I$(top_srcdir)/libio'
1481 #if GLIBCPP_USE_CSHADOW
1482 # CSHADOW_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR) \
1483 # -I$(top_blddir)/cshadow'
1485 CSTD_INCLUDES='-I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)'
1488 # Now, export this to all the little Makefiles....
1489 AC_SUBST(GLIBCPP_INCLUDE_DIR)
1490 AC_SUBST(TOPLEVEL_INCLUDES)
1491 AC_SUBST(LIBMATH_INCLUDES)
1492 AC_SUBST(LIBSUPCXX_INCLUDES)
1493 AC_SUBST(LIBIO_INCLUDES)
1494 AC_SUBST(CSTD_INCLUDES)
1499 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
1501 AC_DEFUN(GLIBCPP_EXPORT_FLAGS, [
1502 # Optimization flags that are probably a good idea for thrill-seekers. Just
1503 # uncomment the lines below and make, everything else is ready to go...
1504 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
1506 AC_SUBST(OPTIMIZE_CXXFLAGS)
1508 WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings -Winline'
1509 AC_SUBST(WARN_FLAGS)
1513 dnl GLIBCPP_EXPORT_INSTALL_INFO
1514 dnl calculates gxx_install_dir
1515 dnl exports glibcpp_toolexecdir
1516 dnl exports glibcpp_toolexeclibdir
1517 dnl exports glibcpp_builddir
1518 dnl exports glibcpp_srcdir
1519 dnl exports glibcpp_prefixdir
1521 dnl Assumes cross_compiling bits already done, and with_cross_host in
1524 dnl GLIBCPP_EXPORT_INSTALL_INFO
1525 AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
1527 glibcpp_toolexecdir=no
1528 glibcpp_toolexeclibdir=no
1530 # Export build and source directories.
1531 # These need to be absolute paths, yet at the same time need to
1532 # canonicalize only relative paths, because then amd will not unmount
1533 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
1534 glibcpp_builddir=`pwd`
1536 [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
1537 *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
1539 glibcpp_prefixdir=${prefix}
1541 AC_MSG_CHECKING([for interface version number])
1542 libstdcxx_interface=$INTERFACE
1543 AC_MSG_RESULT($libstdcxx_interface)
1545 # Process the option --with-gxx-include-dir=<path to include-files directory>
1546 AC_MSG_CHECKING([for --with-gxx-include-dir])
1547 AC_ARG_WITH(gxx-include-dir,
1548 [ --with-gxx-include-dir the installation directory for include files],
1549 [case "${withval}" in
1551 AC_MSG_ERROR(Missing directory for --with-gxx-include-dir)
1558 gxx_include_dir=${withval}
1560 esac], [gxx_include_dir=no])
1561 AC_MSG_RESULT($gxx_include_dir)
1563 # Process the option "--enable-version-specific-runtime-libs"
1564 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
1565 AC_ARG_ENABLE(version-specific-runtime-libs,
1566 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
1567 [ version_specific_libs=yes
1568 # Need the gcc compiler version to know where to install libraries
1569 # and header files if --enable-version-specific-runtime-libs option
1572 gcc_version_trigger=${srcdir}/../gcc/version.c
1573 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
1574 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
1575 gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
1576 glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
1577 glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}
1579 ],version_specific_libs=no)
1580 AC_MSG_RESULT($version_specific_libs)
1582 # Default case for install directory for include files.
1583 if test x"$version_specific_libs" = x"no" \
1584 && test x"$gxx_include_dir" = x"no"; then
1585 gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface}
1588 # Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
1589 # Install a library built with a cross compiler in tooldir, not libdir.
1590 if test x"$glibcpp_toolexecdir" = x"no"; then
1591 if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
1592 glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
1593 glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
1595 glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
1596 glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
1600 AC_MSG_CHECKING([for install location])
1601 AC_MSG_RESULT($gxx_include_dir)
1603 AC_SUBST(glibcpp_builddir)
1604 AC_SUBST(glibcpp_srcdir)
1605 AC_SUBST(glibcpp_prefixdir)
1606 AC_SUBST(gxx_include_dir)
1607 AC_SUBST(glibcpp_toolexecdir)
1608 AC_SUBST(glibcpp_toolexeclibdir)
1612 # Check whether LC_MESSAGES is available in <locale.h>.
1613 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1615 # This file file be copied and used freely without restrictions. It can
1616 # be used in projects which are not available under the GNU Public License
1617 # but which still want to provide support for the GNU gettext functionality.
1618 # Please note that the actual code is *not* freely available.
1622 AC_DEFUN(AC_LC_MESSAGES, [
1623 AC_CHECK_HEADER(locale.h, [
1624 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1625 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1626 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1627 if test $ac_cv_val_LC_MESSAGES = yes; then
1628 AC_DEFINE(HAVE_LC_MESSAGES)
1634 # Check for functions in math library.
1635 # Ulrich Drepper <drepper@cygnus.com>, 1998.
1637 # This file can be copied and used freely without restrictions. It can
1638 # be used in projects which are not available under the GNU Public License
1639 # but which still want to provide support for the GNU gettext functionality.
1640 # Please note that the actual code is *not* freely available.
1644 dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
1645 AC_DEFUN(AC_REPLACE_MATHFUNCS,
1646 [AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])
1647 AC_SUBST(LIBMATHOBJS)dnl
1651 # Check for string functions.
1652 # Ulrich Drepper <drepper@cygnus.com>, 1998.
1654 # This file can be copied and used freely without restrictions. It can
1655 # be used in projects which are not available under the GNU Public License
1656 # but which still want to provide support for the GNU gettext functionality.
1657 # Please note that the actual code is *not* freely available.
1661 dnl AC_REPLACE_STRINGFUNCS(FUNCTION...)
1662 AC_DEFUN(AC_REPLACE_STRINGFUNCS,
1663 [AC_CHECK_FUNCS([$1], , [LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"])
1664 AC_SUBST(LIBSTRINGOBJS)dnl
1668 dnl This macro searches for a GNU version of make. If a match is found, the
1669 dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
1670 dnl set to "#". This is useful for including a special features in a Makefile,
1671 dnl which cannot be handled by other versions of make. The variable
1672 dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
1673 dnl the empty string otherwise.
1675 dnl Here is an example of its use:
1677 dnl Makefile.in might contain:
1679 dnl # A failsafe way of putting a dependency rule into a makefile
1681 dnl $(CC) -MM $(srcdir)/*.c > $(DEPEND)
1683 dnl @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
1684 dnl @ifGNUmake@ include $(DEPEND)
1685 dnl @ifGNUmake@ endif
1687 dnl Then configure.in would normally contain:
1689 dnl CHECK_GNU_MAKE()
1690 dnl AC_OUTPUT(Makefile)
1692 dnl Then perhaps to cause gnu make to override any other make, we could do
1693 dnl something like this (note that GNU make always looks for GNUmakefile first):
1695 dnl if ! test x$_cv_gnu_make_command = x ; then
1696 dnl mv Makefile GNUmakefile
1697 dnl echo .DEFAULT: > Makefile ;
1698 dnl echo \ $_cv_gnu_make_command \$@ >> Makefile;
1701 dnl Then, if any (well almost any) other make is called, and GNU make also
1702 dnl exists, then the other make wraps the GNU make.
1704 dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
1705 dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
1707 dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
1708 dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
1709 dnl #### conditional's subshell (" --version" is not a command), using a
1710 dnl #### different option to grep(1).
1712 dnl #### Fixed Bourne shell portability bug (use ${MAKE-make}, not
1713 dnl #### ${MAKE:-make}).
1716 GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
1717 _cv_gnu_make_command='' ;
1718 dnl Search all the common names for GNU make
1719 for a in "${MAKE-make}" make gmake gnumake ; do
1720 if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
1722 _cv_gnu_make_command=$a ;
1727 dnl If there was a GNU version, then set @ifGNUmake@ to the empty
1728 dnl string, '#' otherwise
1729 if test "x$_cv_gnu_make_command" != "x" ; then
1737 sinclude(../libtool.m4)
1738 dnl The lines below arrange for aclocal not to bring an installed
1739 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1740 dnl add a definition of LIBTOOL to Makefile.in.
1741 ifelse(,,,[AC_SUBST(LIBTOOL)
1742 AC_DEFUN([AM_PROG_LIBTOOL])
1743 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1744 AC_DEFUN([AC_PROG_LD])