1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
14 dnl Initialize configure bits.
16 dnl Define OPTLEVEL='-O2' if new inlining code present.
19 AC_DEFUN(GLIBCPP_CONFIGURE, [
20 dnl Default to --enable-multilib
21 AC_ARG_ENABLE(multilib,
22 [ --enable-multilib build hella library versions (default)],
23 [case "${enableval}" in
26 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
27 esac], [multilib=yes])dnl
29 dnl We may get other options which we dont document:
30 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
31 if test "[$]{srcdir}" = "."; then
32 if test "[$]{with_target_subdir}" != "."; then
33 glibcpp_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
35 glibcpp_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
38 glibcpp_basedir="[$]{srcdir}/$1"
40 AC_SUBST(glibcpp_basedir)
42 AM_INIT_AUTOMAKE(libstdc++, 2.90.8)
44 # Never versions of autoconf add an underscore to these functions.
45 # Prevent future problems ...
46 ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
47 ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
48 ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
49 ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
53 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
54 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
55 # are probably using a cross compiler, which will not be able to fully
56 # link an executable. This should really be fixed in autoconf
59 AC_DEFUN(LIB_AC_PROG_CC,
60 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
61 dnl Fool anybody using AC_PROG_CC.
62 AC_PROVIDE([AC_PROG_CC])
63 AC_CHECK_PROG(CC, gcc, gcc)
64 if test -z "$CC"; then
65 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
66 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
71 if test $ac_cv_prog_gcc = yes; then
73 dnl Check whether -g works, even if CFLAGS is set, in case the package
74 dnl plays around with CFLAGS (such as to build both debugging and
75 dnl normal versions of a library), tasteless as that idea is.
76 ac_test_CFLAGS="${CFLAGS+set}"
77 ac_save_CFLAGS="$CFLAGS"
80 if test "$ac_test_CFLAGS" = set; then
81 CFLAGS="$ac_save_CFLAGS"
82 elif test $ac_cv_prog_cc_g = yes; then
89 test "${CFLAGS+set}" = set || CFLAGS="-g"
95 # Can't just call these here as g++ requires libstc++ to be built....
98 # Likewise for AC_PROG_CXX.
99 AC_DEFUN(LIB_AC_PROG_CXX,
100 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
101 dnl Fool anybody using AC_PROG_CXX.
102 AC_PROVIDE([AC_PROG_CXX])
103 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
104 test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
108 if test $ac_cv_prog_gxx = yes; then
110 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
111 dnl plays around with CXXFLAGS (such as to build both debugging and
112 dnl normal versions of a library), tasteless as that idea is.
113 ac_test_CXXFLAGS="${CXXFLAGS+set}"
114 ac_save_CXXFLAGS="$CXXFLAGS"
117 if test "$ac_test_CXXFLAGS" = set; then
118 CXXFLAGS="$ac_save_CXXFLAGS"
119 elif test $ac_cv_prog_cxx_g = yes; then
126 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
132 AC_CHECK_TOOL(AS, as)
133 AC_CHECK_TOOL(AR, ar)
134 AC_CHECK_TOOL(RANLIB, ranlib, :)
140 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
141 # at least currently, we never actually build a program, so we never
142 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
143 # fails, because we are probably configuring with a cross compiler
144 # which cant create executables. So we include AC_EXEEXT to keep
145 # automake happy, but we dont execute it, since we dont care about
151 # configure.host sets the following important variables
152 # glibcpp_cflags - host specific C compiler flags
153 # glibcpp_cxxflags - host specific C++ compiler flags
157 . [$]{glibcpp_basedir}/configure.host
159 case [$]{glibcpp_basedir} in
160 /* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
161 *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
164 GLIBCPP_CFLAGS="[$]{glibcpp_cflags}"
165 GLIBCPP_CXXFLAGS="[$]{glibcpp_cxxflags}"
166 AC_SUBST(GLIBCPP_CFLAGS)
167 AC_SUBST(GLIBCPP_CXXFLAGS)
172 dnl Check to see if g++ can compile this library, and if so, if any version-
173 dnl specific precautions need to be taken.
175 dnl GLIBCPP_CHECK_COMPILER_VERSION
176 AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
177 # Sanity check that g++ is capable of dealing with v-3.
178 AC_MSG_CHECKING([for g++ that will successfully compile this code])
180 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
183 ], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
184 AC_MSG_RESULT($gpp_satisfactory)
189 dnl Test for newer compiler features, or features that are present in newer
190 dnl compiler version but not older compiler versions should be placed
193 dnl Define WFMT_FLAGS='-fdiagnostics-show-location=once' if possible
195 dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
196 dnl new inlining code or the new system_header pragma will die on -Werror.
197 dnl Leave it out by default and use maint-mode to use it.
199 dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
200 dnl compiler supports it.
201 dnl GLIBCPP_CHECK_COMPILER_FEATURES
202 AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
203 # All these tests are for C++; save the language and the compiler flags.
204 # The CXXFLAGS thing is suspicious, but based on similar bits
205 # found in GLIBCPP_CONFIGURE.
208 ac_test_CXXFLAGS="${CXXFLAGS+set}"
209 ac_save_CXXFLAGS="$CXXFLAGS"
211 # Check for maintainer-mode bits.
212 if test x"$USE_MAINTAINER_MODE" = xno; then
218 # Check for more sophisticated diagnostic control.
219 AC_MSG_CHECKING([for g++ that supports -fdiagnostics-show-location=once])
220 CXXFLAGS='-fdiagnostics-show-location=once'
221 AC_TRY_COMPILE(, [int foo;
222 ], [ac_gabydiags=yes], [ac_gabydiags=no])
223 if test "$ac_test_CXXFLAGS" = set; then
224 CXXFLAGS="$ac_save_CXXFLAGS"
226 # this is the suspicious part
229 if test "$ac_gabydiags" = "yes"; then
230 WFMT_FLAGS='-fdiagnostics-show-location=once'
232 AC_MSG_RESULT($ac_gabydiags)
234 # Check for -ffunction-sections -fdata-sections
235 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
236 CXXFLAGS='-ffunction-sections -fdata-sections'
237 AC_TRY_COMPILE(, [int foo;
238 ], [ac_fdsections=yes], [ac_fdsections=no])
239 if test "$ac_test_CXXFLAGS" = set; then
240 CXXFLAGS="$ac_save_CXXFLAGS"
242 # this is the suspicious part
245 if test "$ac_fdsections" = "yes"; then
246 SECTION_FLAGS='-ffunction-sections -fdata-sections'
248 AC_MSG_RESULT($ac_fdsections)
253 AC_SUBST(SECTION_FLAGS)
258 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
259 dnl the native linker is in use, all variables will be defined to something
260 dnl safe (like an empty string).
262 dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
263 dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
265 dnl GLIBCPP_CHECK_LINKER_FEATURES
266 AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
267 # If we're not using GNU ld, then there's no point in even trying these
268 # tests. Check for that first. We should have already tested for gld
269 # by now (in libtool), but require it now just to be safe...
270 AC_REQUIRE([AC_PROG_LD])
271 if test "$ac_cv_prog_gnu_ld" = "no"; then
275 else # GNU ld it is! Joy and bunny rabbits!
277 # All these tests are for C++; save the language and the compiler flags.
278 # Need to do this so that g++ won't try to link in libstdc++
279 ac_test_CFLAGS="${CFLAGS+set}"
280 ac_save_CFLAGS="$CFLAGS"
281 CFLAGS='-x c++ -Wl,--gc-sections'
283 # Check for -Wl,--gc-sections
284 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
292 ], [ac_sectionLDflags=yes], [ac_sectionLFflags=no], [ac_sectionLDflags=yes])
293 if test "$ac_test_CFLAGS" = set; then
294 CFLAGS="$ac_save_CFLAGS"
296 # this is the suspicious part
299 if test "$ac_sectionLDflags" = "yes"; then
300 SECTION_LDFLAGS='-Wl,--gc-sections'
302 AC_MSG_RESULT($ac_sectionLDflags)
303 OPT_LDFLAGS='-Wl,-O1'
306 AC_SUBST(SECTION_LDFLAGS)
307 AC_SUBST(OPT_LDFLAGS)
312 dnl Check to see if the (math function) argument passed is
313 dnl 1) declared when using the c++ compiler
314 dnl 2) has "C" linkage
316 dnl Define HAVE_CARGF etc if "cargf" is declared and links
318 dnl argument 1 is name of function to check
320 dnl ASSUMES argument is a math function with ONE parameter
322 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
323 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
324 AC_MSG_CHECKING([for $1 declaration])
325 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
328 AC_TRY_COMPILE([#include <math.h>],
330 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
333 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
334 if test x$glibcpp_cv_func_$1_use = x"yes"; then
341 dnl Check to see if the (math function) argument passed is
342 dnl 1) declared when using the c++ compiler
343 dnl 2) has "C" linkage
345 dnl Define HAVE_CARGF etc if "cargf" is declared and links
347 dnl argument 1 is name of function to check
349 dnl ASSUMES argument is a math function with TWO parameters
351 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
352 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
353 AC_MSG_CHECKING([for $1 declaration])
354 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
357 AC_TRY_COMPILE([#include <math.h>],
359 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
362 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
363 if test x$glibcpp_cv_func_$1_use = x"yes"; then
370 dnl Check to see if the (math function) argument passed is
371 dnl 1) declared when using the c++ compiler
372 dnl 2) has "C" linkage
374 dnl Define HAVE_CARGF etc if "cargf" is declared and links
376 dnl argument 1 is name of function to check
378 dnl ASSUMES argument is a math function with THREE parameters
380 dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
381 AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
382 AC_MSG_CHECKING([for $1 declaration])
383 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
386 AC_TRY_COMPILE([#include <math.h>],
388 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
391 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
392 if test x$glibcpp_cv_func_$1_use = x"yes"; then
399 dnl Because the builtins are picky picky picky about the arguments they take,
400 dnl do an explict linkage tests here.
401 dnl Check to see if the (math function) argument passed is
402 dnl 1) declared when using the c++ compiler
403 dnl 2) has "C" linkage
405 dnl Define HAVE_CARGF etc if "cargf" is declared and links
407 dnl argument 1 is name of function to check
409 dnl ASSUMES argument is a math function with ONE parameter
411 dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
412 AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
413 AC_MSG_CHECKING([for $1 declaration])
414 AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
417 AC_TRY_COMPILE([#include <math.h>],
419 [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
422 AC_MSG_RESULT($glibcpp_cv_func_$1_use)
423 if test x$glibcpp_cv_func_$1_use = x"yes"; then
424 AC_MSG_CHECKING([for $1 linkage])
425 AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
426 AC_TRY_LINK([#include <math.h>],
428 [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
430 AC_MSG_RESULT($glibcpp_cv_func_$1_link)
431 if test x$glibcpp_cv_func_$1_link = x"yes"; then
432 ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
433 AC_DEFINE_UNQUOTED(${ac_tr_func})
440 dnl Check to see what builtin math functions are supported
442 dnl check for __builtin_abs
443 dnl check for __builtin_fabsf
444 dnl check for __builtin_fabs
445 dnl check for __builtin_fabl
446 dnl check for __builtin_labs
447 dnl check for __builtin_sqrtf
448 dnl check for __builtin_sqrtl
449 dnl check for __builtin_fsqrt
450 dnl check for __builtin_sinf
451 dnl check for __builtin_sin
452 dnl check for __builtin_sinl
453 dnl check for __builtin_cosf
454 dnl check for __builtin_cos
455 dnl check for __builtin_cosl
457 dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
458 AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
459 dnl Test for builtin math functions.
460 dnl These are made in gcc/c-common.c
461 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
462 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
463 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
464 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
465 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
467 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
468 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fsqrt)
469 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
471 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
472 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
473 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
475 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
476 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
477 GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
479 dnl There is, without a doubt, a more elegant way to have these
480 dnl names exported so that they won't be stripped out of acconfig.h by
481 dnl autoheader. I leave this as an exercise to somebody less frustrated
482 dnl than I.... please email the libstdc++ list if you can figure out a
483 dnl more elegant approach (see autoconf/acgen.m4 and specifically
484 dnl AC_CHECK_FUNC for things to steal.)
486 if test x$dummyvar = x"yes"; then
487 AC_DEFINE(HAVE___BUILTIN_ABS)
488 AC_DEFINE(HAVE___BUILTIN_LABS)
489 AC_DEFINE(HAVE___BUILTIN_COS)
490 AC_DEFINE(HAVE___BUILTIN_COSF)
491 AC_DEFINE(HAVE___BUILTIN_COSL)
492 AC_DEFINE(HAVE___BUILTIN_FABS)
493 AC_DEFINE(HAVE___BUILTIN_FABSF)
494 AC_DEFINE(HAVE___BUILTIN_FABSL)
495 AC_DEFINE(HAVE___BUILTIN_SIN)
496 AC_DEFINE(HAVE___BUILTIN_SINF)
497 AC_DEFINE(HAVE___BUILTIN_SINL)
498 AC_DEFINE(HAVE___BUILTIN_FSQRT)
499 AC_DEFINE(HAVE___BUILTIN_SQRTF)
500 AC_DEFINE(HAVE___BUILTIN_SQRTL)
506 dnl Check to see what the underlying c library or math library is like.
507 dnl These checks need to do two things:
508 dnl 1) make sure the name is declared when using the c++ compiler
509 dnl 2) make sure the name has "C" linkage
510 dnl This might seem like overkill but experience has shown that it's not...
512 dnl Define HAVE_CARGF etc if "cargf" is found.
514 dnl GLIBCPP_CHECK_MATH_SUPPORT
515 AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
516 ac_test_CXXFLAGS="${CXXFLAGS+set}"
517 ac_save_CXXFLAGS="$CXXFLAGS"
518 CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
521 AC_CHECK_LIB(m, sin, libm="-lm")
525 dnl Although not math functions, needed and for some reason checked here.
526 AC_CHECK_FUNCS(strtof strtold)
528 dnl Check to see if certain C math functions exist.
529 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
530 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
531 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
532 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
533 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
534 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
535 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
537 dnl Check to see if basic C math functions have float versions.
538 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
539 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
540 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(acosf)
541 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(asinf)
542 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(atanf)
543 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
544 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(ceilf)
545 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(cosf)
546 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(coshf)
547 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
548 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
549 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(floorf)
550 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
551 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
552 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
553 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
554 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
555 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
556 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
557 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sinf)
558 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sinhf)
559 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
560 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(tanf)
561 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(tanhf)
562 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
563 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
565 dnl Check to see if basic C math functions have long double versions.
566 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
567 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
568 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
569 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(acosl)
570 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(asinl)
571 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(atanl)
572 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
573 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(ceill)
574 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(cosl)
575 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(coshl)
576 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
577 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
578 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(floorl)
579 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
580 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
581 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
582 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
583 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
584 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
585 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
586 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sinl)
587 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sinhl)
588 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
589 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(tanl)
590 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(tanhl)
591 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
592 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
594 dnl Some runtimes have these functions with a preceding underscore. Please
595 dnl keep this sync'd with the one above. And if you add any new symbol,
596 dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
597 dnl Check to see if certain C math functions exist.
598 dnl Check to see if certain C math functions exist.
599 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isinf)
600 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isnan)
601 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_finite)
602 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_copysign)
603 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(_sincos)
604 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_fpclass)
605 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_qfpclass)
607 dnl Check to see if basic C math functions have float versions.
608 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isnanf)
609 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isinff)
610 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_acosf)
611 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_asinf)
612 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_atanf)
613 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_atan2f)
614 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_ceilf)
615 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_cosf)
616 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_coshf)
617 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_expf)
618 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_fabsf)
619 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_floorf)
620 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_fmodf)
621 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_frexpf)
622 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_ldexpf)
623 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_logf)
624 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_log10f)
625 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_modff)
626 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_powf)
627 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sinf)
628 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sinhf)
629 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sqrtf)
630 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_tanf)
631 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_tanhf)
632 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(_sincosf)
633 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_finitef)
635 dnl Check to see if basic C math functions have long double versions.
636 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isnanl)
637 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_isinfl)
638 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_copysignl)
639 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_acosl)
640 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_asinl)
641 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_atanl)
642 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_atan2l)
643 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_ceill)
644 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_cosl)
645 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_coshl)
646 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_expl)
647 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_fabsl)
648 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_floorl)
649 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_fmodl)
650 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_frexpl)
651 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_ldexpl)
652 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_logl)
653 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_log10l)
654 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_modfl)
655 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(_powl)
656 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sinl)
657 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sinhl)
658 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_sqrtl)
659 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_tanl)
660 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_tanhl)
661 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(_sincosl)
662 GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(_finitel)
665 CXXFLAGS="$ac_save_CXXFLAGS"
670 dnl Check to see if there is native support for complex
672 dnl Don't compile bits in math/* if native support exits.
674 dnl Define USE_COMPLEX_LONG_DOUBLE etc if "cargf" is found.
676 dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
677 AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
678 dnl Check for complex versions of math functions of platform.
679 AC_CHECK_HEADERS([complex.h])
680 AC_REPLACE_MATHFUNCS(ccos ccosf ccosh ccoshf cexp cexpf c_log c_logf \
681 clog10 clog10f cpow cpowf csin csinf csinh csinhf csqrt csqrtf \
682 ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf copysignf)
684 dnl Compile the long double complex functions only if the function
685 dnl provides the non-complex long double functions that are needed.
686 dnl Currently this includes copysignl and atan2l, which should be
687 dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
688 USE_COMPLEX_LONG_DOUBLE=no
689 if test x$ac_cv_func_atan2l = x"yes" \
690 && test x$ac_cv_func_copysignl = x"yes"; then
691 USE_COMPLEX_LONG_DOUBLE=yes
692 AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
693 csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)
696 AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
700 dnl Check to see what architecture we are compiling for. If it's
701 dnl supported, use special hand-crafted routines to provide thread
702 dnl primitives. Also, if architecture-specific flags are required for
703 dnl compilation, add them here.
705 dnl Depending on what is found, select configure/cpu/*/bits/atomicity.h
706 dnl If not found, select configure/cpu/generic/bits/atomicity.h
708 dnl GLIBCPP_CHECK_CPU
709 AC_DEFUN(GLIBCPP_CHECK_CPU, [
710 AC_MSG_CHECKING([for cpu primitives directory])
712 case "${target_cpu}" in
714 cpu_include_dir="config/cpu/alpha"
717 cpu_include_dir="config/cpu/arm"
720 cpu_include_dir="config/cpu/ia64"
723 cpu_include_dir="config/cpu/i386"
725 i486 | i586 | i686 | i786)
726 cpu_include_dir="config/cpu/i486"
729 cpu_include_dir="config/cpu/powerpc"
730 CPU_FLAGS='-mcpu=powerpc'
732 sparc64 | ultrasparc)
733 cpu_include_dir="config/cpu/sparc/sparc64"
736 cpu_include_dir="config/cpu/sparc/sparc32"
739 cpu_include_dir="config/cpu/generic"
742 AC_MSG_RESULT($cpu_include_dir)
743 AC_SUBST(cpu_include_dir)
749 dnl Check to see what the underlying c library's interface to ctype looks
750 dnl like. Bits of locale rely on things like isspace, toupper, etc. This
751 dnl stuff makes sure the right bits from the clibrary get called.
753 dnl Depending on what is found, select various configure/*/bits/ctype_base.h
754 dnl Depending on what is found, select various configure/*/ctype.cc
756 dnl GLIBCPP_CHECK_CTYPE
757 AC_DEFUN(GLIBCPP_CHECK_CTYPE, [
758 AC_CHECK_HEADER(ctype.h, [
760 dnl If doesn't match any specified, go with defaults.
763 dnl Test for <ctype> functionality -- gnu-linux
764 AC_MSG_CHECKING([<ctype> for gnu-linux ])
765 AC_TRY_COMPILE([#include <ctype.h>],
768 { return _ISspace + _ISprint + _IScntrl + _ISupper + _ISlower + _ISalpha \
769 + _ISdigit + _ISpunct + _ISxdigit + _ISalnum + _ISgraph \
770 + __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];}], \
771 ctype_linux=yes, ctype_linux=no)
772 AC_MSG_RESULT($ctype_linux)
773 if test $ctype_linux = "yes"; then
774 ctype_include_dir="config/gnu-linux"
778 dnl Test for <ctype> functionality -- FreeBSD 4.0
779 if test $ctype_default = "yes"; then
780 AC_MSG_CHECKING([<ctype> for freebsd 4.0 ])
781 AC_TRY_COMPILE([#include <ctype.h>],
784 { return _CTYPE_S + _CTYPE_R + _CTYPE_C + _CTYPE_U + _CTYPE_L + _CTYPE_A \
785 + _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;}], \
786 ctype_bsd=yes, ctype_bsd=no)
787 AC_MSG_RESULT($ctype_bsd)
788 if test $ctype_bsd = "yes"; then
789 ctype_include_dir="config/bsd"
794 dnl Test for <ctype> functionality -- FreeBSD 3.4
795 if test $ctype_default = "yes"; then
796 AC_MSG_CHECKING([<ctype> for freebsd 3.4 ])
797 AC_TRY_COMPILE([#include <ctype.h>],
800 { return _S + _R + _C + _U + _L + _A \
801 + _D + _P + _X + _G + __istype (a, 0);}], \
802 ctype_freebsd34=yes, ctype_freebsd34=no)
803 AC_MSG_RESULT($ctype_freebsd34)
804 if test $ctype_freebsd34 = "yes"; then
805 ctype_include_dir="config/bsd"
810 dnl Test for <ctype> functionality -- solaris 2.6 and 2.7
811 if test $ctype_default = "yes"; then
812 AC_MSG_CHECKING([<ctype> for solaris 2.[6,7,8] ])
813 AC_TRY_COMPILE([#include <ctype.h>],
816 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
817 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
818 + __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];}], \
819 ctype_solaris=yes, ctype_solaris=no)
820 AC_MSG_RESULT($ctype_solaris)
822 if test $ctype_solaris = "yes"; then
823 AC_MSG_CHECKING([ for version])
825 AC_TRY_COMPILE([#include <ctype.h>],
826 [typedef long* __to_type; __to_type const& _M_toupper = __trans_upper;],\
827 ctype_solaris26=yes, ctype_solaris26=no)
829 if test $ctype_solaris26 = "yes"; then
830 ctype_include_dir="config/solaris/solaris2.6"
831 AC_MSG_RESULT("solaris2.6")
834 ctype_include_dir="config/solaris/solaris2.7"
835 AC_MSG_RESULT("solaris2.[7,8]")
841 dnl Test for <ctype> functionality -- solaris 2.5.1
842 if test $ctype_default = "yes"; then
843 AC_MSG_CHECKING([<ctype> for solaris 2.5.1 ])
844 AC_TRY_COMPILE([#include <ctype.h>],
847 { return _U + _L + _N + _S + _P + _C + _X + _B \
849 ctype_solaris25=yes, ctype_solaris25=no)
850 AC_MSG_RESULT($ctype_solaris25)
851 if test $ctype_solaris25 = "yes"; then
852 ctype_include_dir="config/solaris/solaris2.5"
857 dnl Test for <ctype> functionality -- aix
858 if test $ctype_default = "yes"; then
859 AC_MSG_CHECKING([<ctype> for aix ])
860 AC_TRY_COMPILE([#include <ctype.h>],
863 { return _ISSPACE + _ISPRINT + _ISCNTRL + _ISUPPER + _ISLOWER + _ISALPHA \
864 + _ISDIGIT + _ISPUNCT + _ISXDIGIT + _ISALNUM + _ISGRAPH \
865 + _VALC('a') + _IS('c', 0);}], \
866 ctype_aix=yes, ctype_aix=no)
867 AC_MSG_RESULT($ctype_aix)
868 if test $ctype_aix = "yes"; then
869 ctype_include_dir="config/aix"
874 dnl Test for <ctype> functionality -- newlib
875 if test $ctype_default = "yes"; then
876 AC_MSG_CHECKING([<ctype> for newlib ])
877 AC_TRY_COMPILE([#include <ctype.h>],
880 { return _U + _L + _N + _S + _P + _C + _X + _B \
882 ctype_newlib=yes, ctype_newlib=no)
883 AC_MSG_RESULT($ctype_newlib)
884 if test $ctype_newlib = "yes"; then
885 ctype_include_dir="config/newlib"
890 if test $ctype_default = "yes"; then
891 ctype_include_dir="config/generic"
892 AC_MSG_WARN("Using default ctype headers.")
894 AC_SUBST(ctype_include_dir)
900 dnl Check to see if this target can enable the wchar_t parts of libstdc++.
902 dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
903 dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h
905 dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
906 AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
908 dnl Sanity check for existence of ISO C9X headers for extended encoding.
909 AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
910 AC_CHECK_HEADER(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
912 dnl Only continue checking if the ISO C9X headers exist.
913 if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
915 dnl Test wchar.h for mbstate_t, which is needed for char_traits and others.
916 AC_MSG_CHECKING([for mbstate_t])
917 AC_TRY_COMPILE([#include <wchar.h>],
918 [mbstate_t teststate;],
919 use_native_mbstatet=yes, use_native_mbstatet=no)
920 AC_MSG_RESULT($use_native_mbstatet)
921 if test x"$use_native_mbstatet" = xno; then
922 AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
925 dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
926 dnl numeric_limits can instantiate type_traits<wchar_t>
927 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
928 AC_TRY_COMPILE([#include <wchar.h>],
929 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
930 has_wchar_minmax=yes, has_wchar_minmax=no)
931 AC_MSG_RESULT($has_wchar_minmax)
933 dnl Test wchar.h for WEOF, which is what we use to determine whether
934 dnl to specialize for char_traits<wchar_t> or not.
935 AC_MSG_CHECKING([for WEOF])
938 #include <stddef.h>],
940 has_weof=yes, has_weof=no)
941 AC_MSG_RESULT($has_weof)
943 dnl Tests for wide character functions used in char_traits<wchar_t>.
944 AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset \
945 wcsrtombs mbsrtowcs, ac_wfuncs=yes, ac_wfuncs=no)
947 AC_MSG_CHECKING([for ISO C9X wchar_t support])
948 if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes \
949 && test x"$ac_wfuncs" = xyes; then
950 ac_isoC9X_wchar_t=yes
954 AC_MSG_RESULT($ac_isoC9X_wchar_t)
956 dnl Use iconv for wchar_t to char conversions. As such, check for
957 dnl X/Open Portability Guide, version 2 features (XPG2).
958 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
959 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
960 AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
961 ac_XPG2funcs=yes, ac_XPG2funcs=no)
963 AC_MSG_CHECKING([for XPG2 wchar_t support])
964 if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes \
965 && test x"$ac_XPG2funcs" = xyes; then
970 AC_MSG_RESULT($ac_XPG2_wchar_t)
972 dnl At the moment, only enable wchar_t specializations if all the
973 dnl above support is present.
974 AC_MSG_CHECKING([for enabled wchar_t specializations])
975 if test x"$ac_isoC9X_wchar_t" = xyes \
976 && test x"$ac_XPG2_wchar_t" = xyes; then
977 libinst_wstring_la="libinst-wstring.la"
978 AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
981 libinst_wstring_la=""
984 AC_SUBST(libinst_wstring_la)
987 AC_MSG_WARN([<wchar.h> not found])
988 AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
994 dnl Check to see if this version of GNU C++ is afflicted by bugs in
995 dnl __complex__ float support.
997 dnl Define _GLIBCPP_BUGGY_FLOAT_COMPLEX if buggy.
999 dnl Check to see if this version of GNU C++ is afflicted by bugs in
1000 dnl __complex__ support.Check for buggy __complex__ that will cause ICE in
1001 dnl gcc-2.95.x when using the library, unless we define the default copy
1002 dnl ctor in the specializations of complex<>.
1004 dnl Define _GLIBCPP_BUGGY_COMPLEX if buggy.
1005 dnl GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT
1006 AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT, [
1007 AC_REQUIRE([AC_PROG_CXX])
1009 AC_MSG_CHECKING([for GNU C++ __complex__ support])
1010 AC_CACHE_VAL(glibcpp_cv_complex, [
1013 AC_TRY_COMPILE([struct dcomplex { __complex__ double x; }; \
1014 dcomplex f(const dcomplex& x) { return dcomplex(x); }], \
1015 [ dcomplex x; f(x); ],
1016 glibcpp_cv_complex=ok,
1017 glibcpp_cv_complex=buggy
1021 AC_MSG_RESULT($glibcpp_cv_complex)
1022 if test $glibcpp_cv_complex = buggy; then
1023 AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
1026 AC_MSG_CHECKING([for GNU C++ __complex__ float support])
1027 AC_CACHE_VAL(glibcpp_cv_float_complex, [
1031 cat > conftest.h <<EOB
1033 // Check for buggy __complex__ that causes ICE in most versions of egcs
1034 // and gcc-2.95.x on certain platforms (eg., x86-win32).
1036 // See http://egcs.cygnus.com/ml/gcc-bugs/1999-07/msg00845.html for
1037 // more info on the bug itself.
1042 __complex__ float m_value;
1043 float_complex (float = 0.0f, float = 0.0f);
1044 float_complex (__complex__ float val) : m_value (val) {}
1045 float_complex foo (const float_complex &val)
1046 { return float_complex (~val.m_value); }
1049 AC_TRY_COMPILE([#include "conftest.h"], ,
1050 glibcpp_cv_float_complex=ok,
1051 glibcpp_cv_float_complex=buggy
1055 AC_MSG_RESULT($glibcpp_cv_float_complex)
1056 if test $glibcpp_cv_float_complex = buggy; then
1057 AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
1063 dnl Check for special debugging mode; not for production use.
1065 dnl GLIBCPP_ENABLE_DEBUG
1066 dnl --enable-debug sets '-ggdb -O0'.
1067 dnl --disable-debug sets '-g' and whatever optimization options the
1068 dnl compiler can handle.
1069 dnl + --enable-maintainer-mode automatically defaults this to on.
1070 dnl + Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
1071 dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
1072 dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
1073 dnl defaults to `no'.
1074 AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
1075 define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
1076 AC_ARG_ENABLE(debug,
1077 changequote(<<, >>)dnl
1078 << --enable-debug extra debugging, turn off optimization [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
1079 changequote([, ])dnl
1080 [case "${enableval}" in
1081 yes) enable_debug=yes ;;
1082 no) enable_debug=no ;;
1083 *) AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
1085 enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
1087 dnl Option parsed, now set things appropriately
1088 case "${enable_debug}" in
1090 DEBUG_FLAGS='-O0 -ggdb'
1096 AC_SUBST(DEBUG_FLAGS)
1101 dnl Check for "unusual" flags to pass to the compiler while building.
1103 dnl GLIBCPP_ENABLE_CXX_FLAGS
1104 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1105 dnl experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
1106 dnl Somehow this same set of flags must be passed when [re]building
1108 dnl --disable-cxx-flags passes nothing.
1109 dnl + See http://sourceware.cygnus.com/ml/libstdc++/2000-q2/msg00131.html
1110 dnl http://sourceware.cygnus.com/ml/libstdc++/2000-q2/msg00284.html
1111 dnl http://sourceware.cygnus.com/ml/libstdc++/2000-q1/msg00035.html
1112 dnl + Usage: GLIBCPP_ENABLE_CXX_FLAGS(default flags)
1113 dnl If "default flags" is an empty string (or "none"), the effect is
1114 dnl the same as --disable or --enable=no.
1115 AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
1116 define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
1117 AC_ARG_ENABLE(cxx-flags,
1118 changequote(<<, >>)dnl
1119 << --enable-cxx-flags=FLAGS pass compiler FLAGS when building library;
1120 [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
1121 changequote([, ])dnl
1122 [case "x$enableval" in
1124 AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
1126 enable_cxx_flags='' ;;
1128 enable_cxx_flags="$enableval" ;;
1130 enable_cxx_flags='GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT')
1132 dnl Thinko on my part during design. This kludge is the workaround.
1133 if test "$enable_cxx_flags" = "none"; then
1134 enable_cxx_flags='';
1137 dnl Run through flags (either default or command-line) and set anything
1138 dnl extra (e.g., #defines) that must accompany particular g++ options.
1139 if test -n "$enable_cxx_flags"; then
1140 for f in $enable_cxx_flags; do
1144 *) # and we're trying to pass /what/ exactly?
1145 AC_MSG_ERROR([compiler flags start with a -]) ;;
1149 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1150 AC_SUBST(EXTRA_CXX_FLAGS)
1155 dnl Check for instructions to automatically rebuild libgcc.a. Requires,
1156 dnl of course, the location of the gcc objdir. Note that if --disable-
1157 dnl namespaces is in effect, rebuilding libgcc.a is an expensive no-op.
1159 dnl GLIBCPP_ENABLE_RELIBGCC
1160 dnl --enable-libgcc-rebuild=/absolute/path/to/gcc/objdir sets GCC_OBJDIR
1161 dnl (presumably in the top-level Makefile) to /absol.../objdir
1162 dnl --disable-libgcc-rebuild will not touch libgcc.a at all (maybe print
1163 dnl a warning if this is given along with --enable-namespaces), by
1164 dnl setting GCC_OBJDIR to `no'.
1165 dnl + Doing this by default is going to be interesting. What default
1166 dnl "on" value can there be?
1167 dnl + Usage: GLIBCPP_ENABLE_RELIBGCC[(DEFAULT)]
1168 dnl The default path should be ../.. if bundled with GCC source.
1169 dnl If ommitted, it defaults to `no'.
1171 AC_DEFUN(GLIBCPP_ENABLE_RELIBGCC, [dnl
1172 define([GLIBCPP_ENABLE_RELIBGCC_DEFAULT], ifelse($1,, no, $1))dnl
1173 AC_ARG_ENABLE(libgcc-rebuild,
1174 changequote(<<, >>)dnl
1175 << --enable-libgcc-rebuild=DIR also rebuild libgcc.a; DIR is
1176 the GCC objdir; see install.html>>,
1177 changequote([, ])dnl
1178 [case "$enableval" in
1179 yes) AC_MSG_ERROR([--enable-libgcc-rebuild needs a pathname]) ;;
1180 no) enable_libgcc_rebuild=no ;;
1181 *) if test -d "$enableval" && test -d "${enableval}/gcc" && \
1182 test -d "${enableval}/libiberty"
1184 enable_libgcc_rebuild="$enableval"
1186 AC_MSG_ERROR(["$enableval" does not appear to be the GCC objdir])
1190 enable_libgcc_rebuild=GLIBCPP_ENABLE_RELIBGCC_DEFAULT)dnl
1191 GCC_OBJDIR="$enable_libgcc_rebuild"
1192 AC_SUBST(GCC_OBJDIR)
1197 dnl Check for which I/O library to use: libio, or something specific.
1199 dnl GLIBCPP_ENABLE_CSTDIO
1200 dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
1202 dnl default is libio
1204 AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
1205 AC_MSG_CHECKING([for cstdio to use])
1206 AC_ARG_ENABLE(cstdio,
1207 [ --enable-cstdio enable GNU libio for target io package. (default)
1208 --enable-cstdio=LIB use LIB target-speific io package.],
1209 if test x$enable_cstdio = xno; then
1212 enable_cstdio=libio)
1214 enable_cstdio_flag=$enable_cstdio
1216 dnl Check if a valid thread package
1217 case x${enable_cstdio_flag} in
1218 xlibio | x | xno | xnone | xyes)
1220 CSTDIO_H=config/c_io_libio.h
1221 CSTDIO_CC=config/c_io_libio.cc
1222 AC_MSG_RESULT(libio)
1224 # see if we are on a system with libio native (ie, linux)
1225 AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
1227 # Need to check and see what version of glibc is being used. If
1228 # it's not glibc-2.2 or higher, then we'll need to go ahead and
1229 # compile most of libio for linux systems.
1230 if test x$has_libio = x"yes"; then
1233 AC_MSG_CHECKING([for glibc version >= 2.2])
1234 AC_EGREP_CPP([ok], [
1235 #include <features.h>
1236 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
1239 ], glibc_satisfactory=yes, glibc_satisfactory=no)
1240 AC_MSG_RESULT($glibc_satisfactory)
1244 # XXX at the moment, admit defeat and force the recompilation
1245 # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
1246 glibc_satisfactory=no
1248 if test x$glibc_satisfactory = x"yes"; then
1255 # bkoz XXX need to add checks to enable this
1259 # Using libio, but <libio.h> doesn't exist on the target system. . .
1263 # bkoz XXX need to add checks to enable this
1269 CSTDIO_H=config/c_io_wince.h
1270 CSTDIO_CC=config/c_io_wince.cc
1271 AC_MSG_RESULT(wince)
1276 echo "$enable_cstdio is an unknown io package" 1>&2
1280 AC_LINK_FILES($CSTDIO_H, bits/c++io.h)
1281 AC_LINK_FILES($CSTDIO_CC, src/c++io.cc)
1283 # 2000-08-04 bkoz hack
1284 CCODECVT_C=config/c_io_libio_codecvt.c
1285 AC_LINK_FILES($CCODECVT_C, libio/c_codecvt.c)
1286 # 2000-08-04 bkoz hack
1288 AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
1289 AM_CONDITIONAL(GLIBCPP_NEED_XTRA_LIBIO, test "$need_xtra_libio" = yes)
1290 AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
1295 dnl Check for which threading library to use.
1297 dnl GLIBCPP_ENABLE_THREADS
1298 dnl --enable-threads=posix sets config/threads-posix.h et. al.
1300 dnl default is no threads
1302 AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
1303 dnl Note this comes from the gcc/config.in and libjava/config.in
1304 dnl Efforts should be made to keep this in sync.
1305 AC_MSG_CHECKING([for threads package to use])
1306 AC_ARG_ENABLE(threads,
1307 [ --enable-threads enable thread usage for target GCC.
1308 --enable-threads=LIB use LIB thread package for target GCC.],
1309 if test x$enable_threads = xno; then
1314 enable_threads_flag=$enable_threads
1316 dnl Check if a valid thread package
1317 case x${enable_threads_flag} in
1320 target_thread_file='single'
1324 target_thread_file=''
1326 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
1327 xsolaris | xwin32 | xdce | xvxworks)
1328 target_thread_file=$enable_threads_flag
1331 echo "$enable_threads is an unknown thread package" 1>&2
1336 dnl Check for thread package actually supported in libstdc++
1337 case "$target_thread_file" in
1348 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
1349 AC_MSG_ERROR(thread package $THREADS not yet supported)
1352 AC_MSG_ERROR($THREADS is an unknown thread package)
1355 AC_MSG_RESULT($THREADS)
1365 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
1366 THREADLIBS=-lpthread
1367 THREADSPEC=-lpthread
1368 dnl Not presently used
1369 dnl THREADOBJS=threads-posix.lo
1370 THREADH=threads-posix.h
1373 dnl Not presently used
1374 dnl THREADOBJS=threads-no.lo
1375 THREADH=threads-no.h
1378 AC_SUBST(THREADLIBS)
1379 AC_SUBST(THREADINCS)
1380 AC_SUBST(THREADDEPS)
1381 AC_SUBST(THREADOBJS)
1382 AC_SUBST(THREADSPEC)
1383 AC_LINK_FILES(config/$THREADH, bits/c++threads.h)
1388 dnl Check for template specializations for the 'long long' type extension.
1390 dnl GLIBCPP_ENABLE_LONG_LONG
1391 dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
1392 dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
1393 dnl + Usage: GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
1394 dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
1395 dnl defaults to `no'.
1396 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1398 dnl GLIBCPP_ENABLE_LONG_LONG
1399 AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
1400 define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
1402 AC_ARG_ENABLE(long-long,
1403 changequote(<<, >>)dnl
1404 <<--enable-long-long turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
1405 changequote([, ])dnl
1406 [case "$enableval" in
1407 yes) enable_long_long=yes ;;
1408 no) enable_long_long=no ;;
1409 *) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
1411 enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
1413 # Check for the existance of functions used if long long is enabled.
1414 AC_CHECK_FUNC(strtoll,,ac_strtoll=no)
1415 AC_CHECK_FUNC(strtoull,,ac_strtoull=no)
1417 AC_MSG_CHECKING([for enabled long long])
1418 if test x"$ac_strtoll" = xno || test x"$ac_strtoull" = xno; then
1419 enable_long_long=no;
1421 AC_MSG_RESULT($enable_long_long)
1423 dnl Option parsed, now set things appropriately
1424 case "$enable_long_long" in
1425 yes) AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
1432 dnl Check for whether or not to do shadowed C headers.
1434 dnl GLIBCPP_ENABLE_SHADOW
1435 dnl --enable-cshadow-headers [does stuff].
1436 dnl --disable-cshadow-headers [does not do stuff].
1437 dnl + This will eventually need to be on by default.
1438 dnl + Usage: GLIBCPP_ENABLE_SHADOW[(DEFAULT)]
1439 dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
1440 dnl defaults to `no'.
1441 AC_DEFUN(GLIBCPP_ENABLE_SHADOW, [dnl
1442 define([GLIBCPP_ENABLE_SHADOW_DEFAULT], ifelse($1, yes, yes, no))dnl
1443 AC_MSG_CHECKING([for enabled cshadow headers])
1444 AC_ARG_ENABLE(cshadow-headers,
1445 changequote(<<, >>)dnl
1446 << --enable-cshadow-headers construct "shadowed" C header files for
1447 g++ [default=>>GLIBCPP_ENABLE_SHADOW_DEFAULT],
1449 [case "$enableval" in
1450 yes) enable_cshadow_headers=yes
1452 no) enable_cshadow_headers=no
1454 *) AC_MSG_ERROR([Unknown argument to enable/disable shadowed C headers])
1457 enable_cshadow_headers=GLIBCPP_ENABLE_SHADOW_DEFAULT)
1458 AC_MSG_RESULT($enable_cshadow_headers)
1460 dnl Option parsed, now set things appropriately
1461 dnl CSHADOWFLAGS is currently unused, but may be useful in the future.
1462 case "$enable_cshadow_headers" in
1471 AC_SUBST(CSHADOWFLAGS)
1472 AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes)
1476 # Check whether LC_MESSAGES is available in <locale.h>.
1477 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1479 # This file file be copied and used freely without restrictions. It can
1480 # be used in projects which are not available under the GNU Public License
1481 # but which still want to provide support for the GNU gettext functionality.
1482 # Please note that the actual code is *not* freely available.
1486 AC_DEFUN(AC_LC_MESSAGES,
1487 [if test $ac_cv_header_locale_h = yes; then
1488 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1489 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1490 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1491 if test $ac_cv_val_LC_MESSAGES = yes; then
1492 AC_DEFINE(HAVE_LC_MESSAGES)
1497 # Check for functions in math library.
1498 # Ulrich Drepper <drepper@cygnus.com>, 1998.
1500 # This file can be copied and used freely without restrictions. It can
1501 # be used in projects which are not available under the GNU Public License
1502 # but which still want to provide support for the GNU gettext functionality.
1503 # Please note that the actual code is *not* freely available.
1507 dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
1508 AC_DEFUN(AC_REPLACE_MATHFUNCS,
1509 [AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])
1510 AC_SUBST(LIBMATHOBJS)dnl
1514 # Check for string functions.
1515 # Ulrich Drepper <drepper@cygnus.com>, 1998.
1517 # This file can be copied and used freely without restrictions. It can
1518 # be used in projects which are not available under the GNU Public License
1519 # but which still want to provide support for the GNU gettext functionality.
1520 # Please note that the actual code is *not* freely available.
1524 dnl AC_REPLACE_STRINGFUNCS(FUNCTION...)
1525 AC_DEFUN(AC_REPLACE_STRINGFUNCS,
1526 [AC_CHECK_FUNCS([$1], , [LIBSTRINGOBJS="$LIBSTRINGOBJS ${ac_func}.lo"])
1527 AC_SUBST(LIBSTRINGOBJS)dnl
1531 dnl This macro searches for a GNU version of make. If a match is found, the
1532 dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
1533 dnl set to "#". This is useful for including a special features in a Makefile,
1534 dnl which cannot be handled by other versions of make. The variable
1535 dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
1536 dnl the empty string otherwise.
1538 dnl Here is an example of its use:
1540 dnl Makefile.in might contain:
1542 dnl # A failsafe way of putting a dependency rule into a makefile
1544 dnl $(CC) -MM $(srcdir)/*.c > $(DEPEND)
1546 dnl @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
1547 dnl @ifGNUmake@ include $(DEPEND)
1548 dnl @ifGNUmake@ endif
1550 dnl Then configure.in would normally contain:
1552 dnl CHECK_GNU_MAKE()
1553 dnl AC_OUTPUT(Makefile)
1555 dnl Then perhaps to cause gnu make to override any other make, we could do
1556 dnl something like this (note that GNU make always looks for GNUmakefile first):
1558 dnl if ! test x$_cv_gnu_make_command = x ; then
1559 dnl mv Makefile GNUmakefile
1560 dnl echo .DEFAULT: > Makefile ;
1561 dnl echo \ $_cv_gnu_make_command \$@ >> Makefile;
1564 dnl Then, if any (well almost any) other make is called, and GNU make also
1565 dnl exists, then the other make wraps the GNU make.
1567 dnl @author John Darrington <j.darrington@elvis.murdoch.edu.au>
1568 dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
1570 dnl #### Changes for libstdc++-v3: reformatting and linewrapping; prepending
1571 dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
1572 dnl #### conditional's subshell (" --version" is not a command), using a
1573 dnl #### different option to grep(1).
1576 GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
1577 _cv_gnu_make_command='' ;
1578 dnl Search all the common names for GNU make
1579 for a in "${MAKE:-make}" make gmake gnumake ; do
1580 if ( $a --version 2> /dev/null | grep -c GNU )
1582 _cv_gnu_make_command=$a ;
1587 dnl If there was a GNU version, then set @ifGNUmake@ to the empty
1588 dnl string, '#' otherwise
1589 if test "x$_cv_gnu_make_command" != "x" ; then
1597 sinclude(../libtool.m4)
1598 dnl The lines below arrange for aclocal not to bring an installed
1599 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1600 dnl add a definition of LIBTOOL to Makefile.in.
1601 ifelse(,,,[AC_SUBST(LIBTOOL)
1602 AC_DEFUN([AM_PROG_LIBTOOL])
1603 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1604 AC_DEFUN([AC_PROG_LD])
1607 # Do all the work for Automake. This macro actually does too much --
1608 # some checks are only needed if your package does certain things.
1609 # But this isn't really a big deal.
1614 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
1616 AC_DEFUN(AM_INIT_AUTOMAKE,
1617 [AC_REQUIRE([AC_PROG_INSTALL])
1622 dnl test to see if srcdir already configured
1623 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1624 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1627 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1628 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
1629 AC_REQUIRE([AM_SANITY_CHECK])
1630 AC_REQUIRE([AC_ARG_PROGRAM])
1631 dnl FIXME This is truly gross.
1632 missing_dir=`cd $ac_aux_dir && pwd`
1633 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
1634 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
1635 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
1636 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
1637 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
1638 AC_REQUIRE([AC_PROG_MAKE_SET])])
1641 # Check to make sure that the build environment is sane.
1644 AC_DEFUN(AM_SANITY_CHECK,
1645 [AC_MSG_CHECKING([whether build environment is sane])
1648 echo timestamp > conftestfile
1649 # Do `set' in a subshell so we don't clobber the current shell's
1650 # arguments. Must try -L first in case configure is actually a
1651 # symlink; some systems play weird games with the mod time of symlinks
1652 # (eg FreeBSD returns the mod time of the symlink's containing
1655 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1656 if test "[$]*" = "X"; then
1658 set X `ls -t $srcdir/configure conftestfile`
1660 if test "[$]*" != "X $srcdir/configure conftestfile" \
1661 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1663 # If neither matched, then we have a broken ls. This can happen
1664 # if, for instance, CONFIG_SHELL is bash and it inherits a
1665 # broken ls alias from the environment. This has actually
1666 # happened. Such a system could not be considered "sane".
1667 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1668 alias in your environment])
1671 test "[$]2" = conftestfile
1677 AC_MSG_ERROR([newly created file is older than distributed files!
1678 Check your system clock])
1681 AC_MSG_RESULT(yes)])
1683 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1684 dnl The program must properly implement --version.
1685 AC_DEFUN(AM_MISSING_PROG,
1686 [AC_MSG_CHECKING(for working $2)
1687 # Run test in a subshell; some versions of sh will print an error if
1688 # an executable is not found, even if stderr is redirected.
1689 # Redirect stdin to placate older versions of autoconf. Sigh.
1690 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1692 AC_MSG_RESULT(found)
1695 AC_MSG_RESULT(missing)
1699 # Add --enable-maintainer-mode option to configure.
1704 AC_DEFUN(AM_MAINTAINER_MODE,
1705 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1706 dnl maintainer-mode is disabled by default
1707 AC_ARG_ENABLE(maintainer-mode,
1708 [ --enable-maintainer-mode enable make rules and dependencies not useful
1709 (and sometimes confusing) to the casual installer],
1710 USE_MAINTAINER_MODE=$enableval,
1711 USE_MAINTAINER_MODE=no)
1712 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1713 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1714 MAINT=$MAINTAINER_MODE_TRUE
1719 # Define a conditional.
1721 AC_DEFUN(AM_CONDITIONAL,
1732 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1734 AC_DEFUN(AM_CONFIG_HEADER,
1736 AC_CONFIG_HEADER([$1])
1737 dnl When config.status generates a header, we must update the stamp-h file.
1738 dnl This file resides in the same directory as the config header
1739 dnl that is generated. We must strip everything past the first ":",
1740 dnl and everything past the last "/".
1741 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1742 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1743 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1745 for am_file in <<$1>>; do
1746 case " <<$>>CONFIG_HEADERS " in
1747 *" <<$>>am_file "*<<)>>
1748 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1751 am_indx=`expr "<<$>>am_indx" + 1`