1 # generated automatically by aclocal 1.7.9 -*- 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 GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
18 dnl Exactly like AM_CONDITIONAL, but delays evaluation of the test until the
19 dnl end of configure. This lets tested variables be reassigned, and the
20 dnl conditional will depend on the final state of the variable. For a simple
21 dnl example of why this is needed, see GLIBCXX_ENABLE_HOSTED.
23 m4_define([_m4_divert(glibcxx_diversion)], 8000)dnl
24 AC_DEFUN([GLIBCXX_CONDITIONAL], [dnl
25 m4_divert_text([glibcxx_diversion],dnl
26 AM_CONDITIONAL([$1],[$2])
29 AC_DEFUN([GLIBCXX_EVALUATE_CONDITIONALS], [m4_undivert([glibcxx_diversion])])dnl
33 dnl Check to see what architecture and operating system we are compiling
34 dnl for. Also, if architecture- or OS-specific flags are required for
35 dnl compilation, pick them up here.
37 AC_DEFUN([GLIBCXX_CHECK_HOST], [
38 . $glibcxx_srcdir/configure.host
39 AC_MSG_NOTICE([CPU config directory is $cpu_include_dir])
40 AC_MSG_NOTICE([OS config directory is $os_include_dir])
44 dnl Initialize the rest of the library configury. At this point we have
45 dnl variables like $host.
48 dnl gcc_version (x.y.z format)
51 dnl glibcxx_builddir (absolute path)
52 dnl glibcxx_srcdir (absolute path)
53 dnl toplevel_srcdir (absolute path)
56 dnl with_target_subdir
58 dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
59 dnl - default settings for all AM_CONFITIONAL test variables
60 dnl - lots of tools, like CC and CXX
62 AC_DEFUN([GLIBCXX_CONFIGURE], [
63 # Keep these sync'd with the list in Makefile.am. The first provides an
64 # expandable list at autoconf time; the second provides an expandable list
65 # (i.e., shell variable) at configure time.
66 m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src po testsuite])
67 SUBDIRS='glibcxx_SUBDIRS'
69 # These need to be absolute paths, yet at the same time need to
70 # canonicalize only relative paths, because then amd will not unmount
71 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
72 glibcxx_builddir=`${PWDCMD-pwd}`
74 [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
75 *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
77 toplevel_srcdir=${glibcxx_srcdir}/..
78 AC_SUBST(glibcxx_builddir)
79 AC_SUBST(glibcxx_srcdir)
80 AC_SUBST(toplevel_srcdir)
82 # We use these options to decide which functions to include. They are
83 # set from the top level.
84 AC_ARG_WITH([target-subdir],
85 AC_HELP_STRING([--with-target-subdir=SUBDIR],
86 [configuring in a subdirectory]))
88 AC_ARG_WITH([cross-host],
89 AC_HELP_STRING([--with-cross-host=HOST],
90 [configuring with a cross compiler]))
93 AC_HELP_STRING([--with-newlib],
94 [assume newlib as a system C library]))
96 # We're almost certainly being configured before anything else which uses
97 # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
98 # we not cache the value of CXX that we "discover" here, because it's set
99 # to something unique for us and libjava. Other target libraries need to
100 # find CXX for themselves. We yank the rug out from under the normal AC_*
101 # process by sneakily renaming the cache variable. This also lets us debug
102 # the value of "our" CXX in postmortems.
104 # We must also force CXX to /not/ be a precious variable, otherwise the
105 # wrong (non-multilib-adjusted) value will be used in multilibs. This
106 # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
107 # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
108 # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
110 # -fno-builtin must be present here so that a non-conflicting form of
111 # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
113 m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
114 m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
115 m4_define([_AC_ARG_VAR_PRECIOUS],[])
116 save_CXXFLAGS="$CXXFLAGS"
117 CXXFLAGS="$CXXFLAGS -fno-builtin"
120 CXXFLAGS="$save_CXXFLAGS"
121 m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
125 # For directory versioning (e.g., headers) and other variables.
126 AC_MSG_CHECKING([for GCC version number])
127 gcc_version=`$CXX -dumpversion`
128 AC_MSG_RESULT($gcc_version)
130 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
131 # available). Uncomment the next line to force a particular method.
135 AC_CHECK_TOOL(AS, as)
136 AC_CHECK_TOOL(AR, ar)
137 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
141 # Set up safe default values for all subsequent AM_CONDITIONAL tests
142 # which are themselves conditionally expanded.
143 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
144 ## other macros from doing the same. This should be automated.) -pme
147 #enable_libstdcxx_debug=no
148 #enable_libstdcxx_pch=no
153 #enable_hosted_libstdcxx=yes
155 # Find platform-specific directories containing configuration info.
156 # Also possibly modify flags used elsewhere, as needed by the platform.
161 m4_include([linkage.m4])
162 m4_include([../config/no-executables.m4])
166 dnl Tests for newer compiler features, or features that are present in newer
167 dnl compiler versions but not older compiler versions still in use, should
171 dnl WERROR='-Werror' if requested and possible; g++'s that lack the
172 dnl new inlining code or the new system_header pragma will die on -Werror.
173 dnl Leave it out by default and use maint-mode to use it.
174 dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
175 dnl compiler supports it and the user has not requested debug mode.
177 AC_DEFUN([GLIBCXX_CHECK_COMPILER_FEATURES], [
178 # All these tests are for C++; save the language and the compiler flags.
179 # The CXXFLAGS thing is suspicious, but based on similar bits previously
180 # found in GLIBCXX_CONFIGURE.
183 ac_test_CXXFLAGS="${CXXFLAGS+set}"
184 ac_save_CXXFLAGS="$CXXFLAGS"
186 # Check for maintainer-mode bits.
187 if test x"$USE_MAINTAINER_MODE" = xno; then
193 # Check for -ffunction-sections -fdata-sections
194 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
195 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
196 AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
197 if test "$ac_test_CXXFLAGS" = set; then
198 CXXFLAGS="$ac_save_CXXFLAGS"
200 # this is the suspicious part
203 if test x"$ac_fdsections" = x"yes"; then
204 SECTION_FLAGS='-ffunction-sections -fdata-sections'
206 AC_MSG_RESULT($ac_fdsections)
210 AC_SUBST(SECTION_FLAGS)
215 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
216 dnl the native linker is in use, all variables will be defined to something
217 dnl safe (like an empty string).
220 dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
221 dnl OPT_LDFLAGS='-Wl,-O1' if possible
222 dnl LD (as a side effect of testing)
225 dnl glibcxx_gnu_ld_version (possibly)
227 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
228 dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
230 AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
231 # If we're not using GNU ld, then there's no point in even trying these
232 # tests. Check for that first. We should have already tested for gld
233 # by now (in libtool), but require it now just to be safe...
234 test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
235 test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
236 AC_REQUIRE([AC_PROG_LD])
237 AC_REQUIRE([AC_PROG_AWK])
239 # The name set by libtool depends on the version of libtool. Shame on us
240 # for depending on an impl detail, but c'est la vie. Older versions used
241 # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
242 # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
243 # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
244 # set (hence we're using an older libtool), then set it.
245 if test x${with_gnu_ld+set} != xset; then
246 if test x${ac_cv_prog_gnu_ld+set} != xset; then
247 # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
250 with_gnu_ld=$ac_cv_prog_gnu_ld
254 # Start by getting the version number. I think the libtool test already
255 # does some of this, but throws away the result.
257 ldver=`$LD --version 2>/dev/null | head -1 | \
258 sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
260 glibcxx_gnu_ld_version=`echo $ldver | \
261 $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
264 if test "$with_gnu_ld" = "notbroken"; then
265 # GNU ld it is! Joy and bunny rabbits!
267 # All these tests are for C++; save the language and the compiler flags.
268 # Need to do this so that g++ won't try to link in libstdc++
269 ac_test_CFLAGS="${CFLAGS+set}"
270 ac_save_CFLAGS="$CFLAGS"
271 CFLAGS='-x c++ -Wl,--gc-sections'
273 # Check for -Wl,--gc-sections
274 # XXX This test is broken at the moment, as symbols required for linking
275 # are now in libsupc++ (not built yet). In addition, this test has
276 # cored on solaris in the past. In addition, --gc-sections doesn't
277 # really work at the moment (keeps on discarding used sections, first
278 # .eh_frame and now some of the glibc sections for iconv).
279 # Bzzzzt. Thanks for playing, maybe next time.
280 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
288 ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
289 if test "$ac_test_CFLAGS" = set; then
290 CFLAGS="$ac_save_CFLAGS"
292 # this is the suspicious part
295 if test "$ac_sectionLDflags" = "yes"; then
296 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
298 AC_MSG_RESULT($ac_sectionLDflags)
301 # Set linker optimization flags.
302 if test x"$with_gnu_ld" = x"yes"; then
303 OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
306 AC_SUBST(SECTION_LDFLAGS)
307 AC_SUBST(OPT_LDFLAGS)
312 dnl Check to see if this target can enable the wchar_t parts.
313 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
314 dnl must have been previously checked.) By default, wide characters are
318 dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
319 dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
321 dnl LIBICONV to a -l string containing the iconv library, if needed.
323 AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
324 # Test wchar.h for mbstate_t, which is needed for char_traits and
325 # others even if wchar_t support is not on.
326 AC_MSG_CHECKING([for mbstate_t])
327 AC_TRY_COMPILE([#include <wchar.h>],
328 [mbstate_t teststate;],
329 have_mbstate_t=yes, have_mbstate_t=no)
330 AC_MSG_RESULT($have_mbstate_t)
331 if test x"$have_mbstate_t" = xyes; then
332 AC_DEFINE(HAVE_MBSTATE_T)
335 # Sanity check for existence of ISO C99 headers for extended encoding.
336 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
337 AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
339 # Only continue checking if the ISO C99 headers exist and support is on.
340 if test x"$ac_has_wchar_h" = xyes &&
341 test x"$ac_has_wctype_h" = xyes &&
342 test x"$enable_c_mbchar" != xno; then
344 # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
345 # numeric_limits can instantiate type_traits<wchar_t>
346 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
347 AC_TRY_COMPILE([#include <wchar.h>],
348 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
349 has_wchar_minmax=yes, has_wchar_minmax=no)
350 AC_MSG_RESULT($has_wchar_minmax)
352 # Test wchar.h for WEOF, which is what we use to determine whether
353 # to specialize for char_traits<wchar_t> or not.
354 AC_MSG_CHECKING([for WEOF])
357 #include <stddef.h>],
359 has_weof=yes, has_weof=no)
360 AC_MSG_RESULT($has_weof)
362 # Tests for wide character functions used in char_traits<wchar_t>.
364 AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
367 # Checks for names injected into std:: by the c_std headers.
368 AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
369 fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
370 vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
371 mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
372 wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
373 wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
376 # Checks for wide character functions that are not required
377 # for basic wchar_t support. Don't disable support if they are missing.
378 # Injection of these is wrapped with guard macros.
379 AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[])
381 AC_MSG_CHECKING([for ISO C99 wchar_t support])
382 if test x"$has_weof" = xyes &&
383 test x"$has_wchar_minmax" = xyes &&
384 test x"$ac_wfuncs" = xyes;
386 ac_isoC99_wchar_t=yes
390 AC_MSG_RESULT($ac_isoC99_wchar_t)
392 # Use iconv for wchar_t to char conversions. As such, check for
393 # X/Open Portability Guide, version 2 features (XPG2).
394 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
395 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
397 # Check for existence of libiconv.a providing XPG2 wchar_t support.
398 AC_CHECK_LIB(iconv, iconv, LIBICONV="-liconv")
400 LIBS="$LIBS $LIBICONV"
403 AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
404 [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
408 AC_MSG_CHECKING([for XPG2 wchar_t support])
409 if test x"$ac_has_iconv_h" = xyes &&
410 test x"$ac_has_langinfo_h" = xyes &&
411 test x"$ac_XPG2funcs" = xyes;
417 AC_MSG_RESULT($ac_XPG2_wchar_t)
419 # At the moment, only enable wchar_t specializations if all the
420 # above support is present.
421 if test x"$ac_isoC99_wchar_t" = xyes &&
422 test x"$ac_XPG2_wchar_t" = xyes;
424 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
428 AC_MSG_CHECKING([for enabled wchar_t specializations])
429 AC_MSG_RESULT($enable_wchar_t)
434 dnl Check for headers for, and arguments to, the setrlimit() function.
435 dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
438 dnl _GLIBCXX_RES_LIMITS if we can set artificial resource limits
439 dnl various HAVE_LIMIT_* for individual limit names
441 AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [
444 #include <sys/time.h>
445 #include <sys/resource.h>
447 [ int f = RLIMIT_$1 ; ],
448 [glibcxx_mresult=1], [glibcxx_mresult=0])
449 AC_DEFINE_UNQUOTED(HAVE_LIMIT_$1, $glibcxx_mresult,
450 [Only used in build directory testsuite_hooks.h.])
453 AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [
454 setrlimit_have_headers=yes
455 AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
457 [setrlimit_have_headers=no])
458 # If don't have the headers, then we can't run the tests now, and we
459 # won't be seeing any of these during testsuite compilation.
460 if test $setrlimit_have_headers = yes; then
461 # Can't do these in a loop, else the resulting syntax is wrong.
462 GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
463 GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
464 GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
465 GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
466 GLIBCXX_CHECK_SETRLIMIT_ancilliary(FSIZE)
468 # Check for rlimit, setrlimit.
469 AC_CACHE_VAL(ac_setrlimit, [
472 #include <sys/time.h>
473 #include <sys/resource.h>
477 [ac_setrlimit=yes], [ac_setrlimit=no])
481 AC_MSG_CHECKING([for testsuite resource limits support])
482 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
484 AC_DEFINE(_GLIBCXX_RES_LIMITS)
488 AC_MSG_RESULT($ac_res_limits)
493 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
494 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
496 AC_DEFUN([GLIBCXX_CHECK_S_ISREG_OR_S_IFREG], [
497 AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
499 [#include <sys/stat.h>],
502 S_ISREG(buffer.st_mode);],
503 [glibcxx_cv_S_ISREG=yes],
504 [glibcxx_cv_S_ISREG=no])
506 AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
508 [#include <sys/stat.h>],
511 S_IFREG & buffer.st_mode;],
512 [glibcxx_cv_S_IFREG=yes],
513 [glibcxx_cv_S_IFREG=no])
515 if test $glibcxx_cv_S_ISREG = yes; then
516 AC_DEFINE(HAVE_S_ISREG)
517 elif test $glibcxx_cv_S_IFREG = yes; then
518 AC_DEFINE(HAVE_S_IFREG)
524 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
526 AC_DEFUN([GLIBCXX_CHECK_POLL], [
527 AC_CACHE_VAL(glibcxx_cv_POLL, [
530 [struct pollfd pfd[1];
531 pfd[0].events = POLLIN;
533 [glibcxx_cv_POLL=yes],
534 [glibcxx_cv_POLL=no])
536 if test $glibcxx_cv_POLL = yes; then
543 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
545 AC_DEFUN([GLIBCXX_CHECK_WRITEV], [
546 AC_CACHE_VAL(glibcxx_cv_WRITEV, [
548 [#include <sys/uio.h>],
549 [struct iovec iov[2];
551 [glibcxx_cv_WRITEV=yes],
552 [glibcxx_cv_WRITEV=no])
554 if test $glibcxx_cv_WRITEV = yes; then
555 AC_DEFINE(HAVE_WRITEV)
561 dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
563 AC_DEFUN([GLIBCXX_CHECK_INT64_T], [
564 AC_CACHE_VAL(glibcxx_cv_INT64_T, [
566 [#include <stdint.h>],
568 [glibcxx_cv_INT64_T=yes],
569 [glibcxx_cv_INT64_T=no])
571 if test $glibcxx_cv_INT64_T = yes; then
572 AC_DEFINE(HAVE_INT64_T)
578 dnl Check whether LFS support is available.
580 AC_DEFUN([GLIBCXX_CHECK_LFS], [
583 ac_save_CXXFLAGS="$CXXFLAGS"
584 CXXFLAGS="$CXXFLAGS -fno-exceptions"
585 AC_CACHE_VAL(glibcxx_cv_LFS, [
592 fseeko64(fp, 0, SEEK_CUR);
594 lseek64(1, 0, SEEK_CUR);],
595 [glibcxx_cv_LFS=yes],
598 if test $glibcxx_cv_LFS = yes; then
599 AC_DEFINE(_GLIBCXX_USE_LFS)
601 CXXFLAGS="$ac_save_CXXFLAGS"
607 dnl Does any necessary configuration of the testsuite directory. Generates
608 dnl the testsuite_hooks.h header.
610 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
613 dnl enable_abi_check / GLIBCXX_TEST_ABI
617 AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
618 if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
619 # Do checks for resource limit functions.
620 GLIBCXX_CHECK_SETRLIMIT
622 # Look for setenv, so that extended locale tests can be performed.
623 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
625 if test $enable_symvers = no; then
630 enable_abi_check=no ;;
632 enable_abi_check=yes ;;
636 # Only build this as native, since automake does not understand
641 # Export file names for ABI checking.
642 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
643 AC_SUBST(baseline_dir)
645 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
646 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
651 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
655 dnl TOPLEVEL_INCLUDES
657 AC_DEFUN([GLIBCXX_EXPORT_INCLUDES], [
658 # Used for every C++ compile we perform.
660 -I$glibcxx_builddir/include/$host_alias \
661 -I$glibcxx_builddir/include \
662 -I$glibcxx_srcdir/libsupc++"
664 # For Canadian crosses, pick this up too.
665 if test $CANADIAN = yes; then
666 GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
669 # Stuff in the actual top level. Currently only used by libsupc++ to
670 # get unwind* headers from the gcc dir.
671 #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
672 TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
674 # Now, export this to all the little Makefiles....
675 AC_SUBST(GLIBCXX_INCLUDES)
676 AC_SUBST(TOPLEVEL_INCLUDES)
681 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
682 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
685 dnl OPTIMIZE_CXXFLAGS
688 AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
689 # Optimization flags that are probably a good idea for thrill-seekers. Just
690 # uncomment the lines below and make, everything else is ready to go...
691 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
693 AC_SUBST(OPTIMIZE_CXXFLAGS)
695 WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual'
701 dnl All installation directory information is determined here.
705 dnl glibcxx_prefixdir
706 dnl glibcxx_toolexecdir
707 dnl glibcxx_toolexeclibdir
709 dnl Assumes cross_compiling bits already done, and with_cross_host in
712 AC_DEFUN([GLIBCXX_EXPORT_INSTALL_INFO], [
713 glibcxx_toolexecdir=no
714 glibcxx_toolexeclibdir=no
715 glibcxx_prefixdir=$prefix
717 AC_MSG_CHECKING([for gxx-include-dir])
718 AC_ARG_WITH([gxx-include-dir],
719 AC_HELP_STRING([--with-gxx-include-dir=DIR],
720 [installation directory for include files]),
722 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
723 no) gxx_include_dir=no ;;
724 *) gxx_include_dir=$withval ;;
726 [gxx_include_dir=no])
727 AC_MSG_RESULT($gxx_include_dir)
729 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
730 AC_ARG_ENABLE([version-specific-runtime-libs],
731 AC_HELP_STRING([--enable-version-specific-runtime-libs],
732 [Specify that runtime libraries should be installed in a compiler-specific directory]),
733 [case "$enableval" in
734 yes) version_specific_libs=yes ;;
735 no) version_specific_libs=no ;;
736 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
738 [version_specific_libs=no])
739 AC_MSG_RESULT($version_specific_libs)
741 # Default case for install directory for include files.
742 if test $version_specific_libs = no && test $gxx_include_dir = no; then
743 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
746 # Version-specific runtime libs processing.
747 if test $version_specific_libs = yes; then
748 # Need the gcc compiler version to know where to install libraries
749 # and header files if --enable-version-specific-runtime-libs option
750 # is selected. FIXME: these variables are misnamed, there are
751 # no executables installed in _toolexecdir or _toolexeclibdir.
752 if test x"$gxx_include_dir" = x"no"; then
753 gxx_include_dir='${libdir}/gcc/${host_alias}/'$gcc_version/include/c++
755 glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
756 glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
759 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
760 # Install a library built with a cross compiler in tooldir, not libdir.
761 if test x"$glibcxx_toolexecdir" = x"no"; then
762 if test -n "$with_cross_host" &&
763 test x"$with_cross_host" != x"no"; then
764 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
765 glibcxx_toolexeclibdir='${toolexecdir}/lib'
767 glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
768 glibcxx_toolexeclibdir='${libdir}'
770 multi_os_directory=`$CXX -print-multi-os-directory`
771 case $multi_os_directory in
772 .) ;; # Avoid trailing /.
773 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
777 AC_MSG_CHECKING([for install location])
778 AC_MSG_RESULT($gxx_include_dir)
780 AC_SUBST(glibcxx_prefixdir)
781 AC_SUBST(gxx_include_dir)
782 AC_SUBST(glibcxx_toolexecdir)
783 AC_SUBST(glibcxx_toolexeclibdir)
789 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
790 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
791 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
793 dnl See docs/html/17_intro/configury.html#enable for documentation.
795 m4_define([GLIBCXX_ENABLE],[dnl
796 m4_define([_g_switch],[--enable-$1])dnl
797 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
798 AC_ARG_ENABLE($1,_g_help,
803 m4_bpatsubst([$5],[permit ])) ;;
804 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
805 dnl Idea for future: generate a URL pointing to
806 dnl "onlinedocs/configopts.html#whatever"
813 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
817 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
818 m4_undefine([_g_switch])dnl
819 m4_undefine([_g_help])dnl
824 dnl Check for ISO/IEC 9899:1999 "C99" support.
826 dnl --enable-c99 defines _GLIBCXX_USE_C99
827 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
828 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
829 dnl Where DEFAULT is either `yes' or `no'.
830 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
832 AC_DEFUN([GLIBCXX_ENABLE_C99], [
833 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
838 # Check for the existence of <math.h> functions used if C99 is enabled.
840 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
841 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
842 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
843 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
844 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
845 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
846 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
847 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
848 AC_TRY_COMPILE([#include <math.h>],
849 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
850 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
851 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
852 AC_TRY_COMPILE([#include <math.h>],
853 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
854 AC_TRY_COMPILE([#include <math.h>],
855 [isunordered(0.0,0.0);],, [ac_c99_math=no])
856 AC_MSG_RESULT($ac_c99_math)
858 if test x"$ac_c99_math" = x"yes"; then
859 AC_DEFINE(_GLIBCXX_USE_C99_MATH)
862 # Check for the existence in <stdio.h> of vscanf, et. al.
864 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
865 AC_TRY_COMPILE([#include <stdio.h>],
866 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
867 AC_TRY_COMPILE([#include <stdio.h>
869 void foo(char* fmt, ...)
870 {va_list args; va_start(args, fmt);
871 vfscanf(stderr, "%i", args);}],
872 [],, [ac_c99_stdio=no])
873 AC_TRY_COMPILE([#include <stdio.h>
875 void foo(char* fmt, ...)
876 {va_list args; va_start(args, fmt);
877 vscanf("%i", args);}],
878 [],, [ac_c99_stdio=no])
879 AC_TRY_COMPILE([#include <stdio.h>
881 void foo(char* fmt, ...)
882 {va_list args; va_start(args, fmt);
883 vsnprintf(fmt, 0, "%i", args);}],
884 [],, [ac_c99_stdio=no])
885 AC_TRY_COMPILE([#include <stdio.h>
887 void foo(char* fmt, ...)
888 {va_list args; va_start(args, fmt);
889 vsscanf(fmt, "%i", args);}],
890 [],, [ac_c99_stdio=no])
891 AC_MSG_RESULT($ac_c99_stdio)
893 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
895 AC_MSG_CHECKING([for lldiv_t declaration])
896 AC_CACHE_VAL(ac_c99_lldiv_t, [
897 AC_TRY_COMPILE([#include <stdlib.h>],
899 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
901 AC_MSG_RESULT($ac_c99_lldiv_t)
903 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
904 AC_TRY_COMPILE([#include <stdlib.h>],
905 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
906 AC_TRY_COMPILE([#include <stdlib.h>],
907 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
908 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
909 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
910 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
911 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
912 if test x"$ac_c99_lldiv_t" = x"no"; then
915 AC_MSG_RESULT($ac_c99_stdlib)
917 # Check for the existence of <wchar.h> functions used if C99 is enabled.
918 # XXX the wchar.h checks should be rolled into the general C99 bits.
920 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
921 AC_TRY_COMPILE([#include <wchar.h>],
922 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
923 AC_TRY_COMPILE([#include <wchar.h>],
924 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
925 AC_TRY_COMPILE([#include <wchar.h>],
926 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
927 AC_MSG_RESULT($ac_c99_wchar)
929 AC_MSG_CHECKING([for enabled ISO C99 support])
930 if test x"$ac_c99_math" = x"no" ||
931 test x"$ac_c99_stdio" = x"no" ||
932 test x"$ac_c99_stdlib" = x"no" ||
933 test x"$ac_c99_wchar" = x"no"; then
936 AC_MSG_RESULT($enable_c99)
938 if test x"$ac_99_math" = x"yes"; then
939 AC_DEFINE(_GLIBCXX_USE_C99_MATH)
942 # Option parsed, now set things appropriately
943 if test x"$enable_c99" = x"yes"; then
944 AC_DEFINE(_GLIBCXX_USE_C99)
952 dnl Check for what type of C headers to use.
954 dnl --enable-cheaders= [does stuff].
955 dnl --disable-cheaders [does not do anything, really].
956 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
957 dnl Where DEFAULT is either `c' or `c_std'.
959 AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [
960 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
961 [construct "C" headers for g++], [permit c|c_std])
962 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
964 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
966 AC_SUBST(C_INCLUDE_DIR)
967 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
968 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
969 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
974 dnl Check for which locale library to use. The choice is mapped to
975 dnl a subdirectory of config/locale.
977 dnl Default is generic.
979 AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
980 AC_MSG_CHECKING([for C locale to use])
981 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
982 [use MODEL for target locale package],
983 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
985 # If they didn't use this option switch, or if they specified --enable
986 # with no specific model, we'll have to look for one. If they
987 # specified --disable (???), do likewise.
988 if test $enable_clocale = no || test $enable_clocale = yes; then
992 # Either a known package, or "auto"
993 enable_clocale_flag=$enable_clocale
995 # Probe for locale support if no specific model is specified.
996 # Default to "generic".
997 if test $enable_clocale_flag = auto; then
999 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
1000 AC_EGREP_CPP([_GLIBCXX_ok], [
1001 #include <features.h>
1002 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
1005 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
1007 # Test for bugs early in glibc-2.2.x series
1008 if test $enable_clocale_flag = gnu; then
1010 #define _GNU_SOURCE 1
1013 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
1014 extern __typeof(newlocale) __newlocale;
1015 extern __typeof(duplocale) __duplocale;
1016 extern __typeof(strcoll_l) __strcoll_l;
1020 const char __one[] = "Äuglein Augmen";
1021 const char __two[] = "Äuglein";
1026 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
1027 loc_dup = __duplocale(loc);
1028 i = __strcoll_l(__one, __two, loc);
1029 j = __strcoll_l(__one, __two, loc_dup);
1033 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
1034 [enable_clocale_flag=generic])
1037 # ... at some point put __strxfrm_l tests in as well.
1040 enable_clocale_flag=generic
1045 # Deal with gettext issues. Default to not using it (=no) until we detect
1046 # support for it later. Let the user turn it off via --e/d, but let that
1047 # default to on for easier handling.
1050 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
1054 # Set configure bits for specified locale package
1055 case ${enable_clocale_flag} in
1057 AC_MSG_RESULT(generic)
1059 CLOCALE_H=config/locale/generic/c_locale.h
1060 CLOCALE_CC=config/locale/generic/c_locale.cc
1061 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1062 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1063 CCOLLATE_CC=config/locale/generic/collate_members.cc
1064 CCTYPE_CC=config/locale/generic/ctype_members.cc
1065 CMESSAGES_H=config/locale/generic/messages_members.h
1066 CMESSAGES_CC=config/locale/generic/messages_members.cc
1067 CMONEY_CC=config/locale/generic/monetary_members.cc
1068 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1069 CTIME_H=config/locale/generic/time_members.h
1070 CTIME_CC=config/locale/generic/time_members.cc
1071 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1076 # Declare intention to use gettext, and add support for specific
1078 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1081 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1082 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1083 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1086 # Export the build objects.
1087 for ling in $ALL_LINGUAS; do \
1088 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1089 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1091 AC_SUBST(glibcxx_MOFILES)
1092 AC_SUBST(glibcxx_POFILES)
1094 CLOCALE_H=config/locale/gnu/c_locale.h
1095 CLOCALE_CC=config/locale/gnu/c_locale.cc
1096 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1097 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1098 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1099 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1100 CMESSAGES_H=config/locale/gnu/messages_members.h
1101 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1102 CMONEY_CC=config/locale/gnu/monetary_members.cc
1103 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1104 CTIME_H=config/locale/gnu/time_members.h
1105 CTIME_CC=config/locale/gnu/time_members.cc
1106 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1109 AC_MSG_RESULT(IEEE 1003.1)
1111 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1112 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1113 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1114 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1115 CCOLLATE_CC=config/locale/generic/collate_members.cc
1116 CCTYPE_CC=config/locale/generic/ctype_members.cc
1117 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1118 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1119 CMONEY_CC=config/locale/generic/monetary_members.cc
1120 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1121 CTIME_H=config/locale/generic/time_members.h
1122 CTIME_CC=config/locale/generic/time_members.cc
1123 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1127 # This is where the testsuite looks for locale catalogs, using the
1128 # -DLOCALEDIR define during testsuite compilation.
1129 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1130 AC_SUBST(glibcxx_localedir)
1132 # A standalone libintl (e.g., GNU libintl) may be in use.
1133 if test $USE_NLS = yes; then
1134 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1135 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1137 if test $USE_NLS = yes; then
1138 AC_DEFINE(_GLIBCXX_USE_NLS)
1143 AC_SUBST(CCODECVT_H)
1144 AC_SUBST(CMESSAGES_H)
1145 AC_SUBST(CCODECVT_CC)
1146 AC_SUBST(CCOLLATE_CC)
1148 AC_SUBST(CMESSAGES_CC)
1150 AC_SUBST(CNUMERIC_CC)
1153 AC_SUBST(CLOCALE_CC)
1154 AC_SUBST(CLOCALE_INTERNAL_H)
1159 dnl Check for which std::allocator base class to use. The choice is
1160 dnl mapped from a subdirectory of include/ext.
1164 AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
1165 AC_MSG_CHECKING([for std::allocator base class to use])
1166 GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND],
1167 [use KIND for target std::allocator base],
1168 [permit new|malloc|mt|bitmap|pool|yes|no|auto])
1170 # If they didn't use this option switch, or if they specified --enable
1171 # with no specific model, we'll have to look for one. If they
1172 # specified --disable (???), do likewise.
1173 if test $enable_libstdcxx_allocator = no ||
1174 test $enable_libstdcxx_allocator = yes;
1176 enable_libstdcxx_allocator=auto
1179 # Either a known package, or "auto"
1180 enable_libstdcxx_allocator_flag=$enable_libstdcxx_allocator
1182 # Probe for host-specific support if no specific model is specified.
1184 if test $enable_libstdcxx_allocator_flag = auto; then
1185 case ${target_os} in
1187 enable_libstdcxx_allocator_flag=new
1191 AC_MSG_RESULT($enable_libstdcxx_allocator_flag)
1194 # Set configure bits for specified locale package
1195 case ${enable_libstdcxx_allocator_flag} in
1197 ALLOCATOR_H=config/allocator/bitmap_allocator_base.h
1198 ALLOCATOR_NAME=__gnu_cxx::bitmap_allocator
1201 ALLOCATOR_H=config/allocator/malloc_allocator_base.h
1202 ALLOCATOR_NAME=__gnu_cxx::malloc_allocator
1205 ALLOCATOR_H=config/allocator/mt_allocator_base.h
1206 ALLOCATOR_NAME=__gnu_cxx::__mt_alloc
1209 ALLOCATOR_H=config/allocator/new_allocator_base.h
1210 ALLOCATOR_NAME=__gnu_cxx::new_allocator
1213 ALLOCATOR_H=config/allocator/pool_allocator_base.h
1214 ALLOCATOR_NAME=__gnu_cxx::__pool_alloc
1218 AC_SUBST(ALLOCATOR_H)
1219 AC_SUBST(ALLOCATOR_NAME)
1224 dnl Check for whether the Boost-derived checks should be turned on.
1226 dnl --enable-concept-checks turns them on.
1227 dnl --disable-concept-checks leaves them off.
1228 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1229 dnl Where DEFAULT is either `yes' or `no'.
1231 AC_DEFUN([GLIBCXX_ENABLE_CONCEPT_CHECKS], [
1232 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1233 if test $enable_concept_checks = yes; then
1234 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1240 dnl Check for which I/O library to use: stdio, or something specific.
1242 dnl Default is stdio.
1244 AC_DEFUN([GLIBCXX_ENABLE_CSTDIO], [
1245 AC_MSG_CHECKING([for underlying I/O to use])
1246 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1247 [use target-specific I/O package], [permit stdio])
1249 # Now that libio has been removed, you can have any color you want as long
1250 # as it's black. This is one big no-op until other packages are added, but
1251 # showing the framework never hurts.
1252 case ${enable_cstdio} in
1254 CSTDIO_H=config/io/c_io_stdio.h
1255 BASIC_FILE_H=config/io/basic_file_stdio.h
1256 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1257 AC_MSG_RESULT(stdio)
1262 AC_SUBST(BASIC_FILE_H)
1263 AC_SUBST(BASIC_FILE_CC)
1268 dnl Check for "unusual" flags to pass to the compiler while building.
1270 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1271 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1272 dnl --disable-cxx-flags passes nothing.
1273 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1274 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1275 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1276 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1277 dnl If "default flags" is an empty string, the effect is the same
1278 dnl as --disable or --enable=no.
1280 AC_DEFUN([GLIBCXX_ENABLE_CXX_FLAGS], [dnl
1281 AC_MSG_CHECKING([for extra compiler flags for building])
1282 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1283 [pass compiler FLAGS when building library],
1284 [case "x$enable_cxx_flags" in
1285 xno | x) enable_cxx_flags= ;;
1287 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1290 # Run through flags (either default or command-line) and set anything
1291 # extra (e.g., #defines) that must accompany particular g++ options.
1292 if test -n "$enable_cxx_flags"; then
1293 for f in $enable_cxx_flags; do
1297 *) # and we're trying to pass /what/ exactly?
1298 AC_MSG_ERROR([compiler flags start with a -]) ;;
1303 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1304 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1305 AC_SUBST(EXTRA_CXX_FLAGS)
1310 dnl Check for wide character support. Has the same effect as the option
1311 dnl in gcc's configure, but in a form that autoconf can mess with.
1313 dnl --enable-c-mbchar requests all the wchar_t stuff.
1314 dnl --disable-c-mbchar doesn't.
1315 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1316 dnl Where DEFAULT is either `yes' or `no'.
1318 AC_DEFUN([GLIBCXX_ENABLE_C_MBCHAR], [
1319 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1320 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1325 dnl Check to see if debugging libraries are to be built.
1327 dnl --enable-libstdcxx-debug
1328 dnl builds a separate set of debugging libraries in addition to the
1329 dnl normal (shared, static) libstdc++ binaries.
1331 dnl --disable-libstdcxx-debug
1332 dnl builds only one (non-debug) version of libstdc++.
1334 dnl --enable-libstdcxx-debug-flags=FLAGS
1335 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1337 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1338 dnl Where DEFAULT is either `yes' or `no'.
1340 AC_DEFUN([GLIBCXX_ENABLE_DEBUG], [
1341 AC_MSG_CHECKING([for additional debug build])
1342 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1343 AC_MSG_RESULT($enable_libstdcxx_debug)
1344 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1349 dnl Check for explicit debug flags.
1351 dnl --enable-libstdcxx-debug-flags='-O1'
1352 dnl is a general method for passing flags to be used when
1353 dnl building debug libraries with --enable-debug.
1355 dnl --disable-libstdcxx-debug-flags does nothing.
1356 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1357 dnl If "default flags" is an empty string, the effect is the same
1358 dnl as --disable or --enable=no.
1360 AC_DEFUN([GLIBCXX_ENABLE_DEBUG_FLAGS], [
1361 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1362 [pass compiler FLAGS when building debug library],
1363 [case "x$enable_libstdcxx_debug_flags" in
1364 xno | x) enable_libstdcxx_debug_flags= ;;
1366 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1369 # Option parsed, now set things appropriately
1370 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1371 AC_SUBST(DEBUG_FLAGS)
1373 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1378 dnl Check if the user only wants a freestanding library implementation.
1380 dnl --disable-hosted-libstdcxx will turn off most of the library build,
1381 dnl installing only the headers required by [17.4.1.3] and the language
1382 dnl support library. More than that will be built (to keep the Makefiles
1383 dnl conveniently clean), but not installed.
1386 dnl is_hosted (yes/no)
1389 dnl _GLIBCXX_HOSTED (always defined, either to 1 or 0)
1391 AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
1392 AC_ARG_ENABLE([hosted-libstdcxx],
1393 AC_HELP_STRING([--disable-hosted-libstdcxx],
1394 [only build freestanding C++ runtime support]),,
1395 [enable_hosted_libstdcxx=yes])
1396 if test "$enable_hosted_libstdcxx" = no; then
1397 AC_MSG_NOTICE([Only freestanding libraries will be built])
1401 enable_libstdcxx_pch=no
1406 GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
1407 AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
1408 [Define to 1 if a full hosted library is built, or 0 if freestanding.])
1413 dnl Check for template specializations for the 'long long' type extension.
1414 dnl The result determines only whether 'long long' I/O is enabled; things
1415 dnl like numeric_limits<> specializations are always available.
1417 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1418 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1419 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1420 dnl Where DEFAULT is either `yes' or `no'.
1422 AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
1423 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1424 if test $enable_long_long = yes; then
1425 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1431 dnl Check to see if building and using a C++ precompiled header can be done.
1433 dnl --enable-libstdcxx-pch=yes
1434 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1435 dnl may work, after some light-hearted attempts to puzzle out compiler
1436 dnl support, flip bits on in include/Makefile.am
1438 dnl --disable-libstdcxx-pch
1439 dnl turns off attempts to use or build stdc++.h.gch.
1442 dnl glibcxx_PCHFLAGS
1444 AC_DEFUN([GLIBCXX_ENABLE_PCH], [
1445 AC_MSG_CHECKING([for enabled PCH])
1446 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1447 AC_MSG_RESULT([$enable_libstdcxx_pch])
1449 if test $enable_libstdcxx_pch = yes; then
1450 AC_CACHE_CHECK([for compiler with PCH support],
1451 [glibcxx_cv_prog_CXX_pch],
1452 [ac_save_CXXFLAGS="$CXXFLAGS"
1453 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1456 echo '#include <math.h>' > conftest.h
1457 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1458 -o conftest.h.gch 1>&5 2>&1 &&
1459 echo '#error "pch failed"' > conftest.h &&
1460 echo '#include "conftest.h"' > conftest.cc &&
1461 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1463 glibcxx_cv_prog_CXX_pch=yes
1465 glibcxx_cv_prog_CXX_pch=no
1468 CXXFLAGS=$ac_save_CXXFLAGS
1471 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1474 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1475 if test $enable_libstdcxx_pch = yes; then
1476 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1480 AC_SUBST(glibcxx_PCHFLAGS)
1485 dnl Check for exception handling support. If an explicit enable/disable
1486 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1487 dnl target may or may not support call frame exceptions.
1489 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1490 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1491 dnl Neither one forces an attempt at detection.
1494 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1496 AC_DEFUN([GLIBCXX_ENABLE_SJLJ_EXCEPTIONS], [
1497 AC_MSG_CHECKING([for exception model to use])
1500 GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1501 [force use of builtin_setjmp for exceptions],
1502 [permit yes|no|auto])
1504 if test $enable_sjlj_exceptions = auto; then
1505 # Botheration. Now we've got to detect the exception model. Link tests
1506 # against libgcc.a are problematic since we've not been given proper -L
1507 # bits for single-tree newlib and libgloss.
1509 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
1510 cat > conftest.$ac_ext << EOF
1511 [#]line __oline__ "configure"
1520 old_CXXFLAGS="$CXXFLAGS"
1522 if AC_TRY_EVAL(ac_compile); then
1523 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1524 enable_sjlj_exceptions=yes
1525 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1526 enable_sjlj_exceptions=no
1529 CXXFLAGS="$old_CXXFLAGS"
1533 # This is a tad weird, for hysterical raisins. We have to map enable/disable
1534 # to two different models.
1535 case $enable_sjlj_exceptions in
1537 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1538 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1539 ac_exception_model_name=sjlj
1542 ac_exception_model_name="call frame"
1545 AC_MSG_ERROR([unable to detect exception model])
1549 AC_MSG_RESULT($ac_exception_model_name)
1554 dnl Add version tags to symbols in shared library (or not), additionally
1555 dnl marking other symbols as private/local (or not).
1557 dnl --enable-symvers=style adds a version script to the linker call when
1558 dnl creating the shared library. The choice of version script is
1559 dnl controlled by 'style'.
1560 dnl --disable-symvers does not.
1561 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1562 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1563 dnl choose a default style based on linker characteristics. Passing
1564 dnl 'no' disables versioning.
1566 AC_DEFUN([GLIBCXX_ENABLE_SYMVERS], [
1568 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1569 [enables symbol versioning of the shared library],
1570 [permit yes|no|gnu])
1572 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1573 # don't know enough about $LD to do tricks...
1574 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1575 # FIXME The following test is too strict, in theory.
1576 if test $enable_shared = no ||
1578 test x$glibcxx_gnu_ld_version = x; then
1582 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1583 if test $enable_symvers != no; then
1584 AC_MSG_CHECKING([for shared libgcc])
1585 ac_save_CFLAGS="$CFLAGS"
1587 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1588 CFLAGS="$ac_save_CFLAGS"
1589 AC_MSG_RESULT($glibcxx_shared_libgcc)
1592 # For GNU ld, we need at least this version. The format is described in
1593 # GLIBCXX_CHECK_LINKER_FEATURES above.
1594 glibcxx_min_gnu_ld_version=21400
1595 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1597 # Check to see if unspecified "yes" value can win, given results above.
1598 # Change "yes" into either "no" or a style name.
1599 if test $enable_symvers = yes; then
1600 if test $with_gnu_ld = yes &&
1601 test $glibcxx_shared_libgcc = yes;
1603 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1606 # The right tools, the right setup, but too old. Fallbacks?
1607 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1608 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1609 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1610 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1611 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1612 # Globbing fix is present, proper block support is not.
1613 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1614 dnl enable_symvers=???
1615 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1619 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1625 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1626 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1627 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1628 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1633 # Everything parsed; figure out what file to use.
1634 case $enable_symvers in
1636 SYMVER_MAP=config/linker-map.dummy
1639 SYMVER_MAP=config/linker-map.gnu
1640 AC_DEFINE(_GLIBCXX_SYMVER)
1644 AC_SUBST(SYMVER_MAP)
1645 AC_SUBST(port_specific_symbol_files)
1646 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1647 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1652 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1653 dnl We must stage the required headers so that they will be installed
1654 dnl with the library (unlike libgcc, the STL implementation is provided
1655 dnl solely within headers). Since we must not inject random user-space
1656 dnl macro names into user-provided C++ code, we first stage into <file>-in
1657 dnl and process to <file> with an output command. The reason for a two-
1658 dnl stage process here is to correctly handle $srcdir!=$objdir without
1659 dnl having to write complex code (the sed commands to clean the macro
1660 dnl namespace are complex and fragile enough as it is). We must also
1661 dnl add a relative path so that -I- is supported properly.
1664 dnl glibcxx_thread_h
1667 dnl HAVE_GTHR_DEFAULT
1669 AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
1670 AC_MSG_CHECKING([for thread model used by GCC])
1671 target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1672 AC_MSG_RESULT([$target_thread_file])
1674 if test $target_thread_file != single; then
1675 AC_DEFINE(HAVE_GTHR_DEFAULT)
1678 glibcxx_thread_h=gthr-$target_thread_file.h
1679 AC_SUBST(glibcxx_thread_h)
1683 # Check whether LC_MESSAGES is available in <locale.h>.
1684 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1686 # This file file be copied and used freely without restrictions. It can
1687 # be used in projects which are not available under the GNU Public License
1688 # but which still want to provide support for the GNU gettext functionality.
1689 # Please note that the actual code is *not* freely available.
1692 AC_DEFUN([AC_LC_MESSAGES], [
1693 AC_CHECK_HEADER(locale.h, [
1694 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1695 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1696 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1697 if test $ac_cv_val_LC_MESSAGES = yes; then
1698 AC_DEFINE(HAVE_LC_MESSAGES)
1704 sinclude([../libtool.m4])
1705 dnl The lines below arrange for aclocal not to bring an installed
1706 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1707 dnl add a definition of LIBTOOL to Makefile.in.
1708 ifelse(,,,[AC_SUBST(LIBTOOL)
1709 AC_DEFUN([AM_PROG_LIBTOOL])
1710 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1711 AC_DEFUN([AC_PROG_LD])
1714 dnl vim:et:ts=2:sw=2
1716 # AM_CONDITIONAL -*- Autoconf -*-
1718 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1720 # This program is free software; you can redistribute it and/or modify
1721 # it under the terms of the GNU General Public License as published by
1722 # the Free Software Foundation; either version 2, or (at your option)
1723 # any later version.
1725 # This program is distributed in the hope that it will be useful,
1726 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1727 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1728 # GNU General Public License for more details.
1730 # You should have received a copy of the GNU General Public License
1731 # along with this program; if not, write to the Free Software
1732 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1739 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1740 # -------------------------------------
1741 # Define a conditional.
1742 AC_DEFUN([AM_CONDITIONAL],
1743 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1744 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1746 AC_SUBST([$1_FALSE])
1754 AC_CONFIG_COMMANDS_PRE(
1755 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1756 AC_MSG_ERROR([conditional "$1" was never defined.
1757 Usually this means the macro was only invoked conditionally.])
1760 # Add --enable-maintainer-mode option to configure.
1763 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1765 # This program is free software; you can redistribute it and/or modify
1766 # it under the terms of the GNU General Public License as published by
1767 # the Free Software Foundation; either version 2, or (at your option)
1768 # any later version.
1770 # This program is distributed in the hope that it will be useful,
1771 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1772 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1773 # GNU General Public License for more details.
1775 # You should have received a copy of the GNU General Public License
1776 # along with this program; if not, write to the Free Software
1777 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1782 AC_DEFUN([AM_MAINTAINER_MODE],
1783 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1784 dnl maintainer-mode is disabled by default
1785 AC_ARG_ENABLE(maintainer-mode,
1786 [ --enable-maintainer-mode enable make rules and dependencies not useful
1787 (and sometimes confusing) to the casual installer],
1788 USE_MAINTAINER_MODE=$enableval,
1789 USE_MAINTAINER_MODE=no)
1790 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1791 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1792 MAINT=$MAINTAINER_MODE_TRUE
1797 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1799 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1801 # This program is free software; you can redistribute it and/or modify
1802 # it under the terms of the GNU General Public License as published by
1803 # the Free Software Foundation; either version 2, or (at your option)
1804 # any later version.
1806 # This program is distributed in the hope that it will be useful,
1807 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1808 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1809 # GNU General Public License for more details.
1811 # You should have received a copy of the GNU General Public License
1812 # along with this program; if not, write to the Free Software
1813 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1818 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1819 # ---------------------------------------------------
1820 # Add --enable-multilib to configure.
1821 AC_DEFUN([AM_ENABLE_MULTILIB],
1822 [# Default to --enable-multilib
1823 AC_ARG_ENABLE(multilib,
1824 [ --enable-multilib build many library versions (default)],
1825 [case "$enableval" in
1826 yes) multilib=yes ;;
1828 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1832 # We may get other options which we leave undocumented:
1833 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1834 # See config-ml.in if you want the gory details.
1836 if test "$srcdir" = "."; then
1837 if test "$with_target_subdir" != "."; then
1838 multi_basedir="$srcdir/$with_multisrctop../$2"
1840 multi_basedir="$srcdir/$with_multisrctop$2"
1843 multi_basedir="$srcdir/$2"
1845 AC_SUBST(multi_basedir)
1847 AC_OUTPUT_COMMANDS([
1848 # Only add multilib support code if we just rebuilt the top-level
1850 case " $CONFIG_FILES " in
1851 *" ]m4_default([$1],Makefile)[ "*)
1852 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1859 with_multisubdir="$with_multisubdir"
1860 with_multisrctop="$with_multisrctop"
1861 with_target_subdir="$with_target_subdir"
1862 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1863 multi_basedir="$multi_basedir"
1864 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1867 # Do all the work for Automake. -*- Autoconf -*-
1869 # This macro actually does too much some checks are only needed if
1870 # your package does certain things. But this isn't really a big deal.
1872 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1873 # Free Software Foundation, Inc.
1875 # This program is free software; you can redistribute it and/or modify
1876 # it under the terms of the GNU General Public License as published by
1877 # the Free Software Foundation; either version 2, or (at your option)
1878 # any later version.
1880 # This program is distributed in the hope that it will be useful,
1881 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1882 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1883 # GNU General Public License for more details.
1885 # You should have received a copy of the GNU General Public License
1886 # along with this program; if not, write to the Free Software
1887 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1894 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1895 # the ones we care about.
1896 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1898 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1899 # AM_INIT_AUTOMAKE([OPTIONS])
1900 # -----------------------------------------------
1901 # The call with PACKAGE and VERSION arguments is the old style
1902 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1903 # and VERSION should now be passed to AC_INIT and removed from
1904 # the call to AM_INIT_AUTOMAKE.
1905 # We support both call styles for the transition. After
1906 # the next Automake release, Autoconf can make the AC_INIT
1907 # arguments mandatory, and then we can depend on a new Autoconf
1908 # release and drop the old call support.
1909 AC_DEFUN([AM_INIT_AUTOMAKE],
1910 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1911 AC_REQUIRE([AC_PROG_INSTALL])dnl
1912 # test to see if srcdir already configured
1913 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1914 test -f $srcdir/config.status; then
1915 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1918 # test whether we have cygpath
1919 if test -z "$CYGPATH_W"; then
1920 if (cygpath --version) >/dev/null 2>/dev/null; then
1921 CYGPATH_W='cygpath -w'
1926 AC_SUBST([CYGPATH_W])
1928 # Define the identity of the package.
1929 dnl Distinguish between old-style and new-style calls.
1931 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1932 AC_SUBST([PACKAGE], [$1])dnl
1933 AC_SUBST([VERSION], [$2])],
1934 [_AM_SET_OPTIONS([$1])dnl
1935 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1936 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1938 _AM_IF_OPTION([no-define],,
1939 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1940 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1942 # Some tools Automake needs.
1943 AC_REQUIRE([AM_SANITY_CHECK])dnl
1944 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1945 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1946 AM_MISSING_PROG(AUTOCONF, autoconf)
1947 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1948 AM_MISSING_PROG(AUTOHEADER, autoheader)
1949 AM_MISSING_PROG(MAKEINFO, makeinfo)
1950 AM_MISSING_PROG(AMTAR, tar)
1952 AM_PROG_INSTALL_STRIP
1953 # We need awk for the "check" target. The system "awk" is bad on
1955 AC_REQUIRE([AC_PROG_AWK])dnl
1956 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1957 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1959 _AM_IF_OPTION([no-dependencies],,
1960 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1961 [_AM_DEPENDENCIES(CC)],
1962 [define([AC_PROG_CC],
1963 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1964 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1965 [_AM_DEPENDENCIES(CXX)],
1966 [define([AC_PROG_CXX],
1967 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1972 # When config.status generates a header, we must update the stamp-h file.
1973 # This file resides in the same directory as the config header
1974 # that is generated. The stamp files are numbered to have different names.
1976 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1977 # loop where config.status creates the headers, so we can generate
1978 # our stamp files there.
1979 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1980 [# Compute $1's index in $config_headers.
1982 for _am_header in $config_headers :; do
1987 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1990 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1992 # Copyright 2002 Free Software Foundation, Inc.
1994 # This program is free software; you can redistribute it and/or modify
1995 # it under the terms of the GNU General Public License as published by
1996 # the Free Software Foundation; either version 2, or (at your option)
1997 # any later version.
1999 # This program is distributed in the hope that it will be useful,
2000 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2001 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2002 # GNU General Public License for more details.
2004 # You should have received a copy of the GNU General Public License
2005 # along with this program; if not, write to the Free Software
2006 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2008 # AM_AUTOMAKE_VERSION(VERSION)
2009 # ----------------------------
2010 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2011 # generated from the m4 files accompanying Automake X.Y.
2012 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
2014 # AM_SET_CURRENT_AUTOMAKE_VERSION
2015 # -------------------------------
2016 # Call AM_AUTOMAKE_VERSION so it can be traced.
2017 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
2018 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2019 [AM_AUTOMAKE_VERSION([1.7.9])])
2021 # Helper functions for option handling. -*- Autoconf -*-
2023 # Copyright 2001, 2002 Free Software Foundation, Inc.
2025 # This program is free software; you can redistribute it and/or modify
2026 # it under the terms of the GNU General Public License as published by
2027 # the Free Software Foundation; either version 2, or (at your option)
2028 # any later version.
2030 # This program is distributed in the hope that it will be useful,
2031 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2032 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2033 # GNU General Public License for more details.
2035 # You should have received a copy of the GNU General Public License
2036 # along with this program; if not, write to the Free Software
2037 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2042 # _AM_MANGLE_OPTION(NAME)
2043 # -----------------------
2044 AC_DEFUN([_AM_MANGLE_OPTION],
2045 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2047 # _AM_SET_OPTION(NAME)
2048 # ------------------------------
2049 # Set option NAME. Presently that only means defining a flag for this option.
2050 AC_DEFUN([_AM_SET_OPTION],
2051 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2053 # _AM_SET_OPTIONS(OPTIONS)
2054 # ----------------------------------
2055 # OPTIONS is a space-separated list of Automake options.
2056 AC_DEFUN([_AM_SET_OPTIONS],
2057 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2059 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2060 # -------------------------------------------
2061 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2062 AC_DEFUN([_AM_IF_OPTION],
2063 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2066 # Check to make sure that the build environment is sane.
2069 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2071 # This program is free software; you can redistribute it and/or modify
2072 # it under the terms of the GNU General Public License as published by
2073 # the Free Software Foundation; either version 2, or (at your option)
2074 # any later version.
2076 # This program is distributed in the hope that it will be useful,
2077 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2078 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2079 # GNU General Public License for more details.
2081 # You should have received a copy of the GNU General Public License
2082 # along with this program; if not, write to the Free Software
2083 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2090 AC_DEFUN([AM_SANITY_CHECK],
2091 [AC_MSG_CHECKING([whether build environment is sane])
2094 echo timestamp > conftest.file
2095 # Do `set' in a subshell so we don't clobber the current shell's
2096 # arguments. Must try -L first in case configure is actually a
2097 # symlink; some systems play weird games with the mod time of symlinks
2098 # (eg FreeBSD returns the mod time of the symlink's containing
2101 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2102 if test "$[*]" = "X"; then
2104 set X `ls -t $srcdir/configure conftest.file`
2107 if test "$[*]" != "X $srcdir/configure conftest.file" \
2108 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2110 # If neither matched, then we have a broken ls. This can happen
2111 # if, for instance, CONFIG_SHELL is bash and it inherits a
2112 # broken ls alias from the environment. This has actually
2113 # happened. Such a system could not be considered "sane".
2114 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2115 alias in your environment])
2118 test "$[2]" = conftest.file
2124 AC_MSG_ERROR([newly created file is older than distributed files!
2125 Check your system clock])
2127 AC_MSG_RESULT(yes)])
2132 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2134 # This program is free software; you can redistribute it and/or modify
2135 # it under the terms of the GNU General Public License as published by
2136 # the Free Software Foundation; either version 2, or (at your option)
2137 # any later version.
2139 # This program is distributed in the hope that it will be useful,
2140 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2141 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2142 # GNU General Public License for more details.
2144 # You should have received a copy of the GNU General Public License
2145 # along with this program; if not, write to the Free Software
2146 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2151 # AM_MISSING_PROG(NAME, PROGRAM)
2152 # ------------------------------
2153 AC_DEFUN([AM_MISSING_PROG],
2154 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2155 $1=${$1-"${am_missing_run}$2"}
2159 # AM_MISSING_HAS_RUN
2160 # ------------------
2161 # Define MISSING if not defined so far and test if it supports --run.
2162 # If it does, set am_missing_run to use it, otherwise, to nothing.
2163 AC_DEFUN([AM_MISSING_HAS_RUN],
2164 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2165 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2166 # Use eval to expand $SHELL
2167 if eval "$MISSING --run true"; then
2168 am_missing_run="$MISSING --run "
2171 AC_MSG_WARN([`missing' script is too old or missing])
2177 # Copyright 2001 Free Software Foundation, Inc.
2179 # This program is free software; you can redistribute it and/or modify
2180 # it under the terms of the GNU General Public License as published by
2181 # the Free Software Foundation; either version 2, or (at your option)
2182 # any later version.
2184 # This program is distributed in the hope that it will be useful,
2185 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2186 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2187 # GNU General Public License for more details.
2189 # You should have received a copy of the GNU General Public License
2190 # along with this program; if not, write to the Free Software
2191 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2194 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2195 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2196 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2198 # Of course, Automake must honor this variable whenever it calls a
2199 # tool from the auxiliary directory. The problem is that $srcdir (and
2200 # therefore $ac_aux_dir as well) can be either absolute or relative,
2201 # depending on how configure is run. This is pretty annoying, since
2202 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2203 # source directory, any form will work fine, but in subdirectories a
2204 # relative path needs to be adjusted first.
2206 # $ac_aux_dir/missing
2207 # fails when called from a subdirectory if $ac_aux_dir is relative
2208 # $top_srcdir/$ac_aux_dir/missing
2209 # fails if $ac_aux_dir is absolute,
2210 # fails when called from a subdirectory in a VPATH build with
2211 # a relative $ac_aux_dir
2213 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2214 # are both prefixed by $srcdir. In an in-source build this is usually
2215 # harmless because $srcdir is `.', but things will broke when you
2216 # start a VPATH build or use an absolute $srcdir.
2218 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2219 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2220 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2221 # and then we would define $MISSING as
2222 # MISSING="\${SHELL} $am_aux_dir/missing"
2223 # This will work as long as MISSING is not called from configure, because
2224 # unfortunately $(top_srcdir) has no meaning in configure.
2225 # However there are other variables, like CC, which are often used in
2226 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2228 # Another solution, used here, is to always expand $ac_aux_dir to an
2229 # absolute PATH. The drawback is that using absolute paths prevent a
2230 # configured tree to be moved without reconfiguration.
2232 # Rely on autoconf to set up CDPATH properly.
2235 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2236 # expand $ac_aux_dir to an absolute path
2237 am_aux_dir=`cd $ac_aux_dir && pwd`
2240 # AM_PROG_INSTALL_SH
2241 # ------------------
2242 # Define $install_sh.
2244 # Copyright 2001 Free Software Foundation, Inc.
2246 # This program is free software; you can redistribute it and/or modify
2247 # it under the terms of the GNU General Public License as published by
2248 # the Free Software Foundation; either version 2, or (at your option)
2249 # any later version.
2251 # This program is distributed in the hope that it will be useful,
2252 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2253 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2254 # GNU General Public License for more details.
2256 # You should have received a copy of the GNU General Public License
2257 # along with this program; if not, write to the Free Software
2258 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2261 AC_DEFUN([AM_PROG_INSTALL_SH],
2262 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2263 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2264 AC_SUBST(install_sh)])
2266 # AM_PROG_INSTALL_STRIP
2268 # Copyright 2001 Free Software Foundation, Inc.
2270 # This program is free software; you can redistribute it and/or modify
2271 # it under the terms of the GNU General Public License as published by
2272 # the Free Software Foundation; either version 2, or (at your option)
2273 # any later version.
2275 # This program is distributed in the hope that it will be useful,
2276 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2277 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2278 # GNU General Public License for more details.
2280 # You should have received a copy of the GNU General Public License
2281 # along with this program; if not, write to the Free Software
2282 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2285 # One issue with vendor `install' (even GNU) is that you can't
2286 # specify the program used to strip binaries. This is especially
2287 # annoying in cross-compiling environments, where the build's strip
2288 # is unlikely to handle the host's binaries.
2289 # Fortunately install-sh will honor a STRIPPROG variable, so we
2290 # always use install-sh in `make install-strip', and initialize
2291 # STRIPPROG with the value of the STRIP variable (set by the user).
2292 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2293 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2294 # Installed binaries are usually stripped using `strip' when the user
2295 # run `make install-strip'. However `strip' might not be the right
2296 # tool to use in cross-compilation environments, therefore Automake
2297 # will honor the `STRIP' environment variable to overrule this program.
2298 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2299 if test "$cross_compiling" != no; then
2300 AC_CHECK_TOOL([STRIP], [strip], :)
2302 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2303 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2306 # Copyright (C) 2003 Free Software Foundation, Inc.
2308 # This program is free software; you can redistribute it and/or modify
2309 # it under the terms of the GNU General Public License as published by
2310 # the Free Software Foundation; either version 2, or (at your option)
2311 # any later version.
2313 # This program is distributed in the hope that it will be useful,
2314 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2315 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2316 # GNU General Public License for more details.
2318 # You should have received a copy of the GNU General Public License
2319 # along with this program; if not, write to the Free Software
2320 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2325 # Check whether the underlying file-system supports filenames
2326 # with a leading dot. For instance MS-DOS doesn't.
2327 AC_DEFUN([AM_SET_LEADING_DOT],
2328 [rm -rf .tst 2>/dev/null
2329 mkdir .tst 2>/dev/null
2330 if test -d .tst; then
2335 rmdir .tst 2>/dev/null
2336 AC_SUBST([am__leading_dot])])
2338 # serial 5 -*- Autoconf -*-
2340 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2342 # This program is free software; you can redistribute it and/or modify
2343 # it under the terms of the GNU General Public License as published by
2344 # the Free Software Foundation; either version 2, or (at your option)
2345 # any later version.
2347 # This program is distributed in the hope that it will be useful,
2348 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2349 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2350 # GNU General Public License for more details.
2352 # You should have received a copy of the GNU General Public License
2353 # along with this program; if not, write to the Free Software
2354 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2358 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2359 # written in clear, in which case automake, when reading aclocal.m4,
2360 # will think it sees a *use*, and therefore will trigger all it's
2361 # C support machinery. Also note that it means that autoscan, seeing
2362 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2366 # _AM_DEPENDENCIES(NAME)
2367 # ----------------------
2368 # See how the compiler implements dependency checking.
2369 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2370 # We try a few techniques and use that to set a single cache variable.
2372 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2373 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2374 # dependency, and given that the user is not expected to run this macro,
2375 # just rely on AC_PROG_CC.
2376 AC_DEFUN([_AM_DEPENDENCIES],
2377 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2378 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2379 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2380 AC_REQUIRE([AM_DEP_TRACK])dnl
2382 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2383 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2384 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2385 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2386 [depcc="$$1" am_compiler_list=])
2388 AC_CACHE_CHECK([dependency style of $depcc],
2389 [am_cv_$1_dependencies_compiler_type],
2390 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2391 # We make a subdir and do the tests there. Otherwise we can end up
2392 # making bogus files that we don't know about and never remove. For
2393 # instance it was reported that on HP-UX the gcc test will end up
2394 # making a dummy file named `D' -- because `-MD' means `put the output
2397 # Copy depcomp to subdir because otherwise we won't find it if we're
2398 # using a relative directory.
2399 cp "$am_depcomp" conftest.dir
2401 # We will build objects and dependencies in a subdirectory because
2402 # it helps to detect inapplicable dependency modes. For instance
2403 # both Tru64's cc and ICC support -MD to output dependencies as a
2404 # side effect of compilation, but ICC will put the dependencies in
2405 # the current directory while Tru64 will put them in the object
2409 am_cv_$1_dependencies_compiler_type=none
2410 if test "$am_compiler_list" = ""; then
2411 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2413 for depmode in $am_compiler_list; do
2414 # Setup a source with many dependencies, because some compilers
2415 # like to wrap large dependency lists on column 80 (with \), and
2416 # we should not choose a depcomp mode which is confused by this.
2418 # We need to recreate these files for each test, as the compiler may
2419 # overwrite some of them when testing with obscure command lines.
2420 # This happens at least with the AIX C compiler.
2422 for i in 1 2 3 4 5 6; do
2423 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2426 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2430 # after this tag, mechanisms are not by side-effect, so they'll
2431 # only be used when explicitly requested
2432 if test "x$enable_dependency_tracking" = xyes; then
2440 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2441 # mode. It turns out that the SunPro C++ compiler does not properly
2442 # handle `-M -o', and we need to detect this.
2443 if depmode=$depmode \
2444 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2445 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2446 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2447 >/dev/null 2>conftest.err &&
2448 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2449 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2450 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2451 # icc doesn't choke on unknown options, it will just issue warnings
2452 # (even with -Werror). So we grep stderr for any message
2453 # that says an option was ignored.
2454 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2455 am_cv_$1_dependencies_compiler_type=$depmode
2464 am_cv_$1_dependencies_compiler_type=none
2467 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2468 AM_CONDITIONAL([am__fastdep$1], [
2469 test "x$enable_dependency_tracking" != xno \
2470 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2476 # Choose a directory name for dependency files.
2477 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2478 AC_DEFUN([AM_SET_DEPDIR],
2479 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2480 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2486 AC_DEFUN([AM_DEP_TRACK],
2487 [AC_ARG_ENABLE(dependency-tracking,
2488 [ --disable-dependency-tracking Speeds up one-time builds
2489 --enable-dependency-tracking Do not reject slow dependency extractors])
2490 if test "x$enable_dependency_tracking" != xno; then
2491 am_depcomp="$ac_aux_dir/depcomp"
2494 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2495 AC_SUBST([AMDEPBACKSLASH])
2498 # Generate code to set up dependency tracking. -*- Autoconf -*-
2500 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2502 # This program is free software; you can redistribute it and/or modify
2503 # it under the terms of the GNU General Public License as published by
2504 # the Free Software Foundation; either version 2, or (at your option)
2505 # any later version.
2507 # This program is distributed in the hope that it will be useful,
2508 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2509 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2510 # GNU General Public License for more details.
2512 # You should have received a copy of the GNU General Public License
2513 # along with this program; if not, write to the Free Software
2514 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2519 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2520 # ------------------------------
2521 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2522 [for mf in $CONFIG_FILES; do
2523 # Strip MF so we end up with the name of the file.
2524 mf=`echo "$mf" | sed -e 's/:.*$//'`
2525 # Check whether this is an Automake generated Makefile or not.
2526 # We used to match only the files named `Makefile.in', but
2527 # some people rename them; so instead we look at the file content.
2528 # Grep'ing the first line is not enough: some people post-process
2529 # each Makefile.in and add a new line on top of each file to say so.
2530 # So let's grep whole file.
2531 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2532 dirpart=`AS_DIRNAME("$mf")`
2536 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2537 # Extract the definition of DEP_FILES from the Makefile without
2539 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2540 test -z "$DEPDIR" && continue
2541 # When using ansi2knr, U may be empty or an underscore; expand it
2542 U=`sed -n -e '/^U = / s///p' < "$mf"`
2543 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2544 # We invoke sed twice because it is the simplest approach to
2545 # changing $(DEPDIR) to its actual value in the expansion.
2546 for file in `sed -n -e '
2547 /^DEP_FILES = .*\\\\$/ {
2556 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2557 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2558 # Make sure the directory exists.
2559 test -f "$dirpart/$file" && continue
2560 fdir=`AS_DIRNAME(["$file"])`
2561 AS_MKDIR_P([$dirpart/$fdir])
2562 # echo "creating $dirpart/$file"
2563 echo '# dummy' > "$dirpart/$file"
2566 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2569 # AM_OUTPUT_DEPENDENCY_COMMANDS
2570 # -----------------------------
2571 # This macro should only be invoked once -- use via AC_REQUIRE.
2573 # This code is only required when automatic dependency tracking
2574 # is enabled. FIXME. This creates each `.P' file that we will
2575 # need in order to bootstrap the dependency handling code.
2576 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2577 [AC_CONFIG_COMMANDS([depfiles],
2578 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2579 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2582 # Check to see how 'make' treats includes. -*- Autoconf -*-
2584 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2586 # This program is free software; you can redistribute it and/or modify
2587 # it under the terms of the GNU General Public License as published by
2588 # the Free Software Foundation; either version 2, or (at your option)
2589 # any later version.
2591 # This program is distributed in the hope that it will be useful,
2592 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2593 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2594 # GNU General Public License for more details.
2596 # You should have received a copy of the GNU General Public License
2597 # along with this program; if not, write to the Free Software
2598 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2605 # Check to see how make treats includes.
2606 AC_DEFUN([AM_MAKE_INCLUDE],
2607 [am_make=${MAKE-make}
2608 cat > confinc << 'END'
2613 # If we don't find an include directive, just comment out the code.
2614 AC_MSG_CHECKING([for style of include used by $am_make])
2618 # First try GNU make style include.
2619 echo "include confinc" > confmf
2620 # We grep out `Entering directory' and `Leaving directory'
2621 # messages which can occur if `w' ends up in MAKEFLAGS.
2622 # In particular we don't look at `^make:' because GNU make might
2623 # be invoked under some other name (usually "gmake"), in which
2624 # case it prints its new name instead of `make'.
2625 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2630 # Now try BSD make style include.
2631 if test "$am__include" = "#"; then
2632 echo '.include "confinc"' > confmf
2633 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2634 am__include=.include
2639 AC_SUBST([am__include])
2640 AC_SUBST([am__quote])
2641 AC_MSG_RESULT([$_am_result])
2642 rm -f confinc confmf