1 # generated automatically by aclocal 1.7.8 -*- 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 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
163 # available). Uncomment the next line to force a particular method.
167 AC_CHECK_TOOL(AS, as)
168 AC_CHECK_TOOL(AR, ar)
169 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
173 # Set up safe default values for all subsequent AM_CONDITIONAL tests
174 # which are themselves conditionally expanded.
175 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
176 ## other macros from doing the same. This should be automated.) -pme
179 #enable_libstdcxx_debug=no
180 #enable_libstdcxx_pch=no
185 #enable_hosted_libstdcxx=yes
187 # Find platform-specific directories containing configuration info.
188 # Also possibly modify flags used elsewhere, as needed by the platform.
193 m4_include([linkage.m4])
194 m4_include([../config/no-executables.m4])
198 dnl Tests for newer compiler features, or features that are present in newer
199 dnl compiler versions but not older compiler versions still in use, should
203 dnl WERROR='-Werror' if requested and possible; g++'s that lack the
204 dnl new inlining code or the new system_header pragma will die on -Werror.
205 dnl Leave it out by default and use maint-mode to use it.
206 dnl SECTION_FLAGS='-ffunction-sections -fdata-sections' if
207 dnl compiler supports it and the user has not requested debug mode.
209 AC_DEFUN(GLIBCXX_CHECK_COMPILER_FEATURES, [
210 # All these tests are for C++; save the language and the compiler flags.
211 # The CXXFLAGS thing is suspicious, but based on similar bits previously
212 # found in GLIBCXX_CONFIGURE.
215 ac_test_CXXFLAGS="${CXXFLAGS+set}"
216 ac_save_CXXFLAGS="$CXXFLAGS"
218 # Check for maintainer-mode bits.
219 if test x"$USE_MAINTAINER_MODE" = xno; then
225 # Check for -ffunction-sections -fdata-sections
226 AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
227 CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
228 AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
229 if test "$ac_test_CXXFLAGS" = set; then
230 CXXFLAGS="$ac_save_CXXFLAGS"
232 # this is the suspicious part
235 if test x"$ac_fdsections" = x"yes"; then
236 SECTION_FLAGS='-ffunction-sections -fdata-sections'
238 AC_MSG_RESULT($ac_fdsections)
242 AC_SUBST(SECTION_FLAGS)
247 dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
248 dnl the native linker is in use, all variables will be defined to something
249 dnl safe (like an empty string).
252 dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
253 dnl OPT_LDFLAGS='-Wl,-O1' if possible
254 dnl LD (as a side effect of testing)
257 dnl glibcxx_gnu_ld_version (possibly)
259 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
260 dnl set glibcxx_gnu_ld_version to 12345. Zeros cause problems.
262 AC_DEFUN(GLIBCXX_CHECK_LINKER_FEATURES, [
263 # If we're not using GNU ld, then there's no point in even trying these
264 # tests. Check for that first. We should have already tested for gld
265 # by now (in libtool), but require it now just to be safe...
266 test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
267 test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
268 AC_REQUIRE([AC_PROG_LD])
269 AC_REQUIRE([AC_PROG_AWK])
271 # The name set by libtool depends on the version of libtool. Shame on us
272 # for depending on an impl detail, but c'est la vie. Older versions used
273 # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
274 # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
275 # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
276 # set (hence we're using an older libtool), then set it.
277 if test x${with_gnu_ld+set} != xset; then
278 if test x${ac_cv_prog_gnu_ld+set} != xset; then
279 # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
282 with_gnu_ld=$ac_cv_prog_gnu_ld
286 # Start by getting the version number. I think the libtool test already
287 # does some of this, but throws away the result.
289 ldver=`$LD --version 2>/dev/null | head -1 | \
290 sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
292 glibcxx_gnu_ld_version=`echo $ldver | \
293 $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
296 if test "$with_gnu_ld" = "notbroken"; then
297 # GNU ld it is! Joy and bunny rabbits!
299 # All these tests are for C++; save the language and the compiler flags.
300 # Need to do this so that g++ won't try to link in libstdc++
301 ac_test_CFLAGS="${CFLAGS+set}"
302 ac_save_CFLAGS="$CFLAGS"
303 CFLAGS='-x c++ -Wl,--gc-sections'
305 # Check for -Wl,--gc-sections
306 # XXX This test is broken at the moment, as symbols required for linking
307 # are now in libsupc++ (not built yet). In addition, this test has
308 # cored on solaris in the past. In addition, --gc-sections doesn't
309 # really work at the moment (keeps on discarding used sections, first
310 # .eh_frame and now some of the glibc sections for iconv).
311 # Bzzzzt. Thanks for playing, maybe next time.
312 AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
320 ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
321 if test "$ac_test_CFLAGS" = set; then
322 CFLAGS="$ac_save_CFLAGS"
324 # this is the suspicious part
327 if test "$ac_sectionLDflags" = "yes"; then
328 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
330 AC_MSG_RESULT($ac_sectionLDflags)
333 # Set linker optimization flags.
334 if test x"$with_gnu_ld" = x"yes"; then
335 OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
338 AC_SUBST(SECTION_LDFLAGS)
339 AC_SUBST(OPT_LDFLAGS)
344 dnl Check to see if this target can enable the wchar_t parts.
345 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
346 dnl must have been previously checked.) By default, wide characters are
350 dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
351 dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
353 AC_DEFUN(GLIBCXX_CHECK_WCHAR_T_SUPPORT, [
354 # Test wchar.h for mbstate_t, which is needed for char_traits and
355 # others even if wchar_t support is not on.
356 AC_MSG_CHECKING([for mbstate_t])
357 AC_TRY_COMPILE([#include <wchar.h>],
358 [mbstate_t teststate;],
359 have_mbstate_t=yes, have_mbstate_t=no)
360 AC_MSG_RESULT($have_mbstate_t)
361 if test x"$have_mbstate_t" = xyes; then
362 AC_DEFINE(HAVE_MBSTATE_T)
365 # Sanity check for existence of ISO C99 headers for extended encoding.
366 AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
367 AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
369 # Only continue checking if the ISO C99 headers exist and support is on.
370 if test x"$ac_has_wchar_h" = xyes &&
371 test x"$ac_has_wctype_h" = xyes &&
372 test x"$enable_c_mbchar" != xno; then
374 # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
375 # numeric_limits can instantiate type_traits<wchar_t>
376 AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
377 AC_TRY_COMPILE([#include <wchar.h>],
378 [int i = WCHAR_MIN; int j = WCHAR_MAX;],
379 has_wchar_minmax=yes, has_wchar_minmax=no)
380 AC_MSG_RESULT($has_wchar_minmax)
382 # Test wchar.h for WEOF, which is what we use to determine whether
383 # to specialize for char_traits<wchar_t> or not.
384 AC_MSG_CHECKING([for WEOF])
387 #include <stddef.h>],
389 has_weof=yes, has_weof=no)
390 AC_MSG_RESULT($has_weof)
392 # Tests for wide character functions used in char_traits<wchar_t>.
394 AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
397 # Checks for names injected into std:: by the c_std headers.
398 AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
399 fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
400 vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
401 mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
402 wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
403 wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
406 # Checks for wide character functions that are not required
407 # for basic wchar_t support. Don't disable support if they are missing.
408 # Injection of these is wrapped with guard macros.
409 AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[])
411 AC_MSG_CHECKING([for ISO C99 wchar_t support])
412 if test x"$has_weof" = xyes &&
413 test x"$has_wchar_minmax" = xyes &&
414 test x"$ac_wfuncs" = xyes;
416 ac_isoC99_wchar_t=yes
420 AC_MSG_RESULT($ac_isoC99_wchar_t)
422 # Use iconv for wchar_t to char conversions. As such, check for
423 # X/Open Portability Guide, version 2 features (XPG2).
424 AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
425 AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
427 # Check for existence of libiconv.a providing XPG2 wchar_t support.
428 AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
430 LIBS="$LIBS $libiconv"
432 AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
433 [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
437 AC_MSG_CHECKING([for XPG2 wchar_t support])
438 if test x"$ac_has_iconv_h" = xyes &&
439 test x"$ac_has_langinfo_h" = xyes &&
440 test x"$ac_XPG2funcs" = xyes;
446 AC_MSG_RESULT($ac_XPG2_wchar_t)
448 # At the moment, only enable wchar_t specializations if all the
449 # above support is present.
450 if test x"$ac_isoC99_wchar_t" = xyes &&
451 test x"$ac_XPG2_wchar_t" = xyes;
453 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
457 AC_MSG_CHECKING([for enabled wchar_t specializations])
458 AC_MSG_RESULT($enable_wchar_t)
463 dnl Check for headers for, and arguments to, the setrlimit() function.
464 dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
467 dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory
468 dnl various HAVE_MEMLIMIT_* for individual limit names
470 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT_ancilliary, [
473 #include <sys/time.h>
474 #include <sys/resource.h>
476 [ int f = RLIMIT_$1 ; ],
477 [glibcxx_mresult=1], [glibcxx_mresult=0])
478 AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult,
479 [Only used in build directory testsuite_hooks.h.])
482 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT, [
483 setrlimit_have_headers=yes
484 AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
486 [setrlimit_have_headers=no])
487 # If don't have the headers, then we can't run the tests now, and we
488 # won't be seeing any of these during testsuite compilation.
489 if test $setrlimit_have_headers = yes; then
490 # Can't do these in a loop, else the resulting syntax is wrong.
491 GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
492 GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
493 GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
494 GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
496 # Check for rlimit, setrlimit.
497 AC_CACHE_VAL(ac_setrlimit, [
500 #include <sys/time.h>
501 #include <sys/resource.h>
505 [ac_setrlimit=yes], [ac_setrlimit=no])
509 AC_MSG_CHECKING([for testsuite memory limit support])
510 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
512 AC_DEFINE(_GLIBCXX_MEM_LIMITS)
516 AC_MSG_RESULT($ac_mem_limits)
521 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
522 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
524 AC_DEFUN(GLIBCXX_CHECK_S_ISREG_OR_S_IFREG, [
525 AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
527 [#include <sys/stat.h>],
530 S_ISREG(buffer.st_mode);],
531 [glibcxx_cv_S_ISREG=yes],
532 [glibcxx_cv_S_ISREG=no])
534 AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
536 [#include <sys/stat.h>],
539 S_IFREG & buffer.st_mode;],
540 [glibcxx_cv_S_IFREG=yes],
541 [glibcxx_cv_S_IFREG=no])
543 if test $glibcxx_cv_S_ISREG = yes; then
544 AC_DEFINE(HAVE_S_ISREG)
545 elif test $glibcxx_cv_S_IFREG = yes; then
546 AC_DEFINE(HAVE_S_IFREG)
552 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
554 AC_DEFUN(GLIBCXX_CHECK_POLL, [
555 AC_CACHE_VAL(glibcxx_cv_POLL, [
558 [struct pollfd pfd[1];
559 pfd[0].events = POLLIN;
561 [glibcxx_cv_POLL=yes],
562 [glibcxx_cv_POLL=no])
564 if test $glibcxx_cv_POLL = yes; then
571 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
573 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
574 AC_CACHE_VAL(glibcxx_cv_WRITEV, [
576 [#include <sys/uio.h>],
577 [struct iovec iov[2];
579 [glibcxx_cv_WRITEV=yes],
580 [glibcxx_cv_WRITEV=no])
582 if test $glibcxx_cv_WRITEV = yes; then
583 AC_DEFINE(HAVE_WRITEV)
589 dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
591 AC_DEFUN(GLIBCXX_CHECK_INT64_T, [
592 AC_CACHE_VAL(glibcxx_cv_INT64_T, [
594 [#include <stdint.h>],
596 [glibcxx_cv_INT64_T=yes],
597 [glibcxx_cv_INT64_T=no])
599 if test $glibcxx_cv_INT64_T = yes; then
600 AC_DEFINE(HAVE_INT64_T)
606 dnl Check whether LFS support is available.
608 AC_DEFUN(GLIBCXX_CHECK_LFS, [
611 ac_save_CXXFLAGS="$CXXFLAGS"
612 CXXFLAGS="$CXXFLAGS -fno-exceptions"
613 AC_CACHE_VAL(glibcxx_cv_LFS, [
620 fseeko64(fp, 0, SEEK_CUR);
622 lseek64(1, 0, SEEK_CUR);],
623 [glibcxx_cv_LFS=yes],
626 if test $glibcxx_cv_LFS = yes; then
627 AC_DEFINE(_GLIBCXX_USE_LFS)
629 CXXFLAGS="$ac_save_CXXFLAGS"
635 dnl Does any necessary configuration of the testsuite directory. Generates
636 dnl the testsuite_hooks.h header.
638 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
641 dnl enable_abi_check / GLIBCXX_TEST_ABI
645 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
646 if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
647 # Do checks for memory limit functions.
648 GLIBCXX_CHECK_SETRLIMIT
650 # Look for setenv, so that extended locale tests can be performed.
651 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
653 if test $enable_symvers = no; then
658 enable_abi_check=no ;;
660 enable_abi_check=yes ;;
664 # Only build this as native, since automake does not understand
669 # Export file names for ABI checking.
670 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
671 AC_SUBST(baseline_dir)
673 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
674 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
679 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
683 dnl TOPLEVEL_INCLUDES
685 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
686 # Used for every C++ compile we perform.
688 -I$glibcxx_builddir/include/$host_alias \
689 -I$glibcxx_builddir/include \
690 -I$glibcxx_srcdir/libsupc++"
692 # For Canadian crosses, pick this up too.
693 if test $CANADIAN = yes; then
694 GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
697 # Stuff in the actual top level. Currently only used by libsupc++ to
698 # get unwind* headers from the gcc dir.
699 #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
700 TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
702 # Now, export this to all the little Makefiles....
703 AC_SUBST(GLIBCXX_INCLUDES)
704 AC_SUBST(TOPLEVEL_INCLUDES)
709 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
710 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
713 dnl OPTIMIZE_CXXFLAGS
716 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
717 # Optimization flags that are probably a good idea for thrill-seekers. Just
718 # uncomment the lines below and make, everything else is ready to go...
719 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
721 AC_SUBST(OPTIMIZE_CXXFLAGS)
723 WARN_FLAGS='-Wall -W -Wwrite-strings -Wcast-qual'
729 dnl All installation directory information is determined here.
733 dnl glibcxx_prefixdir
734 dnl glibcxx_toolexecdir
735 dnl glibcxx_toolexeclibdir
737 dnl Assumes cross_compiling bits already done, and with_cross_host in
740 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
741 glibcxx_toolexecdir=no
742 glibcxx_toolexeclibdir=no
743 glibcxx_prefixdir=$prefix
745 AC_MSG_CHECKING([for gxx-include-dir])
746 AC_ARG_WITH([gxx-include-dir],
747 AC_HELP_STRING([--with-gxx-include-dir=DIR],
748 [installation directory for include files]),
750 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
751 no) gxx_include_dir=no ;;
752 *) gxx_include_dir=$withval ;;
754 [gxx_include_dir=no])
755 AC_MSG_RESULT($gxx_include_dir)
757 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
758 AC_ARG_ENABLE([version-specific-runtime-libs],
759 AC_HELP_STRING([--enable-version-specific-runtime-libs],
760 [Specify that runtime libraries should be installed in a compiler-specific directory]),
761 [case "$enableval" in
762 yes) version_specific_libs=yes ;;
763 no) version_specific_libs=no ;;
764 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
766 [version_specific_libs=no])
767 AC_MSG_RESULT($version_specific_libs)
769 # Default case for install directory for include files.
770 if test $version_specific_libs = no && test $gxx_include_dir = no; then
771 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
774 # Version-specific runtime libs processing.
775 if test $version_specific_libs = yes; then
776 # Need the gcc compiler version to know where to install libraries
777 # and header files if --enable-version-specific-runtime-libs option
778 # is selected. FIXME: these variables are misnamed, there are
779 # no executables installed in _toolexecdir or _toolexeclibdir.
780 if test x"$gxx_include_dir" = x"no"; then
781 gxx_include_dir='${libdir}/gcc/${host_alias}/'$gcc_version/include/c++
783 glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
784 glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
787 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
788 # Install a library built with a cross compiler in tooldir, not libdir.
789 if test x"$glibcxx_toolexecdir" = x"no"; then
790 if test -n "$with_cross_host" &&
791 test x"$with_cross_host" != x"no"; then
792 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
793 glibcxx_toolexeclibdir='${toolexecdir}/lib'
795 glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
796 glibcxx_toolexeclibdir='${libdir}'
798 multi_os_directory=`$CXX -print-multi-os-directory`
799 case $multi_os_directory in
800 .) ;; # Avoid trailing /.
801 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
805 AC_MSG_CHECKING([for install location])
806 AC_MSG_RESULT($gxx_include_dir)
808 AC_SUBST(glibcxx_prefixdir)
809 AC_SUBST(gxx_include_dir)
810 AC_SUBST(glibcxx_toolexecdir)
811 AC_SUBST(glibcxx_toolexeclibdir)
817 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
818 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
819 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
821 dnl See docs/html/17_intro/configury.html#enable for documentation.
823 m4_define([GLIBCXX_ENABLE],[dnl
824 m4_define([_g_switch],[--enable-$1])dnl
825 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
826 AC_ARG_ENABLE($1,_g_help,
831 m4_bpatsubst([$5],[permit ])) ;;
832 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
833 dnl Idea for future: generate a URL pointing to
834 dnl "onlinedocs/configopts.html#whatever"
841 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
845 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
846 m4_undefine([_g_switch])dnl
847 m4_undefine([_g_help])dnl
852 dnl Check for ISO/IEC 9899:1999 "C99" support.
854 dnl --enable-c99 defines _GLIBCXX_USE_C99
855 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
856 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
857 dnl Where DEFAULT is either `yes' or `no'.
858 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
860 AC_DEFUN(GLIBCXX_ENABLE_C99, [
861 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
866 # Check for the existence of <math.h> functions used if C99 is enabled.
868 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
869 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
870 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
871 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
872 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
873 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
874 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
875 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
876 AC_TRY_COMPILE([#include <math.h>],
877 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
878 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
879 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
880 AC_TRY_COMPILE([#include <math.h>],
881 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
882 AC_TRY_COMPILE([#include <math.h>],
883 [isunordered(0.0,0.0);],, [ac_c99_math=no])
884 AC_MSG_RESULT($ac_c99_math)
886 if test x"$ac_c99_math" = x"yes"; then
887 AC_DEFINE(_GLIBCXX_USE_C99_MATH)
890 # Check for the existence in <stdio.h> of vscanf, et. al.
892 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
893 AC_TRY_COMPILE([#include <stdio.h>],
894 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
895 AC_TRY_COMPILE([#include <stdio.h>
897 void foo(char* fmt, ...)
898 {va_list args; va_start(args, fmt);
899 vfscanf(stderr, "%i", args);}],
900 [],, [ac_c99_stdio=no])
901 AC_TRY_COMPILE([#include <stdio.h>
903 void foo(char* fmt, ...)
904 {va_list args; va_start(args, fmt);
905 vscanf("%i", args);}],
906 [],, [ac_c99_stdio=no])
907 AC_TRY_COMPILE([#include <stdio.h>
909 void foo(char* fmt, ...)
910 {va_list args; va_start(args, fmt);
911 vsnprintf(fmt, 0, "%i", args);}],
912 [],, [ac_c99_stdio=no])
913 AC_TRY_COMPILE([#include <stdio.h>
915 void foo(char* fmt, ...)
916 {va_list args; va_start(args, fmt);
917 vsscanf(fmt, "%i", args);}],
918 [],, [ac_c99_stdio=no])
919 AC_MSG_RESULT($ac_c99_stdio)
921 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
923 AC_MSG_CHECKING([for lldiv_t declaration])
924 AC_CACHE_VAL(ac_c99_lldiv_t, [
925 AC_TRY_COMPILE([#include <stdlib.h>],
927 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
929 AC_MSG_RESULT($ac_c99_lldiv_t)
931 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
932 AC_TRY_COMPILE([#include <stdlib.h>],
933 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
934 AC_TRY_COMPILE([#include <stdlib.h>],
935 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
936 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
937 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
938 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
939 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
940 if test x"$ac_c99_lldiv_t" = x"no"; then
943 AC_MSG_RESULT($ac_c99_stdlib)
945 # Check for the existence of <wchar.h> functions used if C99 is enabled.
946 # XXX the wchar.h checks should be rolled into the general C99 bits.
948 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
949 AC_TRY_COMPILE([#include <wchar.h>],
950 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
951 AC_TRY_COMPILE([#include <wchar.h>],
952 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
953 AC_TRY_COMPILE([#include <wchar.h>],
954 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
955 AC_MSG_RESULT($ac_c99_wchar)
957 AC_MSG_CHECKING([for enabled ISO C99 support])
958 if test x"$ac_c99_math" = x"no" ||
959 test x"$ac_c99_stdio" = x"no" ||
960 test x"$ac_c99_stdlib" = x"no" ||
961 test x"$ac_c99_wchar" = x"no"; then
964 AC_MSG_RESULT($enable_c99)
966 if test x"$ac_99_math" = x"yes"; then
967 AC_DEFINE(_GLIBCXX_USE_C99_MATH)
970 # Option parsed, now set things appropriately
971 if test x"$enable_c99" = x"yes"; then
972 AC_DEFINE(_GLIBCXX_USE_C99)
980 dnl Check for what type of C headers to use.
982 dnl --enable-cheaders= [does stuff].
983 dnl --disable-cheaders [does not do anything, really].
984 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
985 dnl Where DEFAULT is either `c' or `c_std'.
987 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
988 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
989 [construct "C" headers for g++], [permit c|c_std])
990 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
992 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
994 AC_SUBST(C_INCLUDE_DIR)
995 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
996 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
997 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
1002 dnl Check for which locale library to use. The choice is mapped to
1003 dnl a subdirectory of config/locale.
1005 dnl Default is generic.
1007 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
1008 AC_MSG_CHECKING([for C locale to use])
1009 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
1010 [use MODEL for target locale package],
1011 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
1013 # If they didn't use this option switch, or if they specified --enable
1014 # with no specific model, we'll have to look for one. If they
1015 # specified --disable (???), do likewise.
1016 if test $enable_clocale = no || test $enable_clocale = yes; then
1020 # Either a known package, or "auto"
1021 enable_clocale_flag=$enable_clocale
1023 # Probe for locale support if no specific model is specified.
1024 # Default to "generic".
1025 if test $enable_clocale_flag = auto; then
1026 case x${target_os} in
1027 xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
1028 AC_EGREP_CPP([_GLIBCXX_ok], [
1029 #include <features.h>
1030 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
1033 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
1035 # Test for bugs early in glibc-2.2.x series
1036 if test x$enable_clocale_flag = xgnu; then
1038 #define _GNU_SOURCE 1
1041 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
1042 extern __typeof(newlocale) __newlocale;
1043 extern __typeof(duplocale) __duplocale;
1044 extern __typeof(strcoll_l) __strcoll_l;
1048 const char __one[] = "Äuglein Augmen";
1049 const char __two[] = "Äuglein";
1054 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
1055 loc_dup = __duplocale(loc);
1056 i = __strcoll_l(__one, __two, loc);
1057 j = __strcoll_l(__one, __two, loc_dup);
1061 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
1062 [enable_clocale_flag=generic])
1065 # ... at some point put __strxfrm_l tests in as well.
1068 enable_clocale_flag=generic
1073 # Deal with gettext issues. Default to not using it (=no) until we detect
1074 # support for it later. Let the user turn it off via --e/d, but let that
1075 # default to on for easier handling.
1078 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
1082 # Set configure bits for specified locale package
1083 case ${enable_clocale_flag} in
1085 AC_MSG_RESULT(generic)
1087 CLOCALE_H=config/locale/generic/c_locale.h
1088 CLOCALE_CC=config/locale/generic/c_locale.cc
1089 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1090 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1091 CCOLLATE_CC=config/locale/generic/collate_members.cc
1092 CCTYPE_CC=config/locale/generic/ctype_members.cc
1093 CMESSAGES_H=config/locale/generic/messages_members.h
1094 CMESSAGES_CC=config/locale/generic/messages_members.cc
1095 CMONEY_CC=config/locale/generic/monetary_members.cc
1096 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1097 CTIME_H=config/locale/generic/time_members.h
1098 CTIME_CC=config/locale/generic/time_members.cc
1099 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1104 # Declare intention to use gettext, and add support for specific
1106 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1109 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1110 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1111 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1114 # Export the build objects.
1115 for ling in $ALL_LINGUAS; do \
1116 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1117 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1119 AC_SUBST(glibcxx_MOFILES)
1120 AC_SUBST(glibcxx_POFILES)
1122 CLOCALE_H=config/locale/gnu/c_locale.h
1123 CLOCALE_CC=config/locale/gnu/c_locale.cc
1124 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1125 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1126 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1127 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1128 CMESSAGES_H=config/locale/gnu/messages_members.h
1129 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1130 CMONEY_CC=config/locale/gnu/monetary_members.cc
1131 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1132 CTIME_H=config/locale/gnu/time_members.h
1133 CTIME_CC=config/locale/gnu/time_members.cc
1134 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1137 AC_MSG_RESULT(IEEE 1003.1)
1139 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1140 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1141 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1142 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1143 CCOLLATE_CC=config/locale/generic/collate_members.cc
1144 CCTYPE_CC=config/locale/generic/ctype_members.cc
1145 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1146 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1147 CMONEY_CC=config/locale/generic/monetary_members.cc
1148 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1149 CTIME_H=config/locale/generic/time_members.h
1150 CTIME_CC=config/locale/generic/time_members.cc
1151 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1155 # This is where the testsuite looks for locale catalogs, using the
1156 # -DLOCALEDIR define during testsuite compilation.
1157 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1158 AC_SUBST(glibcxx_localedir)
1160 # A standalone libintl (e.g., GNU libintl) may be in use.
1161 if test $USE_NLS = yes; then
1162 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1163 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1165 if test $USE_NLS = yes; then
1166 AC_DEFINE(_GLIBCXX_USE_NLS)
1171 AC_SUBST(CCODECVT_H)
1172 AC_SUBST(CMESSAGES_H)
1173 AC_SUBST(CCODECVT_CC)
1174 AC_SUBST(CCOLLATE_CC)
1176 AC_SUBST(CMESSAGES_CC)
1178 AC_SUBST(CNUMERIC_CC)
1181 AC_SUBST(CLOCALE_CC)
1182 AC_SUBST(CLOCALE_INTERNAL_H)
1187 dnl Check for whether the Boost-derived checks should be turned on.
1189 dnl --enable-concept-checks turns them on.
1190 dnl --disable-concept-checks leaves them off.
1191 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1192 dnl Where DEFAULT is either `yes' or `no'.
1194 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1195 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1196 if test $enable_concept_checks = yes; then
1197 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1203 dnl Check for which I/O library to use: stdio, or something specific.
1205 dnl Default is stdio.
1207 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1208 AC_MSG_CHECKING([for underlying I/O to use])
1209 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1210 [use target-specific I/O package], [permit stdio])
1212 # Now that libio has been removed, you can have any color you want as long
1213 # as it's black. This is one big no-op until other packages are added, but
1214 # showing the framework never hurts.
1215 case ${enable_cstdio} in
1217 CSTDIO_H=config/io/c_io_stdio.h
1218 BASIC_FILE_H=config/io/basic_file_stdio.h
1219 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1220 AC_MSG_RESULT(stdio)
1225 AC_SUBST(BASIC_FILE_H)
1226 AC_SUBST(BASIC_FILE_CC)
1231 dnl Check for "unusual" flags to pass to the compiler while building.
1233 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1234 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1235 dnl --disable-cxx-flags passes nothing.
1236 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1237 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1238 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1239 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1240 dnl If "default flags" is an empty string, the effect is the same
1241 dnl as --disable or --enable=no.
1243 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1244 AC_MSG_CHECKING([for extra compiler flags for building])
1245 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1246 [pass compiler FLAGS when building library],
1247 [case "x$enable_cxx_flags" in
1248 xno | x) enable_cxx_flags= ;;
1250 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1253 # Run through flags (either default or command-line) and set anything
1254 # extra (e.g., #defines) that must accompany particular g++ options.
1255 if test -n "$enable_cxx_flags"; then
1256 for f in $enable_cxx_flags; do
1260 *) # and we're trying to pass /what/ exactly?
1261 AC_MSG_ERROR([compiler flags start with a -]) ;;
1266 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1267 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1268 AC_SUBST(EXTRA_CXX_FLAGS)
1273 dnl Check for wide character support. Has the same effect as the option
1274 dnl in gcc's configure, but in a form that autoconf can mess with.
1276 dnl --enable-c-mbchar requests all the wchar_t stuff.
1277 dnl --disable-c-mbchar doesn't.
1278 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1279 dnl Where DEFAULT is either `yes' or `no'.
1281 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1282 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1283 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1288 dnl Check to see if debugging libraries are to be built.
1290 dnl --enable-libstdcxx-debug
1291 dnl builds a separate set of debugging libraries in addition to the
1292 dnl normal (shared, static) libstdc++ binaries.
1294 dnl --disable-libstdcxx-debug
1295 dnl builds only one (non-debug) version of libstdc++.
1297 dnl --enable-libstdcxx-debug-flags=FLAGS
1298 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1300 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1301 dnl Where DEFAULT is either `yes' or `no'.
1303 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1304 AC_MSG_CHECKING([for additional debug build])
1305 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1306 AC_MSG_RESULT($enable_libstdcxx_debug)
1307 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1312 dnl Check for explicit debug flags.
1314 dnl --enable-libstdcxx-debug-flags='-O1'
1315 dnl is a general method for passing flags to be used when
1316 dnl building debug libraries with --enable-debug.
1318 dnl --disable-libstdcxx-debug-flags does nothing.
1319 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1320 dnl If "default flags" is an empty string, the effect is the same
1321 dnl as --disable or --enable=no.
1323 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1324 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1325 [pass compiler FLAGS when building debug library],
1326 [case "x$enable_libstdcxx_debug_flags" in
1327 xno | x) enable_libstdcxx_debug_flags= ;;
1329 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1332 # Option parsed, now set things appropriately
1333 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1334 AC_SUBST(DEBUG_FLAGS)
1336 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1341 dnl Check if the user only wants a freestanding library implementation.
1343 dnl --disable-hosted-libstdcxx will turn off most of the library build,
1344 dnl installing only the headers required by [17.4.1.3] and the language
1345 dnl support library. More than that will be built (to keep the Makefiles
1346 dnl conveniently clean), but not installed.
1349 dnl is_hosted (yes/no)
1352 dnl _GLIBCXX_HOSTED (always defined, either to 1 or 0)
1354 AC_DEFUN(GLIBCXX_ENABLE_HOSTED, [
1355 AC_ARG_ENABLE([hosted-libstdcxx],
1356 AC_HELP_STRING([--disable-hosted-libstdcxx],
1357 [only build freestanding C++ runtime support]),,
1358 [enable_hosted_libstdcxx=yes])
1359 if test "$enable_hosted_libstdcxx" = no; then
1360 AC_MSG_NOTICE([Only freestanding libraries will be built])
1364 enable_libstdcxx_pch=no
1369 GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
1370 AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
1371 [Define to 1 if a full hosted library is built, or 0 if freestanding.])
1376 dnl Check for template specializations for the 'long long' type extension.
1377 dnl The result determines only whether 'long long' I/O is enabled; things
1378 dnl like numeric_limits<> specializations are always available.
1380 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1381 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1382 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1383 dnl Where DEFAULT is either `yes' or `no'.
1384 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1386 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1387 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1392 AC_MSG_CHECKING([for enabled long long I/O support])
1393 # iostreams require strtoll, strtoull to compile
1394 AC_TRY_COMPILE([#include <stdlib.h>],
1395 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1396 AC_TRY_COMPILE([#include <stdlib.h>],
1397 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1399 # Option parsed, now set things appropriately
1400 if test $enable_long_long = yes; then
1401 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1403 AC_MSG_RESULT($enable_long_long)
1410 dnl Check to see if building and using a C++ precompiled header can be done.
1412 dnl --enable-libstdcxx-pch=yes
1413 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1414 dnl may work, after some light-hearted attempts to puzzle out compiler
1415 dnl support, flip bits on in include/Makefile.am
1417 dnl --disable-libstdcxx-pch
1418 dnl turns off attempts to use or build stdc++.h.gch.
1421 dnl glibcxx_PCHFLAGS
1423 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1424 AC_MSG_CHECKING([for enabled PCH])
1425 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1426 AC_MSG_RESULT([$enable_libstdcxx_pch])
1428 if test $enable_libstdcxx_pch = yes; then
1429 AC_CACHE_CHECK([for compiler with PCH support],
1430 [glibcxx_cv_prog_CXX_pch],
1431 [ac_save_CXXFLAGS="$CXXFLAGS"
1432 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1435 echo '#include <math.h>' > conftest.h
1436 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1437 -o conftest.h.gch 1>&5 2>&1 &&
1438 echo '#error "pch failed"' > conftest.h &&
1439 echo '#include "conftest.h"' > conftest.cc &&
1440 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1442 glibcxx_cv_prog_CXX_pch=yes
1444 glibcxx_cv_prog_CXX_pch=no
1447 CXXFLAGS=$ac_save_CXXFLAGS
1450 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1453 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1454 if test $enable_libstdcxx_pch = yes; then
1455 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1459 AC_SUBST(glibcxx_PCHFLAGS)
1464 dnl Check for exception handling support. If an explicit enable/disable
1465 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1466 dnl target may or may not support call frame exceptions.
1468 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1469 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1470 dnl Neither one forces an attempt at detection.
1473 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1475 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1476 AC_MSG_CHECKING([for exception model to use])
1479 GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1480 [force use of builtin_setjmp for exceptions],
1481 [permit yes|no|auto])
1483 if test $enable_sjlj_exceptions = auto; then
1484 # Botheration. Now we've got to detect the exception model. Link tests
1485 # against libgcc.a are problematic since we've not been given proper -L
1486 # bits for single-tree newlib and libgloss.
1488 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
1489 cat > conftest.$ac_ext << EOF
1490 [#]line __oline__ "configure"
1499 old_CXXFLAGS="$CXXFLAGS"
1501 if AC_TRY_EVAL(ac_compile); then
1502 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1503 enable_sjlj_exceptions=yes
1504 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1505 enable_sjlj_exceptions=no
1508 CXXFLAGS="$old_CXXFLAGS"
1512 # This is a tad weird, for hysterical raisins. We have to map enable/disable
1513 # to two different models.
1514 case $enable_sjlj_exceptions in
1516 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1517 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1518 ac_exception_model_name=sjlj
1521 ac_exception_model_name="call frame"
1524 AC_MSG_ERROR([unable to detect exception model])
1528 AC_MSG_RESULT($ac_exception_model_name)
1533 dnl Add version tags to symbols in shared library (or not), additionally
1534 dnl marking other symbols as private/local (or not).
1536 dnl --enable-symvers=style adds a version script to the linker call when
1537 dnl creating the shared library. The choice of version script is
1538 dnl controlled by 'style'.
1539 dnl --disable-symvers does not.
1540 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1541 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1542 dnl choose a default style based on linker characteristics. Passing
1543 dnl 'no' disables versioning.
1545 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1547 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1548 [enables symbol versioning of the shared library],
1549 [permit yes|no|gnu])
1551 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1552 # don't know enough about $LD to do tricks...
1553 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1554 # FIXME The following test is too strict, in theory.
1555 if test $enable_shared = no ||
1557 test x$glibcxx_gnu_ld_version = x; then
1561 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1562 if test $enable_symvers != no; then
1563 AC_MSG_CHECKING([for shared libgcc])
1564 ac_save_CFLAGS="$CFLAGS"
1566 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1567 CFLAGS="$ac_save_CFLAGS"
1568 AC_MSG_RESULT($glibcxx_shared_libgcc)
1571 # For GNU ld, we need at least this version. The format is described in
1572 # GLIBCXX_CHECK_LINKER_FEATURES above.
1573 glibcxx_min_gnu_ld_version=21400
1574 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1576 # Check to see if unspecified "yes" value can win, given results above.
1577 # Change "yes" into either "no" or a style name.
1578 if test $enable_symvers = yes; then
1579 if test $with_gnu_ld = yes &&
1580 test $glibcxx_shared_libgcc = yes;
1582 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1585 # The right tools, the right setup, but too old. Fallbacks?
1586 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1587 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1588 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1589 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1590 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1591 # Globbing fix is present, proper block support is not.
1592 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1593 dnl enable_symvers=???
1594 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1598 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1604 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1605 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1606 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1607 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1612 # Everything parsed; figure out what file to use.
1613 case $enable_symvers in
1615 SYMVER_MAP=config/linker-map.dummy
1618 SYMVER_MAP=config/linker-map.gnu
1619 AC_DEFINE(_GLIBCXX_SYMVER)
1623 AC_SUBST(SYMVER_MAP)
1624 AC_SUBST(port_specific_symbol_files)
1625 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1626 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1631 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1632 dnl We must stage the required headers so that they will be installed
1633 dnl with the library (unlike libgcc, the STL implementation is provided
1634 dnl solely within headers). Since we must not inject random user-space
1635 dnl macro names into user-provided C++ code, we first stage into <file>-in
1636 dnl and process to <file> with an output command. The reason for a two-
1637 dnl stage process here is to correctly handle $srcdir!=$objdir without
1638 dnl having to write complex code (the sed commands to clean the macro
1639 dnl namespace are complex and fragile enough as it is). We must also
1640 dnl add a relative path so that -I- is supported properly.
1643 dnl glibcxx_thread_h
1646 dnl HAVE_GTHR_DEFAULT
1647 dnl _GLIBCXX_SUPPORTS_WEAK
1649 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1650 AC_MSG_CHECKING([for thread model used by GCC])
1651 target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1652 AC_MSG_RESULT([$target_thread_file])
1654 if test $target_thread_file != single; then
1655 AC_DEFINE(HAVE_GTHR_DEFAULT)
1656 AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1659 glibcxx_thread_h=gthr-$target_thread_file.h
1660 AC_SUBST(glibcxx_thread_h)
1664 # Check whether LC_MESSAGES is available in <locale.h>.
1665 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1667 # This file file be copied and used freely without restrictions. It can
1668 # be used in projects which are not available under the GNU Public License
1669 # but which still want to provide support for the GNU gettext functionality.
1670 # Please note that the actual code is *not* freely available.
1673 AC_DEFUN(AC_LC_MESSAGES, [
1674 AC_CHECK_HEADER(locale.h, [
1675 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1676 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1677 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1678 if test $ac_cv_val_LC_MESSAGES = yes; then
1679 AC_DEFINE(HAVE_LC_MESSAGES)
1685 sinclude([../libtool.m4])
1686 dnl The lines below arrange for aclocal not to bring an installed
1687 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1688 dnl add a definition of LIBTOOL to Makefile.in.
1689 ifelse(,,,[AC_SUBST(LIBTOOL)
1690 AC_DEFUN([AM_PROG_LIBTOOL])
1691 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1692 AC_DEFUN([AC_PROG_LD])
1695 dnl vim:et:ts=2:sw=2
1697 # AM_CONDITIONAL -*- Autoconf -*-
1699 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1701 # This program is free software; you can redistribute it and/or modify
1702 # it under the terms of the GNU General Public License as published by
1703 # the Free Software Foundation; either version 2, or (at your option)
1704 # any later version.
1706 # This program is distributed in the hope that it will be useful,
1707 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1708 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1709 # GNU General Public License for more details.
1711 # You should have received a copy of the GNU General Public License
1712 # along with this program; if not, write to the Free Software
1713 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1720 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1721 # -------------------------------------
1722 # Define a conditional.
1723 AC_DEFUN([AM_CONDITIONAL],
1724 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1725 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1727 AC_SUBST([$1_FALSE])
1735 AC_CONFIG_COMMANDS_PRE(
1736 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1737 AC_MSG_ERROR([conditional "$1" was never defined.
1738 Usually this means the macro was only invoked conditionally.])
1741 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1743 # This program is free software; you can redistribute it and/or modify
1744 # it under the terms of the GNU General Public License as published by
1745 # the Free Software Foundation; either version 2, or (at your option)
1746 # any later version.
1748 # This program is distributed in the hope that it will be useful,
1749 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1750 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1751 # GNU General Public License for more details.
1753 # You should have received a copy of the GNU General Public License
1754 # along with this program; if not, write to the Free Software
1755 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1760 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1761 # ---------------------------------------------------
1762 # Add --enable-multilib to configure.
1763 AC_DEFUN([AM_ENABLE_MULTILIB],
1764 [# Default to --enable-multilib
1765 AC_ARG_ENABLE(multilib,
1766 [ --enable-multilib build many library versions (default)],
1767 [case "$enableval" in
1768 yes) multilib=yes ;;
1770 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1774 # We may get other options which we leave undocumented:
1775 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1776 # See config-ml.in if you want the gory details.
1778 if test "$srcdir" = "."; then
1779 if test "$with_target_subdir" != "."; then
1780 multi_basedir="$srcdir/$with_multisrctop../$2"
1782 multi_basedir="$srcdir/$with_multisrctop$2"
1785 multi_basedir="$srcdir/$2"
1787 AC_SUBST(multi_basedir)
1789 AC_OUTPUT_COMMANDS([
1790 # Only add multilib support code if we just rebuilt the top-level
1792 case " $CONFIG_FILES " in
1793 *" ]m4_default([$1],Makefile)[ "*)
1794 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1801 with_multisubdir="$with_multisubdir"
1802 with_multisrctop="$with_multisrctop"
1803 with_target_subdir="$with_target_subdir"
1804 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1805 multi_basedir="$multi_basedir"
1806 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1809 # Add --enable-maintainer-mode option to configure.
1812 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1814 # This program is free software; you can redistribute it and/or modify
1815 # it under the terms of the GNU General Public License as published by
1816 # the Free Software Foundation; either version 2, or (at your option)
1817 # any later version.
1819 # This program is distributed in the hope that it will be useful,
1820 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1821 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1822 # GNU General Public License for more details.
1824 # You should have received a copy of the GNU General Public License
1825 # along with this program; if not, write to the Free Software
1826 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1831 AC_DEFUN([AM_MAINTAINER_MODE],
1832 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1833 dnl maintainer-mode is disabled by default
1834 AC_ARG_ENABLE(maintainer-mode,
1835 [ --enable-maintainer-mode enable make rules and dependencies not useful
1836 (and sometimes confusing) to the casual installer],
1837 USE_MAINTAINER_MODE=$enableval,
1838 USE_MAINTAINER_MODE=no)
1839 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1840 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1841 MAINT=$MAINTAINER_MODE_TRUE
1846 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1848 # Do all the work for Automake. -*- Autoconf -*-
1850 # This macro actually does too much some checks are only needed if
1851 # your package does certain things. But this isn't really a big deal.
1853 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1854 # Free Software Foundation, Inc.
1856 # This program is free software; you can redistribute it and/or modify
1857 # it under the terms of the GNU General Public License as published by
1858 # the Free Software Foundation; either version 2, or (at your option)
1859 # any later version.
1861 # This program is distributed in the hope that it will be useful,
1862 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1863 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1864 # GNU General Public License for more details.
1866 # You should have received a copy of the GNU General Public License
1867 # along with this program; if not, write to the Free Software
1868 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1875 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1876 # the ones we care about.
1877 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1879 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1880 # AM_INIT_AUTOMAKE([OPTIONS])
1881 # -----------------------------------------------
1882 # The call with PACKAGE and VERSION arguments is the old style
1883 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1884 # and VERSION should now be passed to AC_INIT and removed from
1885 # the call to AM_INIT_AUTOMAKE.
1886 # We support both call styles for the transition. After
1887 # the next Automake release, Autoconf can make the AC_INIT
1888 # arguments mandatory, and then we can depend on a new Autoconf
1889 # release and drop the old call support.
1890 AC_DEFUN([AM_INIT_AUTOMAKE],
1891 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1892 AC_REQUIRE([AC_PROG_INSTALL])dnl
1893 # test to see if srcdir already configured
1894 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1895 test -f $srcdir/config.status; then
1896 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1899 # test whether we have cygpath
1900 if test -z "$CYGPATH_W"; then
1901 if (cygpath --version) >/dev/null 2>/dev/null; then
1902 CYGPATH_W='cygpath -w'
1907 AC_SUBST([CYGPATH_W])
1909 # Define the identity of the package.
1910 dnl Distinguish between old-style and new-style calls.
1912 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1913 AC_SUBST([PACKAGE], [$1])dnl
1914 AC_SUBST([VERSION], [$2])],
1915 [_AM_SET_OPTIONS([$1])dnl
1916 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1917 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1919 _AM_IF_OPTION([no-define],,
1920 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1921 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1923 # Some tools Automake needs.
1924 AC_REQUIRE([AM_SANITY_CHECK])dnl
1925 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1926 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1927 AM_MISSING_PROG(AUTOCONF, autoconf)
1928 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1929 AM_MISSING_PROG(AUTOHEADER, autoheader)
1930 AM_MISSING_PROG(MAKEINFO, makeinfo)
1931 AM_MISSING_PROG(AMTAR, tar)
1933 AM_PROG_INSTALL_STRIP
1934 # We need awk for the "check" target. The system "awk" is bad on
1936 AC_REQUIRE([AC_PROG_AWK])dnl
1937 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1938 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1940 _AM_IF_OPTION([no-dependencies],,
1941 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1942 [_AM_DEPENDENCIES(CC)],
1943 [define([AC_PROG_CC],
1944 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1945 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1946 [_AM_DEPENDENCIES(CXX)],
1947 [define([AC_PROG_CXX],
1948 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1953 # When config.status generates a header, we must update the stamp-h file.
1954 # This file resides in the same directory as the config header
1955 # that is generated. The stamp files are numbered to have different names.
1957 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1958 # loop where config.status creates the headers, so we can generate
1959 # our stamp files there.
1960 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1961 [# Compute $1's index in $config_headers.
1963 for _am_header in $config_headers :; do
1968 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1971 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1973 # Copyright 2002 Free Software Foundation, Inc.
1975 # This program is free software; you can redistribute it and/or modify
1976 # it under the terms of the GNU General Public License as published by
1977 # the Free Software Foundation; either version 2, or (at your option)
1978 # any later version.
1980 # This program is distributed in the hope that it will be useful,
1981 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1982 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1983 # GNU General Public License for more details.
1985 # You should have received a copy of the GNU General Public License
1986 # along with this program; if not, write to the Free Software
1987 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1989 # AM_AUTOMAKE_VERSION(VERSION)
1990 # ----------------------------
1991 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1992 # generated from the m4 files accompanying Automake X.Y.
1993 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1995 # AM_SET_CURRENT_AUTOMAKE_VERSION
1996 # -------------------------------
1997 # Call AM_AUTOMAKE_VERSION so it can be traced.
1998 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1999 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2000 [AM_AUTOMAKE_VERSION([1.7.8])])
2002 # Helper functions for option handling. -*- Autoconf -*-
2004 # Copyright 2001, 2002 Free Software Foundation, Inc.
2006 # This program is free software; you can redistribute it and/or modify
2007 # it under the terms of the GNU General Public License as published by
2008 # the Free Software Foundation; either version 2, or (at your option)
2009 # any later version.
2011 # This program is distributed in the hope that it will be useful,
2012 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2013 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2014 # GNU General Public License for more details.
2016 # You should have received a copy of the GNU General Public License
2017 # along with this program; if not, write to the Free Software
2018 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2023 # _AM_MANGLE_OPTION(NAME)
2024 # -----------------------
2025 AC_DEFUN([_AM_MANGLE_OPTION],
2026 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2028 # _AM_SET_OPTION(NAME)
2029 # ------------------------------
2030 # Set option NAME. Presently that only means defining a flag for this option.
2031 AC_DEFUN([_AM_SET_OPTION],
2032 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2034 # _AM_SET_OPTIONS(OPTIONS)
2035 # ----------------------------------
2036 # OPTIONS is a space-separated list of Automake options.
2037 AC_DEFUN([_AM_SET_OPTIONS],
2038 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2040 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2041 # -------------------------------------------
2042 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2043 AC_DEFUN([_AM_IF_OPTION],
2044 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2047 # Check to make sure that the build environment is sane.
2050 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2052 # This program is free software; you can redistribute it and/or modify
2053 # it under the terms of the GNU General Public License as published by
2054 # the Free Software Foundation; either version 2, or (at your option)
2055 # any later version.
2057 # This program is distributed in the hope that it will be useful,
2058 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2059 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2060 # GNU General Public License for more details.
2062 # You should have received a copy of the GNU General Public License
2063 # along with this program; if not, write to the Free Software
2064 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2071 AC_DEFUN([AM_SANITY_CHECK],
2072 [AC_MSG_CHECKING([whether build environment is sane])
2075 echo timestamp > conftest.file
2076 # Do `set' in a subshell so we don't clobber the current shell's
2077 # arguments. Must try -L first in case configure is actually a
2078 # symlink; some systems play weird games with the mod time of symlinks
2079 # (eg FreeBSD returns the mod time of the symlink's containing
2082 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2083 if test "$[*]" = "X"; then
2085 set X `ls -t $srcdir/configure conftest.file`
2088 if test "$[*]" != "X $srcdir/configure conftest.file" \
2089 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2091 # If neither matched, then we have a broken ls. This can happen
2092 # if, for instance, CONFIG_SHELL is bash and it inherits a
2093 # broken ls alias from the environment. This has actually
2094 # happened. Such a system could not be considered "sane".
2095 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2096 alias in your environment])
2099 test "$[2]" = conftest.file
2105 AC_MSG_ERROR([newly created file is older than distributed files!
2106 Check your system clock])
2108 AC_MSG_RESULT(yes)])
2113 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2115 # This program is free software; you can redistribute it and/or modify
2116 # it under the terms of the GNU General Public License as published by
2117 # the Free Software Foundation; either version 2, or (at your option)
2118 # any later version.
2120 # This program is distributed in the hope that it will be useful,
2121 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2122 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2123 # GNU General Public License for more details.
2125 # You should have received a copy of the GNU General Public License
2126 # along with this program; if not, write to the Free Software
2127 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2132 # AM_MISSING_PROG(NAME, PROGRAM)
2133 # ------------------------------
2134 AC_DEFUN([AM_MISSING_PROG],
2135 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2136 $1=${$1-"${am_missing_run}$2"}
2140 # AM_MISSING_HAS_RUN
2141 # ------------------
2142 # Define MISSING if not defined so far and test if it supports --run.
2143 # If it does, set am_missing_run to use it, otherwise, to nothing.
2144 AC_DEFUN([AM_MISSING_HAS_RUN],
2145 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2146 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2147 # Use eval to expand $SHELL
2148 if eval "$MISSING --run true"; then
2149 am_missing_run="$MISSING --run "
2152 AC_MSG_WARN([`missing' script is too old or missing])
2158 # Copyright 2001 Free Software Foundation, Inc.
2160 # This program is free software; you can redistribute it and/or modify
2161 # it under the terms of the GNU General Public License as published by
2162 # the Free Software Foundation; either version 2, or (at your option)
2163 # any later version.
2165 # This program is distributed in the hope that it will be useful,
2166 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2167 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2168 # GNU General Public License for more details.
2170 # You should have received a copy of the GNU General Public License
2171 # along with this program; if not, write to the Free Software
2172 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2175 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2176 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2177 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2179 # Of course, Automake must honor this variable whenever it calls a
2180 # tool from the auxiliary directory. The problem is that $srcdir (and
2181 # therefore $ac_aux_dir as well) can be either absolute or relative,
2182 # depending on how configure is run. This is pretty annoying, since
2183 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2184 # source directory, any form will work fine, but in subdirectories a
2185 # relative path needs to be adjusted first.
2187 # $ac_aux_dir/missing
2188 # fails when called from a subdirectory if $ac_aux_dir is relative
2189 # $top_srcdir/$ac_aux_dir/missing
2190 # fails if $ac_aux_dir is absolute,
2191 # fails when called from a subdirectory in a VPATH build with
2192 # a relative $ac_aux_dir
2194 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2195 # are both prefixed by $srcdir. In an in-source build this is usually
2196 # harmless because $srcdir is `.', but things will broke when you
2197 # start a VPATH build or use an absolute $srcdir.
2199 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2200 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2201 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2202 # and then we would define $MISSING as
2203 # MISSING="\${SHELL} $am_aux_dir/missing"
2204 # This will work as long as MISSING is not called from configure, because
2205 # unfortunately $(top_srcdir) has no meaning in configure.
2206 # However there are other variables, like CC, which are often used in
2207 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2209 # Another solution, used here, is to always expand $ac_aux_dir to an
2210 # absolute PATH. The drawback is that using absolute paths prevent a
2211 # configured tree to be moved without reconfiguration.
2213 # Rely on autoconf to set up CDPATH properly.
2216 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2217 # expand $ac_aux_dir to an absolute path
2218 am_aux_dir=`cd $ac_aux_dir && pwd`
2221 # AM_PROG_INSTALL_SH
2222 # ------------------
2223 # Define $install_sh.
2225 # Copyright 2001 Free Software Foundation, Inc.
2227 # This program is free software; you can redistribute it and/or modify
2228 # it under the terms of the GNU General Public License as published by
2229 # the Free Software Foundation; either version 2, or (at your option)
2230 # any later version.
2232 # This program is distributed in the hope that it will be useful,
2233 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2234 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2235 # GNU General Public License for more details.
2237 # You should have received a copy of the GNU General Public License
2238 # along with this program; if not, write to the Free Software
2239 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2242 AC_DEFUN([AM_PROG_INSTALL_SH],
2243 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2244 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2245 AC_SUBST(install_sh)])
2247 # AM_PROG_INSTALL_STRIP
2249 # Copyright 2001 Free Software Foundation, Inc.
2251 # This program is free software; you can redistribute it and/or modify
2252 # it under the terms of the GNU General Public License as published by
2253 # the Free Software Foundation; either version 2, or (at your option)
2254 # any later version.
2256 # This program is distributed in the hope that it will be useful,
2257 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2258 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2259 # GNU General Public License for more details.
2261 # You should have received a copy of the GNU General Public License
2262 # along with this program; if not, write to the Free Software
2263 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2266 # One issue with vendor `install' (even GNU) is that you can't
2267 # specify the program used to strip binaries. This is especially
2268 # annoying in cross-compiling environments, where the build's strip
2269 # is unlikely to handle the host's binaries.
2270 # Fortunately install-sh will honor a STRIPPROG variable, so we
2271 # always use install-sh in `make install-strip', and initialize
2272 # STRIPPROG with the value of the STRIP variable (set by the user).
2273 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2274 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2275 # Installed binaries are usually stripped using `strip' when the user
2276 # run `make install-strip'. However `strip' might not be the right
2277 # tool to use in cross-compilation environments, therefore Automake
2278 # will honor the `STRIP' environment variable to overrule this program.
2279 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2280 if test "$cross_compiling" != no; then
2281 AC_CHECK_TOOL([STRIP], [strip], :)
2283 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2284 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2287 # Copyright (C) 2003 Free Software Foundation, Inc.
2289 # This program is free software; you can redistribute it and/or modify
2290 # it under the terms of the GNU General Public License as published by
2291 # the Free Software Foundation; either version 2, or (at your option)
2292 # any later version.
2294 # This program is distributed in the hope that it will be useful,
2295 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2296 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2297 # GNU General Public License for more details.
2299 # You should have received a copy of the GNU General Public License
2300 # along with this program; if not, write to the Free Software
2301 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2306 # Check whether the underlying file-system supports filenames
2307 # with a leading dot. For instance MS-DOS doesn't.
2308 AC_DEFUN([AM_SET_LEADING_DOT],
2309 [rm -rf .tst 2>/dev/null
2310 mkdir .tst 2>/dev/null
2311 if test -d .tst; then
2316 rmdir .tst 2>/dev/null
2317 AC_SUBST([am__leading_dot])])
2319 # serial 5 -*- Autoconf -*-
2321 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2323 # This program is free software; you can redistribute it and/or modify
2324 # it under the terms of the GNU General Public License as published by
2325 # the Free Software Foundation; either version 2, or (at your option)
2326 # any later version.
2328 # This program is distributed in the hope that it will be useful,
2329 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2331 # GNU General Public License for more details.
2333 # You should have received a copy of the GNU General Public License
2334 # along with this program; if not, write to the Free Software
2335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2339 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2340 # written in clear, in which case automake, when reading aclocal.m4,
2341 # will think it sees a *use*, and therefore will trigger all it's
2342 # C support machinery. Also note that it means that autoscan, seeing
2343 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2347 # _AM_DEPENDENCIES(NAME)
2348 # ----------------------
2349 # See how the compiler implements dependency checking.
2350 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2351 # We try a few techniques and use that to set a single cache variable.
2353 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2354 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2355 # dependency, and given that the user is not expected to run this macro,
2356 # just rely on AC_PROG_CC.
2357 AC_DEFUN([_AM_DEPENDENCIES],
2358 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2359 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2360 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2361 AC_REQUIRE([AM_DEP_TRACK])dnl
2363 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2364 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2365 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2366 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2367 [depcc="$$1" am_compiler_list=])
2369 AC_CACHE_CHECK([dependency style of $depcc],
2370 [am_cv_$1_dependencies_compiler_type],
2371 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2372 # We make a subdir and do the tests there. Otherwise we can end up
2373 # making bogus files that we don't know about and never remove. For
2374 # instance it was reported that on HP-UX the gcc test will end up
2375 # making a dummy file named `D' -- because `-MD' means `put the output
2378 # Copy depcomp to subdir because otherwise we won't find it if we're
2379 # using a relative directory.
2380 cp "$am_depcomp" conftest.dir
2382 # We will build objects and dependencies in a subdirectory because
2383 # it helps to detect inapplicable dependency modes. For instance
2384 # both Tru64's cc and ICC support -MD to output dependencies as a
2385 # side effect of compilation, but ICC will put the dependencies in
2386 # the current directory while Tru64 will put them in the object
2390 am_cv_$1_dependencies_compiler_type=none
2391 if test "$am_compiler_list" = ""; then
2392 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2394 for depmode in $am_compiler_list; do
2395 # Setup a source with many dependencies, because some compilers
2396 # like to wrap large dependency lists on column 80 (with \), and
2397 # we should not choose a depcomp mode which is confused by this.
2399 # We need to recreate these files for each test, as the compiler may
2400 # overwrite some of them when testing with obscure command lines.
2401 # This happens at least with the AIX C compiler.
2403 for i in 1 2 3 4 5 6; do
2404 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2407 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2411 # after this tag, mechanisms are not by side-effect, so they'll
2412 # only be used when explicitly requested
2413 if test "x$enable_dependency_tracking" = xyes; then
2421 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2422 # mode. It turns out that the SunPro C++ compiler does not properly
2423 # handle `-M -o', and we need to detect this.
2424 if depmode=$depmode \
2425 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2426 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2427 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2428 >/dev/null 2>conftest.err &&
2429 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2430 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2431 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2432 # icc doesn't choke on unknown options, it will just issue warnings
2433 # (even with -Werror). So we grep stderr for any message
2434 # that says an option was ignored.
2435 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2436 am_cv_$1_dependencies_compiler_type=$depmode
2445 am_cv_$1_dependencies_compiler_type=none
2448 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2449 AM_CONDITIONAL([am__fastdep$1], [
2450 test "x$enable_dependency_tracking" != xno \
2451 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2457 # Choose a directory name for dependency files.
2458 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2459 AC_DEFUN([AM_SET_DEPDIR],
2460 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2461 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2467 AC_DEFUN([AM_DEP_TRACK],
2468 [AC_ARG_ENABLE(dependency-tracking,
2469 [ --disable-dependency-tracking Speeds up one-time builds
2470 --enable-dependency-tracking Do not reject slow dependency extractors])
2471 if test "x$enable_dependency_tracking" != xno; then
2472 am_depcomp="$ac_aux_dir/depcomp"
2475 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2476 AC_SUBST([AMDEPBACKSLASH])
2479 # Generate code to set up dependency tracking. -*- Autoconf -*-
2481 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2483 # This program is free software; you can redistribute it and/or modify
2484 # it under the terms of the GNU General Public License as published by
2485 # the Free Software Foundation; either version 2, or (at your option)
2486 # any later version.
2488 # This program is distributed in the hope that it will be useful,
2489 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2491 # GNU General Public License for more details.
2493 # You should have received a copy of the GNU General Public License
2494 # along with this program; if not, write to the Free Software
2495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2500 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2501 # ------------------------------
2502 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2503 [for mf in $CONFIG_FILES; do
2504 # Strip MF so we end up with the name of the file.
2505 mf=`echo "$mf" | sed -e 's/:.*$//'`
2506 # Check whether this is an Automake generated Makefile or not.
2507 # We used to match only the files named `Makefile.in', but
2508 # some people rename them; so instead we look at the file content.
2509 # Grep'ing the first line is not enough: some people post-process
2510 # each Makefile.in and add a new line on top of each file to say so.
2511 # So let's grep whole file.
2512 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2513 dirpart=`AS_DIRNAME("$mf")`
2517 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2518 # Extract the definition of DEP_FILES from the Makefile without
2520 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2521 test -z "$DEPDIR" && continue
2522 # When using ansi2knr, U may be empty or an underscore; expand it
2523 U=`sed -n -e '/^U = / s///p' < "$mf"`
2524 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2525 # We invoke sed twice because it is the simplest approach to
2526 # changing $(DEPDIR) to its actual value in the expansion.
2527 for file in `sed -n -e '
2528 /^DEP_FILES = .*\\\\$/ {
2537 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2538 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2539 # Make sure the directory exists.
2540 test -f "$dirpart/$file" && continue
2541 fdir=`AS_DIRNAME(["$file"])`
2542 AS_MKDIR_P([$dirpart/$fdir])
2543 # echo "creating $dirpart/$file"
2544 echo '# dummy' > "$dirpart/$file"
2547 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2550 # AM_OUTPUT_DEPENDENCY_COMMANDS
2551 # -----------------------------
2552 # This macro should only be invoked once -- use via AC_REQUIRE.
2554 # This code is only required when automatic dependency tracking
2555 # is enabled. FIXME. This creates each `.P' file that we will
2556 # need in order to bootstrap the dependency handling code.
2557 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2558 [AC_CONFIG_COMMANDS([depfiles],
2559 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2560 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2563 # Check to see how 'make' treats includes. -*- Autoconf -*-
2565 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2567 # This program is free software; you can redistribute it and/or modify
2568 # it under the terms of the GNU General Public License as published by
2569 # the Free Software Foundation; either version 2, or (at your option)
2570 # any later version.
2572 # This program is distributed in the hope that it will be useful,
2573 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2574 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2575 # GNU General Public License for more details.
2577 # You should have received a copy of the GNU General Public License
2578 # along with this program; if not, write to the Free Software
2579 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2586 # Check to see how make treats includes.
2587 AC_DEFUN([AM_MAKE_INCLUDE],
2588 [am_make=${MAKE-make}
2589 cat > confinc << 'END'
2594 # If we don't find an include directive, just comment out the code.
2595 AC_MSG_CHECKING([for style of include used by $am_make])
2599 # First try GNU make style include.
2600 echo "include confinc" > confmf
2601 # We grep out `Entering directory' and `Leaving directory'
2602 # messages which can occur if `w' ends up in MAKEFLAGS.
2603 # In particular we don't look at `^make:' because GNU make might
2604 # be invoked under some other name (usually "gmake"), in which
2605 # case it prints its new name instead of `make'.
2606 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2611 # Now try BSD make style include.
2612 if test "$am__include" = "#"; then
2613 echo '.include "confinc"' > confmf
2614 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2615 am__include=.include
2620 AC_SUBST([am__include])
2621 AC_SUBST([am__quote])
2622 AC_MSG_RESULT([$_am_result])
2623 rm -f confinc confmf