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]))
106 # We're almost certainly being configured before anything else which uses
107 # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
108 # we not cache the value of CXX that we "discover" here, because it's set
109 # to something unique for us and libjava. Other target libraries need to
110 # find CXX for themselves. We yank the rug out from under the normal AC_*
111 # process by sneakily renaming the cache variable. This also lets us debug
112 # the value of "our" CXX in postmortems.
114 # We must also force CXX to /not/ be a precious variable, otherwise the
115 # wrong (non-multilib-adjusted) value will be used in multilibs. This
116 # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
117 # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
120 # -fno-builtin must be present here so that a non-conflicting form of
121 # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
122 m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
123 m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
124 m4_define([_AC_ARG_VAR_PRECIOUS],[])
125 save_CXXFLAGS="$CXXFLAGS"
126 CXXFLAGS="$CXXFLAGS -fno-builtin"
128 CXXFLAGS="$save_CXXFLAGS"
129 m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
132 # For directory versioning (e.g., headers) and other variables.
133 AC_MSG_CHECKING([for GCC version number])
134 gcc_version=`$CXX -dumpversion`
135 AC_MSG_RESULT($gcc_version)
137 # For some reason, gettext needs this.
140 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
141 # available). Uncomment the next line to force a particular method.
145 AC_CHECK_TOOL(AS, as)
146 AC_CHECK_TOOL(AR, ar)
147 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
151 # Set up safe default values for all subsequent AM_CONDITIONAL tests.
154 #enable_libstdcxx_debug=no
155 #enable_libstdcxx_pch=no
161 # Find platform-specific directories containing configuration info.
162 # Also possibly modify flags used elsewhere, as needed by the platform.
167 m4_include([linkage.m4])
171 dnl Tests for newer compiler features, or features that are present in newer
172 dnl compiler versions but not older compiler versions still in use, should
176 dnl WERROR='-Werror' if requested and possible; g++'s that lack the
177 dnl new inlining code or the new system_header pragma will die on -Werror.
178 dnl Leave it out by default and use maint-mode to use it.
179 dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
180 dnl compiler supports it and the user has not requested debug mode.
182 AC_DEFUN(GLIBCXX_CHECK_COMPILER_FEATURES, [
183 # All these tests are for C++; save the language and the compiler flags.
184 # The CXXFLAGS thing is suspicious, but based on similar bits previously
185 # found in GLIBCXX_CONFIGURE.
188 ac_test_CXXFLAGS="${CXXFLAGS+set}"
189 ac_save_CXXFLAGS="$CXXFLAGS"
191 # Check for maintainer-mode bits.
192 if test x"$USE_MAINTAINER_MODE" = xno; then
198 # Check for -ffunction-sections -fdata-sections
199 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
200 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
201 AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
202 if test "$ac_test_CXXFLAGS" = set; then
203 CXXFLAGS="$ac_save_CXXFLAGS"
205 # this is the suspicious part
208 if test x"$ac_fdsections" = x"yes"; then
209 SECTION_FLAGS='-ffunction-sections -fdata-sections'
211 AC_MSG_RESULT($ac_fdsections)
215 AC_SUBST(SECTION_FLAGS)
220 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
221 dnl the native linker is in use, all variables will be defined to something
222 dnl safe (like an empty string).
225 dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
226 dnl OPT_LDFLAGS='-Wl,-O1' if possible
227 dnl LD (as a side effect of testing)
230 dnl glibcxx_gnu_ld_version (possibly)
232 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
233 dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
235 AC_DEFUN(GLIBCXX_CHECK_LINKER_FEATURES, [
236 # If we're not using GNU ld, then there's no point in even trying these
237 # tests. Check for that first. We should have already tested for gld
238 # by now (in libtool), but require it now just to be safe...
239 test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
240 test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
241 AC_REQUIRE([AC_PROG_LD])
242 AC_REQUIRE([AC_PROG_AWK])
244 # The name set by libtool depends on the version of libtool. Shame on us
245 # for depending on an impl detail, but c'est la vie. Older versions used
246 # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
247 # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
248 # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
249 # set (hence we're using an older libtool), then set it.
250 if test x${with_gnu_ld+set} != xset; then
251 if test x${ac_cv_prog_gnu_ld+set} != xset; then
252 # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
255 with_gnu_ld=$ac_cv_prog_gnu_ld
259 # Start by getting the version number. I think the libtool test already
260 # does some of this, but throws away the result.
262 ldver=`$LD --version 2>/dev/null | head -1 | \
263 sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
265 glibcxx_gnu_ld_version=`echo $ldver | \
266 $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
269 if test "$with_gnu_ld" = "notbroken"; then
270 # GNU ld it is! Joy and bunny rabbits!
272 # All these tests are for C++; save the language and the compiler flags.
273 # Need to do this so that g++ won't try to link in libstdc++
274 ac_test_CFLAGS="${CFLAGS+set}"
275 ac_save_CFLAGS="$CFLAGS"
276 CFLAGS='-x c++ -Wl,--gc-sections'
278 # Check for -Wl,--gc-sections
279 # XXX This test is broken at the moment, as symbols required for linking
280 # are now in libsupc++ (not built yet). In addition, this test has
281 # cored on solaris in the past. In addition, --gc-sections doesn't
282 # really work at the moment (keeps on discarding used sections, first
283 # .eh_frame and now some of the glibc sections for iconv).
284 # Bzzzzt. Thanks for playing, maybe next time.
285 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
293 ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
294 if test "$ac_test_CFLAGS" = set; then
295 CFLAGS="$ac_save_CFLAGS"
297 # this is the suspicious part
300 if test "$ac_sectionLDflags" = "yes"; then
301 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
303 AC_MSG_RESULT($ac_sectionLDflags)
306 # Set linker optimization flags.
307 if test x"$with_gnu_ld" = x"yes"; then
308 OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
311 AC_SUBST(SECTION_LDFLAGS)
312 AC_SUBST(OPT_LDFLAGS)
317 dnl Check to see if this target can enable the wchar_t parts.
318 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
319 dnl must have been previously checked.) By default, wide characters are
323 dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
324 dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
326 AC_DEFUN(GLIBCXX_CHECK_WCHAR_T_SUPPORT, [
327 # Test wchar.h for mbstate_t, which is needed for char_traits and
328 # others even if wchar_t support is not on.
329 AC_MSG_CHECKING([for mbstate_t])
330 AC_TRY_COMPILE([#include <wchar.h>],
331 [mbstate_t teststate;],
332 have_mbstate_t=yes, have_mbstate_t=no)
333 AC_MSG_RESULT($have_mbstate_t)
334 if test x"$have_mbstate_t" = xyes; then
335 AC_DEFINE(HAVE_MBSTATE_T)
338 # Sanity check for existence of ISO C99 headers for extended encoding.
339 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
340 AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
342 # Only continue checking if the ISO C99 headers exist and support is on.
343 if test x"$ac_has_wchar_h" = xyes &&
344 test x"$ac_has_wctype_h" = xyes &&
345 test x"$enable_c_mbchar" != xno; then
347 # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
348 # numeric_limits can instantiate type_traits<wchar_t>
349 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
350 AC_TRY_COMPILE([#include <wchar.h>],
351 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
352 has_wchar_minmax=yes, has_wchar_minmax=no)
353 AC_MSG_RESULT($has_wchar_minmax)
355 # Test wchar.h for WEOF, which is what we use to determine whether
356 # to specialize for char_traits<wchar_t> or not.
357 AC_MSG_CHECKING([for WEOF])
360 #include <stddef.h>],
362 has_weof=yes, has_weof=no)
363 AC_MSG_RESULT($has_weof)
365 # Tests for wide character functions used in char_traits<wchar_t>.
367 AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
370 # Checks for names injected into std:: by the c_std headers.
371 AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
372 fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
373 vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
374 mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
375 wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
376 wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
379 AC_MSG_CHECKING([for ISO C99 wchar_t support])
380 if test x"$has_weof" = xyes &&
381 test x"$has_wchar_minmax" = xyes &&
382 test x"$ac_wfuncs" = xyes;
384 ac_isoC99_wchar_t=yes
388 AC_MSG_RESULT($ac_isoC99_wchar_t)
390 # Use iconv for wchar_t to char conversions. As such, check for
391 # X/Open Portability Guide, version 2 features (XPG2).
392 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
393 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
395 # Check for existence of libiconv.a providing XPG2 wchar_t support.
396 AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
398 LIBS="$LIBS $libiconv"
400 AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
401 [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
405 AC_MSG_CHECKING([for XPG2 wchar_t support])
406 if test x"$ac_has_iconv_h" = xyes &&
407 test x"$ac_has_langinfo_h" = xyes &&
408 test x"$ac_XPG2funcs" = xyes;
414 AC_MSG_RESULT($ac_XPG2_wchar_t)
416 # At the moment, only enable wchar_t specializations if all the
417 # above support is present.
418 if test x"$ac_isoC99_wchar_t" = xyes &&
419 test x"$ac_XPG2_wchar_t" = xyes;
421 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
425 AC_MSG_CHECKING([for enabled wchar_t specializations])
426 AC_MSG_RESULT($enable_wchar_t)
431 dnl Check for headers for, and arguments to, the setrlimit() function.
432 dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
435 dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory
436 dnl various HAVE_MEMLIMIT_* for individual limit names
438 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT_ancilliary, [
441 #include <sys/time.h>
442 #include <sys/resource.h>
444 [ int f = RLIMIT_$1 ; ],
445 [glibcxx_mresult=1], [glibcxx_mresult=0])
446 AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult,
447 [Only used in build directory testsuite_hooks.h.])
450 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT, [
451 setrlimit_have_headers=yes
452 AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
454 [setrlimit_have_headers=no])
455 # If don't have the headers, then we can't run the tests now, and we
456 # won't be seeing any of these during testsuite compilation.
457 if test $setrlimit_have_headers = yes; then
458 # Can't do these in a loop, else the resulting syntax is wrong.
459 GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
460 GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
461 GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
462 GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
464 # Check for rlimit, setrlimit.
465 AC_CACHE_VAL(ac_setrlimit, [
468 #include <sys/time.h>
469 #include <sys/resource.h>
473 [ac_setrlimit=yes], [ac_setrlimit=no])
477 AC_MSG_CHECKING([for testsuite memory limit support])
478 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
480 AC_DEFINE(_GLIBCXX_MEM_LIMITS)
484 AC_MSG_RESULT($ac_mem_limits)
489 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
490 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
492 AC_DEFUN(GLIBCXX_CHECK_S_ISREG_OR_S_IFREG, [
493 AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
495 [#include <sys/stat.h>],
498 S_ISREG(buffer.st_mode);],
499 [glibcxx_cv_S_ISREG=yes],
500 [glibcxx_cv_S_ISREG=no])
502 AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
504 [#include <sys/stat.h>],
507 S_IFREG & buffer.st_mode;],
508 [glibcxx_cv_S_IFREG=yes],
509 [glibcxx_cv_S_IFREG=no])
511 if test $glibcxx_cv_S_ISREG = yes; then
512 AC_DEFINE(HAVE_S_ISREG)
513 elif test $glibcxx_cv_S_IFREG = yes; then
514 AC_DEFINE(HAVE_S_IFREG)
520 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
522 AC_DEFUN(GLIBCXX_CHECK_POLL, [
523 AC_CACHE_VAL(glibcxx_cv_POLL, [
526 [struct pollfd pfd[1];
527 pfd[0].events = POLLIN;
529 [glibcxx_cv_POLL=yes],
530 [glibcxx_cv_POLL=no])
532 if test $glibcxx_cv_POLL = yes; then
539 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
541 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
542 AC_CACHE_VAL(glibcxx_cv_WRITEV, [
544 [#include <sys/uio.h>],
545 [struct iovec iov[2];
547 [glibcxx_cv_WRITEV=yes],
548 [glibcxx_cv_WRITEV=no])
550 if test $glibcxx_cv_WRITEV = yes; then
551 AC_DEFINE(HAVE_WRITEV)
557 dnl Does any necessary configuration of the testsuite directory. Generates
558 dnl the testsuite_hooks.h header.
560 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
563 dnl enable_abi_check / GLIBCXX_TEST_ABI
567 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
568 if $GLIBCXX_IS_NATIVE; then
569 # Do checks for memory limit functions.
570 GLIBCXX_CHECK_SETRLIMIT
572 # Look for setenv, so that extended locale tests can be performed.
573 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
576 # Export file names for ABI checking.
577 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
578 AC_SUBST(baseline_dir)
580 # Determine if checking the ABI is desirable.
581 if test $enable_symvers = no; then
586 enable_abi_check=no ;;
588 enable_abi_check=yes ;;
592 AM_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
593 AM_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
598 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
602 dnl TOPLEVEL_INCLUDES
604 dnl LIBSUPCXX_INCLUDES
606 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
607 # Root level of the build directory include sources.
608 GLIBCXX_INCLUDES="-I$glibcxx_builddir/include/$host_alias -I$glibcxx_builddir/include"
610 # Passed down for canadian crosses.
611 if test $CANADIAN = yes; then
612 TOPLEVEL_INCLUDES='-I${includedir}'
615 LIBMATH_INCLUDES='-I${glibcxx_srcdir}/libmath'
617 LIBSUPCXX_INCLUDES='-I${glibcxx_srcdir}/libsupc++'
619 # Now, export this to all the little Makefiles....
620 AC_SUBST(GLIBCXX_INCLUDES)
621 AC_SUBST(TOPLEVEL_INCLUDES)
622 AC_SUBST(LIBMATH_INCLUDES)
623 AC_SUBST(LIBSUPCXX_INCLUDES)
628 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
629 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
632 dnl OPTIMIZE_CXXFLAGS
635 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
636 # Optimization flags that are probably a good idea for thrill-seekers. Just
637 # uncomment the lines below and make, everything else is ready to go...
638 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
640 AC_SUBST(OPTIMIZE_CXXFLAGS)
642 WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
648 dnl All installation directory information is determined here.
652 dnl glibcxx_prefixdir
653 dnl glibcxx_toolexecdir
654 dnl glibcxx_toolexeclibdir
656 dnl Assumes cross_compiling bits already done, and with_cross_host in
659 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
660 glibcxx_toolexecdir=no
661 glibcxx_toolexeclibdir=no
662 glibcxx_prefixdir=$prefix
664 AC_MSG_CHECKING([for gxx-include-dir])
665 AC_ARG_WITH([gxx-include-dir],
666 AC_HELP_STRING([--with-gxx-include-dir=DIR],
667 [installation directory for include files]),
669 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
670 no) gxx_include_dir=no ;;
671 *) gxx_include_dir=$withval ;;
673 [gxx_include_dir=no])
674 AC_MSG_RESULT($gxx_include_dir)
676 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
677 AC_ARG_ENABLE([version-specific-runtime-libs],
678 AC_HELP_STRING([--enable-version-specific-runtime-libs],
679 [Specify that runtime libraries should be installed in a compiler-specific directory]),
680 [case "$enableval" in
681 yes) version_specific_libs=yes ;;
682 no) version_specific_libs=no ;;
683 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
685 [version_specific_libs=no])
686 AC_MSG_RESULT($version_specific_libs)
688 # Default case for install directory for include files.
689 if test $version_specific_libs = no && test $gxx_include_dir = no; then
690 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
693 # Version-specific runtime libs processing.
694 if test $version_specific_libs = yes; then
695 # Need the gcc compiler version to know where to install libraries
696 # and header files if --enable-version-specific-runtime-libs option
698 if test x"$gxx_include_dir" = x"no"; then
699 gxx_include_dir='$libdir/gcc-lib/$host_alias/'$gcc_version/include/c++
701 glibcxx_toolexecdir='$libdir/gcc-lib/$host_alias'
702 glibcxx_toolexeclibdir='$toolexecdir/'$gcc_version'$(MULTISUBDIR)'
705 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
706 # Install a library built with a cross compiler in tooldir, not libdir.
707 if test x"$glibcxx_toolexecdir" = x"no"; then
708 if test -n "$with_cross_host" &&
709 test x"$with_cross_host" != x"no"; then
710 glibcxx_toolexecdir='$(exec_prefix)/$(host_alias)'
711 glibcxx_toolexeclibdir='$(toolexecdir)/lib'
713 glibcxx_toolexecdir='$(libdir)/gcc-lib/$(host_alias)'
714 glibcxx_toolexeclibdir='$(libdir)'
716 multi_os_directory=`$CC -print-multi-os-directory`
717 case $multi_os_directory in
718 .) ;; # Avoid trailing /.
719 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
723 AC_MSG_CHECKING([for install location])
724 AC_MSG_RESULT($gxx_include_dir)
726 AC_SUBST(glibcxx_prefixdir)
727 AC_SUBST(gxx_include_dir)
728 AC_SUBST(glibcxx_toolexecdir)
729 AC_SUBST(glibcxx_toolexeclibdir)
735 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
736 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
737 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
739 dnl See docs/html/17_intro/configury.html#enable for documentation.
741 m4_define([GLIBCXX_ENABLE],[dnl
742 m4_define([_g_switch],[--enable-$1])dnl
743 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
744 AC_ARG_ENABLE($1,_g_help,
749 m4_bpatsubst([$5],[permit ])) ;;
750 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
751 dnl Idea for future: generate a URL pointing to
752 dnl "onlinedocs/configopts.html#whatever"
759 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
763 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
764 m4_undefine([_g_switch])dnl
765 m4_undefine([_g_help])dnl
770 dnl Check for ISO/IEC 9899:1999 "C99" support.
772 dnl --enable-c99 defines _GLIBCXX_USE_C99
773 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
774 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
775 dnl Where DEFAULT is either `yes' or `no'.
776 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
778 AC_DEFUN(GLIBCXX_ENABLE_C99, [
779 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
784 # Check for the existence of <math.h> functions used if C99 is enabled.
786 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
787 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
788 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
789 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
790 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
791 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
792 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
793 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
794 AC_TRY_COMPILE([#include <math.h>],
795 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
796 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
797 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
798 AC_TRY_COMPILE([#include <math.h>],
799 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
800 AC_TRY_COMPILE([#include <math.h>],
801 [isunordered(0.0,0.0);],, [ac_c99_math=no])
802 AC_MSG_RESULT($ac_c99_math)
804 # Check for the existence in <stdio.h> of vscanf, et. al.
806 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
807 AC_TRY_COMPILE([#include <stdio.h>],
808 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
809 AC_TRY_COMPILE([#include <stdio.h>
811 void foo(char* fmt, ...)
812 {va_list args; va_start(args, fmt);
813 vfscanf(stderr, "%i", args);}],
814 [],, [ac_c99_stdio=no])
815 AC_TRY_COMPILE([#include <stdio.h>
817 void foo(char* fmt, ...)
818 {va_list args; va_start(args, fmt);
819 vscanf("%i", args);}],
820 [],, [ac_c99_stdio=no])
821 AC_TRY_COMPILE([#include <stdio.h>
823 void foo(char* fmt, ...)
824 {va_list args; va_start(args, fmt);
825 vsnprintf(fmt, 0, "%i", args);}],
826 [],, [ac_c99_stdio=no])
827 AC_TRY_COMPILE([#include <stdio.h>
829 void foo(char* fmt, ...)
830 {va_list args; va_start(args, fmt);
831 vsscanf(fmt, "%i", args);}],
832 [],, [ac_c99_stdio=no])
833 AC_MSG_RESULT($ac_c99_stdio)
835 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
837 AC_MSG_CHECKING([for lldiv_t declaration])
838 AC_CACHE_VAL(ac_c99_lldiv_t, [
839 AC_TRY_COMPILE([#include <stdlib.h>],
841 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
843 AC_MSG_RESULT($ac_c99_lldiv_t)
845 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
846 AC_TRY_COMPILE([#include <stdlib.h>],
847 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
848 AC_TRY_COMPILE([#include <stdlib.h>],
849 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
850 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
851 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
852 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
853 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
854 if test x"$ac_c99_lldiv_t" = x"no"; then
857 AC_MSG_RESULT($ac_c99_stdlib)
859 # Check for the existence of <wchar.h> functions used if C99 is enabled.
860 # XXX the wchar.h checks should be rolled into the general C99 bits.
862 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
863 AC_TRY_COMPILE([#include <wchar.h>],
864 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
865 AC_TRY_COMPILE([#include <wchar.h>],
866 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
867 AC_TRY_COMPILE([#include <wchar.h>],
868 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
869 AC_MSG_RESULT($ac_c99_wchar)
871 AC_MSG_CHECKING([for enabled ISO C99 support])
872 if test x"$ac_c99_math" = x"no" ||
873 test x"$ac_c99_stdio" = x"no" ||
874 test x"$ac_c99_stdlib" = x"no" ||
875 test x"$ac_c99_wchar" = x"no"; then
878 AC_MSG_RESULT($enable_c99)
880 # Option parsed, now set things appropriately
881 if test x"$enable_c99" = x"yes"; then
882 AC_DEFINE(_GLIBCXX_USE_C99)
890 dnl Check for what type of C headers to use.
892 dnl --enable-cheaders= [does stuff].
893 dnl --disable-cheaders [does not do anything, really].
894 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
895 dnl Where DEFAULT is either `c' or `c_std'.
897 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
898 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
899 [construct "C" headers for g++], [permit c|c_std])
900 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
902 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
904 AC_SUBST(C_INCLUDE_DIR)
905 AM_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
906 AM_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
907 AM_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
912 dnl Check for which locale library to use. The choice is mapped to
913 dnl a subdirectory of config/locale.
915 dnl Default is generic.
917 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
918 AC_MSG_CHECKING([for C locale to use])
919 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
920 [use MODEL for target locale package],
921 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
923 # If they didn't use this option switch, or if they specified --enable
924 # with no specific model, we'll have to look for one. If they
925 # specified --disable (???), do likewise.
926 if test $enable_clocale = no || test $enable_clocale = yes; then
930 # Either a known package, or "auto"
931 enable_clocale_flag=$enable_clocale
933 # Probe for locale support if no specific model is specified.
934 # Default to "generic".
935 if test $enable_clocale_flag = auto; then
936 case x${target_os} in
938 AC_EGREP_CPP([_GLIBCXX_ok], [
939 #include <features.h>
940 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
943 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
945 # Test for bugs early in glibc-2.2.x series
946 if test x$enable_clocale_flag = xgnu; then
948 #define _GNU_SOURCE 1
951 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
952 extern __typeof(newlocale) __newlocale;
953 extern __typeof(duplocale) __duplocale;
954 extern __typeof(strcoll_l) __strcoll_l;
958 const char __one[] = "Äuglein Augmen";
959 const char __two[] = "Äuglein";
964 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
965 loc_dup = __duplocale(loc);
966 i = __strcoll_l(__one, __two, loc);
967 j = __strcoll_l(__one, __two, loc_dup);
971 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
972 [enable_clocale_flag=generic])
975 # ... at some point put __strxfrm_l tests in as well.
978 enable_clocale_flag=generic
983 # Deal with gettext issues. Default to not using it (=no) until we detect
984 # support for it later. Let the user turn it off via --e/d, but let that
985 # default to on for easier handling.
988 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
992 # Set configure bits for specified locale package
993 case ${enable_clocale_flag} in
995 AC_MSG_RESULT(generic)
997 CLOCALE_H=config/locale/generic/c_locale.h
998 CLOCALE_CC=config/locale/generic/c_locale.cc
999 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1000 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1001 CCOLLATE_CC=config/locale/generic/collate_members.cc
1002 CCTYPE_CC=config/locale/generic/ctype_members.cc
1003 CMESSAGES_H=config/locale/generic/messages_members.h
1004 CMESSAGES_CC=config/locale/generic/messages_members.cc
1005 CMONEY_CC=config/locale/generic/monetary_members.cc
1006 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1007 CTIME_H=config/locale/generic/time_members.h
1008 CTIME_CC=config/locale/generic/time_members.cc
1009 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1014 # Declare intention to use gettext, and add support for specific
1016 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1019 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1020 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1021 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1024 # Export the build objects.
1025 for ling in $ALL_LINGUAS; do \
1026 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1027 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1029 AC_SUBST(glibcxx_MOFILES)
1030 AC_SUBST(glibcxx_POFILES)
1032 CLOCALE_H=config/locale/gnu/c_locale.h
1033 CLOCALE_CC=config/locale/gnu/c_locale.cc
1034 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1035 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1036 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1037 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1038 CMESSAGES_H=config/locale/gnu/messages_members.h
1039 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1040 CMONEY_CC=config/locale/gnu/monetary_members.cc
1041 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1042 CTIME_H=config/locale/gnu/time_members.h
1043 CTIME_CC=config/locale/gnu/time_members.cc
1044 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1047 AC_MSG_RESULT(IEEE 1003.1)
1049 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1050 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1051 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1052 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1053 CCOLLATE_CC=config/locale/generic/collate_members.cc
1054 CCTYPE_CC=config/locale/generic/ctype_members.cc
1055 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1056 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1057 CMONEY_CC=config/locale/generic/monetary_members.cc
1058 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1059 CTIME_H=config/locale/generic/time_members.h
1060 CTIME_CC=config/locale/generic/time_members.cc
1061 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1065 # This is where the testsuite looks for locale catalogs, using the
1066 # -DLOCALEDIR define during testsuite compilation.
1067 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1068 AC_SUBST(glibcxx_localedir)
1070 # A standalone libintl (e.g., GNU libintl) may be in use.
1071 if test $USE_NLS = yes; then
1072 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1073 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1075 if test $USE_NLS = yes; then
1076 AC_DEFINE(_GLIBCXX_USE_NLS)
1081 AC_SUBST(CCODECVT_H)
1082 AC_SUBST(CMESSAGES_H)
1083 AC_SUBST(CCODECVT_CC)
1084 AC_SUBST(CCOLLATE_CC)
1086 AC_SUBST(CMESSAGES_CC)
1088 AC_SUBST(CNUMERIC_CC)
1091 AC_SUBST(CLOCALE_CC)
1092 AC_SUBST(CLOCALE_INTERNAL_H)
1097 dnl Check for whether the Boost-derived checks should be turned on.
1099 dnl --enable-concept-checks turns them on.
1100 dnl --disable-concept-checks leaves them off.
1101 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1102 dnl Where DEFAULT is either `yes' or `no'.
1104 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1105 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1106 if test $enable_concept_checks = yes; then
1107 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1113 dnl Check for which I/O library to use: stdio, or something specific.
1115 dnl Default is stdio.
1117 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1118 AC_MSG_CHECKING([for underlying I/O to use])
1119 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1120 [use target-specific I/O package], [permit stdio])
1122 # Now that libio has been removed, you can have any color you want as long
1123 # as it's black. This is one big no-op until other packages are added, but
1124 # showing the framework never hurts.
1125 case ${enable_cstdio} in
1127 CSTDIO_H=config/io/c_io_stdio.h
1128 BASIC_FILE_H=config/io/basic_file_stdio.h
1129 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1130 AC_MSG_RESULT(stdio)
1134 dnl Set directory for fpos.h
1135 FPOS_H=$fpos_include_dir
1139 AC_SUBST(BASIC_FILE_H)
1140 AC_SUBST(BASIC_FILE_CC)
1145 dnl Check for "unusual" flags to pass to the compiler while building.
1147 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1148 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1149 dnl --disable-cxx-flags passes nothing.
1150 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1151 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1152 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1153 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1154 dnl If "default flags" is an empty string, the effect is the same
1155 dnl as --disable or --enable=no.
1157 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1158 AC_MSG_CHECKING([for extra compiler flags for building])
1159 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1160 [pass compiler FLAGS when building library],
1161 [case "x$enable_cxx_flags" in
1162 xno | x) enable_cxx_flags= ;;
1164 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1167 # Run through flags (either default or command-line) and set anything
1168 # extra (e.g., #defines) that must accompany particular g++ options.
1169 if test -n "$enable_cxx_flags"; then
1170 for f in $enable_cxx_flags; do
1174 *) # and we're trying to pass /what/ exactly?
1175 AC_MSG_ERROR([compiler flags start with a -]) ;;
1180 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1181 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1182 AC_SUBST(EXTRA_CXX_FLAGS)
1187 dnl Check for wide character support. Has the same effect as the option
1188 dnl in gcc's configure, but in a form that autoconf can mess with.
1190 dnl --enable-c-mbchar requests all the wchar_t stuff.
1191 dnl --disable-c-mbchar doesn't.
1192 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1193 dnl Where DEFAULT is either `yes' or `no'.
1195 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1196 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1197 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1202 dnl Check to see if debugging libraries are to be built.
1204 dnl --enable-libstdcxx-debug
1205 dnl builds a separate set of debugging libraries in addition to the
1206 dnl normal (shared, static) libstdc++ binaries.
1208 dnl --disable-libstdcxx-debug
1209 dnl builds only one (non-debug) version of libstdc++.
1211 dnl --enable-libstdcxx-debug-flags=FLAGS
1212 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1214 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1215 dnl Where DEFAULT is either `yes' or `no'.
1217 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1218 AC_MSG_CHECKING([for additional debug build])
1219 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1220 AC_MSG_RESULT($enable_libstdcxx_debug)
1221 AM_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1226 dnl Check for explicit debug flags.
1228 dnl --enable-libstdcxx-debug-flags='-O1'
1229 dnl is a general method for passing flags to be used when
1230 dnl building debug libraries with --enable-debug.
1232 dnl --disable-libstdcxx-debug-flags does nothing.
1233 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1234 dnl If "default flags" is an empty string, the effect is the same
1235 dnl as --disable or --enable=no.
1237 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1238 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1239 [pass compiler FLAGS when building debug library],
1240 [case "x$enable_libstdcxx_debug_flags" in
1241 xno | x) enable_libstdcxx_debug_flags= ;;
1243 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1246 # Option parsed, now set things appropriately
1247 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1248 AC_SUBST(DEBUG_FLAGS)
1250 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1255 dnl Check for libunwind exception handling support. If enabled, then
1256 dnl we assume that the _Unwind_* functions that make up the Unwind ABI
1257 dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
1258 dnl libunwind instead of libgcc, and that libstdc++ has a dependency
1259 dnl on libunwind as well as libgcc.
1261 dnl --enable-libunwind-exceptions forces the use of libunwind.
1262 dnl --disable-libunwind-exceptions assumes there is no libunwind.
1267 AC_DEFUN(GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS, [
1268 AC_MSG_CHECKING([for use of libunwind])
1269 GLIBCXX_ENABLE(libunwind-exceptions,no,,
1270 [force use of libunwind for exceptions])
1271 AC_MSG_RESULT($use_libunwind_exceptions)
1272 if test $enable_libunwind_exceptions = yes; then
1273 LIBUNWIND_FLAG="-lunwind"
1277 AC_SUBST(LIBUNWIND_FLAG)
1282 dnl Check for template specializations for the 'long long' type extension.
1283 dnl The result determines only whether 'long long' I/O is enabled; things
1284 dnl like numeric_limits<> specializations are always available.
1286 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1287 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1288 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1289 dnl Where DEFAULT is either `yes' or `no'.
1290 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1292 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1293 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1298 AC_MSG_CHECKING([for enabled long long I/O support])
1299 # iostreams require strtoll, strtoull to compile
1300 AC_TRY_COMPILE([#include <stdlib.h>],
1301 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1302 AC_TRY_COMPILE([#include <stdlib.h>],
1303 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1305 # Option parsed, now set things appropriately
1306 if test $enable_long_long = yes; then
1307 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1309 AC_MSG_RESULT($enable_long_long)
1316 dnl Check to see if building and using a C++ precompiled header can be done.
1318 dnl --enable-libstdcxx-pch=yes
1319 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1320 dnl may work, after some light-hearted attempts to puzzle out compiler
1321 dnl support, flip bits on in include/Makefile.am
1323 dnl --disable-libstdcxx-pch
1324 dnl turns off attempts to use or build stdc++.h.gch.
1327 dnl glibcxx_PCHFLAGS
1329 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1330 AC_MSG_CHECKING([for enabled PCH])
1331 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1332 AC_MSG_RESULT([$enable_libstdcxx_pch])
1334 if test $enable_libstdcxx_pch = yes; then
1335 AC_CACHE_CHECK([for compiler with PCH support],
1336 [glibcxx_cv_prog_CXX_pch],
1337 [ac_save_CXXFLAGS="$CXXFLAGS"
1338 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1341 echo '#include <math.h>' > conftest.h
1342 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1343 -o conftest.h.gch 1>&5 2>&1 &&
1344 echo '#error "pch failed"' > conftest.h &&
1345 echo '#include "conftest.h"' > conftest.cc &&
1346 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1348 glibcxx_cv_prog_CXX_pch=yes
1350 glibcxx_cv_prog_CXX_pch=no
1353 CXXFLAGS=$ac_save_CXXFLAGS
1356 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1359 AM_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1360 if test $enable_libstdcxx_pch = yes; then
1361 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1365 AC_SUBST(glibcxx_PCHFLAGS)
1370 dnl Check for exception handling support. If an explicit enable/disable
1371 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1372 dnl target may or may not support call frame exceptions.
1374 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1375 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1378 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1380 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1381 AC_MSG_CHECKING([for exception model to use])
1384 GLIBCXX_ENABLE(sjlj-exceptions,no,,
1385 [force use of builtin_setjmp for exceptions],
1387 [# Botheration. Now we've got to detect the exception model.
1388 # Link tests against libgcc.a are problematic since -- at least
1389 # as of this writing -- we've not been given proper -L bits for
1390 # single-tree newlib and libgloss.
1392 # This is what AC_TRY_COMPILE would do if it didn't delete the
1393 # conftest files before we got a change to grep them first.
1394 cat > conftest.$ac_ext << EOF
1395 [#]line __oline__ "configure"
1404 old_CXXFLAGS="$CXXFLAGS"
1406 if AC_TRY_EVAL(ac_compile); then
1407 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1408 enable_sjlj_exceptions=yes
1409 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1410 enable_sjlj_exceptions=no
1413 CXXFLAGS="$old_CXXFLAGS"
1416 if test $enable_sjlj_exceptions = yes; then
1417 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1418 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1419 ac_exception_model_name=sjlj
1420 elif test x$enable_sjlj_exceptions = xno; then
1421 ac_exception_model_name="call frame"
1423 AC_MSG_ERROR([unable to detect exception model])
1426 AC_MSG_RESULT($ac_exception_model_name)
1431 dnl Add version tags to symbols in shared library (or not), additionally
1432 dnl marking other symbols as private/local (or not).
1434 dnl --enable-symvers=style adds a version script to the linker call when
1435 dnl creating the shared library. The choice of version script is
1436 dnl controlled by 'style'.
1437 dnl --disable-symvers does not.
1438 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1439 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1440 dnl choose a default style based on linker characteristics. Passing
1441 dnl 'no' disables versioning.
1443 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1445 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1446 [enables symbol versioning of the shared library],
1447 [permit yes|no|gnu])
1449 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1450 # don't know enough about $LD to do tricks...
1451 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1452 # FIXME The following test is too strict, in theory.
1453 if test $enable_shared = no ||
1455 test x$glibcxx_gnu_ld_version = x; then
1459 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1460 if test $enable_symvers != no; then
1461 AC_MSG_CHECKING([for shared libgcc])
1462 ac_save_CFLAGS="$CFLAGS"
1464 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1465 CFLAGS="$ac_save_CFLAGS"
1466 AC_MSG_RESULT($glibcxx_shared_libgcc)
1469 # For GNU ld, we need at least this version. The format is described in
1470 # GLIBCXX_CHECK_LINKER_FEATURES above.
1471 glibcxx_min_gnu_ld_version=21400
1472 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1474 # Check to see if unspecified "yes" value can win, given results above.
1475 # Change "yes" into either "no" or a style name.
1476 if test $enable_symvers = yes; then
1477 if test $with_gnu_ld = yes &&
1478 test $glibcxx_shared_libgcc = yes;
1480 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1483 # The right tools, the right setup, but too old. Fallbacks?
1484 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1485 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1486 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1487 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1488 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1489 # Globbing fix is present, proper block support is not.
1490 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1491 dnl enable_symvers=???
1492 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1496 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1502 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1503 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1504 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1505 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1510 # Everything parsed; figure out what file to use.
1511 case $enable_symvers in
1513 SYMVER_MAP=config/linker-map.dummy
1516 SYMVER_MAP=config/linker-map.gnu
1517 AC_DEFINE(_GLIBCXX_SYMVER)
1521 AC_SUBST(SYMVER_MAP)
1522 AC_SUBST(port_specific_symbol_files)
1523 AM_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1524 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1529 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1530 dnl We must stage the required headers so that they will be installed
1531 dnl with the library (unlike libgcc, the STL implementation is provided
1532 dnl solely within headers). Since we must not inject random user-space
1533 dnl macro names into user-provided C++ code, we first stage into <file>-in
1534 dnl and process to <file> with an output command. The reason for a two-
1535 dnl stage process here is to correctly handle $srcdir!=$objdir without
1536 dnl having to write complex code (the sed commands to clean the macro
1537 dnl namespace are complex and fragile enough as it is). We must also
1538 dnl add a relative path so that -I- is supported properly.
1541 dnl glibcxx_thread_h
1544 dnl HAVE_GTHR_DEFAULT
1545 dnl _GLIBCXX_SUPPORTS_WEAK
1547 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1548 AC_MSG_CHECKING([for thread model used by GCC])
1549 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
1550 AC_MSG_RESULT([$target_thread_file])
1552 if test $target_thread_file != single; then
1553 AC_DEFINE(HAVE_GTHR_DEFAULT)
1554 AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1557 glibcxx_thread_h=gthr-$target_thread_file.h
1558 AC_SUBST(glibcxx_thread_h)
1562 # Check whether LC_MESSAGES is available in <locale.h>.
1563 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1565 # This file file be copied and used freely without restrictions. It can
1566 # be used in projects which are not available under the GNU Public License
1567 # but which still want to provide support for the GNU gettext functionality.
1568 # Please note that the actual code is *not* freely available.
1571 AC_DEFUN(AC_LC_MESSAGES, [
1572 AC_CHECK_HEADER(locale.h, [
1573 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1574 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1575 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1576 if test $ac_cv_val_LC_MESSAGES = yes; then
1577 AC_DEFINE(HAVE_LC_MESSAGES)
1583 sinclude([../libtool.m4])
1584 dnl The lines below arrange for aclocal not to bring an installed
1585 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1586 dnl add a definition of LIBTOOL to Makefile.in.
1587 ifelse(,,,[AC_SUBST(LIBTOOL)
1588 AC_DEFUN([AM_PROG_LIBTOOL])
1589 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1590 AC_DEFUN([AC_PROG_LD])
1593 dnl vim:et:ts=2:sw=2
1595 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1597 # This program is free software; you can redistribute it and/or modify
1598 # it under the terms of the GNU General Public License as published by
1599 # the Free Software Foundation; either version 2, or (at your option)
1600 # any later version.
1602 # This program is distributed in the hope that it will be useful,
1603 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1604 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1605 # GNU General Public License for more details.
1607 # You should have received a copy of the GNU General Public License
1608 # along with this program; if not, write to the Free Software
1609 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1614 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1615 # ---------------------------------------------------
1616 # Add --enable-multilib to configure.
1617 AC_DEFUN([AM_ENABLE_MULTILIB],
1618 [# Default to --enable-multilib
1619 AC_ARG_ENABLE(multilib,
1620 [ --enable-multilib build many library versions (default)],
1621 [case "$enableval" in
1622 yes) multilib=yes ;;
1624 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1628 # We may get other options which we leave undocumented:
1629 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1630 # See config-ml.in if you want the gory details.
1632 if test "$srcdir" = "."; then
1633 if test "$with_target_subdir" != "."; then
1634 multi_basedir="$srcdir/$with_multisrctop../$2"
1636 multi_basedir="$srcdir/$with_multisrctop$2"
1639 multi_basedir="$srcdir/$2"
1641 AC_SUBST(multi_basedir)
1643 AC_OUTPUT_COMMANDS([
1644 # Only add multilib support code if we just rebuilt the top-level
1646 case " $CONFIG_FILES " in
1647 *" ]m4_default([$1],Makefile)[ "*)
1648 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1655 with_multisubdir="$with_multisubdir"
1656 with_multisrctop="$with_multisrctop"
1657 with_target_subdir="$with_target_subdir"
1658 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1659 multi_basedir="$multi_basedir"
1660 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1663 # isc-posix.m4 serial 2 (gettext-0.11.2)
1664 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1665 dnl This file is free software, distributed under the terms of the GNU
1666 dnl General Public License. As a special exception to the GNU General
1667 dnl Public License, this file may be distributed as part of a program
1668 dnl that contains a configuration script generated by Autoconf, under
1669 dnl the same distribution terms as the rest of that program.
1671 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1673 # This test replaces the one in autoconf.
1674 # Currently this macro should have the same name as the autoconf macro
1675 # because gettext's gettext.m4 (distributed in the automake package)
1676 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1677 # give these diagnostics:
1678 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1679 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1681 undefine([AC_ISC_POSIX])
1683 AC_DEFUN([AC_ISC_POSIX],
1685 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1686 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1690 # Add --enable-maintainer-mode option to configure.
1693 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1695 # This program is free software; you can redistribute it and/or modify
1696 # it under the terms of the GNU General Public License as published by
1697 # the Free Software Foundation; either version 2, or (at your option)
1698 # any later version.
1700 # This program is distributed in the hope that it will be useful,
1701 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1702 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1703 # GNU General Public License for more details.
1705 # You should have received a copy of the GNU General Public License
1706 # along with this program; if not, write to the Free Software
1707 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1712 AC_DEFUN([AM_MAINTAINER_MODE],
1713 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1714 dnl maintainer-mode is disabled by default
1715 AC_ARG_ENABLE(maintainer-mode,
1716 [ --enable-maintainer-mode enable make rules and dependencies not useful
1717 (and sometimes confusing) to the casual installer],
1718 USE_MAINTAINER_MODE=$enableval,
1719 USE_MAINTAINER_MODE=no)
1720 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1721 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1722 MAINT=$MAINTAINER_MODE_TRUE
1727 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1729 # AM_CONDITIONAL -*- Autoconf -*-
1731 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1733 # This program is free software; you can redistribute it and/or modify
1734 # it under the terms of the GNU General Public License as published by
1735 # the Free Software Foundation; either version 2, or (at your option)
1736 # any later version.
1738 # This program is distributed in the hope that it will be useful,
1739 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1740 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1741 # GNU General Public License for more details.
1743 # You should have received a copy of the GNU General Public License
1744 # along with this program; if not, write to the Free Software
1745 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1752 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1753 # -------------------------------------
1754 # Define a conditional.
1755 AC_DEFUN([AM_CONDITIONAL],
1756 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1757 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1759 AC_SUBST([$1_FALSE])
1767 AC_CONFIG_COMMANDS_PRE(
1768 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1769 AC_MSG_ERROR([conditional "$1" was never defined.
1770 Usually this means the macro was only invoked conditionally.])
1773 # Do all the work for Automake. -*- Autoconf -*-
1775 # This macro actually does too much some checks are only needed if
1776 # your package does certain things. But this isn't really a big deal.
1778 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1779 # Free Software Foundation, Inc.
1781 # This program is free software; you can redistribute it and/or modify
1782 # it under the terms of the GNU General Public License as published by
1783 # the Free Software Foundation; either version 2, or (at your option)
1784 # any later version.
1786 # This program is distributed in the hope that it will be useful,
1787 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1788 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1789 # GNU General Public License for more details.
1791 # You should have received a copy of the GNU General Public License
1792 # along with this program; if not, write to the Free Software
1793 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1800 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1801 # the ones we care about.
1802 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1804 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1805 # AM_INIT_AUTOMAKE([OPTIONS])
1806 # -----------------------------------------------
1807 # The call with PACKAGE and VERSION arguments is the old style
1808 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1809 # and VERSION should now be passed to AC_INIT and removed from
1810 # the call to AM_INIT_AUTOMAKE.
1811 # We support both call styles for the transition. After
1812 # the next Automake release, Autoconf can make the AC_INIT
1813 # arguments mandatory, and then we can depend on a new Autoconf
1814 # release and drop the old call support.
1815 AC_DEFUN([AM_INIT_AUTOMAKE],
1816 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1817 AC_REQUIRE([AC_PROG_INSTALL])dnl
1818 # test to see if srcdir already configured
1819 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1820 test -f $srcdir/config.status; then
1821 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1824 # test whether we have cygpath
1825 if test -z "$CYGPATH_W"; then
1826 if (cygpath --version) >/dev/null 2>/dev/null; then
1827 CYGPATH_W='cygpath -w'
1832 AC_SUBST([CYGPATH_W])
1834 # Define the identity of the package.
1835 dnl Distinguish between old-style and new-style calls.
1837 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1838 AC_SUBST([PACKAGE], [$1])dnl
1839 AC_SUBST([VERSION], [$2])],
1840 [_AM_SET_OPTIONS([$1])dnl
1841 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1842 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1844 _AM_IF_OPTION([no-define],,
1845 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1846 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1848 # Some tools Automake needs.
1849 AC_REQUIRE([AM_SANITY_CHECK])dnl
1850 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1851 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1852 AM_MISSING_PROG(AUTOCONF, autoconf)
1853 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1854 AM_MISSING_PROG(AUTOHEADER, autoheader)
1855 AM_MISSING_PROG(MAKEINFO, makeinfo)
1856 AM_MISSING_PROG(AMTAR, tar)
1858 AM_PROG_INSTALL_STRIP
1859 # We need awk for the "check" target. The system "awk" is bad on
1861 AC_REQUIRE([AC_PROG_AWK])dnl
1862 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1863 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1865 _AM_IF_OPTION([no-dependencies],,
1866 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1867 [_AM_DEPENDENCIES(CC)],
1868 [define([AC_PROG_CC],
1869 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1870 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1871 [_AM_DEPENDENCIES(CXX)],
1872 [define([AC_PROG_CXX],
1873 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1878 # When config.status generates a header, we must update the stamp-h file.
1879 # This file resides in the same directory as the config header
1880 # that is generated. The stamp files are numbered to have different names.
1882 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1883 # loop where config.status creates the headers, so we can generate
1884 # our stamp files there.
1885 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1886 [# Compute $1's index in $config_headers.
1888 for _am_header in $config_headers :; do
1893 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1896 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1898 # Copyright 2002 Free Software Foundation, Inc.
1900 # This program is free software; you can redistribute it and/or modify
1901 # it under the terms of the GNU General Public License as published by
1902 # the Free Software Foundation; either version 2, or (at your option)
1903 # any later version.
1905 # This program is distributed in the hope that it will be useful,
1906 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1907 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1908 # GNU General Public License for more details.
1910 # You should have received a copy of the GNU General Public License
1911 # along with this program; if not, write to the Free Software
1912 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1914 # AM_AUTOMAKE_VERSION(VERSION)
1915 # ----------------------------
1916 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1917 # generated from the m4 files accompanying Automake X.Y.
1918 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1920 # AM_SET_CURRENT_AUTOMAKE_VERSION
1921 # -------------------------------
1922 # Call AM_AUTOMAKE_VERSION so it can be traced.
1923 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1924 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1925 [AM_AUTOMAKE_VERSION([1.7.6])])
1927 # Helper functions for option handling. -*- Autoconf -*-
1929 # Copyright 2001, 2002 Free Software Foundation, Inc.
1931 # This program is free software; you can redistribute it and/or modify
1932 # it under the terms of the GNU General Public License as published by
1933 # the Free Software Foundation; either version 2, or (at your option)
1934 # any later version.
1936 # This program is distributed in the hope that it will be useful,
1937 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1938 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1939 # GNU General Public License for more details.
1941 # You should have received a copy of the GNU General Public License
1942 # along with this program; if not, write to the Free Software
1943 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1948 # _AM_MANGLE_OPTION(NAME)
1949 # -----------------------
1950 AC_DEFUN([_AM_MANGLE_OPTION],
1951 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1953 # _AM_SET_OPTION(NAME)
1954 # ------------------------------
1955 # Set option NAME. Presently that only means defining a flag for this option.
1956 AC_DEFUN([_AM_SET_OPTION],
1957 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1959 # _AM_SET_OPTIONS(OPTIONS)
1960 # ----------------------------------
1961 # OPTIONS is a space-separated list of Automake options.
1962 AC_DEFUN([_AM_SET_OPTIONS],
1963 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1965 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1966 # -------------------------------------------
1967 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1968 AC_DEFUN([_AM_IF_OPTION],
1969 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1972 # Check to make sure that the build environment is sane.
1975 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1977 # This program is free software; you can redistribute it and/or modify
1978 # it under the terms of the GNU General Public License as published by
1979 # the Free Software Foundation; either version 2, or (at your option)
1980 # any later version.
1982 # This program is distributed in the hope that it will be useful,
1983 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1984 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1985 # GNU General Public License for more details.
1987 # You should have received a copy of the GNU General Public License
1988 # along with this program; if not, write to the Free Software
1989 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1996 AC_DEFUN([AM_SANITY_CHECK],
1997 [AC_MSG_CHECKING([whether build environment is sane])
2000 echo timestamp > conftest.file
2001 # Do `set' in a subshell so we don't clobber the current shell's
2002 # arguments. Must try -L first in case configure is actually a
2003 # symlink; some systems play weird games with the mod time of symlinks
2004 # (eg FreeBSD returns the mod time of the symlink's containing
2007 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2008 if test "$[*]" = "X"; then
2010 set X `ls -t $srcdir/configure conftest.file`
2013 if test "$[*]" != "X $srcdir/configure conftest.file" \
2014 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2016 # If neither matched, then we have a broken ls. This can happen
2017 # if, for instance, CONFIG_SHELL is bash and it inherits a
2018 # broken ls alias from the environment. This has actually
2019 # happened. Such a system could not be considered "sane".
2020 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2021 alias in your environment])
2024 test "$[2]" = conftest.file
2030 AC_MSG_ERROR([newly created file is older than distributed files!
2031 Check your system clock])
2033 AC_MSG_RESULT(yes)])
2038 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2040 # This program is free software; you can redistribute it and/or modify
2041 # it under the terms of the GNU General Public License as published by
2042 # the Free Software Foundation; either version 2, or (at your option)
2043 # any later version.
2045 # This program is distributed in the hope that it will be useful,
2046 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2047 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2048 # GNU General Public License for more details.
2050 # You should have received a copy of the GNU General Public License
2051 # along with this program; if not, write to the Free Software
2052 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2057 # AM_MISSING_PROG(NAME, PROGRAM)
2058 # ------------------------------
2059 AC_DEFUN([AM_MISSING_PROG],
2060 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2061 $1=${$1-"${am_missing_run}$2"}
2065 # AM_MISSING_HAS_RUN
2066 # ------------------
2067 # Define MISSING if not defined so far and test if it supports --run.
2068 # If it does, set am_missing_run to use it, otherwise, to nothing.
2069 AC_DEFUN([AM_MISSING_HAS_RUN],
2070 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2071 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2072 # Use eval to expand $SHELL
2073 if eval "$MISSING --run true"; then
2074 am_missing_run="$MISSING --run "
2077 AC_MSG_WARN([`missing' script is too old or missing])
2083 # Copyright 2001 Free Software Foundation, Inc.
2085 # This program is free software; you can redistribute it and/or modify
2086 # it under the terms of the GNU General Public License as published by
2087 # the Free Software Foundation; either version 2, or (at your option)
2088 # any later version.
2090 # This program is distributed in the hope that it will be useful,
2091 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2092 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2093 # GNU General Public License for more details.
2095 # You should have received a copy of the GNU General Public License
2096 # along with this program; if not, write to the Free Software
2097 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2100 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2101 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2102 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2104 # Of course, Automake must honor this variable whenever it calls a
2105 # tool from the auxiliary directory. The problem is that $srcdir (and
2106 # therefore $ac_aux_dir as well) can be either absolute or relative,
2107 # depending on how configure is run. This is pretty annoying, since
2108 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2109 # source directory, any form will work fine, but in subdirectories a
2110 # relative path needs to be adjusted first.
2112 # $ac_aux_dir/missing
2113 # fails when called from a subdirectory if $ac_aux_dir is relative
2114 # $top_srcdir/$ac_aux_dir/missing
2115 # fails if $ac_aux_dir is absolute,
2116 # fails when called from a subdirectory in a VPATH build with
2117 # a relative $ac_aux_dir
2119 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2120 # are both prefixed by $srcdir. In an in-source build this is usually
2121 # harmless because $srcdir is `.', but things will broke when you
2122 # start a VPATH build or use an absolute $srcdir.
2124 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2125 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2126 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2127 # and then we would define $MISSING as
2128 # MISSING="\${SHELL} $am_aux_dir/missing"
2129 # This will work as long as MISSING is not called from configure, because
2130 # unfortunately $(top_srcdir) has no meaning in configure.
2131 # However there are other variables, like CC, which are often used in
2132 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2134 # Another solution, used here, is to always expand $ac_aux_dir to an
2135 # absolute PATH. The drawback is that using absolute paths prevent a
2136 # configured tree to be moved without reconfiguration.
2138 # Rely on autoconf to set up CDPATH properly.
2141 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2142 # expand $ac_aux_dir to an absolute path
2143 am_aux_dir=`cd $ac_aux_dir && pwd`
2146 # AM_PROG_INSTALL_SH
2147 # ------------------
2148 # Define $install_sh.
2150 # Copyright 2001 Free Software Foundation, Inc.
2152 # This program is free software; you can redistribute it and/or modify
2153 # it under the terms of the GNU General Public License as published by
2154 # the Free Software Foundation; either version 2, or (at your option)
2155 # any later version.
2157 # This program is distributed in the hope that it will be useful,
2158 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2159 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2160 # GNU General Public License for more details.
2162 # You should have received a copy of the GNU General Public License
2163 # along with this program; if not, write to the Free Software
2164 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2167 AC_DEFUN([AM_PROG_INSTALL_SH],
2168 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2169 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2170 AC_SUBST(install_sh)])
2172 # AM_PROG_INSTALL_STRIP
2174 # Copyright 2001 Free Software Foundation, Inc.
2176 # This program is free software; you can redistribute it and/or modify
2177 # it under the terms of the GNU General Public License as published by
2178 # the Free Software Foundation; either version 2, or (at your option)
2179 # any later version.
2181 # This program is distributed in the hope that it will be useful,
2182 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2183 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2184 # GNU General Public License for more details.
2186 # You should have received a copy of the GNU General Public License
2187 # along with this program; if not, write to the Free Software
2188 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2191 # One issue with vendor `install' (even GNU) is that you can't
2192 # specify the program used to strip binaries. This is especially
2193 # annoying in cross-compiling environments, where the build's strip
2194 # is unlikely to handle the host's binaries.
2195 # Fortunately install-sh will honor a STRIPPROG variable, so we
2196 # always use install-sh in `make install-strip', and initialize
2197 # STRIPPROG with the value of the STRIP variable (set by the user).
2198 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2199 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2200 # Installed binaries are usually stripped using `strip' when the user
2201 # run `make install-strip'. However `strip' might not be the right
2202 # tool to use in cross-compilation environments, therefore Automake
2203 # will honor the `STRIP' environment variable to overrule this program.
2204 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2205 if test "$cross_compiling" != no; then
2206 AC_CHECK_TOOL([STRIP], [strip], :)
2208 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2209 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2212 # Copyright (C) 2003 Free Software Foundation, Inc.
2214 # This program is free software; you can redistribute it and/or modify
2215 # it under the terms of the GNU General Public License as published by
2216 # the Free Software Foundation; either version 2, or (at your option)
2217 # any later version.
2219 # This program is distributed in the hope that it will be useful,
2220 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2221 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2222 # GNU General Public License for more details.
2224 # You should have received a copy of the GNU General Public License
2225 # along with this program; if not, write to the Free Software
2226 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2231 # Check whether the underlying file-system supports filenames
2232 # with a leading dot. For instance MS-DOS doesn't.
2233 AC_DEFUN([AM_SET_LEADING_DOT],
2234 [rm -rf .tst 2>/dev/null
2235 mkdir .tst 2>/dev/null
2236 if test -d .tst; then
2241 rmdir .tst 2>/dev/null
2242 AC_SUBST([am__leading_dot])])
2244 # serial 5 -*- Autoconf -*-
2246 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2248 # This program is free software; you can redistribute it and/or modify
2249 # it under the terms of the GNU General Public License as published by
2250 # the Free Software Foundation; either version 2, or (at your option)
2251 # any later version.
2253 # This program is distributed in the hope that it will be useful,
2254 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2255 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2256 # GNU General Public License for more details.
2258 # You should have received a copy of the GNU General Public License
2259 # along with this program; if not, write to the Free Software
2260 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2264 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2265 # written in clear, in which case automake, when reading aclocal.m4,
2266 # will think it sees a *use*, and therefore will trigger all it's
2267 # C support machinery. Also note that it means that autoscan, seeing
2268 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2272 # _AM_DEPENDENCIES(NAME)
2273 # ----------------------
2274 # See how the compiler implements dependency checking.
2275 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2276 # We try a few techniques and use that to set a single cache variable.
2278 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2279 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2280 # dependency, and given that the user is not expected to run this macro,
2281 # just rely on AC_PROG_CC.
2282 AC_DEFUN([_AM_DEPENDENCIES],
2283 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2284 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2285 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2286 AC_REQUIRE([AM_DEP_TRACK])dnl
2288 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2289 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2290 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2291 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2292 [depcc="$$1" am_compiler_list=])
2294 AC_CACHE_CHECK([dependency style of $depcc],
2295 [am_cv_$1_dependencies_compiler_type],
2296 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2297 # We make a subdir and do the tests there. Otherwise we can end up
2298 # making bogus files that we don't know about and never remove. For
2299 # instance it was reported that on HP-UX the gcc test will end up
2300 # making a dummy file named `D' -- because `-MD' means `put the output
2303 # Copy depcomp to subdir because otherwise we won't find it if we're
2304 # using a relative directory.
2305 cp "$am_depcomp" conftest.dir
2307 # We will build objects and dependencies in a subdirectory because
2308 # it helps to detect inapplicable dependency modes. For instance
2309 # both Tru64's cc and ICC support -MD to output dependencies as a
2310 # side effect of compilation, but ICC will put the dependencies in
2311 # the current directory while Tru64 will put them in the object
2315 am_cv_$1_dependencies_compiler_type=none
2316 if test "$am_compiler_list" = ""; then
2317 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2319 for depmode in $am_compiler_list; do
2320 # Setup a source with many dependencies, because some compilers
2321 # like to wrap large dependency lists on column 80 (with \), and
2322 # we should not choose a depcomp mode which is confused by this.
2324 # We need to recreate these files for each test, as the compiler may
2325 # overwrite some of them when testing with obscure command lines.
2326 # This happens at least with the AIX C compiler.
2328 for i in 1 2 3 4 5 6; do
2329 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2332 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2336 # after this tag, mechanisms are not by side-effect, so they'll
2337 # only be used when explicitly requested
2338 if test "x$enable_dependency_tracking" = xyes; then
2346 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2347 # mode. It turns out that the SunPro C++ compiler does not properly
2348 # handle `-M -o', and we need to detect this.
2349 if depmode=$depmode \
2350 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2351 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2352 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2353 >/dev/null 2>conftest.err &&
2354 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2355 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2356 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2357 # icc doesn't choke on unknown options, it will just issue warnings
2358 # (even with -Werror). So we grep stderr for any message
2359 # that says an option was ignored.
2360 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2361 am_cv_$1_dependencies_compiler_type=$depmode
2370 am_cv_$1_dependencies_compiler_type=none
2373 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2374 AM_CONDITIONAL([am__fastdep$1], [
2375 test "x$enable_dependency_tracking" != xno \
2376 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2382 # Choose a directory name for dependency files.
2383 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2384 AC_DEFUN([AM_SET_DEPDIR],
2385 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2386 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2392 AC_DEFUN([AM_DEP_TRACK],
2393 [AC_ARG_ENABLE(dependency-tracking,
2394 [ --disable-dependency-tracking Speeds up one-time builds
2395 --enable-dependency-tracking Do not reject slow dependency extractors])
2396 if test "x$enable_dependency_tracking" != xno; then
2397 am_depcomp="$ac_aux_dir/depcomp"
2400 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2401 AC_SUBST([AMDEPBACKSLASH])
2404 # Generate code to set up dependency tracking. -*- Autoconf -*-
2406 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2408 # This program is free software; you can redistribute it and/or modify
2409 # it under the terms of the GNU General Public License as published by
2410 # the Free Software Foundation; either version 2, or (at your option)
2411 # any later version.
2413 # This program is distributed in the hope that it will be useful,
2414 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2415 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2416 # GNU General Public License for more details.
2418 # You should have received a copy of the GNU General Public License
2419 # along with this program; if not, write to the Free Software
2420 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2425 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2426 # ------------------------------
2427 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2428 [for mf in $CONFIG_FILES; do
2429 # Strip MF so we end up with the name of the file.
2430 mf=`echo "$mf" | sed -e 's/:.*$//'`
2431 # Check whether this is an Automake generated Makefile or not.
2432 # We used to match only the files named `Makefile.in', but
2433 # some people rename them; so instead we look at the file content.
2434 # Grep'ing the first line is not enough: some people post-process
2435 # each Makefile.in and add a new line on top of each file to say so.
2436 # So let's grep whole file.
2437 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2438 dirpart=`AS_DIRNAME("$mf")`
2442 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2443 # Extract the definition of DEP_FILES from the Makefile without
2445 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2446 test -z "$DEPDIR" && continue
2447 # When using ansi2knr, U may be empty or an underscore; expand it
2448 U=`sed -n -e '/^U = / s///p' < "$mf"`
2449 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2450 # We invoke sed twice because it is the simplest approach to
2451 # changing $(DEPDIR) to its actual value in the expansion.
2452 for file in `sed -n -e '
2453 /^DEP_FILES = .*\\\\$/ {
2462 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2463 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2464 # Make sure the directory exists.
2465 test -f "$dirpart/$file" && continue
2466 fdir=`AS_DIRNAME(["$file"])`
2467 AS_MKDIR_P([$dirpart/$fdir])
2468 # echo "creating $dirpart/$file"
2469 echo '# dummy' > "$dirpart/$file"
2472 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2475 # AM_OUTPUT_DEPENDENCY_COMMANDS
2476 # -----------------------------
2477 # This macro should only be invoked once -- use via AC_REQUIRE.
2479 # This code is only required when automatic dependency tracking
2480 # is enabled. FIXME. This creates each `.P' file that we will
2481 # need in order to bootstrap the dependency handling code.
2482 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2483 [AC_CONFIG_COMMANDS([depfiles],
2484 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2485 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2488 # Check to see how 'make' treats includes. -*- Autoconf -*-
2490 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2492 # This program is free software; you can redistribute it and/or modify
2493 # it under the terms of the GNU General Public License as published by
2494 # the Free Software Foundation; either version 2, or (at your option)
2495 # any later version.
2497 # This program is distributed in the hope that it will be useful,
2498 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2499 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2500 # GNU General Public License for more details.
2502 # You should have received a copy of the GNU General Public License
2503 # along with this program; if not, write to the Free Software
2504 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2511 # Check to see how make treats includes.
2512 AC_DEFUN([AM_MAKE_INCLUDE],
2513 [am_make=${MAKE-make}
2514 cat > confinc << 'END'
2519 # If we don't find an include directive, just comment out the code.
2520 AC_MSG_CHECKING([for style of include used by $am_make])
2524 # First try GNU make style include.
2525 echo "include confinc" > confmf
2526 # We grep out `Entering directory' and `Leaving directory'
2527 # messages which can occur if `w' ends up in MAKEFLAGS.
2528 # In particular we don't look at `^make:' because GNU make might
2529 # be invoked under some other name (usually "gmake"), in which
2530 # case it prints its new name instead of `make'.
2531 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2536 # Now try BSD make style include.
2537 if test "$am__include" = "#"; then
2538 echo '.include "confinc"' > confmf
2539 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2540 am__include=.include
2545 AC_SUBST([am__include])
2546 AC_SUBST([am__quote])
2547 AC_MSG_RESULT([$_am_result])
2548 rm -f confinc confmf