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 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)
45 dnl Initialize basic configure bits.
50 AC_DEFUN(GLIBCXX_TOPREL_CONFIGURE, [
51 # Sets up multi_basedir, which is srcdir/.. plus the usual
52 # "multi_source_toprel_bottom_adjust" lunacy as needed.
53 AM_ENABLE_MULTILIB(, ..)
55 # The generated code is exactly the same, except that automake's looks in
56 # ".. $srcdir/.." and autoconf's looks in multi_basedir. Apparently other
57 # things are triggered on the presence of the two ...AUX_DIR[S], but I don't
58 # know what they are or what the other differences might be (and they keep
61 # Looking in multi_basedir seems smarter, so actually execute that branch.
63 # this is for automake
66 # this is for autoconf
67 AC_CONFIG_AUX_DIRS(${multi_basedir})
76 dnl Initialize the rest of the library configury. At this point we have
77 dnl variables like $host.
80 dnl gcc_version (x.y.z format)
83 dnl glibcxx_builddir (absolute path)
84 dnl glibcxx_srcdir (absolute path)
85 dnl toplevel_srcdir (absolute path)
88 dnl with_target_subdir
90 dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
91 dnl - default settings for all AM_CONFITIONAL test variables
92 dnl - lots of tools, like CC and CXX
94 AC_DEFUN(GLIBCXX_CONFIGURE, [
95 # Keep these sync'd with the list in Makefile.am. The first provides an
96 # expandable list at autoconf time; the second provides an expandable list
97 # (i.e., shell variable) at configure time.
98 m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src po testsuite])
99 SUBDIRS='glibcxx_SUBDIRS'
101 # These need to be absolute paths, yet at the same time need to
102 # canonicalize only relative paths, because then amd will not unmount
103 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
104 glibcxx_builddir=`${PWDCMD-pwd}`
106 [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
107 *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
109 toplevel_srcdir=${glibcxx_srcdir}/..
110 AC_SUBST(glibcxx_builddir)
111 AC_SUBST(glibcxx_srcdir)
112 AC_SUBST(toplevel_srcdir)
114 # We use these options to decide which functions to include. They are
115 # set from the top level.
116 AC_ARG_WITH([target-subdir],
117 AC_HELP_STRING([--with-target-subdir=SUBDIR],
118 [configuring in a subdirectory]))
120 AC_ARG_WITH([cross-host],
121 AC_HELP_STRING([--with-cross-host=HOST],
122 [configuring with a cross compiler]))
124 AC_ARG_WITH([newlib],
125 AC_HELP_STRING([--with-newlib],
126 [assume newlib as a system C library]))
128 # We're almost certainly being configured before anything else which uses
129 # C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
130 # we not cache the value of CXX that we "discover" here, because it's set
131 # to something unique for us and libjava. Other target libraries need to
132 # find CXX for themselves. We yank the rug out from under the normal AC_*
133 # process by sneakily renaming the cache variable. This also lets us debug
134 # the value of "our" CXX in postmortems.
136 # We must also force CXX to /not/ be a precious variable, otherwise the
137 # wrong (non-multilib-adjusted) value will be used in multilibs. This
138 # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
139 # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
140 # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
142 # -fno-builtin must be present here so that a non-conflicting form of
143 # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
145 m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
146 m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
147 m4_define([_AC_ARG_VAR_PRECIOUS],[])
148 save_CXXFLAGS="$CXXFLAGS"
149 CXXFLAGS="$CXXFLAGS -fno-builtin"
152 CXXFLAGS="$save_CXXFLAGS"
153 m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
157 # For directory versioning (e.g., headers) and other variables.
158 AC_MSG_CHECKING([for GCC version number])
159 gcc_version=`$CXX -dumpversion`
160 AC_MSG_RESULT($gcc_version)
162 # For some reason, gettext needs this.
165 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
166 # available). Uncomment the next line to force a particular method.
170 AC_CHECK_TOOL(AS, as)
171 AC_CHECK_TOOL(AR, ar)
172 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
176 # Set up safe default values for all subsequent AM_CONDITIONAL tests
177 # which are themselves conditionally expanded.
178 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
179 ## other macros from doing the same. This should be automated.) -pme
182 #enable_libstdcxx_debug=no
183 #enable_libstdcxx_pch=no
188 #enable_hosted_libstdcxx=yes
190 # Find platform-specific directories containing configuration info.
191 # Also possibly modify flags used elsewhere, as needed by the platform.
196 m4_include([linkage.m4])
200 dnl Tests for newer compiler features, or features that are present in newer
201 dnl compiler versions but not older compiler versions still in use, should
205 dnl WERROR='-Werror' if requested and possible; g++'s that lack the
206 dnl new inlining code or the new system_header pragma will die on -Werror.
207 dnl Leave it out by default and use maint-mode to use it.
208 dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
209 dnl compiler supports it and the user has not requested debug mode.
211 AC_DEFUN(GLIBCXX_CHECK_COMPILER_FEATURES, [
212 # All these tests are for C++; save the language and the compiler flags.
213 # The CXXFLAGS thing is suspicious, but based on similar bits previously
214 # found in GLIBCXX_CONFIGURE.
217 ac_test_CXXFLAGS="${CXXFLAGS+set}"
218 ac_save_CXXFLAGS="$CXXFLAGS"
220 # Check for maintainer-mode bits.
221 if test x"$USE_MAINTAINER_MODE" = xno; then
227 # Check for -ffunction-sections -fdata-sections
228 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
229 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
230 AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
231 if test "$ac_test_CXXFLAGS" = set; then
232 CXXFLAGS="$ac_save_CXXFLAGS"
234 # this is the suspicious part
237 if test x"$ac_fdsections" = x"yes"; then
238 SECTION_FLAGS='-ffunction-sections -fdata-sections'
240 AC_MSG_RESULT($ac_fdsections)
244 AC_SUBST(SECTION_FLAGS)
249 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
250 dnl the native linker is in use, all variables will be defined to something
251 dnl safe (like an empty string).
254 dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
255 dnl OPT_LDFLAGS='-Wl,-O1' if possible
256 dnl LD (as a side effect of testing)
259 dnl glibcxx_gnu_ld_version (possibly)
261 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
262 dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
264 AC_DEFUN(GLIBCXX_CHECK_LINKER_FEATURES, [
265 # If we're not using GNU ld, then there's no point in even trying these
266 # tests. Check for that first. We should have already tested for gld
267 # by now (in libtool), but require it now just to be safe...
268 test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
269 test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
270 AC_REQUIRE([AC_PROG_LD])
271 AC_REQUIRE([AC_PROG_AWK])
273 # The name set by libtool depends on the version of libtool. Shame on us
274 # for depending on an impl detail, but c'est la vie. Older versions used
275 # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
276 # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
277 # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
278 # set (hence we're using an older libtool), then set it.
279 if test x${with_gnu_ld+set} != xset; then
280 if test x${ac_cv_prog_gnu_ld+set} != xset; then
281 # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
284 with_gnu_ld=$ac_cv_prog_gnu_ld
288 # Start by getting the version number. I think the libtool test already
289 # does some of this, but throws away the result.
291 ldver=`$LD --version 2>/dev/null | head -1 | \
292 sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
294 glibcxx_gnu_ld_version=`echo $ldver | \
295 $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
298 if test "$with_gnu_ld" = "notbroken"; then
299 # GNU ld it is! Joy and bunny rabbits!
301 # All these tests are for C++; save the language and the compiler flags.
302 # Need to do this so that g++ won't try to link in libstdc++
303 ac_test_CFLAGS="${CFLAGS+set}"
304 ac_save_CFLAGS="$CFLAGS"
305 CFLAGS='-x c++ -Wl,--gc-sections'
307 # Check for -Wl,--gc-sections
308 # XXX This test is broken at the moment, as symbols required for linking
309 # are now in libsupc++ (not built yet). In addition, this test has
310 # cored on solaris in the past. In addition, --gc-sections doesn't
311 # really work at the moment (keeps on discarding used sections, first
312 # .eh_frame and now some of the glibc sections for iconv).
313 # Bzzzzt. Thanks for playing, maybe next time.
314 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
322 ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
323 if test "$ac_test_CFLAGS" = set; then
324 CFLAGS="$ac_save_CFLAGS"
326 # this is the suspicious part
329 if test "$ac_sectionLDflags" = "yes"; then
330 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
332 AC_MSG_RESULT($ac_sectionLDflags)
335 # Set linker optimization flags.
336 if test x"$with_gnu_ld" = x"yes"; then
337 OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
340 AC_SUBST(SECTION_LDFLAGS)
341 AC_SUBST(OPT_LDFLAGS)
346 dnl Check to see if this target can enable the wchar_t parts.
347 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
348 dnl must have been previously checked.) By default, wide characters are
352 dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
353 dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
355 AC_DEFUN(GLIBCXX_CHECK_WCHAR_T_SUPPORT, [
356 # Test wchar.h for mbstate_t, which is needed for char_traits and
357 # others even if wchar_t support is not on.
358 AC_MSG_CHECKING([for mbstate_t])
359 AC_TRY_COMPILE([#include <wchar.h>],
360 [mbstate_t teststate;],
361 have_mbstate_t=yes, have_mbstate_t=no)
362 AC_MSG_RESULT($have_mbstate_t)
363 if test x"$have_mbstate_t" = xyes; then
364 AC_DEFINE(HAVE_MBSTATE_T)
367 # Sanity check for existence of ISO C99 headers for extended encoding.
368 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
369 AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
371 # Only continue checking if the ISO C99 headers exist and support is on.
372 if test x"$ac_has_wchar_h" = xyes &&
373 test x"$ac_has_wctype_h" = xyes &&
374 test x"$enable_c_mbchar" != xno; then
376 # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
377 # numeric_limits can instantiate type_traits<wchar_t>
378 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
379 AC_TRY_COMPILE([#include <wchar.h>],
380 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
381 has_wchar_minmax=yes, has_wchar_minmax=no)
382 AC_MSG_RESULT($has_wchar_minmax)
384 # Test wchar.h for WEOF, which is what we use to determine whether
385 # to specialize for char_traits<wchar_t> or not.
386 AC_MSG_CHECKING([for WEOF])
389 #include <stddef.h>],
391 has_weof=yes, has_weof=no)
392 AC_MSG_RESULT($has_weof)
394 # Tests for wide character functions used in char_traits<wchar_t>.
396 AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
399 # Checks for names injected into std:: by the c_std headers.
400 AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
401 fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
402 vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
403 mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
404 wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
405 wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
408 AC_MSG_CHECKING([for ISO C99 wchar_t support])
409 if test x"$has_weof" = xyes &&
410 test x"$has_wchar_minmax" = xyes &&
411 test x"$ac_wfuncs" = xyes;
413 ac_isoC99_wchar_t=yes
417 AC_MSG_RESULT($ac_isoC99_wchar_t)
419 # Use iconv for wchar_t to char conversions. As such, check for
420 # X/Open Portability Guide, version 2 features (XPG2).
421 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
422 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
424 # Check for existence of libiconv.a providing XPG2 wchar_t support.
425 AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
427 LIBS="$LIBS $libiconv"
429 AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
430 [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
434 AC_MSG_CHECKING([for XPG2 wchar_t support])
435 if test x"$ac_has_iconv_h" = xyes &&
436 test x"$ac_has_langinfo_h" = xyes &&
437 test x"$ac_XPG2funcs" = xyes;
443 AC_MSG_RESULT($ac_XPG2_wchar_t)
445 # At the moment, only enable wchar_t specializations if all the
446 # above support is present.
447 if test x"$ac_isoC99_wchar_t" = xyes &&
448 test x"$ac_XPG2_wchar_t" = xyes;
450 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
454 AC_MSG_CHECKING([for enabled wchar_t specializations])
455 AC_MSG_RESULT($enable_wchar_t)
460 dnl Check for headers for, and arguments to, the setrlimit() function.
461 dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
464 dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory
465 dnl various HAVE_MEMLIMIT_* for individual limit names
467 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT_ancilliary, [
470 #include <sys/time.h>
471 #include <sys/resource.h>
473 [ int f = RLIMIT_$1 ; ],
474 [glibcxx_mresult=1], [glibcxx_mresult=0])
475 AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult,
476 [Only used in build directory testsuite_hooks.h.])
479 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT, [
480 setrlimit_have_headers=yes
481 AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
483 [setrlimit_have_headers=no])
484 # If don't have the headers, then we can't run the tests now, and we
485 # won't be seeing any of these during testsuite compilation.
486 if test $setrlimit_have_headers = yes; then
487 # Can't do these in a loop, else the resulting syntax is wrong.
488 GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
489 GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
490 GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
491 GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
493 # Check for rlimit, setrlimit.
494 AC_CACHE_VAL(ac_setrlimit, [
497 #include <sys/time.h>
498 #include <sys/resource.h>
502 [ac_setrlimit=yes], [ac_setrlimit=no])
506 AC_MSG_CHECKING([for testsuite memory limit support])
507 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
509 AC_DEFINE(_GLIBCXX_MEM_LIMITS)
513 AC_MSG_RESULT($ac_mem_limits)
518 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
519 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
521 AC_DEFUN(GLIBCXX_CHECK_S_ISREG_OR_S_IFREG, [
522 AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
524 [#include <sys/stat.h>],
527 S_ISREG(buffer.st_mode);],
528 [glibcxx_cv_S_ISREG=yes],
529 [glibcxx_cv_S_ISREG=no])
531 AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
533 [#include <sys/stat.h>],
536 S_IFREG & buffer.st_mode;],
537 [glibcxx_cv_S_IFREG=yes],
538 [glibcxx_cv_S_IFREG=no])
540 if test $glibcxx_cv_S_ISREG = yes; then
541 AC_DEFINE(HAVE_S_ISREG)
542 elif test $glibcxx_cv_S_IFREG = yes; then
543 AC_DEFINE(HAVE_S_IFREG)
549 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
551 AC_DEFUN(GLIBCXX_CHECK_POLL, [
552 AC_CACHE_VAL(glibcxx_cv_POLL, [
555 [struct pollfd pfd[1];
556 pfd[0].events = POLLIN;
558 [glibcxx_cv_POLL=yes],
559 [glibcxx_cv_POLL=no])
561 if test $glibcxx_cv_POLL = yes; then
568 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
570 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
571 AC_CACHE_VAL(glibcxx_cv_WRITEV, [
573 [#include <sys/uio.h>],
574 [struct iovec iov[2];
576 [glibcxx_cv_WRITEV=yes],
577 [glibcxx_cv_WRITEV=no])
579 if test $glibcxx_cv_WRITEV = yes; then
580 AC_DEFINE(HAVE_WRITEV)
586 dnl Does any necessary configuration of the testsuite directory. Generates
587 dnl the testsuite_hooks.h header.
589 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
592 dnl enable_abi_check / GLIBCXX_TEST_ABI
596 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
597 if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
598 # Do checks for memory limit functions.
599 GLIBCXX_CHECK_SETRLIMIT
601 # Look for setenv, so that extended locale tests can be performed.
602 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
605 # Export file names for ABI checking.
606 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
607 AC_SUBST(baseline_dir)
609 # Determine if checking the ABI is desirable.
610 if test $enable_symvers = no || test $is_hosted = no; then
615 enable_abi_check=no ;;
617 enable_abi_check=yes ;;
621 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
622 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
627 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
631 dnl TOPLEVEL_INCLUDES
633 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
634 # Used for every C++ compile we perform.
636 -I$glibcxx_builddir/include/$host_alias \
637 -I$glibcxx_builddir/include \
638 -I$glibcxx_srcdir/libsupc++"
640 # For Canadian crosses, pick this up too.
641 if test $CANADIAN = yes; then
642 GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES '-I${includedir}'"
645 # Stuff in the actual top level. Currently only used by libsupc++ to
646 # get unwind* headers from the gcc dir.
647 #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
648 TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
650 # Now, export this to all the little Makefiles....
651 AC_SUBST(GLIBCXX_INCLUDES)
652 AC_SUBST(TOPLEVEL_INCLUDES)
657 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
658 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
661 dnl OPTIMIZE_CXXFLAGS
664 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
665 # Optimization flags that are probably a good idea for thrill-seekers. Just
666 # uncomment the lines below and make, everything else is ready to go...
667 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
669 AC_SUBST(OPTIMIZE_CXXFLAGS)
671 WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
677 dnl All installation directory information is determined here.
681 dnl glibcxx_prefixdir
682 dnl glibcxx_toolexecdir
683 dnl glibcxx_toolexeclibdir
685 dnl Assumes cross_compiling bits already done, and with_cross_host in
688 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
689 glibcxx_toolexecdir=no
690 glibcxx_toolexeclibdir=no
691 glibcxx_prefixdir=$prefix
693 AC_MSG_CHECKING([for gxx-include-dir])
694 AC_ARG_WITH([gxx-include-dir],
695 AC_HELP_STRING([--with-gxx-include-dir=DIR],
696 [installation directory for include files]),
698 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
699 no) gxx_include_dir=no ;;
700 *) gxx_include_dir=$withval ;;
702 [gxx_include_dir=no])
703 AC_MSG_RESULT($gxx_include_dir)
705 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
706 AC_ARG_ENABLE([version-specific-runtime-libs],
707 AC_HELP_STRING([--enable-version-specific-runtime-libs],
708 [Specify that runtime libraries should be installed in a compiler-specific directory]),
709 [case "$enableval" in
710 yes) version_specific_libs=yes ;;
711 no) version_specific_libs=no ;;
712 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
714 [version_specific_libs=no])
715 AC_MSG_RESULT($version_specific_libs)
717 # Default case for install directory for include files.
718 if test $version_specific_libs = no && test $gxx_include_dir = no; then
719 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
722 # Version-specific runtime libs processing.
723 if test $version_specific_libs = yes; then
724 # Need the gcc compiler version to know where to install libraries
725 # and header files if --enable-version-specific-runtime-libs option
727 if test x"$gxx_include_dir" = x"no"; then
728 gxx_include_dir='${libdir}/gcc-lib/${host_alias}/'$gcc_version/include/c++
730 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
731 glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
734 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
735 # Install a library built with a cross compiler in tooldir, not libdir.
736 if test x"$glibcxx_toolexecdir" = x"no"; then
737 if test -n "$with_cross_host" &&
738 test x"$with_cross_host" != x"no"; then
739 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
740 glibcxx_toolexeclibdir='${toolexecdir}/lib'
742 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
743 glibcxx_toolexeclibdir='${libdir}'
745 multi_os_directory=`$CXX -print-multi-os-directory`
746 case $multi_os_directory in
747 .) ;; # Avoid trailing /.
748 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
752 AC_MSG_CHECKING([for install location])
753 AC_MSG_RESULT($gxx_include_dir)
755 AC_SUBST(glibcxx_prefixdir)
756 AC_SUBST(gxx_include_dir)
757 AC_SUBST(glibcxx_toolexecdir)
758 AC_SUBST(glibcxx_toolexeclibdir)
764 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
765 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
766 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
768 dnl See docs/html/17_intro/configury.html#enable for documentation.
770 m4_define([GLIBCXX_ENABLE],[dnl
771 m4_define([_g_switch],[--enable-$1])dnl
772 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
773 AC_ARG_ENABLE($1,_g_help,
778 m4_bpatsubst([$5],[permit ])) ;;
779 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
780 dnl Idea for future: generate a URL pointing to
781 dnl "onlinedocs/configopts.html#whatever"
788 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
792 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
793 m4_undefine([_g_switch])dnl
794 m4_undefine([_g_help])dnl
799 dnl Check for ISO/IEC 9899:1999 "C99" support.
801 dnl --enable-c99 defines _GLIBCXX_USE_C99
802 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
803 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
804 dnl Where DEFAULT is either `yes' or `no'.
805 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
807 AC_DEFUN(GLIBCXX_ENABLE_C99, [
808 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
813 # Check for the existence of <math.h> functions used if C99 is enabled.
815 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
816 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
817 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
818 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
819 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
820 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
821 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
822 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
823 AC_TRY_COMPILE([#include <math.h>],
824 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
825 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
826 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
827 AC_TRY_COMPILE([#include <math.h>],
828 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
829 AC_TRY_COMPILE([#include <math.h>],
830 [isunordered(0.0,0.0);],, [ac_c99_math=no])
831 AC_MSG_RESULT($ac_c99_math)
833 # Check for the existence in <stdio.h> of vscanf, et. al.
835 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
836 AC_TRY_COMPILE([#include <stdio.h>],
837 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
838 AC_TRY_COMPILE([#include <stdio.h>
840 void foo(char* fmt, ...)
841 {va_list args; va_start(args, fmt);
842 vfscanf(stderr, "%i", args);}],
843 [],, [ac_c99_stdio=no])
844 AC_TRY_COMPILE([#include <stdio.h>
846 void foo(char* fmt, ...)
847 {va_list args; va_start(args, fmt);
848 vscanf("%i", args);}],
849 [],, [ac_c99_stdio=no])
850 AC_TRY_COMPILE([#include <stdio.h>
852 void foo(char* fmt, ...)
853 {va_list args; va_start(args, fmt);
854 vsnprintf(fmt, 0, "%i", args);}],
855 [],, [ac_c99_stdio=no])
856 AC_TRY_COMPILE([#include <stdio.h>
858 void foo(char* fmt, ...)
859 {va_list args; va_start(args, fmt);
860 vsscanf(fmt, "%i", args);}],
861 [],, [ac_c99_stdio=no])
862 AC_MSG_RESULT($ac_c99_stdio)
864 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
866 AC_MSG_CHECKING([for lldiv_t declaration])
867 AC_CACHE_VAL(ac_c99_lldiv_t, [
868 AC_TRY_COMPILE([#include <stdlib.h>],
870 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
872 AC_MSG_RESULT($ac_c99_lldiv_t)
874 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
875 AC_TRY_COMPILE([#include <stdlib.h>],
876 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
877 AC_TRY_COMPILE([#include <stdlib.h>],
878 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
879 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
880 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
881 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
882 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
883 if test x"$ac_c99_lldiv_t" = x"no"; then
886 AC_MSG_RESULT($ac_c99_stdlib)
888 # Check for the existence of <wchar.h> functions used if C99 is enabled.
889 # XXX the wchar.h checks should be rolled into the general C99 bits.
891 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
892 AC_TRY_COMPILE([#include <wchar.h>],
893 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
894 AC_TRY_COMPILE([#include <wchar.h>],
895 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
896 AC_TRY_COMPILE([#include <wchar.h>],
897 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
898 AC_MSG_RESULT($ac_c99_wchar)
900 AC_MSG_CHECKING([for enabled ISO C99 support])
901 if test x"$ac_c99_math" = x"no" ||
902 test x"$ac_c99_stdio" = x"no" ||
903 test x"$ac_c99_stdlib" = x"no" ||
904 test x"$ac_c99_wchar" = x"no"; then
907 AC_MSG_RESULT($enable_c99)
909 # Option parsed, now set things appropriately
910 if test x"$enable_c99" = x"yes"; then
911 AC_DEFINE(_GLIBCXX_USE_C99)
919 dnl Check for what type of C headers to use.
921 dnl --enable-cheaders= [does stuff].
922 dnl --disable-cheaders [does not do anything, really].
923 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
924 dnl Where DEFAULT is either `c' or `c_std'.
926 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
927 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
928 [construct "C" headers for g++], [permit c|c_std])
929 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
931 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
933 AC_SUBST(C_INCLUDE_DIR)
934 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
935 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
936 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
941 dnl Check for which locale library to use. The choice is mapped to
942 dnl a subdirectory of config/locale.
944 dnl Default is generic.
946 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
947 AC_MSG_CHECKING([for C locale to use])
948 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
949 [use MODEL for target locale package],
950 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
952 # If they didn't use this option switch, or if they specified --enable
953 # with no specific model, we'll have to look for one. If they
954 # specified --disable (???), do likewise.
955 if test $enable_clocale = no || test $enable_clocale = yes; then
959 # Either a known package, or "auto"
960 enable_clocale_flag=$enable_clocale
962 # Probe for locale support if no specific model is specified.
963 # Default to "generic".
964 if test $enable_clocale_flag = auto; then
965 case x${target_os} in
967 AC_EGREP_CPP([_GLIBCXX_ok], [
968 #include <features.h>
969 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
972 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
974 # Test for bugs early in glibc-2.2.x series
975 if test x$enable_clocale_flag = xgnu; then
977 #define _GNU_SOURCE 1
980 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
981 extern __typeof(newlocale) __newlocale;
982 extern __typeof(duplocale) __duplocale;
983 extern __typeof(strcoll_l) __strcoll_l;
987 const char __one[] = "Äuglein Augmen";
988 const char __two[] = "Äuglein";
993 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
994 loc_dup = __duplocale(loc);
995 i = __strcoll_l(__one, __two, loc);
996 j = __strcoll_l(__one, __two, loc_dup);
1000 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
1001 [enable_clocale_flag=generic])
1004 # ... at some point put __strxfrm_l tests in as well.
1007 enable_clocale_flag=generic
1012 # Deal with gettext issues. Default to not using it (=no) until we detect
1013 # support for it later. Let the user turn it off via --e/d, but let that
1014 # default to on for easier handling.
1017 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
1021 # Set configure bits for specified locale package
1022 case ${enable_clocale_flag} in
1024 AC_MSG_RESULT(generic)
1026 CLOCALE_H=config/locale/generic/c_locale.h
1027 CLOCALE_CC=config/locale/generic/c_locale.cc
1028 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1029 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1030 CCOLLATE_CC=config/locale/generic/collate_members.cc
1031 CCTYPE_CC=config/locale/generic/ctype_members.cc
1032 CMESSAGES_H=config/locale/generic/messages_members.h
1033 CMESSAGES_CC=config/locale/generic/messages_members.cc
1034 CMONEY_CC=config/locale/generic/monetary_members.cc
1035 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1036 CTIME_H=config/locale/generic/time_members.h
1037 CTIME_CC=config/locale/generic/time_members.cc
1038 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1043 # Declare intention to use gettext, and add support for specific
1045 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1048 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1049 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1050 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1053 # Export the build objects.
1054 for ling in $ALL_LINGUAS; do \
1055 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1056 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1058 AC_SUBST(glibcxx_MOFILES)
1059 AC_SUBST(glibcxx_POFILES)
1061 CLOCALE_H=config/locale/gnu/c_locale.h
1062 CLOCALE_CC=config/locale/gnu/c_locale.cc
1063 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1064 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1065 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1066 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1067 CMESSAGES_H=config/locale/gnu/messages_members.h
1068 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1069 CMONEY_CC=config/locale/gnu/monetary_members.cc
1070 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1071 CTIME_H=config/locale/gnu/time_members.h
1072 CTIME_CC=config/locale/gnu/time_members.cc
1073 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1076 AC_MSG_RESULT(IEEE 1003.1)
1078 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1079 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1080 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1081 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1082 CCOLLATE_CC=config/locale/generic/collate_members.cc
1083 CCTYPE_CC=config/locale/generic/ctype_members.cc
1084 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1085 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1086 CMONEY_CC=config/locale/generic/monetary_members.cc
1087 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1088 CTIME_H=config/locale/generic/time_members.h
1089 CTIME_CC=config/locale/generic/time_members.cc
1090 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1094 # This is where the testsuite looks for locale catalogs, using the
1095 # -DLOCALEDIR define during testsuite compilation.
1096 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1097 AC_SUBST(glibcxx_localedir)
1099 # A standalone libintl (e.g., GNU libintl) may be in use.
1100 if test $USE_NLS = yes; then
1101 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1102 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1104 if test $USE_NLS = yes; then
1105 AC_DEFINE(_GLIBCXX_USE_NLS)
1110 AC_SUBST(CCODECVT_H)
1111 AC_SUBST(CMESSAGES_H)
1112 AC_SUBST(CCODECVT_CC)
1113 AC_SUBST(CCOLLATE_CC)
1115 AC_SUBST(CMESSAGES_CC)
1117 AC_SUBST(CNUMERIC_CC)
1120 AC_SUBST(CLOCALE_CC)
1121 AC_SUBST(CLOCALE_INTERNAL_H)
1126 dnl Check for whether the Boost-derived checks should be turned on.
1128 dnl --enable-concept-checks turns them on.
1129 dnl --disable-concept-checks leaves them off.
1130 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1131 dnl Where DEFAULT is either `yes' or `no'.
1133 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1134 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1135 if test $enable_concept_checks = yes; then
1136 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1142 dnl Check for which I/O library to use: stdio, or something specific.
1144 dnl Default is stdio.
1146 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1147 AC_MSG_CHECKING([for underlying I/O to use])
1148 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1149 [use target-specific I/O package], [permit stdio])
1151 # Now that libio has been removed, you can have any color you want as long
1152 # as it's black. This is one big no-op until other packages are added, but
1153 # showing the framework never hurts.
1154 case ${enable_cstdio} in
1156 CSTDIO_H=config/io/c_io_stdio.h
1157 BASIC_FILE_H=config/io/basic_file_stdio.h
1158 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1159 AC_MSG_RESULT(stdio)
1163 dnl Set directory for fpos.h
1164 FPOS_H=$fpos_include_dir
1168 AC_SUBST(BASIC_FILE_H)
1169 AC_SUBST(BASIC_FILE_CC)
1174 dnl Check for "unusual" flags to pass to the compiler while building.
1176 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1177 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1178 dnl --disable-cxx-flags passes nothing.
1179 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1180 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1181 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1182 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1183 dnl If "default flags" is an empty string, the effect is the same
1184 dnl as --disable or --enable=no.
1186 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1187 AC_MSG_CHECKING([for extra compiler flags for building])
1188 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1189 [pass compiler FLAGS when building library],
1190 [case "x$enable_cxx_flags" in
1191 xno | x) enable_cxx_flags= ;;
1193 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1196 # Run through flags (either default or command-line) and set anything
1197 # extra (e.g., #defines) that must accompany particular g++ options.
1198 if test -n "$enable_cxx_flags"; then
1199 for f in $enable_cxx_flags; do
1203 *) # and we're trying to pass /what/ exactly?
1204 AC_MSG_ERROR([compiler flags start with a -]) ;;
1209 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1210 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1211 AC_SUBST(EXTRA_CXX_FLAGS)
1216 dnl Check for wide character support. Has the same effect as the option
1217 dnl in gcc's configure, but in a form that autoconf can mess with.
1219 dnl --enable-c-mbchar requests all the wchar_t stuff.
1220 dnl --disable-c-mbchar doesn't.
1221 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1222 dnl Where DEFAULT is either `yes' or `no'.
1224 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1225 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1226 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1231 dnl Check to see if debugging libraries are to be built.
1233 dnl --enable-libstdcxx-debug
1234 dnl builds a separate set of debugging libraries in addition to the
1235 dnl normal (shared, static) libstdc++ binaries.
1237 dnl --disable-libstdcxx-debug
1238 dnl builds only one (non-debug) version of libstdc++.
1240 dnl --enable-libstdcxx-debug-flags=FLAGS
1241 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1243 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1244 dnl Where DEFAULT is either `yes' or `no'.
1246 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1247 AC_MSG_CHECKING([for additional debug build])
1248 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1249 AC_MSG_RESULT($enable_libstdcxx_debug)
1250 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1255 dnl Check for explicit debug flags.
1257 dnl --enable-libstdcxx-debug-flags='-O1'
1258 dnl is a general method for passing flags to be used when
1259 dnl building debug libraries with --enable-debug.
1261 dnl --disable-libstdcxx-debug-flags does nothing.
1262 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1263 dnl If "default flags" is an empty string, the effect is the same
1264 dnl as --disable or --enable=no.
1266 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1267 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1268 [pass compiler FLAGS when building debug library],
1269 [case "x$enable_libstdcxx_debug_flags" in
1270 xno | x) enable_libstdcxx_debug_flags= ;;
1272 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1275 # Option parsed, now set things appropriately
1276 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1277 AC_SUBST(DEBUG_FLAGS)
1279 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1284 dnl Check if the user only wants a freestanding library implementation.
1286 dnl --disable-hosted-libstdcxx will turn off most of the library build,
1287 dnl installing only the headers required by [17.4.1.3] and the language
1288 dnl support library. More than that will be built (to keep the Makefiles
1289 dnl conveniently clean), but not installed.
1292 dnl is_hosted (yes/no)
1294 AC_DEFUN(GLIBCXX_ENABLE_HOSTED, [
1295 AC_ARG_ENABLE([hosted-libstdcxx],
1296 AC_HELP_STRING([--disable-hosted-libstdcxx],
1297 [only build freestanding C++ runtime support]),,
1298 [enable_hosted_libstdcxx=yes])
1299 if test "$enable_hosted_libstdcxx" = no; then
1300 AC_MSG_NOTICE([Only freestanding libraries will be built])
1303 enable_libstdcxx_pch=no
1307 GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
1312 dnl Check for libunwind exception handling support. If enabled, then
1313 dnl we assume that the _Unwind_* functions that make up the Unwind ABI
1314 dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
1315 dnl libunwind instead of libgcc, and that libstdc++ has a dependency
1316 dnl on libunwind as well as libgcc.
1318 dnl --enable-libunwind-exceptions forces the use of libunwind.
1319 dnl --disable-libunwind-exceptions assumes there is no libunwind.
1324 AC_DEFUN(GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS, [
1325 AC_MSG_CHECKING([for use of libunwind])
1326 GLIBCXX_ENABLE(libunwind-exceptions,no,,
1327 [force use of libunwind for exceptions])
1328 AC_MSG_RESULT($use_libunwind_exceptions)
1329 if test $enable_libunwind_exceptions = yes; then
1330 LIBUNWIND_FLAG="-lunwind"
1334 AC_SUBST(LIBUNWIND_FLAG)
1339 dnl Check for template specializations for the 'long long' type extension.
1340 dnl The result determines only whether 'long long' I/O is enabled; things
1341 dnl like numeric_limits<> specializations are always available.
1343 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1344 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1345 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1346 dnl Where DEFAULT is either `yes' or `no'.
1347 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1349 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1350 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1355 AC_MSG_CHECKING([for enabled long long I/O support])
1356 # iostreams require strtoll, strtoull to compile
1357 AC_TRY_COMPILE([#include <stdlib.h>],
1358 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1359 AC_TRY_COMPILE([#include <stdlib.h>],
1360 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1362 # Option parsed, now set things appropriately
1363 if test $enable_long_long = yes; then
1364 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1366 AC_MSG_RESULT($enable_long_long)
1373 dnl Check to see if building and using a C++ precompiled header can be done.
1375 dnl --enable-libstdcxx-pch=yes
1376 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1377 dnl may work, after some light-hearted attempts to puzzle out compiler
1378 dnl support, flip bits on in include/Makefile.am
1380 dnl --disable-libstdcxx-pch
1381 dnl turns off attempts to use or build stdc++.h.gch.
1384 dnl glibcxx_PCHFLAGS
1386 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1387 AC_MSG_CHECKING([for enabled PCH])
1388 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1389 AC_MSG_RESULT([$enable_libstdcxx_pch])
1391 if test $enable_libstdcxx_pch = yes; then
1392 AC_CACHE_CHECK([for compiler with PCH support],
1393 [glibcxx_cv_prog_CXX_pch],
1394 [ac_save_CXXFLAGS="$CXXFLAGS"
1395 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1398 echo '#include <math.h>' > conftest.h
1399 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1400 -o conftest.h.gch 1>&5 2>&1 &&
1401 echo '#error "pch failed"' > conftest.h &&
1402 echo '#include "conftest.h"' > conftest.cc &&
1403 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1405 glibcxx_cv_prog_CXX_pch=yes
1407 glibcxx_cv_prog_CXX_pch=no
1410 CXXFLAGS=$ac_save_CXXFLAGS
1413 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1416 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1417 if test $enable_libstdcxx_pch = yes; then
1418 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1422 AC_SUBST(glibcxx_PCHFLAGS)
1427 dnl Check for exception handling support. If an explicit enable/disable
1428 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1429 dnl target may or may not support call frame exceptions.
1431 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1432 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1433 dnl Neither one forces an attempt at detection.
1436 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1438 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1439 AC_MSG_CHECKING([for exception model to use])
1442 GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1443 [force use of builtin_setjmp for exceptions],
1444 [permit yes|no|auto])
1446 if test $enable_sjlj_exceptions = auto; then
1447 # Botheration. Now we've got to detect the exception model. Link tests
1448 # against libgcc.a are problematic since we've not been given proper -L
1449 # bits for single-tree newlib and libgloss.
1451 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
1452 cat > conftest.$ac_ext << EOF
1453 [#]line __oline__ "configure"
1462 old_CXXFLAGS="$CXXFLAGS"
1464 if AC_TRY_EVAL(ac_compile); then
1465 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1466 enable_sjlj_exceptions=yes
1467 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1468 enable_sjlj_exceptions=no
1471 CXXFLAGS="$old_CXXFLAGS"
1475 # This is a tad weird, for hysterical raisins. We have to map enable/disable
1476 # to two different models.
1477 case $enable_sjlj_exceptions in
1479 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1480 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1481 ac_exception_model_name=sjlj
1484 ac_exception_model_name="call frame"
1487 AC_MSG_ERROR([unable to detect exception model])
1491 AC_MSG_RESULT($ac_exception_model_name)
1496 dnl Add version tags to symbols in shared library (or not), additionally
1497 dnl marking other symbols as private/local (or not).
1499 dnl --enable-symvers=style adds a version script to the linker call when
1500 dnl creating the shared library. The choice of version script is
1501 dnl controlled by 'style'.
1502 dnl --disable-symvers does not.
1503 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1504 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1505 dnl choose a default style based on linker characteristics. Passing
1506 dnl 'no' disables versioning.
1508 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1510 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1511 [enables symbol versioning of the shared library],
1512 [permit yes|no|gnu])
1514 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1515 # don't know enough about $LD to do tricks...
1516 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1517 # FIXME The following test is too strict, in theory.
1518 if test $enable_shared = no ||
1520 test x$glibcxx_gnu_ld_version = x; then
1524 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1525 if test $enable_symvers != no; then
1526 AC_MSG_CHECKING([for shared libgcc])
1527 ac_save_CFLAGS="$CFLAGS"
1529 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1530 CFLAGS="$ac_save_CFLAGS"
1531 AC_MSG_RESULT($glibcxx_shared_libgcc)
1534 # For GNU ld, we need at least this version. The format is described in
1535 # GLIBCXX_CHECK_LINKER_FEATURES above.
1536 glibcxx_min_gnu_ld_version=21400
1537 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1539 # Check to see if unspecified "yes" value can win, given results above.
1540 # Change "yes" into either "no" or a style name.
1541 if test $enable_symvers = yes; then
1542 if test $with_gnu_ld = yes &&
1543 test $glibcxx_shared_libgcc = yes;
1545 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1548 # The right tools, the right setup, but too old. Fallbacks?
1549 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1550 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1551 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1552 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1553 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1554 # Globbing fix is present, proper block support is not.
1555 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1556 dnl enable_symvers=???
1557 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1561 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1567 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1568 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1569 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1570 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1575 # Everything parsed; figure out what file to use.
1576 case $enable_symvers in
1578 SYMVER_MAP=config/linker-map.dummy
1581 SYMVER_MAP=config/linker-map.gnu
1582 AC_DEFINE(_GLIBCXX_SYMVER)
1586 AC_SUBST(SYMVER_MAP)
1587 AC_SUBST(port_specific_symbol_files)
1588 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1589 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1594 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1595 dnl We must stage the required headers so that they will be installed
1596 dnl with the library (unlike libgcc, the STL implementation is provided
1597 dnl solely within headers). Since we must not inject random user-space
1598 dnl macro names into user-provided C++ code, we first stage into <file>-in
1599 dnl and process to <file> with an output command. The reason for a two-
1600 dnl stage process here is to correctly handle $srcdir!=$objdir without
1601 dnl having to write complex code (the sed commands to clean the macro
1602 dnl namespace are complex and fragile enough as it is). We must also
1603 dnl add a relative path so that -I- is supported properly.
1606 dnl glibcxx_thread_h
1609 dnl HAVE_GTHR_DEFAULT
1610 dnl _GLIBCXX_SUPPORTS_WEAK
1612 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1613 AC_MSG_CHECKING([for thread model used by GCC])
1614 target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1615 AC_MSG_RESULT([$target_thread_file])
1617 if test $target_thread_file != single; then
1618 AC_DEFINE(HAVE_GTHR_DEFAULT)
1619 AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1622 glibcxx_thread_h=gthr-$target_thread_file.h
1623 AC_SUBST(glibcxx_thread_h)
1627 # Check whether LC_MESSAGES is available in <locale.h>.
1628 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1630 # This file file be copied and used freely without restrictions. It can
1631 # be used in projects which are not available under the GNU Public License
1632 # but which still want to provide support for the GNU gettext functionality.
1633 # Please note that the actual code is *not* freely available.
1636 AC_DEFUN(AC_LC_MESSAGES, [
1637 AC_CHECK_HEADER(locale.h, [
1638 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1639 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1640 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1641 if test $ac_cv_val_LC_MESSAGES = yes; then
1642 AC_DEFINE(HAVE_LC_MESSAGES)
1648 sinclude([../libtool.m4])
1649 dnl The lines below arrange for aclocal not to bring an installed
1650 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1651 dnl add a definition of LIBTOOL to Makefile.in.
1652 ifelse(,,,[AC_SUBST(LIBTOOL)
1653 AC_DEFUN([AM_PROG_LIBTOOL])
1654 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1655 AC_DEFUN([AC_PROG_LD])
1658 dnl vim:et:ts=2:sw=2
1660 # AM_CONDITIONAL -*- Autoconf -*-
1662 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1664 # This program is free software; you can redistribute it and/or modify
1665 # it under the terms of the GNU General Public License as published by
1666 # the Free Software Foundation; either version 2, or (at your option)
1667 # any later version.
1669 # This program is distributed in the hope that it will be useful,
1670 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1671 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1672 # GNU General Public License for more details.
1674 # You should have received a copy of the GNU General Public License
1675 # along with this program; if not, write to the Free Software
1676 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1683 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1684 # -------------------------------------
1685 # Define a conditional.
1686 AC_DEFUN([AM_CONDITIONAL],
1687 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1688 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1690 AC_SUBST([$1_FALSE])
1698 AC_CONFIG_COMMANDS_PRE(
1699 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1700 AC_MSG_ERROR([conditional "$1" was never defined.
1701 Usually this means the macro was only invoked conditionally.])
1704 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1706 # This program is free software; you can redistribute it and/or modify
1707 # it under the terms of the GNU General Public License as published by
1708 # the Free Software Foundation; either version 2, or (at your option)
1709 # any later version.
1711 # This program is distributed in the hope that it will be useful,
1712 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1713 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1714 # GNU General Public License for more details.
1716 # You should have received a copy of the GNU General Public License
1717 # along with this program; if not, write to the Free Software
1718 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1723 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1724 # ---------------------------------------------------
1725 # Add --enable-multilib to configure.
1726 AC_DEFUN([AM_ENABLE_MULTILIB],
1727 [# Default to --enable-multilib
1728 AC_ARG_ENABLE(multilib,
1729 [ --enable-multilib build many library versions (default)],
1730 [case "$enableval" in
1731 yes) multilib=yes ;;
1733 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1737 # We may get other options which we leave undocumented:
1738 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1739 # See config-ml.in if you want the gory details.
1741 if test "$srcdir" = "."; then
1742 if test "$with_target_subdir" != "."; then
1743 multi_basedir="$srcdir/$with_multisrctop../$2"
1745 multi_basedir="$srcdir/$with_multisrctop$2"
1748 multi_basedir="$srcdir/$2"
1750 AC_SUBST(multi_basedir)
1752 AC_OUTPUT_COMMANDS([
1753 # Only add multilib support code if we just rebuilt the top-level
1755 case " $CONFIG_FILES " in
1756 *" ]m4_default([$1],Makefile)[ "*)
1757 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1764 with_multisubdir="$with_multisubdir"
1765 with_multisrctop="$with_multisrctop"
1766 with_target_subdir="$with_target_subdir"
1767 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1768 multi_basedir="$multi_basedir"
1769 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1772 # isc-posix.m4 serial 2 (gettext-0.11.2)
1773 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1774 dnl This file is free software, distributed under the terms of the GNU
1775 dnl General Public License. As a special exception to the GNU General
1776 dnl Public License, this file may be distributed as part of a program
1777 dnl that contains a configuration script generated by Autoconf, under
1778 dnl the same distribution terms as the rest of that program.
1780 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1782 # This test replaces the one in autoconf.
1783 # Currently this macro should have the same name as the autoconf macro
1784 # because gettext's gettext.m4 (distributed in the automake package)
1785 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
1786 # give these diagnostics:
1787 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1788 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1790 undefine([AC_ISC_POSIX])
1792 AC_DEFUN([AC_ISC_POSIX],
1794 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1795 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1799 # Add --enable-maintainer-mode option to configure.
1802 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1804 # This program is free software; you can redistribute it and/or modify
1805 # it under the terms of the GNU General Public License as published by
1806 # the Free Software Foundation; either version 2, or (at your option)
1807 # any later version.
1809 # This program is distributed in the hope that it will be useful,
1810 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1811 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1812 # GNU General Public License for more details.
1814 # You should have received a copy of the GNU General Public License
1815 # along with this program; if not, write to the Free Software
1816 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1821 AC_DEFUN([AM_MAINTAINER_MODE],
1822 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1823 dnl maintainer-mode is disabled by default
1824 AC_ARG_ENABLE(maintainer-mode,
1825 [ --enable-maintainer-mode enable make rules and dependencies not useful
1826 (and sometimes confusing) to the casual installer],
1827 USE_MAINTAINER_MODE=$enableval,
1828 USE_MAINTAINER_MODE=no)
1829 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1830 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1831 MAINT=$MAINTAINER_MODE_TRUE
1836 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1838 # Do all the work for Automake. -*- Autoconf -*-
1840 # This macro actually does too much some checks are only needed if
1841 # your package does certain things. But this isn't really a big deal.
1843 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1844 # Free Software Foundation, Inc.
1846 # This program is free software; you can redistribute it and/or modify
1847 # it under the terms of the GNU General Public License as published by
1848 # the Free Software Foundation; either version 2, or (at your option)
1849 # any later version.
1851 # This program is distributed in the hope that it will be useful,
1852 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1853 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1854 # GNU General Public License for more details.
1856 # You should have received a copy of the GNU General Public License
1857 # along with this program; if not, write to the Free Software
1858 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1865 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1866 # the ones we care about.
1867 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1869 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1870 # AM_INIT_AUTOMAKE([OPTIONS])
1871 # -----------------------------------------------
1872 # The call with PACKAGE and VERSION arguments is the old style
1873 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1874 # and VERSION should now be passed to AC_INIT and removed from
1875 # the call to AM_INIT_AUTOMAKE.
1876 # We support both call styles for the transition. After
1877 # the next Automake release, Autoconf can make the AC_INIT
1878 # arguments mandatory, and then we can depend on a new Autoconf
1879 # release and drop the old call support.
1880 AC_DEFUN([AM_INIT_AUTOMAKE],
1881 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1882 AC_REQUIRE([AC_PROG_INSTALL])dnl
1883 # test to see if srcdir already configured
1884 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1885 test -f $srcdir/config.status; then
1886 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1889 # test whether we have cygpath
1890 if test -z "$CYGPATH_W"; then
1891 if (cygpath --version) >/dev/null 2>/dev/null; then
1892 CYGPATH_W='cygpath -w'
1897 AC_SUBST([CYGPATH_W])
1899 # Define the identity of the package.
1900 dnl Distinguish between old-style and new-style calls.
1902 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1903 AC_SUBST([PACKAGE], [$1])dnl
1904 AC_SUBST([VERSION], [$2])],
1905 [_AM_SET_OPTIONS([$1])dnl
1906 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1907 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1909 _AM_IF_OPTION([no-define],,
1910 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1911 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1913 # Some tools Automake needs.
1914 AC_REQUIRE([AM_SANITY_CHECK])dnl
1915 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1916 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1917 AM_MISSING_PROG(AUTOCONF, autoconf)
1918 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1919 AM_MISSING_PROG(AUTOHEADER, autoheader)
1920 AM_MISSING_PROG(MAKEINFO, makeinfo)
1921 AM_MISSING_PROG(AMTAR, tar)
1923 AM_PROG_INSTALL_STRIP
1924 # We need awk for the "check" target. The system "awk" is bad on
1926 AC_REQUIRE([AC_PROG_AWK])dnl
1927 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1928 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1930 _AM_IF_OPTION([no-dependencies],,
1931 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1932 [_AM_DEPENDENCIES(CC)],
1933 [define([AC_PROG_CC],
1934 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1935 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1936 [_AM_DEPENDENCIES(CXX)],
1937 [define([AC_PROG_CXX],
1938 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1943 # When config.status generates a header, we must update the stamp-h file.
1944 # This file resides in the same directory as the config header
1945 # that is generated. The stamp files are numbered to have different names.
1947 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1948 # loop where config.status creates the headers, so we can generate
1949 # our stamp files there.
1950 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1951 [# Compute $1's index in $config_headers.
1953 for _am_header in $config_headers :; do
1958 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1961 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1963 # Copyright 2002 Free Software Foundation, Inc.
1965 # This program is free software; you can redistribute it and/or modify
1966 # it under the terms of the GNU General Public License as published by
1967 # the Free Software Foundation; either version 2, or (at your option)
1968 # any later version.
1970 # This program is distributed in the hope that it will be useful,
1971 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1972 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1973 # GNU General Public License for more details.
1975 # You should have received a copy of the GNU General Public License
1976 # along with this program; if not, write to the Free Software
1977 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1979 # AM_AUTOMAKE_VERSION(VERSION)
1980 # ----------------------------
1981 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1982 # generated from the m4 files accompanying Automake X.Y.
1983 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1985 # AM_SET_CURRENT_AUTOMAKE_VERSION
1986 # -------------------------------
1987 # Call AM_AUTOMAKE_VERSION so it can be traced.
1988 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1989 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1990 [AM_AUTOMAKE_VERSION([1.7.6])])
1992 # Helper functions for option handling. -*- Autoconf -*-
1994 # Copyright 2001, 2002 Free Software Foundation, Inc.
1996 # This program is free software; you can redistribute it and/or modify
1997 # it under the terms of the GNU General Public License as published by
1998 # the Free Software Foundation; either version 2, or (at your option)
1999 # any later version.
2001 # This program is distributed in the hope that it will be useful,
2002 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2004 # GNU General Public License for more details.
2006 # You should have received a copy of the GNU General Public License
2007 # along with this program; if not, write to the Free Software
2008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2013 # _AM_MANGLE_OPTION(NAME)
2014 # -----------------------
2015 AC_DEFUN([_AM_MANGLE_OPTION],
2016 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2018 # _AM_SET_OPTION(NAME)
2019 # ------------------------------
2020 # Set option NAME. Presently that only means defining a flag for this option.
2021 AC_DEFUN([_AM_SET_OPTION],
2022 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2024 # _AM_SET_OPTIONS(OPTIONS)
2025 # ----------------------------------
2026 # OPTIONS is a space-separated list of Automake options.
2027 AC_DEFUN([_AM_SET_OPTIONS],
2028 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2030 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2031 # -------------------------------------------
2032 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2033 AC_DEFUN([_AM_IF_OPTION],
2034 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2037 # Check to make sure that the build environment is sane.
2040 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2042 # This program is free software; you can redistribute it and/or modify
2043 # it under the terms of the GNU General Public License as published by
2044 # the Free Software Foundation; either version 2, or (at your option)
2045 # any later version.
2047 # This program is distributed in the hope that it will be useful,
2048 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2049 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2050 # GNU General Public License for more details.
2052 # You should have received a copy of the GNU General Public License
2053 # along with this program; if not, write to the Free Software
2054 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2061 AC_DEFUN([AM_SANITY_CHECK],
2062 [AC_MSG_CHECKING([whether build environment is sane])
2065 echo timestamp > conftest.file
2066 # Do `set' in a subshell so we don't clobber the current shell's
2067 # arguments. Must try -L first in case configure is actually a
2068 # symlink; some systems play weird games with the mod time of symlinks
2069 # (eg FreeBSD returns the mod time of the symlink's containing
2072 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2073 if test "$[*]" = "X"; then
2075 set X `ls -t $srcdir/configure conftest.file`
2078 if test "$[*]" != "X $srcdir/configure conftest.file" \
2079 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2081 # If neither matched, then we have a broken ls. This can happen
2082 # if, for instance, CONFIG_SHELL is bash and it inherits a
2083 # broken ls alias from the environment. This has actually
2084 # happened. Such a system could not be considered "sane".
2085 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2086 alias in your environment])
2089 test "$[2]" = conftest.file
2095 AC_MSG_ERROR([newly created file is older than distributed files!
2096 Check your system clock])
2098 AC_MSG_RESULT(yes)])
2103 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2105 # This program is free software; you can redistribute it and/or modify
2106 # it under the terms of the GNU General Public License as published by
2107 # the Free Software Foundation; either version 2, or (at your option)
2108 # any later version.
2110 # This program is distributed in the hope that it will be useful,
2111 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2112 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2113 # GNU General Public License for more details.
2115 # You should have received a copy of the GNU General Public License
2116 # along with this program; if not, write to the Free Software
2117 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2122 # AM_MISSING_PROG(NAME, PROGRAM)
2123 # ------------------------------
2124 AC_DEFUN([AM_MISSING_PROG],
2125 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2126 $1=${$1-"${am_missing_run}$2"}
2130 # AM_MISSING_HAS_RUN
2131 # ------------------
2132 # Define MISSING if not defined so far and test if it supports --run.
2133 # If it does, set am_missing_run to use it, otherwise, to nothing.
2134 AC_DEFUN([AM_MISSING_HAS_RUN],
2135 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2136 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2137 # Use eval to expand $SHELL
2138 if eval "$MISSING --run true"; then
2139 am_missing_run="$MISSING --run "
2142 AC_MSG_WARN([`missing' script is too old or missing])
2148 # Copyright 2001 Free Software Foundation, Inc.
2150 # This program is free software; you can redistribute it and/or modify
2151 # it under the terms of the GNU General Public License as published by
2152 # the Free Software Foundation; either version 2, or (at your option)
2153 # any later version.
2155 # This program is distributed in the hope that it will be useful,
2156 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2157 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2158 # GNU General Public License for more details.
2160 # You should have received a copy of the GNU General Public License
2161 # along with this program; if not, write to the Free Software
2162 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2165 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2166 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2167 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2169 # Of course, Automake must honor this variable whenever it calls a
2170 # tool from the auxiliary directory. The problem is that $srcdir (and
2171 # therefore $ac_aux_dir as well) can be either absolute or relative,
2172 # depending on how configure is run. This is pretty annoying, since
2173 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2174 # source directory, any form will work fine, but in subdirectories a
2175 # relative path needs to be adjusted first.
2177 # $ac_aux_dir/missing
2178 # fails when called from a subdirectory if $ac_aux_dir is relative
2179 # $top_srcdir/$ac_aux_dir/missing
2180 # fails if $ac_aux_dir is absolute,
2181 # fails when called from a subdirectory in a VPATH build with
2182 # a relative $ac_aux_dir
2184 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2185 # are both prefixed by $srcdir. In an in-source build this is usually
2186 # harmless because $srcdir is `.', but things will broke when you
2187 # start a VPATH build or use an absolute $srcdir.
2189 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2190 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2191 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2192 # and then we would define $MISSING as
2193 # MISSING="\${SHELL} $am_aux_dir/missing"
2194 # This will work as long as MISSING is not called from configure, because
2195 # unfortunately $(top_srcdir) has no meaning in configure.
2196 # However there are other variables, like CC, which are often used in
2197 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2199 # Another solution, used here, is to always expand $ac_aux_dir to an
2200 # absolute PATH. The drawback is that using absolute paths prevent a
2201 # configured tree to be moved without reconfiguration.
2203 # Rely on autoconf to set up CDPATH properly.
2206 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2207 # expand $ac_aux_dir to an absolute path
2208 am_aux_dir=`cd $ac_aux_dir && pwd`
2211 # AM_PROG_INSTALL_SH
2212 # ------------------
2213 # Define $install_sh.
2215 # Copyright 2001 Free Software Foundation, Inc.
2217 # This program is free software; you can redistribute it and/or modify
2218 # it under the terms of the GNU General Public License as published by
2219 # the Free Software Foundation; either version 2, or (at your option)
2220 # any later version.
2222 # This program is distributed in the hope that it will be useful,
2223 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2224 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2225 # GNU General Public License for more details.
2227 # You should have received a copy of the GNU General Public License
2228 # along with this program; if not, write to the Free Software
2229 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2232 AC_DEFUN([AM_PROG_INSTALL_SH],
2233 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2234 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2235 AC_SUBST(install_sh)])
2237 # AM_PROG_INSTALL_STRIP
2239 # Copyright 2001 Free Software Foundation, Inc.
2241 # This program is free software; you can redistribute it and/or modify
2242 # it under the terms of the GNU General Public License as published by
2243 # the Free Software Foundation; either version 2, or (at your option)
2244 # any later version.
2246 # This program is distributed in the hope that it will be useful,
2247 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2248 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2249 # GNU General Public License for more details.
2251 # You should have received a copy of the GNU General Public License
2252 # along with this program; if not, write to the Free Software
2253 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2256 # One issue with vendor `install' (even GNU) is that you can't
2257 # specify the program used to strip binaries. This is especially
2258 # annoying in cross-compiling environments, where the build's strip
2259 # is unlikely to handle the host's binaries.
2260 # Fortunately install-sh will honor a STRIPPROG variable, so we
2261 # always use install-sh in `make install-strip', and initialize
2262 # STRIPPROG with the value of the STRIP variable (set by the user).
2263 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2264 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2265 # Installed binaries are usually stripped using `strip' when the user
2266 # run `make install-strip'. However `strip' might not be the right
2267 # tool to use in cross-compilation environments, therefore Automake
2268 # will honor the `STRIP' environment variable to overrule this program.
2269 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2270 if test "$cross_compiling" != no; then
2271 AC_CHECK_TOOL([STRIP], [strip], :)
2273 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2274 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2277 # Copyright (C) 2003 Free Software Foundation, Inc.
2279 # This program is free software; you can redistribute it and/or modify
2280 # it under the terms of the GNU General Public License as published by
2281 # the Free Software Foundation; either version 2, or (at your option)
2282 # any later version.
2284 # This program is distributed in the hope that it will be useful,
2285 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2286 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2287 # GNU General Public License for more details.
2289 # You should have received a copy of the GNU General Public License
2290 # along with this program; if not, write to the Free Software
2291 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2296 # Check whether the underlying file-system supports filenames
2297 # with a leading dot. For instance MS-DOS doesn't.
2298 AC_DEFUN([AM_SET_LEADING_DOT],
2299 [rm -rf .tst 2>/dev/null
2300 mkdir .tst 2>/dev/null
2301 if test -d .tst; then
2306 rmdir .tst 2>/dev/null
2307 AC_SUBST([am__leading_dot])])
2309 # serial 5 -*- Autoconf -*-
2311 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2313 # This program is free software; you can redistribute it and/or modify
2314 # it under the terms of the GNU General Public License as published by
2315 # the Free Software Foundation; either version 2, or (at your option)
2316 # any later version.
2318 # This program is distributed in the hope that it will be useful,
2319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2321 # GNU General Public License for more details.
2323 # You should have received a copy of the GNU General Public License
2324 # along with this program; if not, write to the Free Software
2325 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2329 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2330 # written in clear, in which case automake, when reading aclocal.m4,
2331 # will think it sees a *use*, and therefore will trigger all it's
2332 # C support machinery. Also note that it means that autoscan, seeing
2333 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2337 # _AM_DEPENDENCIES(NAME)
2338 # ----------------------
2339 # See how the compiler implements dependency checking.
2340 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2341 # We try a few techniques and use that to set a single cache variable.
2343 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2344 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2345 # dependency, and given that the user is not expected to run this macro,
2346 # just rely on AC_PROG_CC.
2347 AC_DEFUN([_AM_DEPENDENCIES],
2348 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2349 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2350 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2351 AC_REQUIRE([AM_DEP_TRACK])dnl
2353 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2354 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2355 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2356 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2357 [depcc="$$1" am_compiler_list=])
2359 AC_CACHE_CHECK([dependency style of $depcc],
2360 [am_cv_$1_dependencies_compiler_type],
2361 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2362 # We make a subdir and do the tests there. Otherwise we can end up
2363 # making bogus files that we don't know about and never remove. For
2364 # instance it was reported that on HP-UX the gcc test will end up
2365 # making a dummy file named `D' -- because `-MD' means `put the output
2368 # Copy depcomp to subdir because otherwise we won't find it if we're
2369 # using a relative directory.
2370 cp "$am_depcomp" conftest.dir
2372 # We will build objects and dependencies in a subdirectory because
2373 # it helps to detect inapplicable dependency modes. For instance
2374 # both Tru64's cc and ICC support -MD to output dependencies as a
2375 # side effect of compilation, but ICC will put the dependencies in
2376 # the current directory while Tru64 will put them in the object
2380 am_cv_$1_dependencies_compiler_type=none
2381 if test "$am_compiler_list" = ""; then
2382 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2384 for depmode in $am_compiler_list; do
2385 # Setup a source with many dependencies, because some compilers
2386 # like to wrap large dependency lists on column 80 (with \), and
2387 # we should not choose a depcomp mode which is confused by this.
2389 # We need to recreate these files for each test, as the compiler may
2390 # overwrite some of them when testing with obscure command lines.
2391 # This happens at least with the AIX C compiler.
2393 for i in 1 2 3 4 5 6; do
2394 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2397 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2401 # after this tag, mechanisms are not by side-effect, so they'll
2402 # only be used when explicitly requested
2403 if test "x$enable_dependency_tracking" = xyes; then
2411 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2412 # mode. It turns out that the SunPro C++ compiler does not properly
2413 # handle `-M -o', and we need to detect this.
2414 if depmode=$depmode \
2415 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2416 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2417 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2418 >/dev/null 2>conftest.err &&
2419 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2420 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2421 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2422 # icc doesn't choke on unknown options, it will just issue warnings
2423 # (even with -Werror). So we grep stderr for any message
2424 # that says an option was ignored.
2425 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2426 am_cv_$1_dependencies_compiler_type=$depmode
2435 am_cv_$1_dependencies_compiler_type=none
2438 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2439 AM_CONDITIONAL([am__fastdep$1], [
2440 test "x$enable_dependency_tracking" != xno \
2441 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2447 # Choose a directory name for dependency files.
2448 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2449 AC_DEFUN([AM_SET_DEPDIR],
2450 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2451 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2457 AC_DEFUN([AM_DEP_TRACK],
2458 [AC_ARG_ENABLE(dependency-tracking,
2459 [ --disable-dependency-tracking Speeds up one-time builds
2460 --enable-dependency-tracking Do not reject slow dependency extractors])
2461 if test "x$enable_dependency_tracking" != xno; then
2462 am_depcomp="$ac_aux_dir/depcomp"
2465 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2466 AC_SUBST([AMDEPBACKSLASH])
2469 # Generate code to set up dependency tracking. -*- Autoconf -*-
2471 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2473 # This program is free software; you can redistribute it and/or modify
2474 # it under the terms of the GNU General Public License as published by
2475 # the Free Software Foundation; either version 2, or (at your option)
2476 # any later version.
2478 # This program is distributed in the hope that it will be useful,
2479 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2480 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2481 # GNU General Public License for more details.
2483 # You should have received a copy of the GNU General Public License
2484 # along with this program; if not, write to the Free Software
2485 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2490 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2491 # ------------------------------
2492 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2493 [for mf in $CONFIG_FILES; do
2494 # Strip MF so we end up with the name of the file.
2495 mf=`echo "$mf" | sed -e 's/:.*$//'`
2496 # Check whether this is an Automake generated Makefile or not.
2497 # We used to match only the files named `Makefile.in', but
2498 # some people rename them; so instead we look at the file content.
2499 # Grep'ing the first line is not enough: some people post-process
2500 # each Makefile.in and add a new line on top of each file to say so.
2501 # So let's grep whole file.
2502 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2503 dirpart=`AS_DIRNAME("$mf")`
2507 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2508 # Extract the definition of DEP_FILES from the Makefile without
2510 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2511 test -z "$DEPDIR" && continue
2512 # When using ansi2knr, U may be empty or an underscore; expand it
2513 U=`sed -n -e '/^U = / s///p' < "$mf"`
2514 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2515 # We invoke sed twice because it is the simplest approach to
2516 # changing $(DEPDIR) to its actual value in the expansion.
2517 for file in `sed -n -e '
2518 /^DEP_FILES = .*\\\\$/ {
2527 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2528 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2529 # Make sure the directory exists.
2530 test -f "$dirpart/$file" && continue
2531 fdir=`AS_DIRNAME(["$file"])`
2532 AS_MKDIR_P([$dirpart/$fdir])
2533 # echo "creating $dirpart/$file"
2534 echo '# dummy' > "$dirpart/$file"
2537 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2540 # AM_OUTPUT_DEPENDENCY_COMMANDS
2541 # -----------------------------
2542 # This macro should only be invoked once -- use via AC_REQUIRE.
2544 # This code is only required when automatic dependency tracking
2545 # is enabled. FIXME. This creates each `.P' file that we will
2546 # need in order to bootstrap the dependency handling code.
2547 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2548 [AC_CONFIG_COMMANDS([depfiles],
2549 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2550 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2553 # Check to see how 'make' treats includes. -*- Autoconf -*-
2555 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2557 # This program is free software; you can redistribute it and/or modify
2558 # it under the terms of the GNU General Public License as published by
2559 # the Free Software Foundation; either version 2, or (at your option)
2560 # any later version.
2562 # This program is distributed in the hope that it will be useful,
2563 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2564 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2565 # GNU General Public License for more details.
2567 # You should have received a copy of the GNU General Public License
2568 # along with this program; if not, write to the Free Software
2569 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2576 # Check to see how make treats includes.
2577 AC_DEFUN([AM_MAKE_INCLUDE],
2578 [am_make=${MAKE-make}
2579 cat > confinc << 'END'
2584 # If we don't find an include directive, just comment out the code.
2585 AC_MSG_CHECKING([for style of include used by $am_make])
2589 # First try GNU make style include.
2590 echo "include confinc" > confmf
2591 # We grep out `Entering directory' and `Leaving directory'
2592 # messages which can occur if `w' ends up in MAKEFLAGS.
2593 # In particular we don't look at `^make:' because GNU make might
2594 # be invoked under some other name (usually "gmake"), in which
2595 # case it prints its new name instead of `make'.
2596 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2601 # Now try BSD make style include.
2602 if test "$am__include" = "#"; then
2603 echo '.include "confinc"' > confmf
2604 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2605 am__include=.include
2610 AC_SUBST([am__include])
2611 AC_SUBST([am__quote])
2612 AC_MSG_RESULT([$_am_result])
2613 rm -f confinc confmf