1 # generated automatically by aclocal 1.7.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 dnl Check to see what architecture and operating system we are compiling
17 dnl for. Also, if architecture- or OS-specific flags are required for
18 dnl compilation, pick them up here.
20 AC_DEFUN(GLIBCXX_CHECK_HOST, [
21 . $glibcxx_srcdir/configure.host
22 AC_MSG_NOTICE(CPU config directory is $cpu_include_dir)
23 AC_MSG_NOTICE(OS config directory is $os_include_dir)
28 dnl Initialize basic configure bits.
33 AC_DEFUN(GLIBCXX_TOPREL_CONFIGURE, [
34 # Sets up multi_basedir, which is srcdir/.. plus the usual
35 # "multi_source_toprel_bottom_adjust" lunacy as needed.
36 AM_ENABLE_MULTILIB(, ..)
38 # The generated code is exactly the same, except that automake's looks in
39 # ".. $srcdir/.." and autoconf's looks in multi_basedir. Apparently other
40 # things are triggered on the presence of the two ...AUX_DIR[S], but I don't
41 # know what they are or what the other differences might be (and they keep
44 # Looking in multi_basedir seems smarter, so actually execute that branch.
46 # this is for automake
49 # this is for autoconf
50 AC_CONFIG_AUX_DIRS(${multi_basedir})
59 dnl Initialize the rest of the library configury. At this point we have
60 dnl variables like $host.
63 dnl gcc_version (x.y.z format)
65 dnl glibcxx_builddir (absolute path)
66 dnl glibcxx_srcdir (absolute path)
67 dnl toplevel_srcdir (absolute path)
70 dnl with_target_subdir
72 dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
73 dnl - default settings for all AM_CONFITIONAL test variables
74 dnl - lots of tools, like CC and CXX
76 AC_DEFUN(GLIBCXX_CONFIGURE, [
77 # These need to be absolute paths, yet at the same time need to
78 # canonicalize only relative paths, because then amd will not unmount
79 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
80 glibcxx_builddir=`${PWDCMD-pwd}`
82 [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
83 *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
85 toplevel_srcdir=${glibcxx_srcdir}/..
86 AC_SUBST(glibcxx_builddir)
87 AC_SUBST(glibcxx_srcdir)
88 AC_SUBST(toplevel_srcdir)
90 # We use these options to decide which functions to include. They are
91 # set from the top level.
92 AC_ARG_WITH([target-subdir],
93 AC_HELP_STRING([--with-target-subdir=SUBDIR],
94 [configuring in a subdirectory]))
96 AC_ARG_WITH([cross-host],
97 AC_HELP_STRING([--with-cross-host=HOST],
98 [configuring with a cross compiler]))
100 AC_ARG_WITH([newlib],
101 AC_HELP_STRING([--with-newlib],
102 [assume newlib as a system C library]))
104 # We're almost certainly being configured before anything else which uses
105 # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
106 # we not cache the value of CXX that we "discover" here, because it's set
107 # to something unique for us and libjava. Other target libraries need to
108 # find CXX for themselves. We yank the rug out from under the normal AC_*
109 # process by sneakily renaming the cache variable. This also lets us debug
110 # the value of "our" CXX in postmortems.
112 # We must also force CXX to /not/ be a precious variable, otherwise the
113 # wrong (non-multilib-adjusted) value will be used in multilibs. This
114 # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
115 # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
116 # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
118 # -fno-builtin must be present here so that a non-conflicting form of
119 # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
121 m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
122 m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
123 m4_define([_AC_ARG_VAR_PRECIOUS],[])
124 save_CXXFLAGS="$CXXFLAGS"
125 CXXFLAGS="$CXXFLAGS -fno-builtin"
128 CXXFLAGS="$save_CXXFLAGS"
129 m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
133 # For directory versioning (e.g., headers) and other variables.
134 AC_MSG_CHECKING([for GCC version number])
135 gcc_version=`$CXX -dumpversion`
136 AC_MSG_RESULT($gcc_version)
138 # For some reason, gettext needs this.
141 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
142 # available). Uncomment the next line to force a particular method.
146 AC_CHECK_TOOL(AS, as)
147 AC_CHECK_TOOL(AR, ar)
148 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
152 # Set up safe default values for all subsequent AM_CONDITIONAL tests.
155 #enable_libstdcxx_debug=no
156 #enable_libstdcxx_pch=no
162 # Find platform-specific directories containing configuration info.
163 # Also possibly modify flags used elsewhere, as needed by the platform.
168 m4_include([linkage.m4])
172 dnl Tests for newer compiler features, or features that are present in newer
173 dnl compiler versions but not older compiler versions still in use, should
177 dnl WERROR='-Werror' if requested and possible; g++'s that lack the
178 dnl new inlining code or the new system_header pragma will die on -Werror.
179 dnl Leave it out by default and use maint-mode to use it.
180 dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
181 dnl compiler supports it and the user has not requested debug mode.
183 AC_DEFUN(GLIBCXX_CHECK_COMPILER_FEATURES, [
184 # All these tests are for C++; save the language and the compiler flags.
185 # The CXXFLAGS thing is suspicious, but based on similar bits previously
186 # found in GLIBCXX_CONFIGURE.
189 ac_test_CXXFLAGS="${CXXFLAGS+set}"
190 ac_save_CXXFLAGS="$CXXFLAGS"
192 # Check for maintainer-mode bits.
193 if test x"$USE_MAINTAINER_MODE" = xno; then
199 # Check for -ffunction-sections -fdata-sections
200 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
201 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
202 AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
203 if test "$ac_test_CXXFLAGS" = set; then
204 CXXFLAGS="$ac_save_CXXFLAGS"
206 # this is the suspicious part
209 if test x"$ac_fdsections" = x"yes"; then
210 SECTION_FLAGS='-ffunction-sections -fdata-sections'
212 AC_MSG_RESULT($ac_fdsections)
216 AC_SUBST(SECTION_FLAGS)
221 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
222 dnl the native linker is in use, all variables will be defined to something
223 dnl safe (like an empty string).
226 dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
227 dnl OPT_LDFLAGS='-Wl,-O1' if possible
228 dnl LD (as a side effect of testing)
231 dnl glibcxx_gnu_ld_version (possibly)
233 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
234 dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
236 AC_DEFUN(GLIBCXX_CHECK_LINKER_FEATURES, [
237 # If we're not using GNU ld, then there's no point in even trying these
238 # tests. Check for that first. We should have already tested for gld
239 # by now (in libtool), but require it now just to be safe...
240 test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
241 test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
242 AC_REQUIRE([AC_PROG_LD])
243 AC_REQUIRE([AC_PROG_AWK])
245 # The name set by libtool depends on the version of libtool. Shame on us
246 # for depending on an impl detail, but c'est la vie. Older versions used
247 # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
248 # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
249 # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
250 # set (hence we're using an older libtool), then set it.
251 if test x${with_gnu_ld+set} != xset; then
252 if test x${ac_cv_prog_gnu_ld+set} != xset; then
253 # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
256 with_gnu_ld=$ac_cv_prog_gnu_ld
260 # Start by getting the version number. I think the libtool test already
261 # does some of this, but throws away the result.
263 ldver=`$LD --version 2>/dev/null | head -1 | \
264 sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
266 glibcxx_gnu_ld_version=`echo $ldver | \
267 $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
270 if test "$with_gnu_ld" = "notbroken"; then
271 # GNU ld it is! Joy and bunny rabbits!
273 # All these tests are for C++; save the language and the compiler flags.
274 # Need to do this so that g++ won't try to link in libstdc++
275 ac_test_CFLAGS="${CFLAGS+set}"
276 ac_save_CFLAGS="$CFLAGS"
277 CFLAGS='-x c++ -Wl,--gc-sections'
279 # Check for -Wl,--gc-sections
280 # XXX This test is broken at the moment, as symbols required for linking
281 # are now in libsupc++ (not built yet). In addition, this test has
282 # cored on solaris in the past. In addition, --gc-sections doesn't
283 # really work at the moment (keeps on discarding used sections, first
284 # .eh_frame and now some of the glibc sections for iconv).
285 # Bzzzzt. Thanks for playing, maybe next time.
286 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
294 ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
295 if test "$ac_test_CFLAGS" = set; then
296 CFLAGS="$ac_save_CFLAGS"
298 # this is the suspicious part
301 if test "$ac_sectionLDflags" = "yes"; then
302 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
304 AC_MSG_RESULT($ac_sectionLDflags)
307 # Set linker optimization flags.
308 if test x"$with_gnu_ld" = x"yes"; then
309 OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
312 AC_SUBST(SECTION_LDFLAGS)
313 AC_SUBST(OPT_LDFLAGS)
318 dnl Check to see if this target can enable the wchar_t parts.
319 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
320 dnl must have been previously checked.) By default, wide characters are
324 dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
325 dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
327 AC_DEFUN(GLIBCXX_CHECK_WCHAR_T_SUPPORT, [
328 # Test wchar.h for mbstate_t, which is needed for char_traits and
329 # others even if wchar_t support is not on.
330 AC_MSG_CHECKING([for mbstate_t])
331 AC_TRY_COMPILE([#include <wchar.h>],
332 [mbstate_t teststate;],
333 have_mbstate_t=yes, have_mbstate_t=no)
334 AC_MSG_RESULT($have_mbstate_t)
335 if test x"$have_mbstate_t" = xyes; then
336 AC_DEFINE(HAVE_MBSTATE_T)
339 # Sanity check for existence of ISO C99 headers for extended encoding.
340 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
341 AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
343 # Only continue checking if the ISO C99 headers exist and support is on.
344 if test x"$ac_has_wchar_h" = xyes &&
345 test x"$ac_has_wctype_h" = xyes &&
346 test x"$enable_c_mbchar" != xno; then
348 # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
349 # numeric_limits can instantiate type_traits<wchar_t>
350 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
351 AC_TRY_COMPILE([#include <wchar.h>],
352 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
353 has_wchar_minmax=yes, has_wchar_minmax=no)
354 AC_MSG_RESULT($has_wchar_minmax)
356 # Test wchar.h for WEOF, which is what we use to determine whether
357 # to specialize for char_traits<wchar_t> or not.
358 AC_MSG_CHECKING([for WEOF])
361 #include <stddef.h>],
363 has_weof=yes, has_weof=no)
364 AC_MSG_RESULT($has_weof)
366 # Tests for wide character functions used in char_traits<wchar_t>.
368 AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
371 # Checks for names injected into std:: by the c_std headers.
372 AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
373 fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
374 vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
375 mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
376 wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
377 wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
380 AC_MSG_CHECKING([for ISO C99 wchar_t support])
381 if test x"$has_weof" = xyes &&
382 test x"$has_wchar_minmax" = xyes &&
383 test x"$ac_wfuncs" = xyes;
385 ac_isoC99_wchar_t=yes
389 AC_MSG_RESULT($ac_isoC99_wchar_t)
391 # Use iconv for wchar_t to char conversions. As such, check for
392 # X/Open Portability Guide, version 2 features (XPG2).
393 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
394 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
396 # Check for existence of libiconv.a providing XPG2 wchar_t support.
397 AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
399 LIBS="$LIBS $libiconv"
401 AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
402 [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
406 AC_MSG_CHECKING([for XPG2 wchar_t support])
407 if test x"$ac_has_iconv_h" = xyes &&
408 test x"$ac_has_langinfo_h" = xyes &&
409 test x"$ac_XPG2funcs" = xyes;
415 AC_MSG_RESULT($ac_XPG2_wchar_t)
417 # At the moment, only enable wchar_t specializations if all the
418 # above support is present.
419 if test x"$ac_isoC99_wchar_t" = xyes &&
420 test x"$ac_XPG2_wchar_t" = xyes;
422 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
426 AC_MSG_CHECKING([for enabled wchar_t specializations])
427 AC_MSG_RESULT($enable_wchar_t)
432 dnl Check for headers for, and arguments to, the setrlimit() function.
433 dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
436 dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory
437 dnl various HAVE_MEMLIMIT_* for individual limit names
439 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT_ancilliary, [
442 #include <sys/time.h>
443 #include <sys/resource.h>
445 [ int f = RLIMIT_$1 ; ],
446 [glibcxx_mresult=1], [glibcxx_mresult=0])
447 AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult,
448 [Only used in build directory testsuite_hooks.h.])
451 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT, [
452 setrlimit_have_headers=yes
453 AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
455 [setrlimit_have_headers=no])
456 # If don't have the headers, then we can't run the tests now, and we
457 # won't be seeing any of these during testsuite compilation.
458 if test $setrlimit_have_headers = yes; then
459 # Can't do these in a loop, else the resulting syntax is wrong.
460 GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
461 GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
462 GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
463 GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
465 # Check for rlimit, setrlimit.
466 AC_CACHE_VAL(ac_setrlimit, [
469 #include <sys/time.h>
470 #include <sys/resource.h>
474 [ac_setrlimit=yes], [ac_setrlimit=no])
478 AC_MSG_CHECKING([for testsuite memory limit support])
479 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
481 AC_DEFINE(_GLIBCXX_MEM_LIMITS)
485 AC_MSG_RESULT($ac_mem_limits)
490 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
491 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
493 AC_DEFUN(GLIBCXX_CHECK_S_ISREG_OR_S_IFREG, [
494 AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
496 [#include <sys/stat.h>],
499 S_ISREG(buffer.st_mode);],
500 [glibcxx_cv_S_ISREG=yes],
501 [glibcxx_cv_S_ISREG=no])
503 AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
505 [#include <sys/stat.h>],
508 S_IFREG & buffer.st_mode;],
509 [glibcxx_cv_S_IFREG=yes],
510 [glibcxx_cv_S_IFREG=no])
512 if test $glibcxx_cv_S_ISREG = yes; then
513 AC_DEFINE(HAVE_S_ISREG)
514 elif test $glibcxx_cv_S_IFREG = yes; then
515 AC_DEFINE(HAVE_S_IFREG)
521 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
523 AC_DEFUN(GLIBCXX_CHECK_POLL, [
524 AC_CACHE_VAL(glibcxx_cv_POLL, [
527 [struct pollfd pfd[1];
528 pfd[0].events = POLLIN;
530 [glibcxx_cv_POLL=yes],
531 [glibcxx_cv_POLL=no])
533 if test $glibcxx_cv_POLL = yes; then
540 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
542 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
543 AC_CACHE_VAL(glibcxx_cv_WRITEV, [
545 [#include <sys/uio.h>],
546 [struct iovec iov[2];
548 [glibcxx_cv_WRITEV=yes],
549 [glibcxx_cv_WRITEV=no])
551 if test $glibcxx_cv_WRITEV = yes; then
552 AC_DEFINE(HAVE_WRITEV)
558 dnl Does any necessary configuration of the testsuite directory. Generates
559 dnl the testsuite_hooks.h header.
561 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
564 dnl enable_abi_check / GLIBCXX_TEST_ABI
568 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
569 if $GLIBCXX_IS_NATIVE; then
570 # Do checks for memory limit functions.
571 GLIBCXX_CHECK_SETRLIMIT
573 # Look for setenv, so that extended locale tests can be performed.
574 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
577 # Export file names for ABI checking.
578 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
579 AC_SUBST(baseline_dir)
581 # Determine if checking the ABI is desirable.
582 if test $enable_symvers = no; then
587 enable_abi_check=no ;;
589 enable_abi_check=yes ;;
593 AM_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
594 AM_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
599 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
603 dnl TOPLEVEL_INCLUDES
605 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
606 # Used for every C++ compile we perform.
608 -I$glibcxx_builddir/include/$host_alias \
609 -I$glibcxx_builddir/include \
610 -I$glibcxx_srcdir/libsupc++"
612 # For Canadian crosses, pick this up too.
613 if test $CANADIAN = yes; then
614 GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES '-I${includedir}'"
617 # Stuff in the actual top level. Currently only used by libsupc++ to
618 # get unwind* headers from the gcc dir.
619 #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
620 TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
622 # Now, export this to all the little Makefiles....
623 AC_SUBST(GLIBCXX_INCLUDES)
624 AC_SUBST(TOPLEVEL_INCLUDES)
629 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
630 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
633 dnl OPTIMIZE_CXXFLAGS
636 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
637 # Optimization flags that are probably a good idea for thrill-seekers. Just
638 # uncomment the lines below and make, everything else is ready to go...
639 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
641 AC_SUBST(OPTIMIZE_CXXFLAGS)
643 WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
649 dnl All installation directory information is determined here.
653 dnl glibcxx_prefixdir
654 dnl glibcxx_toolexecdir
655 dnl glibcxx_toolexeclibdir
657 dnl Assumes cross_compiling bits already done, and with_cross_host in
660 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
661 glibcxx_toolexecdir=no
662 glibcxx_toolexeclibdir=no
663 glibcxx_prefixdir=$prefix
665 AC_MSG_CHECKING([for gxx-include-dir])
666 AC_ARG_WITH([gxx-include-dir],
667 AC_HELP_STRING([--with-gxx-include-dir=DIR],
668 [installation directory for include files]),
670 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
671 no) gxx_include_dir=no ;;
672 *) gxx_include_dir=$withval ;;
674 [gxx_include_dir=no])
675 AC_MSG_RESULT($gxx_include_dir)
677 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
678 AC_ARG_ENABLE([version-specific-runtime-libs],
679 AC_HELP_STRING([--enable-version-specific-runtime-libs],
680 [Specify that runtime libraries should be installed in a compiler-specific directory]),
681 [case "$enableval" in
682 yes) version_specific_libs=yes ;;
683 no) version_specific_libs=no ;;
684 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
686 [version_specific_libs=no])
687 AC_MSG_RESULT($version_specific_libs)
689 # Default case for install directory for include files.
690 if test $version_specific_libs = no && test $gxx_include_dir = no; then
691 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
694 # Version-specific runtime libs processing.
695 if test $version_specific_libs = yes; then
696 # Need the gcc compiler version to know where to install libraries
697 # and header files if --enable-version-specific-runtime-libs option
699 if test x"$gxx_include_dir" = x"no"; then
700 gxx_include_dir='${libdir}/gcc-lib/${host_alias}/'$gcc_version/include/c++
702 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
703 glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
706 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
707 # Install a library built with a cross compiler in tooldir, not libdir.
708 if test x"$glibcxx_toolexecdir" = x"no"; then
709 if test -n "$with_cross_host" &&
710 test x"$with_cross_host" != x"no"; then
711 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
712 glibcxx_toolexeclibdir='${toolexecdir}/lib'
714 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
715 glibcxx_toolexeclibdir='${libdir}'
717 multi_os_directory=`$CXX -print-multi-os-directory`
718 case $multi_os_directory in
719 .) ;; # Avoid trailing /.
720 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
724 AC_MSG_CHECKING([for install location])
725 AC_MSG_RESULT($gxx_include_dir)
727 AC_SUBST(glibcxx_prefixdir)
728 AC_SUBST(gxx_include_dir)
729 AC_SUBST(glibcxx_toolexecdir)
730 AC_SUBST(glibcxx_toolexeclibdir)
736 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
737 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
738 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
740 dnl See docs/html/17_intro/configury.html#enable for documentation.
742 m4_define([GLIBCXX_ENABLE],[dnl
743 m4_define([_g_switch],[--enable-$1])dnl
744 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
745 AC_ARG_ENABLE($1,_g_help,
750 m4_bpatsubst([$5],[permit ])) ;;
751 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
752 dnl Idea for future: generate a URL pointing to
753 dnl "onlinedocs/configopts.html#whatever"
760 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
764 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
765 m4_undefine([_g_switch])dnl
766 m4_undefine([_g_help])dnl
771 dnl Check for ISO/IEC 9899:1999 "C99" support.
773 dnl --enable-c99 defines _GLIBCXX_USE_C99
774 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
775 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
776 dnl Where DEFAULT is either `yes' or `no'.
777 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
779 AC_DEFUN(GLIBCXX_ENABLE_C99, [
780 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
785 # Check for the existence of <math.h> functions used if C99 is enabled.
787 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
788 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
789 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
790 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
791 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
792 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
793 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
794 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
795 AC_TRY_COMPILE([#include <math.h>],
796 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
797 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
798 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
799 AC_TRY_COMPILE([#include <math.h>],
800 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
801 AC_TRY_COMPILE([#include <math.h>],
802 [isunordered(0.0,0.0);],, [ac_c99_math=no])
803 AC_MSG_RESULT($ac_c99_math)
805 # Check for the existence in <stdio.h> of vscanf, et. al.
807 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
808 AC_TRY_COMPILE([#include <stdio.h>],
809 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
810 AC_TRY_COMPILE([#include <stdio.h>
812 void foo(char* fmt, ...)
813 {va_list args; va_start(args, fmt);
814 vfscanf(stderr, "%i", args);}],
815 [],, [ac_c99_stdio=no])
816 AC_TRY_COMPILE([#include <stdio.h>
818 void foo(char* fmt, ...)
819 {va_list args; va_start(args, fmt);
820 vscanf("%i", args);}],
821 [],, [ac_c99_stdio=no])
822 AC_TRY_COMPILE([#include <stdio.h>
824 void foo(char* fmt, ...)
825 {va_list args; va_start(args, fmt);
826 vsnprintf(fmt, 0, "%i", args);}],
827 [],, [ac_c99_stdio=no])
828 AC_TRY_COMPILE([#include <stdio.h>
830 void foo(char* fmt, ...)
831 {va_list args; va_start(args, fmt);
832 vsscanf(fmt, "%i", args);}],
833 [],, [ac_c99_stdio=no])
834 AC_MSG_RESULT($ac_c99_stdio)
836 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
838 AC_MSG_CHECKING([for lldiv_t declaration])
839 AC_CACHE_VAL(ac_c99_lldiv_t, [
840 AC_TRY_COMPILE([#include <stdlib.h>],
842 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
844 AC_MSG_RESULT($ac_c99_lldiv_t)
846 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
847 AC_TRY_COMPILE([#include <stdlib.h>],
848 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
849 AC_TRY_COMPILE([#include <stdlib.h>],
850 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
851 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
852 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
853 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
854 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
855 if test x"$ac_c99_lldiv_t" = x"no"; then
858 AC_MSG_RESULT($ac_c99_stdlib)
860 # Check for the existence of <wchar.h> functions used if C99 is enabled.
861 # XXX the wchar.h checks should be rolled into the general C99 bits.
863 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
864 AC_TRY_COMPILE([#include <wchar.h>],
865 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
866 AC_TRY_COMPILE([#include <wchar.h>],
867 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
868 AC_TRY_COMPILE([#include <wchar.h>],
869 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
870 AC_MSG_RESULT($ac_c99_wchar)
872 AC_MSG_CHECKING([for enabled ISO C99 support])
873 if test x"$ac_c99_math" = x"no" ||
874 test x"$ac_c99_stdio" = x"no" ||
875 test x"$ac_c99_stdlib" = x"no" ||
876 test x"$ac_c99_wchar" = x"no"; then
879 AC_MSG_RESULT($enable_c99)
881 # Option parsed, now set things appropriately
882 if test x"$enable_c99" = x"yes"; then
883 AC_DEFINE(_GLIBCXX_USE_C99)
891 dnl Check for what type of C headers to use.
893 dnl --enable-cheaders= [does stuff].
894 dnl --disable-cheaders [does not do anything, really].
895 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
896 dnl Where DEFAULT is either `c' or `c_std'.
898 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
899 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
900 [construct "C" headers for g++], [permit c|c_std])
901 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
903 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
905 AC_SUBST(C_INCLUDE_DIR)
906 AM_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
907 AM_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
908 AM_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
913 dnl Check for which locale library to use. The choice is mapped to
914 dnl a subdirectory of config/locale.
916 dnl Default is generic.
918 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
919 AC_MSG_CHECKING([for C locale to use])
920 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
921 [use MODEL for target locale package],
922 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
924 # If they didn't use this option switch, or if they specified --enable
925 # with no specific model, we'll have to look for one. If they
926 # specified --disable (???), do likewise.
927 if test $enable_clocale = no || test $enable_clocale = yes; then
931 # Either a known package, or "auto"
932 enable_clocale_flag=$enable_clocale
934 # Probe for locale support if no specific model is specified.
935 # Default to "generic".
936 if test $enable_clocale_flag = auto; then
937 case x${target_os} in
939 AC_EGREP_CPP([_GLIBCXX_ok], [
940 #include <features.h>
941 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
944 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
946 # Test for bugs early in glibc-2.2.x series
947 if test x$enable_clocale_flag = xgnu; then
949 #define _GNU_SOURCE 1
952 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
953 extern __typeof(newlocale) __newlocale;
954 extern __typeof(duplocale) __duplocale;
955 extern __typeof(strcoll_l) __strcoll_l;
959 const char __one[] = "Äuglein Augmen";
960 const char __two[] = "Äuglein";
965 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
966 loc_dup = __duplocale(loc);
967 i = __strcoll_l(__one, __two, loc);
968 j = __strcoll_l(__one, __two, loc_dup);
972 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
973 [enable_clocale_flag=generic])
976 # ... at some point put __strxfrm_l tests in as well.
979 enable_clocale_flag=generic
984 # Deal with gettext issues. Default to not using it (=no) until we detect
985 # support for it later. Let the user turn it off via --e/d, but let that
986 # default to on for easier handling.
989 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
993 # Set configure bits for specified locale package
994 case ${enable_clocale_flag} in
996 AC_MSG_RESULT(generic)
998 CLOCALE_H=config/locale/generic/c_locale.h
999 CLOCALE_CC=config/locale/generic/c_locale.cc
1000 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1001 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1002 CCOLLATE_CC=config/locale/generic/collate_members.cc
1003 CCTYPE_CC=config/locale/generic/ctype_members.cc
1004 CMESSAGES_H=config/locale/generic/messages_members.h
1005 CMESSAGES_CC=config/locale/generic/messages_members.cc
1006 CMONEY_CC=config/locale/generic/monetary_members.cc
1007 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1008 CTIME_H=config/locale/generic/time_members.h
1009 CTIME_CC=config/locale/generic/time_members.cc
1010 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1015 # Declare intention to use gettext, and add support for specific
1017 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1020 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1021 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1022 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1025 # Export the build objects.
1026 for ling in $ALL_LINGUAS; do \
1027 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1028 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1030 AC_SUBST(glibcxx_MOFILES)
1031 AC_SUBST(glibcxx_POFILES)
1033 CLOCALE_H=config/locale/gnu/c_locale.h
1034 CLOCALE_CC=config/locale/gnu/c_locale.cc
1035 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1036 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1037 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1038 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1039 CMESSAGES_H=config/locale/gnu/messages_members.h
1040 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1041 CMONEY_CC=config/locale/gnu/monetary_members.cc
1042 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1043 CTIME_H=config/locale/gnu/time_members.h
1044 CTIME_CC=config/locale/gnu/time_members.cc
1045 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1048 AC_MSG_RESULT(IEEE 1003.1)
1050 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1051 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1052 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1053 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1054 CCOLLATE_CC=config/locale/generic/collate_members.cc
1055 CCTYPE_CC=config/locale/generic/ctype_members.cc
1056 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1057 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1058 CMONEY_CC=config/locale/generic/monetary_members.cc
1059 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1060 CTIME_H=config/locale/generic/time_members.h
1061 CTIME_CC=config/locale/generic/time_members.cc
1062 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1066 # This is where the testsuite looks for locale catalogs, using the
1067 # -DLOCALEDIR define during testsuite compilation.
1068 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1069 AC_SUBST(glibcxx_localedir)
1071 # A standalone libintl (e.g., GNU libintl) may be in use.
1072 if test $USE_NLS = yes; then
1073 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1074 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1076 if test $USE_NLS = yes; then
1077 AC_DEFINE(_GLIBCXX_USE_NLS)
1082 AC_SUBST(CCODECVT_H)
1083 AC_SUBST(CMESSAGES_H)
1084 AC_SUBST(CCODECVT_CC)
1085 AC_SUBST(CCOLLATE_CC)
1087 AC_SUBST(CMESSAGES_CC)
1089 AC_SUBST(CNUMERIC_CC)
1092 AC_SUBST(CLOCALE_CC)
1093 AC_SUBST(CLOCALE_INTERNAL_H)
1098 dnl Check for whether the Boost-derived checks should be turned on.
1100 dnl --enable-concept-checks turns them on.
1101 dnl --disable-concept-checks leaves them off.
1102 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1103 dnl Where DEFAULT is either `yes' or `no'.
1105 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1106 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1107 if test $enable_concept_checks = yes; then
1108 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1114 dnl Check for which I/O library to use: stdio, or something specific.
1116 dnl Default is stdio.
1118 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1119 AC_MSG_CHECKING([for underlying I/O to use])
1120 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1121 [use target-specific I/O package], [permit stdio])
1123 # Now that libio has been removed, you can have any color you want as long
1124 # as it's black. This is one big no-op until other packages are added, but
1125 # showing the framework never hurts.
1126 case ${enable_cstdio} in
1128 CSTDIO_H=config/io/c_io_stdio.h
1129 BASIC_FILE_H=config/io/basic_file_stdio.h
1130 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1131 AC_MSG_RESULT(stdio)
1135 dnl Set directory for fpos.h
1136 FPOS_H=$fpos_include_dir
1140 AC_SUBST(BASIC_FILE_H)
1141 AC_SUBST(BASIC_FILE_CC)
1146 dnl Check for "unusual" flags to pass to the compiler while building.
1148 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1149 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1150 dnl --disable-cxx-flags passes nothing.
1151 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1152 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1153 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1154 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1155 dnl If "default flags" is an empty string, the effect is the same
1156 dnl as --disable or --enable=no.
1158 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1159 AC_MSG_CHECKING([for extra compiler flags for building])
1160 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1161 [pass compiler FLAGS when building library],
1162 [case "x$enable_cxx_flags" in
1163 xno | x) enable_cxx_flags= ;;
1165 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1168 # Run through flags (either default or command-line) and set anything
1169 # extra (e.g., #defines) that must accompany particular g++ options.
1170 if test -n "$enable_cxx_flags"; then
1171 for f in $enable_cxx_flags; do
1175 *) # and we're trying to pass /what/ exactly?
1176 AC_MSG_ERROR([compiler flags start with a -]) ;;
1181 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1182 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1183 AC_SUBST(EXTRA_CXX_FLAGS)
1188 dnl Check for wide character support. Has the same effect as the option
1189 dnl in gcc's configure, but in a form that autoconf can mess with.
1191 dnl --enable-c-mbchar requests all the wchar_t stuff.
1192 dnl --disable-c-mbchar doesn't.
1193 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1194 dnl Where DEFAULT is either `yes' or `no'.
1196 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1197 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1198 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1203 dnl Check to see if debugging libraries are to be built.
1205 dnl --enable-libstdcxx-debug
1206 dnl builds a separate set of debugging libraries in addition to the
1207 dnl normal (shared, static) libstdc++ binaries.
1209 dnl --disable-libstdcxx-debug
1210 dnl builds only one (non-debug) version of libstdc++.
1212 dnl --enable-libstdcxx-debug-flags=FLAGS
1213 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1215 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1216 dnl Where DEFAULT is either `yes' or `no'.
1218 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1219 AC_MSG_CHECKING([for additional debug build])
1220 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1221 AC_MSG_RESULT($enable_libstdcxx_debug)
1222 AM_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1227 dnl Check for explicit debug flags.
1229 dnl --enable-libstdcxx-debug-flags='-O1'
1230 dnl is a general method for passing flags to be used when
1231 dnl building debug libraries with --enable-debug.
1233 dnl --disable-libstdcxx-debug-flags does nothing.
1234 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1235 dnl If "default flags" is an empty string, the effect is the same
1236 dnl as --disable or --enable=no.
1238 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1239 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1240 [pass compiler FLAGS when building debug library],
1241 [case "x$enable_libstdcxx_debug_flags" in
1242 xno | x) enable_libstdcxx_debug_flags= ;;
1244 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1247 # Option parsed, now set things appropriately
1248 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1249 AC_SUBST(DEBUG_FLAGS)
1251 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1256 dnl Check for libunwind exception handling support. If enabled, then
1257 dnl we assume that the _Unwind_* functions that make up the Unwind ABI
1258 dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
1259 dnl libunwind instead of libgcc, and that libstdc++ has a dependency
1260 dnl on libunwind as well as libgcc.
1262 dnl --enable-libunwind-exceptions forces the use of libunwind.
1263 dnl --disable-libunwind-exceptions assumes there is no libunwind.
1268 AC_DEFUN(GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS, [
1269 AC_MSG_CHECKING([for use of libunwind])
1270 GLIBCXX_ENABLE(libunwind-exceptions,no,,
1271 [force use of libunwind for exceptions])
1272 AC_MSG_RESULT($use_libunwind_exceptions)
1273 if test $enable_libunwind_exceptions = yes; then
1274 LIBUNWIND_FLAG="-lunwind"
1278 AC_SUBST(LIBUNWIND_FLAG)
1283 dnl Check for template specializations for the 'long long' type extension.
1284 dnl The result determines only whether 'long long' I/O is enabled; things
1285 dnl like numeric_limits<> specializations are always available.
1287 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1288 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1289 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1290 dnl Where DEFAULT is either `yes' or `no'.
1291 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1293 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1294 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1299 AC_MSG_CHECKING([for enabled long long I/O support])
1300 # iostreams require strtoll, strtoull to compile
1301 AC_TRY_COMPILE([#include <stdlib.h>],
1302 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1303 AC_TRY_COMPILE([#include <stdlib.h>],
1304 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1306 # Option parsed, now set things appropriately
1307 if test $enable_long_long = yes; then
1308 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1310 AC_MSG_RESULT($enable_long_long)
1317 dnl Check to see if building and using a C++ precompiled header can be done.
1319 dnl --enable-libstdcxx-pch=yes
1320 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1321 dnl may work, after some light-hearted attempts to puzzle out compiler
1322 dnl support, flip bits on in include/Makefile.am
1324 dnl --disable-libstdcxx-pch
1325 dnl turns off attempts to use or build stdc++.h.gch.
1328 dnl glibcxx_PCHFLAGS
1330 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1331 AC_MSG_CHECKING([for enabled PCH])
1332 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1333 AC_MSG_RESULT([$enable_libstdcxx_pch])
1335 if test $enable_libstdcxx_pch = yes; then
1336 AC_CACHE_CHECK([for compiler with PCH support],
1337 [glibcxx_cv_prog_CXX_pch],
1338 [ac_save_CXXFLAGS="$CXXFLAGS"
1339 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1342 echo '#include <math.h>' > conftest.h
1343 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1344 -o conftest.h.gch 1>&5 2>&1 &&
1345 echo '#error "pch failed"' > conftest.h &&
1346 echo '#include "conftest.h"' > conftest.cc &&
1347 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1349 glibcxx_cv_prog_CXX_pch=yes
1351 glibcxx_cv_prog_CXX_pch=no
1354 CXXFLAGS=$ac_save_CXXFLAGS
1357 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1360 AM_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1361 if test $enable_libstdcxx_pch = yes; then
1362 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1366 AC_SUBST(glibcxx_PCHFLAGS)
1371 dnl Check for exception handling support. If an explicit enable/disable
1372 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1373 dnl target may or may not support call frame exceptions.
1375 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1376 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1377 dnl Neither one forces an attempt at detection.
1380 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1382 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1383 AC_MSG_CHECKING([for exception model to use])
1386 GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1387 [force use of builtin_setjmp for exceptions],
1388 [permit yes|no|auto])
1390 if test $enable_sjlj_exceptions = auto; then
1391 # Botheration. Now we've got to detect the exception model. Link tests
1392 # against libgcc.a are problematic since we've not been given proper -L
1393 # bits for single-tree newlib and libgloss.
1395 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
1396 cat > conftest.$ac_ext << EOF
1397 [#]line __oline__ "configure"
1406 old_CXXFLAGS="$CXXFLAGS"
1408 if AC_TRY_EVAL(ac_compile); then
1409 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1410 enable_sjlj_exceptions=yes
1411 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1412 enable_sjlj_exceptions=no
1415 CXXFLAGS="$old_CXXFLAGS"
1419 # This is a tad weird, for hysterical raisins. We have to map enable/disable
1420 # to two different models.
1421 case $enable_sjlj_exceptions in
1423 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1424 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1425 ac_exception_model_name=sjlj
1428 ac_exception_model_name="call frame"
1431 AC_MSG_ERROR([unable to detect exception model])
1435 AC_MSG_RESULT($ac_exception_model_name)
1440 dnl Add version tags to symbols in shared library (or not), additionally
1441 dnl marking other symbols as private/local (or not).
1443 dnl --enable-symvers=style adds a version script to the linker call when
1444 dnl creating the shared library. The choice of version script is
1445 dnl controlled by 'style'.
1446 dnl --disable-symvers does not.
1447 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1448 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1449 dnl choose a default style based on linker characteristics. Passing
1450 dnl 'no' disables versioning.
1452 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1454 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1455 [enables symbol versioning of the shared library],
1456 [permit yes|no|gnu])
1458 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1459 # don't know enough about $LD to do tricks...
1460 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1461 # FIXME The following test is too strict, in theory.
1462 if test $enable_shared = no ||
1464 test x$glibcxx_gnu_ld_version = x; then
1468 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1469 if test $enable_symvers != no; then
1470 AC_MSG_CHECKING([for shared libgcc])
1471 ac_save_CFLAGS="$CFLAGS"
1473 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1474 CFLAGS="$ac_save_CFLAGS"
1475 AC_MSG_RESULT($glibcxx_shared_libgcc)
1478 # For GNU ld, we need at least this version. The format is described in
1479 # GLIBCXX_CHECK_LINKER_FEATURES above.
1480 glibcxx_min_gnu_ld_version=21400
1481 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1483 # Check to see if unspecified "yes" value can win, given results above.
1484 # Change "yes" into either "no" or a style name.
1485 if test $enable_symvers = yes; then
1486 if test $with_gnu_ld = yes &&
1487 test $glibcxx_shared_libgcc = yes;
1489 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1492 # The right tools, the right setup, but too old. Fallbacks?
1493 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1494 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1495 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1496 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1497 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1498 # Globbing fix is present, proper block support is not.
1499 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1500 dnl enable_symvers=???
1501 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1505 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1511 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1512 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1513 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1514 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1519 # Everything parsed; figure out what file to use.
1520 case $enable_symvers in
1522 SYMVER_MAP=config/linker-map.dummy
1525 SYMVER_MAP=config/linker-map.gnu
1526 AC_DEFINE(_GLIBCXX_SYMVER)
1530 AC_SUBST(SYMVER_MAP)
1531 AC_SUBST(port_specific_symbol_files)
1532 AM_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1533 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1538 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1539 dnl We must stage the required headers so that they will be installed
1540 dnl with the library (unlike libgcc, the STL implementation is provided
1541 dnl solely within headers). Since we must not inject random user-space
1542 dnl macro names into user-provided C++ code, we first stage into <file>-in
1543 dnl and process to <file> with an output command. The reason for a two-
1544 dnl stage process here is to correctly handle $srcdir!=$objdir without
1545 dnl having to write complex code (the sed commands to clean the macro
1546 dnl namespace are complex and fragile enough as it is). We must also
1547 dnl add a relative path so that -I- is supported properly.
1550 dnl glibcxx_thread_h
1553 dnl HAVE_GTHR_DEFAULT
1554 dnl _GLIBCXX_SUPPORTS_WEAK
1556 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1557 AC_MSG_CHECKING([for thread model used by GCC])
1558 target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1559 AC_MSG_RESULT([$target_thread_file])
1561 if test $target_thread_file != single; then
1562 AC_DEFINE(HAVE_GTHR_DEFAULT)
1563 AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1566 glibcxx_thread_h=gthr-$target_thread_file.h
1567 AC_SUBST(glibcxx_thread_h)
1571 # Check whether LC_MESSAGES is available in <locale.h>.
1572 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1574 # This file file be copied and used freely without restrictions. It can
1575 # be used in projects which are not available under the GNU Public License
1576 # but which still want to provide support for the GNU gettext functionality.
1577 # Please note that the actual code is *not* freely available.
1580 AC_DEFUN(AC_LC_MESSAGES, [
1581 AC_CHECK_HEADER(locale.h, [
1582 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1583 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1584 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1585 if test $ac_cv_val_LC_MESSAGES = yes; then
1586 AC_DEFINE(HAVE_LC_MESSAGES)
1592 sinclude([../libtool.m4])
1593 dnl The lines below arrange for aclocal not to bring an installed
1594 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1595 dnl add a definition of LIBTOOL to Makefile.in.
1596 ifelse(,,,[AC_SUBST(LIBTOOL)
1597 AC_DEFUN([AM_PROG_LIBTOOL])
1598 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1599 AC_DEFUN([AC_PROG_LD])
1602 dnl vim:et:ts=2:sw=2
1604 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1606 # This program is free software; you can redistribute it and/or modify
1607 # it under the terms of the GNU General Public License as published by
1608 # the Free Software Foundation; either version 2, or (at your option)
1609 # any later version.
1611 # This program is distributed in the hope that it will be useful,
1612 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1613 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1614 # GNU General Public License for more details.
1616 # You should have received a copy of the GNU General Public License
1617 # along with this program; if not, write to the Free Software
1618 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1623 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1624 # ---------------------------------------------------
1625 # Add --enable-multilib to configure.
1626 AC_DEFUN([AM_ENABLE_MULTILIB],
1627 [# Default to --enable-multilib
1628 AC_ARG_ENABLE(multilib,
1629 [ --enable-multilib build many library versions (default)],
1630 [case "$enableval" in
1631 yes) multilib=yes ;;
1633 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1637 # We may get other options which we leave undocumented:
1638 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1639 # See config-ml.in if you want the gory details.
1641 if test "$srcdir" = "."; then
1642 if test "$with_target_subdir" != "."; then
1643 multi_basedir="$srcdir/$with_multisrctop../$2"
1645 multi_basedir="$srcdir/$with_multisrctop$2"
1648 multi_basedir="$srcdir/$2"
1650 AC_SUBST(multi_basedir)
1652 AC_OUTPUT_COMMANDS([
1653 # Only add multilib support code if we just rebuilt the top-level
1655 case " $CONFIG_FILES " in
1656 *" ]m4_default([$1],Makefile)[ "*)
1657 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1664 with_multisubdir="$with_multisubdir"
1665 with_multisrctop="$with_multisrctop"
1666 with_target_subdir="$with_target_subdir"
1667 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1668 multi_basedir="$multi_basedir"
1669 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1672 # isc-posix.m4 serial 2 (gettext-0.11.2)
1673 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1674 dnl This file is free software, distributed under the terms of the GNU
1675 dnl General Public License. As a special exception to the GNU General
1676 dnl Public License, this file may be distributed as part of a program
1677 dnl that contains a configuration script generated by Autoconf, under
1678 dnl the same distribution terms as the rest of that program.
1680 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1682 # This test replaces the one in autoconf.
1683 # Currently this macro should have the same name as the autoconf macro
1684 # because gettext's gettext.m4 (distributed in the automake package)
1685 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1686 # give these diagnostics:
1687 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1688 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1690 undefine([AC_ISC_POSIX])
1692 AC_DEFUN([AC_ISC_POSIX],
1694 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1695 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1699 # Add --enable-maintainer-mode option to configure.
1702 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1704 # This program is free software; you can redistribute it and/or modify
1705 # it under the terms of the GNU General Public License as published by
1706 # the Free Software Foundation; either version 2, or (at your option)
1707 # any later version.
1709 # This program is distributed in the hope that it will be useful,
1710 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1711 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1712 # GNU General Public License for more details.
1714 # You should have received a copy of the GNU General Public License
1715 # along with this program; if not, write to the Free Software
1716 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1721 AC_DEFUN([AM_MAINTAINER_MODE],
1722 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1723 dnl maintainer-mode is disabled by default
1724 AC_ARG_ENABLE(maintainer-mode,
1725 [ --enable-maintainer-mode enable make rules and dependencies not useful
1726 (and sometimes confusing) to the casual installer],
1727 USE_MAINTAINER_MODE=$enableval,
1728 USE_MAINTAINER_MODE=no)
1729 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1730 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1731 MAINT=$MAINTAINER_MODE_TRUE
1736 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1738 # AM_CONDITIONAL -*- Autoconf -*-
1740 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1742 # This program is free software; you can redistribute it and/or modify
1743 # it under the terms of the GNU General Public License as published by
1744 # the Free Software Foundation; either version 2, or (at your option)
1745 # any later version.
1747 # This program is distributed in the hope that it will be useful,
1748 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1749 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1750 # GNU General Public License for more details.
1752 # You should have received a copy of the GNU General Public License
1753 # along with this program; if not, write to the Free Software
1754 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1761 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1762 # -------------------------------------
1763 # Define a conditional.
1764 AC_DEFUN([AM_CONDITIONAL],
1765 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1766 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1768 AC_SUBST([$1_FALSE])
1776 AC_CONFIG_COMMANDS_PRE(
1777 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1778 AC_MSG_ERROR([conditional "$1" was never defined.
1779 Usually this means the macro was only invoked conditionally.])
1782 # Do all the work for Automake. -*- Autoconf -*-
1784 # This macro actually does too much some checks are only needed if
1785 # your package does certain things. But this isn't really a big deal.
1787 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1788 # Free Software Foundation, Inc.
1790 # This program is free software; you can redistribute it and/or modify
1791 # it under the terms of the GNU General Public License as published by
1792 # the Free Software Foundation; either version 2, or (at your option)
1793 # any later version.
1795 # This program is distributed in the hope that it will be useful,
1796 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1797 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1798 # GNU General Public License for more details.
1800 # You should have received a copy of the GNU General Public License
1801 # along with this program; if not, write to the Free Software
1802 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1809 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1810 # the ones we care about.
1811 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1813 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1814 # AM_INIT_AUTOMAKE([OPTIONS])
1815 # -----------------------------------------------
1816 # The call with PACKAGE and VERSION arguments is the old style
1817 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1818 # and VERSION should now be passed to AC_INIT and removed from
1819 # the call to AM_INIT_AUTOMAKE.
1820 # We support both call styles for the transition. After
1821 # the next Automake release, Autoconf can make the AC_INIT
1822 # arguments mandatory, and then we can depend on a new Autoconf
1823 # release and drop the old call support.
1824 AC_DEFUN([AM_INIT_AUTOMAKE],
1825 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1826 AC_REQUIRE([AC_PROG_INSTALL])dnl
1827 # test to see if srcdir already configured
1828 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1829 test -f $srcdir/config.status; then
1830 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1833 # test whether we have cygpath
1834 if test -z "$CYGPATH_W"; then
1835 if (cygpath --version) >/dev/null 2>/dev/null; then
1836 CYGPATH_W='cygpath -w'
1841 AC_SUBST([CYGPATH_W])
1843 # Define the identity of the package.
1844 dnl Distinguish between old-style and new-style calls.
1846 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1847 AC_SUBST([PACKAGE], [$1])dnl
1848 AC_SUBST([VERSION], [$2])],
1849 [_AM_SET_OPTIONS([$1])dnl
1850 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1851 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1853 _AM_IF_OPTION([no-define],,
1854 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1855 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1857 # Some tools Automake needs.
1858 AC_REQUIRE([AM_SANITY_CHECK])dnl
1859 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1860 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1861 AM_MISSING_PROG(AUTOCONF, autoconf)
1862 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1863 AM_MISSING_PROG(AUTOHEADER, autoheader)
1864 AM_MISSING_PROG(MAKEINFO, makeinfo)
1865 AM_MISSING_PROG(AMTAR, tar)
1867 AM_PROG_INSTALL_STRIP
1868 # We need awk for the "check" target. The system "awk" is bad on
1870 AC_REQUIRE([AC_PROG_AWK])dnl
1871 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1872 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1874 _AM_IF_OPTION([no-dependencies],,
1875 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1876 [_AM_DEPENDENCIES(CC)],
1877 [define([AC_PROG_CC],
1878 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1879 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1880 [_AM_DEPENDENCIES(CXX)],
1881 [define([AC_PROG_CXX],
1882 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1887 # When config.status generates a header, we must update the stamp-h file.
1888 # This file resides in the same directory as the config header
1889 # that is generated. The stamp files are numbered to have different names.
1891 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1892 # loop where config.status creates the headers, so we can generate
1893 # our stamp files there.
1894 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1895 [# Compute $1's index in $config_headers.
1897 for _am_header in $config_headers :; do
1902 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1905 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1907 # Copyright 2002 Free Software Foundation, Inc.
1909 # This program is free software; you can redistribute it and/or modify
1910 # it under the terms of the GNU General Public License as published by
1911 # the Free Software Foundation; either version 2, or (at your option)
1912 # any later version.
1914 # This program is distributed in the hope that it will be useful,
1915 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1916 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1917 # GNU General Public License for more details.
1919 # You should have received a copy of the GNU General Public License
1920 # along with this program; if not, write to the Free Software
1921 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1923 # AM_AUTOMAKE_VERSION(VERSION)
1924 # ----------------------------
1925 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1926 # generated from the m4 files accompanying Automake X.Y.
1927 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1929 # AM_SET_CURRENT_AUTOMAKE_VERSION
1930 # -------------------------------
1931 # Call AM_AUTOMAKE_VERSION so it can be traced.
1932 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1933 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1934 [AM_AUTOMAKE_VERSION([1.7.6])])
1936 # Helper functions for option handling. -*- Autoconf -*-
1938 # Copyright 2001, 2002 Free Software Foundation, Inc.
1940 # This program is free software; you can redistribute it and/or modify
1941 # it under the terms of the GNU General Public License as published by
1942 # the Free Software Foundation; either version 2, or (at your option)
1943 # any later version.
1945 # This program is distributed in the hope that it will be useful,
1946 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1947 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1948 # GNU General Public License for more details.
1950 # You should have received a copy of the GNU General Public License
1951 # along with this program; if not, write to the Free Software
1952 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1957 # _AM_MANGLE_OPTION(NAME)
1958 # -----------------------
1959 AC_DEFUN([_AM_MANGLE_OPTION],
1960 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1962 # _AM_SET_OPTION(NAME)
1963 # ------------------------------
1964 # Set option NAME. Presently that only means defining a flag for this option.
1965 AC_DEFUN([_AM_SET_OPTION],
1966 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1968 # _AM_SET_OPTIONS(OPTIONS)
1969 # ----------------------------------
1970 # OPTIONS is a space-separated list of Automake options.
1971 AC_DEFUN([_AM_SET_OPTIONS],
1972 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1974 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1975 # -------------------------------------------
1976 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1977 AC_DEFUN([_AM_IF_OPTION],
1978 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1981 # Check to make sure that the build environment is sane.
1984 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1986 # This program is free software; you can redistribute it and/or modify
1987 # it under the terms of the GNU General Public License as published by
1988 # the Free Software Foundation; either version 2, or (at your option)
1989 # any later version.
1991 # This program is distributed in the hope that it will be useful,
1992 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1993 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1994 # GNU General Public License for more details.
1996 # You should have received a copy of the GNU General Public License
1997 # along with this program; if not, write to the Free Software
1998 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2005 AC_DEFUN([AM_SANITY_CHECK],
2006 [AC_MSG_CHECKING([whether build environment is sane])
2009 echo timestamp > conftest.file
2010 # Do `set' in a subshell so we don't clobber the current shell's
2011 # arguments. Must try -L first in case configure is actually a
2012 # symlink; some systems play weird games with the mod time of symlinks
2013 # (eg FreeBSD returns the mod time of the symlink's containing
2016 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2017 if test "$[*]" = "X"; then
2019 set X `ls -t $srcdir/configure conftest.file`
2022 if test "$[*]" != "X $srcdir/configure conftest.file" \
2023 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2025 # If neither matched, then we have a broken ls. This can happen
2026 # if, for instance, CONFIG_SHELL is bash and it inherits a
2027 # broken ls alias from the environment. This has actually
2028 # happened. Such a system could not be considered "sane".
2029 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2030 alias in your environment])
2033 test "$[2]" = conftest.file
2039 AC_MSG_ERROR([newly created file is older than distributed files!
2040 Check your system clock])
2042 AC_MSG_RESULT(yes)])
2047 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2049 # This program is free software; you can redistribute it and/or modify
2050 # it under the terms of the GNU General Public License as published by
2051 # the Free Software Foundation; either version 2, or (at your option)
2052 # any later version.
2054 # This program is distributed in the hope that it will be useful,
2055 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2056 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2057 # GNU General Public License for more details.
2059 # You should have received a copy of the GNU General Public License
2060 # along with this program; if not, write to the Free Software
2061 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2066 # AM_MISSING_PROG(NAME, PROGRAM)
2067 # ------------------------------
2068 AC_DEFUN([AM_MISSING_PROG],
2069 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2070 $1=${$1-"${am_missing_run}$2"}
2074 # AM_MISSING_HAS_RUN
2075 # ------------------
2076 # Define MISSING if not defined so far and test if it supports --run.
2077 # If it does, set am_missing_run to use it, otherwise, to nothing.
2078 AC_DEFUN([AM_MISSING_HAS_RUN],
2079 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2080 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2081 # Use eval to expand $SHELL
2082 if eval "$MISSING --run true"; then
2083 am_missing_run="$MISSING --run "
2086 AC_MSG_WARN([`missing' script is too old or missing])
2092 # Copyright 2001 Free Software Foundation, Inc.
2094 # This program is free software; you can redistribute it and/or modify
2095 # it under the terms of the GNU General Public License as published by
2096 # the Free Software Foundation; either version 2, or (at your option)
2097 # any later version.
2099 # This program is distributed in the hope that it will be useful,
2100 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2101 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2102 # GNU General Public License for more details.
2104 # You should have received a copy of the GNU General Public License
2105 # along with this program; if not, write to the Free Software
2106 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2109 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2110 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2111 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2113 # Of course, Automake must honor this variable whenever it calls a
2114 # tool from the auxiliary directory. The problem is that $srcdir (and
2115 # therefore $ac_aux_dir as well) can be either absolute or relative,
2116 # depending on how configure is run. This is pretty annoying, since
2117 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2118 # source directory, any form will work fine, but in subdirectories a
2119 # relative path needs to be adjusted first.
2121 # $ac_aux_dir/missing
2122 # fails when called from a subdirectory if $ac_aux_dir is relative
2123 # $top_srcdir/$ac_aux_dir/missing
2124 # fails if $ac_aux_dir is absolute,
2125 # fails when called from a subdirectory in a VPATH build with
2126 # a relative $ac_aux_dir
2128 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2129 # are both prefixed by $srcdir. In an in-source build this is usually
2130 # harmless because $srcdir is `.', but things will broke when you
2131 # start a VPATH build or use an absolute $srcdir.
2133 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2134 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2135 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2136 # and then we would define $MISSING as
2137 # MISSING="\${SHELL} $am_aux_dir/missing"
2138 # This will work as long as MISSING is not called from configure, because
2139 # unfortunately $(top_srcdir) has no meaning in configure.
2140 # However there are other variables, like CC, which are often used in
2141 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2143 # Another solution, used here, is to always expand $ac_aux_dir to an
2144 # absolute PATH. The drawback is that using absolute paths prevent a
2145 # configured tree to be moved without reconfiguration.
2147 # Rely on autoconf to set up CDPATH properly.
2150 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2151 # expand $ac_aux_dir to an absolute path
2152 am_aux_dir=`cd $ac_aux_dir && pwd`
2155 # AM_PROG_INSTALL_SH
2156 # ------------------
2157 # Define $install_sh.
2159 # Copyright 2001 Free Software Foundation, Inc.
2161 # This program is free software; you can redistribute it and/or modify
2162 # it under the terms of the GNU General Public License as published by
2163 # the Free Software Foundation; either version 2, or (at your option)
2164 # any later version.
2166 # This program is distributed in the hope that it will be useful,
2167 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2168 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2169 # GNU General Public License for more details.
2171 # You should have received a copy of the GNU General Public License
2172 # along with this program; if not, write to the Free Software
2173 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2176 AC_DEFUN([AM_PROG_INSTALL_SH],
2177 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2178 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2179 AC_SUBST(install_sh)])
2181 # AM_PROG_INSTALL_STRIP
2183 # Copyright 2001 Free Software Foundation, Inc.
2185 # This program is free software; you can redistribute it and/or modify
2186 # it under the terms of the GNU General Public License as published by
2187 # the Free Software Foundation; either version 2, or (at your option)
2188 # any later version.
2190 # This program is distributed in the hope that it will be useful,
2191 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2192 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2193 # GNU General Public License for more details.
2195 # You should have received a copy of the GNU General Public License
2196 # along with this program; if not, write to the Free Software
2197 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2200 # One issue with vendor `install' (even GNU) is that you can't
2201 # specify the program used to strip binaries. This is especially
2202 # annoying in cross-compiling environments, where the build's strip
2203 # is unlikely to handle the host's binaries.
2204 # Fortunately install-sh will honor a STRIPPROG variable, so we
2205 # always use install-sh in `make install-strip', and initialize
2206 # STRIPPROG with the value of the STRIP variable (set by the user).
2207 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2208 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2209 # Installed binaries are usually stripped using `strip' when the user
2210 # run `make install-strip'. However `strip' might not be the right
2211 # tool to use in cross-compilation environments, therefore Automake
2212 # will honor the `STRIP' environment variable to overrule this program.
2213 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2214 if test "$cross_compiling" != no; then
2215 AC_CHECK_TOOL([STRIP], [strip], :)
2217 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2218 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2221 # Copyright (C) 2003 Free Software Foundation, Inc.
2223 # This program is free software; you can redistribute it and/or modify
2224 # it under the terms of the GNU General Public License as published by
2225 # the Free Software Foundation; either version 2, or (at your option)
2226 # any later version.
2228 # This program is distributed in the hope that it will be useful,
2229 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2230 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2231 # GNU General Public License for more details.
2233 # You should have received a copy of the GNU General Public License
2234 # along with this program; if not, write to the Free Software
2235 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2240 # Check whether the underlying file-system supports filenames
2241 # with a leading dot. For instance MS-DOS doesn't.
2242 AC_DEFUN([AM_SET_LEADING_DOT],
2243 [rm -rf .tst 2>/dev/null
2244 mkdir .tst 2>/dev/null
2245 if test -d .tst; then
2250 rmdir .tst 2>/dev/null
2251 AC_SUBST([am__leading_dot])])
2253 # serial 5 -*- Autoconf -*-
2255 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2257 # This program is free software; you can redistribute it and/or modify
2258 # it under the terms of the GNU General Public License as published by
2259 # the Free Software Foundation; either version 2, or (at your option)
2260 # any later version.
2262 # This program is distributed in the hope that it will be useful,
2263 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2264 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2265 # GNU General Public License for more details.
2267 # You should have received a copy of the GNU General Public License
2268 # along with this program; if not, write to the Free Software
2269 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2273 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2274 # written in clear, in which case automake, when reading aclocal.m4,
2275 # will think it sees a *use*, and therefore will trigger all it's
2276 # C support machinery. Also note that it means that autoscan, seeing
2277 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2281 # _AM_DEPENDENCIES(NAME)
2282 # ----------------------
2283 # See how the compiler implements dependency checking.
2284 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2285 # We try a few techniques and use that to set a single cache variable.
2287 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2288 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2289 # dependency, and given that the user is not expected to run this macro,
2290 # just rely on AC_PROG_CC.
2291 AC_DEFUN([_AM_DEPENDENCIES],
2292 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2293 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2294 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2295 AC_REQUIRE([AM_DEP_TRACK])dnl
2297 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2298 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2299 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2300 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2301 [depcc="$$1" am_compiler_list=])
2303 AC_CACHE_CHECK([dependency style of $depcc],
2304 [am_cv_$1_dependencies_compiler_type],
2305 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2306 # We make a subdir and do the tests there. Otherwise we can end up
2307 # making bogus files that we don't know about and never remove. For
2308 # instance it was reported that on HP-UX the gcc test will end up
2309 # making a dummy file named `D' -- because `-MD' means `put the output
2312 # Copy depcomp to subdir because otherwise we won't find it if we're
2313 # using a relative directory.
2314 cp "$am_depcomp" conftest.dir
2316 # We will build objects and dependencies in a subdirectory because
2317 # it helps to detect inapplicable dependency modes. For instance
2318 # both Tru64's cc and ICC support -MD to output dependencies as a
2319 # side effect of compilation, but ICC will put the dependencies in
2320 # the current directory while Tru64 will put them in the object
2324 am_cv_$1_dependencies_compiler_type=none
2325 if test "$am_compiler_list" = ""; then
2326 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2328 for depmode in $am_compiler_list; do
2329 # Setup a source with many dependencies, because some compilers
2330 # like to wrap large dependency lists on column 80 (with \), and
2331 # we should not choose a depcomp mode which is confused by this.
2333 # We need to recreate these files for each test, as the compiler may
2334 # overwrite some of them when testing with obscure command lines.
2335 # This happens at least with the AIX C compiler.
2337 for i in 1 2 3 4 5 6; do
2338 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2341 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2345 # after this tag, mechanisms are not by side-effect, so they'll
2346 # only be used when explicitly requested
2347 if test "x$enable_dependency_tracking" = xyes; then
2355 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2356 # mode. It turns out that the SunPro C++ compiler does not properly
2357 # handle `-M -o', and we need to detect this.
2358 if depmode=$depmode \
2359 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2360 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2361 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2362 >/dev/null 2>conftest.err &&
2363 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2364 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2365 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2366 # icc doesn't choke on unknown options, it will just issue warnings
2367 # (even with -Werror). So we grep stderr for any message
2368 # that says an option was ignored.
2369 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2370 am_cv_$1_dependencies_compiler_type=$depmode
2379 am_cv_$1_dependencies_compiler_type=none
2382 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2383 AM_CONDITIONAL([am__fastdep$1], [
2384 test "x$enable_dependency_tracking" != xno \
2385 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2391 # Choose a directory name for dependency files.
2392 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2393 AC_DEFUN([AM_SET_DEPDIR],
2394 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2395 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2401 AC_DEFUN([AM_DEP_TRACK],
2402 [AC_ARG_ENABLE(dependency-tracking,
2403 [ --disable-dependency-tracking Speeds up one-time builds
2404 --enable-dependency-tracking Do not reject slow dependency extractors])
2405 if test "x$enable_dependency_tracking" != xno; then
2406 am_depcomp="$ac_aux_dir/depcomp"
2409 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2410 AC_SUBST([AMDEPBACKSLASH])
2413 # Generate code to set up dependency tracking. -*- Autoconf -*-
2415 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2417 # This program is free software; you can redistribute it and/or modify
2418 # it under the terms of the GNU General Public License as published by
2419 # the Free Software Foundation; either version 2, or (at your option)
2420 # any later version.
2422 # This program is distributed in the hope that it will be useful,
2423 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2424 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2425 # GNU General Public License for more details.
2427 # You should have received a copy of the GNU General Public License
2428 # along with this program; if not, write to the Free Software
2429 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2434 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2435 # ------------------------------
2436 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2437 [for mf in $CONFIG_FILES; do
2438 # Strip MF so we end up with the name of the file.
2439 mf=`echo "$mf" | sed -e 's/:.*$//'`
2440 # Check whether this is an Automake generated Makefile or not.
2441 # We used to match only the files named `Makefile.in', but
2442 # some people rename them; so instead we look at the file content.
2443 # Grep'ing the first line is not enough: some people post-process
2444 # each Makefile.in and add a new line on top of each file to say so.
2445 # So let's grep whole file.
2446 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2447 dirpart=`AS_DIRNAME("$mf")`
2451 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2452 # Extract the definition of DEP_FILES from the Makefile without
2454 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2455 test -z "$DEPDIR" && continue
2456 # When using ansi2knr, U may be empty or an underscore; expand it
2457 U=`sed -n -e '/^U = / s///p' < "$mf"`
2458 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2459 # We invoke sed twice because it is the simplest approach to
2460 # changing $(DEPDIR) to its actual value in the expansion.
2461 for file in `sed -n -e '
2462 /^DEP_FILES = .*\\\\$/ {
2471 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2472 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2473 # Make sure the directory exists.
2474 test -f "$dirpart/$file" && continue
2475 fdir=`AS_DIRNAME(["$file"])`
2476 AS_MKDIR_P([$dirpart/$fdir])
2477 # echo "creating $dirpart/$file"
2478 echo '# dummy' > "$dirpart/$file"
2481 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2484 # AM_OUTPUT_DEPENDENCY_COMMANDS
2485 # -----------------------------
2486 # This macro should only be invoked once -- use via AC_REQUIRE.
2488 # This code is only required when automatic dependency tracking
2489 # is enabled. FIXME. This creates each `.P' file that we will
2490 # need in order to bootstrap the dependency handling code.
2491 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2492 [AC_CONFIG_COMMANDS([depfiles],
2493 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2494 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2497 # Check to see how 'make' treats includes. -*- Autoconf -*-
2499 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2501 # This program is free software; you can redistribute it and/or modify
2502 # it under the terms of the GNU General Public License as published by
2503 # the Free Software Foundation; either version 2, or (at your option)
2504 # any later version.
2506 # This program is distributed in the hope that it will be useful,
2507 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2508 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2509 # GNU General Public License for more details.
2511 # You should have received a copy of the GNU General Public License
2512 # along with this program; if not, write to the Free Software
2513 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2520 # Check to see how make treats includes.
2521 AC_DEFUN([AM_MAKE_INCLUDE],
2522 [am_make=${MAKE-make}
2523 cat > confinc << 'END'
2528 # If we don't find an include directive, just comment out the code.
2529 AC_MSG_CHECKING([for style of include used by $am_make])
2533 # First try GNU make style include.
2534 echo "include confinc" > confmf
2535 # We grep out `Entering directory' and `Leaving directory'
2536 # messages which can occur if `w' ends up in MAKEFLAGS.
2537 # In particular we don't look at `^make:' because GNU make might
2538 # be invoked under some other name (usually "gmake"), in which
2539 # case it prints its new name instead of `make'.
2540 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2545 # Now try BSD make style include.
2546 if test "$am__include" = "#"; then
2547 echo '.include "confinc"' > confmf
2548 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2549 am__include=.include
2554 AC_SUBST([am__include])
2555 AC_SUBST([am__quote])
2556 AC_MSG_RESULT([$_am_result])
2557 rm -f confinc confmf