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_CACHE_VAL(glibcxx_cv_LFS, [
617 lseek64(1, 0, SEEK_CUR);],
618 [glibcxx_cv_LFS=yes],
621 if test $glibcxx_cv_LFS = yes; then
622 AC_DEFINE(_GLIBCXX_USE_LFS)
629 dnl Does any necessary configuration of the testsuite directory. Generates
630 dnl the testsuite_hooks.h header.
632 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
635 dnl enable_abi_check / GLIBCXX_TEST_ABI
639 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
640 if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
641 # Do checks for memory limit functions.
642 GLIBCXX_CHECK_SETRLIMIT
644 # Look for setenv, so that extended locale tests can be performed.
645 GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
647 if test $enable_symvers = no; then
652 enable_abi_check=no ;;
654 enable_abi_check=yes ;;
658 # Only build this as native, since automake does not understand
663 # Export file names for ABI checking.
664 baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
665 AC_SUBST(baseline_dir)
667 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
668 GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
673 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
677 dnl TOPLEVEL_INCLUDES
679 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
680 # Used for every C++ compile we perform.
682 -I$glibcxx_builddir/include/$host_alias \
683 -I$glibcxx_builddir/include \
684 -I$glibcxx_srcdir/libsupc++"
686 # For Canadian crosses, pick this up too.
687 if test $CANADIAN = yes; then
688 GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
691 # Stuff in the actual top level. Currently only used by libsupc++ to
692 # get unwind* headers from the gcc dir.
693 #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
694 TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
696 # Now, export this to all the little Makefiles....
697 AC_SUBST(GLIBCXX_INCLUDES)
698 AC_SUBST(TOPLEVEL_INCLUDES)
703 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
704 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
707 dnl OPTIMIZE_CXXFLAGS
710 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
711 # Optimization flags that are probably a good idea for thrill-seekers. Just
712 # uncomment the lines below and make, everything else is ready to go...
713 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
715 AC_SUBST(OPTIMIZE_CXXFLAGS)
717 WARN_FLAGS='-Wall -W -Wwrite-strings -Wcast-qual'
723 dnl All installation directory information is determined here.
727 dnl glibcxx_prefixdir
728 dnl glibcxx_toolexecdir
729 dnl glibcxx_toolexeclibdir
731 dnl Assumes cross_compiling bits already done, and with_cross_host in
734 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
735 glibcxx_toolexecdir=no
736 glibcxx_toolexeclibdir=no
737 glibcxx_prefixdir=$prefix
739 AC_MSG_CHECKING([for gxx-include-dir])
740 AC_ARG_WITH([gxx-include-dir],
741 AC_HELP_STRING([--with-gxx-include-dir=DIR],
742 [installation directory for include files]),
744 yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
745 no) gxx_include_dir=no ;;
746 *) gxx_include_dir=$withval ;;
748 [gxx_include_dir=no])
749 AC_MSG_RESULT($gxx_include_dir)
751 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
752 AC_ARG_ENABLE([version-specific-runtime-libs],
753 AC_HELP_STRING([--enable-version-specific-runtime-libs],
754 [Specify that runtime libraries should be installed in a compiler-specific directory]),
755 [case "$enableval" in
756 yes) version_specific_libs=yes ;;
757 no) version_specific_libs=no ;;
758 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
760 [version_specific_libs=no])
761 AC_MSG_RESULT($version_specific_libs)
763 # Default case for install directory for include files.
764 if test $version_specific_libs = no && test $gxx_include_dir = no; then
765 gxx_include_dir='${prefix}'/include/c++/${gcc_version}
768 # Version-specific runtime libs processing.
769 if test $version_specific_libs = yes; then
770 # Need the gcc compiler version to know where to install libraries
771 # and header files if --enable-version-specific-runtime-libs option
773 if test x"$gxx_include_dir" = x"no"; then
774 gxx_include_dir='${libdir}/gcc-lib/${host_alias}/'$gcc_version/include/c++
776 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
777 glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
780 # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
781 # Install a library built with a cross compiler in tooldir, not libdir.
782 if test x"$glibcxx_toolexecdir" = x"no"; then
783 if test -n "$with_cross_host" &&
784 test x"$with_cross_host" != x"no"; then
785 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
786 glibcxx_toolexeclibdir='${toolexecdir}/lib'
788 glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
789 glibcxx_toolexeclibdir='${libdir}'
791 multi_os_directory=`$CXX -print-multi-os-directory`
792 case $multi_os_directory in
793 .) ;; # Avoid trailing /.
794 *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
798 AC_MSG_CHECKING([for install location])
799 AC_MSG_RESULT($gxx_include_dir)
801 AC_SUBST(glibcxx_prefixdir)
802 AC_SUBST(gxx_include_dir)
803 AC_SUBST(glibcxx_toolexecdir)
804 AC_SUBST(glibcxx_toolexeclibdir)
810 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
811 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
812 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
814 dnl See docs/html/17_intro/configury.html#enable for documentation.
816 m4_define([GLIBCXX_ENABLE],[dnl
817 m4_define([_g_switch],[--enable-$1])dnl
818 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
819 AC_ARG_ENABLE($1,_g_help,
824 m4_bpatsubst([$5],[permit ])) ;;
825 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
826 dnl Idea for future: generate a URL pointing to
827 dnl "onlinedocs/configopts.html#whatever"
834 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
838 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
839 m4_undefine([_g_switch])dnl
840 m4_undefine([_g_help])dnl
845 dnl Check for ISO/IEC 9899:1999 "C99" support.
847 dnl --enable-c99 defines _GLIBCXX_USE_C99
848 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
849 dnl + Usage: GLIBCXX_ENABLE_C99[(DEFAULT)]
850 dnl Where DEFAULT is either `yes' or `no'.
851 dnl + If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
853 AC_DEFUN(GLIBCXX_ENABLE_C99, [
854 GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
859 # Check for the existence of <math.h> functions used if C99 is enabled.
861 AC_MSG_CHECKING([for ISO C99 support in <math.h>])
862 AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
863 AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
864 AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
865 AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
866 AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
867 AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
868 AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
869 AC_TRY_COMPILE([#include <math.h>],
870 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
871 AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
872 AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
873 AC_TRY_COMPILE([#include <math.h>],
874 [islessgreater(0.0,0.0);],, [ac_c99_math=no])
875 AC_TRY_COMPILE([#include <math.h>],
876 [isunordered(0.0,0.0);],, [ac_c99_math=no])
877 AC_MSG_RESULT($ac_c99_math)
879 # Check for the existence in <stdio.h> of vscanf, et. al.
881 AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
882 AC_TRY_COMPILE([#include <stdio.h>],
883 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
884 AC_TRY_COMPILE([#include <stdio.h>
886 void foo(char* fmt, ...)
887 {va_list args; va_start(args, fmt);
888 vfscanf(stderr, "%i", args);}],
889 [],, [ac_c99_stdio=no])
890 AC_TRY_COMPILE([#include <stdio.h>
892 void foo(char* fmt, ...)
893 {va_list args; va_start(args, fmt);
894 vscanf("%i", args);}],
895 [],, [ac_c99_stdio=no])
896 AC_TRY_COMPILE([#include <stdio.h>
898 void foo(char* fmt, ...)
899 {va_list args; va_start(args, fmt);
900 vsnprintf(fmt, 0, "%i", args);}],
901 [],, [ac_c99_stdio=no])
902 AC_TRY_COMPILE([#include <stdio.h>
904 void foo(char* fmt, ...)
905 {va_list args; va_start(args, fmt);
906 vsscanf(fmt, "%i", args);}],
907 [],, [ac_c99_stdio=no])
908 AC_MSG_RESULT($ac_c99_stdio)
910 # Check for the existence in <stdlib.h> of lldiv_t, et. al.
912 AC_MSG_CHECKING([for lldiv_t declaration])
913 AC_CACHE_VAL(ac_c99_lldiv_t, [
914 AC_TRY_COMPILE([#include <stdlib.h>],
916 [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
918 AC_MSG_RESULT($ac_c99_lldiv_t)
920 AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
921 AC_TRY_COMPILE([#include <stdlib.h>],
922 [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
923 AC_TRY_COMPILE([#include <stdlib.h>],
924 [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
925 AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
926 AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
927 AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
928 AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
929 if test x"$ac_c99_lldiv_t" = x"no"; then
932 AC_MSG_RESULT($ac_c99_stdlib)
934 # Check for the existence of <wchar.h> functions used if C99 is enabled.
935 # XXX the wchar.h checks should be rolled into the general C99 bits.
937 AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
938 AC_TRY_COMPILE([#include <wchar.h>],
939 [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
940 AC_TRY_COMPILE([#include <wchar.h>],
941 [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
942 AC_TRY_COMPILE([#include <wchar.h>],
943 [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
944 AC_MSG_RESULT($ac_c99_wchar)
946 AC_MSG_CHECKING([for enabled ISO C99 support])
947 if test x"$ac_c99_math" = x"no" ||
948 test x"$ac_c99_stdio" = x"no" ||
949 test x"$ac_c99_stdlib" = x"no" ||
950 test x"$ac_c99_wchar" = x"no"; then
953 AC_MSG_RESULT($enable_c99)
955 # Option parsed, now set things appropriately
956 if test x"$enable_c99" = x"yes"; then
957 AC_DEFINE(_GLIBCXX_USE_C99)
965 dnl Check for what type of C headers to use.
967 dnl --enable-cheaders= [does stuff].
968 dnl --disable-cheaders [does not do anything, really].
969 dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
970 dnl Where DEFAULT is either `c' or `c_std'.
972 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
973 GLIBCXX_ENABLE(cheaders,$1,[=KIND],
974 [construct "C" headers for g++], [permit c|c_std])
975 AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
977 C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
979 AC_SUBST(C_INCLUDE_DIR)
980 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
981 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
982 GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
987 dnl Check for which locale library to use. The choice is mapped to
988 dnl a subdirectory of config/locale.
990 dnl Default is generic.
992 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
993 AC_MSG_CHECKING([for C locale to use])
994 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
995 [use MODEL for target locale package],
996 [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
998 # If they didn't use this option switch, or if they specified --enable
999 # with no specific model, we'll have to look for one. If they
1000 # specified --disable (???), do likewise.
1001 if test $enable_clocale = no || test $enable_clocale = yes; then
1005 # Either a known package, or "auto"
1006 enable_clocale_flag=$enable_clocale
1008 # Probe for locale support if no specific model is specified.
1009 # Default to "generic".
1010 if test $enable_clocale_flag = auto; then
1011 case x${target_os} in
1012 xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
1013 AC_EGREP_CPP([_GLIBCXX_ok], [
1014 #include <features.h>
1015 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
1018 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
1020 # Test for bugs early in glibc-2.2.x series
1021 if test x$enable_clocale_flag = xgnu; then
1023 #define _GNU_SOURCE 1
1026 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
1027 extern __typeof(newlocale) __newlocale;
1028 extern __typeof(duplocale) __duplocale;
1029 extern __typeof(strcoll_l) __strcoll_l;
1033 const char __one[] = "Äuglein Augmen";
1034 const char __two[] = "Äuglein";
1039 loc = __newlocale(1 << LC_ALL, "de_DE", 0);
1040 loc_dup = __duplocale(loc);
1041 i = __strcoll_l(__one, __two, loc);
1042 j = __strcoll_l(__one, __two, loc_dup);
1046 [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
1047 [enable_clocale_flag=generic])
1050 # ... at some point put __strxfrm_l tests in as well.
1053 enable_clocale_flag=generic
1058 # Deal with gettext issues. Default to not using it (=no) until we detect
1059 # support for it later. Let the user turn it off via --e/d, but let that
1060 # default to on for easier handling.
1063 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
1067 # Set configure bits for specified locale package
1068 case ${enable_clocale_flag} in
1070 AC_MSG_RESULT(generic)
1072 CLOCALE_H=config/locale/generic/c_locale.h
1073 CLOCALE_CC=config/locale/generic/c_locale.cc
1074 CCODECVT_H=config/locale/generic/codecvt_specializations.h
1075 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1076 CCOLLATE_CC=config/locale/generic/collate_members.cc
1077 CCTYPE_CC=config/locale/generic/ctype_members.cc
1078 CMESSAGES_H=config/locale/generic/messages_members.h
1079 CMESSAGES_CC=config/locale/generic/messages_members.cc
1080 CMONEY_CC=config/locale/generic/monetary_members.cc
1081 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1082 CTIME_H=config/locale/generic/time_members.h
1083 CTIME_CC=config/locale/generic/time_members.cc
1084 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1089 # Declare intention to use gettext, and add support for specific
1091 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1094 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1095 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1096 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1099 # Export the build objects.
1100 for ling in $ALL_LINGUAS; do \
1101 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1102 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1104 AC_SUBST(glibcxx_MOFILES)
1105 AC_SUBST(glibcxx_POFILES)
1107 CLOCALE_H=config/locale/gnu/c_locale.h
1108 CLOCALE_CC=config/locale/gnu/c_locale.cc
1109 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1110 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1111 CCOLLATE_CC=config/locale/gnu/collate_members.cc
1112 CCTYPE_CC=config/locale/gnu/ctype_members.cc
1113 CMESSAGES_H=config/locale/gnu/messages_members.h
1114 CMESSAGES_CC=config/locale/gnu/messages_members.cc
1115 CMONEY_CC=config/locale/gnu/monetary_members.cc
1116 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1117 CTIME_H=config/locale/gnu/time_members.h
1118 CTIME_CC=config/locale/gnu/time_members.cc
1119 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1122 AC_MSG_RESULT(IEEE 1003.1)
1124 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1125 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1126 CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1127 CCODECVT_CC=config/locale/generic/codecvt_members.cc
1128 CCOLLATE_CC=config/locale/generic/collate_members.cc
1129 CCTYPE_CC=config/locale/generic/ctype_members.cc
1130 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1131 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1132 CMONEY_CC=config/locale/generic/monetary_members.cc
1133 CNUMERIC_CC=config/locale/generic/numeric_members.cc
1134 CTIME_H=config/locale/generic/time_members.h
1135 CTIME_CC=config/locale/generic/time_members.cc
1136 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1140 # This is where the testsuite looks for locale catalogs, using the
1141 # -DLOCALEDIR define during testsuite compilation.
1142 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1143 AC_SUBST(glibcxx_localedir)
1145 # A standalone libintl (e.g., GNU libintl) may be in use.
1146 if test $USE_NLS = yes; then
1147 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1148 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1150 if test $USE_NLS = yes; then
1151 AC_DEFINE(_GLIBCXX_USE_NLS)
1156 AC_SUBST(CCODECVT_H)
1157 AC_SUBST(CMESSAGES_H)
1158 AC_SUBST(CCODECVT_CC)
1159 AC_SUBST(CCOLLATE_CC)
1161 AC_SUBST(CMESSAGES_CC)
1163 AC_SUBST(CNUMERIC_CC)
1166 AC_SUBST(CLOCALE_CC)
1167 AC_SUBST(CLOCALE_INTERNAL_H)
1172 dnl Check for whether the Boost-derived checks should be turned on.
1174 dnl --enable-concept-checks turns them on.
1175 dnl --disable-concept-checks leaves them off.
1176 dnl + Usage: GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1177 dnl Where DEFAULT is either `yes' or `no'.
1179 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1180 GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1181 if test $enable_concept_checks = yes; then
1182 AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1188 dnl Check for which I/O library to use: stdio, or something specific.
1190 dnl Default is stdio.
1192 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1193 AC_MSG_CHECKING([for underlying I/O to use])
1194 GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1195 [use target-specific I/O package], [permit stdio])
1197 # Now that libio has been removed, you can have any color you want as long
1198 # as it's black. This is one big no-op until other packages are added, but
1199 # showing the framework never hurts.
1200 case ${enable_cstdio} in
1202 CSTDIO_H=config/io/c_io_stdio.h
1203 BASIC_FILE_H=config/io/basic_file_stdio.h
1204 BASIC_FILE_CC=config/io/basic_file_stdio.cc
1205 AC_MSG_RESULT(stdio)
1210 AC_SUBST(BASIC_FILE_H)
1211 AC_SUBST(BASIC_FILE_CC)
1216 dnl Check for "unusual" flags to pass to the compiler while building.
1218 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1219 dnl experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1220 dnl --disable-cxx-flags passes nothing.
1221 dnl + See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1222 dnl http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1223 dnl http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1224 dnl + Usage: GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1225 dnl If "default flags" is an empty string, the effect is the same
1226 dnl as --disable or --enable=no.
1228 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1229 AC_MSG_CHECKING([for extra compiler flags for building])
1230 GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1231 [pass compiler FLAGS when building library],
1232 [case "x$enable_cxx_flags" in
1233 xno | x) enable_cxx_flags= ;;
1235 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1238 # Run through flags (either default or command-line) and set anything
1239 # extra (e.g., #defines) that must accompany particular g++ options.
1240 if test -n "$enable_cxx_flags"; then
1241 for f in $enable_cxx_flags; do
1245 *) # and we're trying to pass /what/ exactly?
1246 AC_MSG_ERROR([compiler flags start with a -]) ;;
1251 EXTRA_CXX_FLAGS="$enable_cxx_flags"
1252 AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1253 AC_SUBST(EXTRA_CXX_FLAGS)
1258 dnl Check for wide character support. Has the same effect as the option
1259 dnl in gcc's configure, but in a form that autoconf can mess with.
1261 dnl --enable-c-mbchar requests all the wchar_t stuff.
1262 dnl --disable-c-mbchar doesn't.
1263 dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1264 dnl Where DEFAULT is either `yes' or `no'.
1266 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1267 GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1268 # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1273 dnl Check to see if debugging libraries are to be built.
1275 dnl --enable-libstdcxx-debug
1276 dnl builds a separate set of debugging libraries in addition to the
1277 dnl normal (shared, static) libstdc++ binaries.
1279 dnl --disable-libstdcxx-debug
1280 dnl builds only one (non-debug) version of libstdc++.
1282 dnl --enable-libstdcxx-debug-flags=FLAGS
1283 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1285 dnl + Usage: GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1286 dnl Where DEFAULT is either `yes' or `no'.
1288 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1289 AC_MSG_CHECKING([for additional debug build])
1290 GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1291 AC_MSG_RESULT($enable_libstdcxx_debug)
1292 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1297 dnl Check for explicit debug flags.
1299 dnl --enable-libstdcxx-debug-flags='-O1'
1300 dnl is a general method for passing flags to be used when
1301 dnl building debug libraries with --enable-debug.
1303 dnl --disable-libstdcxx-debug-flags does nothing.
1304 dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1305 dnl If "default flags" is an empty string, the effect is the same
1306 dnl as --disable or --enable=no.
1308 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1309 GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1310 [pass compiler FLAGS when building debug library],
1311 [case "x$enable_libstdcxx_debug_flags" in
1312 xno | x) enable_libstdcxx_debug_flags= ;;
1314 *) AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1317 # Option parsed, now set things appropriately
1318 DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1319 AC_SUBST(DEBUG_FLAGS)
1321 AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1326 dnl Check if the user only wants a freestanding library implementation.
1328 dnl --disable-hosted-libstdcxx will turn off most of the library build,
1329 dnl installing only the headers required by [17.4.1.3] and the language
1330 dnl support library. More than that will be built (to keep the Makefiles
1331 dnl conveniently clean), but not installed.
1334 dnl is_hosted (yes/no)
1337 dnl _GLIBCXX_HOSTED (always defined, either to 1 or 0)
1339 AC_DEFUN(GLIBCXX_ENABLE_HOSTED, [
1340 AC_ARG_ENABLE([hosted-libstdcxx],
1341 AC_HELP_STRING([--disable-hosted-libstdcxx],
1342 [only build freestanding C++ runtime support]),,
1343 [enable_hosted_libstdcxx=yes])
1344 if test "$enable_hosted_libstdcxx" = no; then
1345 AC_MSG_NOTICE([Only freestanding libraries will be built])
1349 enable_libstdcxx_pch=no
1354 GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
1355 AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
1356 [Define to 1 if a full hosted library is built, or 0 if freestanding.])
1361 dnl Check for libunwind exception handling support. If enabled, then
1362 dnl we assume that the _Unwind_* functions that make up the Unwind ABI
1363 dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
1364 dnl libunwind instead of libgcc, and that libstdc++ has a dependency
1365 dnl on libunwind as well as libgcc.
1367 dnl --enable-libunwind-exceptions forces the use of libunwind.
1368 dnl --disable-libunwind-exceptions assumes there is no libunwind.
1373 AC_DEFUN(GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS, [
1374 AC_MSG_CHECKING([for use of libunwind])
1375 GLIBCXX_ENABLE(libunwind-exceptions,no,,
1376 [force use of libunwind for exceptions])
1377 AC_MSG_RESULT($use_libunwind_exceptions)
1378 if test $enable_libunwind_exceptions = yes; then
1379 LIBUNWIND_FLAG="-lunwind"
1383 AC_SUBST(LIBUNWIND_FLAG)
1388 dnl Check for template specializations for the 'long long' type extension.
1389 dnl The result determines only whether 'long long' I/O is enabled; things
1390 dnl like numeric_limits<> specializations are always available.
1392 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1393 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1394 dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1395 dnl Where DEFAULT is either `yes' or `no'.
1396 dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1398 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1399 GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1404 AC_MSG_CHECKING([for enabled long long I/O support])
1405 # iostreams require strtoll, strtoull to compile
1406 AC_TRY_COMPILE([#include <stdlib.h>],
1407 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1408 AC_TRY_COMPILE([#include <stdlib.h>],
1409 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1411 # Option parsed, now set things appropriately
1412 if test $enable_long_long = yes; then
1413 AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1415 AC_MSG_RESULT($enable_long_long)
1422 dnl Check to see if building and using a C++ precompiled header can be done.
1424 dnl --enable-libstdcxx-pch=yes
1425 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1426 dnl may work, after some light-hearted attempts to puzzle out compiler
1427 dnl support, flip bits on in include/Makefile.am
1429 dnl --disable-libstdcxx-pch
1430 dnl turns off attempts to use or build stdc++.h.gch.
1433 dnl glibcxx_PCHFLAGS
1435 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1436 AC_MSG_CHECKING([for enabled PCH])
1437 GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1438 AC_MSG_RESULT([$enable_libstdcxx_pch])
1440 if test $enable_libstdcxx_pch = yes; then
1441 AC_CACHE_CHECK([for compiler with PCH support],
1442 [glibcxx_cv_prog_CXX_pch],
1443 [ac_save_CXXFLAGS="$CXXFLAGS"
1444 CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1447 echo '#include <math.h>' > conftest.h
1448 if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1449 -o conftest.h.gch 1>&5 2>&1 &&
1450 echo '#error "pch failed"' > conftest.h &&
1451 echo '#include "conftest.h"' > conftest.cc &&
1452 $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1454 glibcxx_cv_prog_CXX_pch=yes
1456 glibcxx_cv_prog_CXX_pch=no
1459 CXXFLAGS=$ac_save_CXXFLAGS
1462 enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1465 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1466 if test $enable_libstdcxx_pch = yes; then
1467 glibcxx_PCHFLAGS="-include bits/stdc++.h"
1471 AC_SUBST(glibcxx_PCHFLAGS)
1476 dnl Check for exception handling support. If an explicit enable/disable
1477 dnl sjlj exceptions is given, we don't have to detect. Otherwise the
1478 dnl target may or may not support call frame exceptions.
1480 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1481 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1482 dnl Neither one forces an attempt at detection.
1485 dnl _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1487 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1488 AC_MSG_CHECKING([for exception model to use])
1491 GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1492 [force use of builtin_setjmp for exceptions],
1493 [permit yes|no|auto])
1495 if test $enable_sjlj_exceptions = auto; then
1496 # Botheration. Now we've got to detect the exception model. Link tests
1497 # against libgcc.a are problematic since we've not been given proper -L
1498 # bits for single-tree newlib and libgloss.
1500 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
1501 cat > conftest.$ac_ext << EOF
1502 [#]line __oline__ "configure"
1511 old_CXXFLAGS="$CXXFLAGS"
1513 if AC_TRY_EVAL(ac_compile); then
1514 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1515 enable_sjlj_exceptions=yes
1516 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1517 enable_sjlj_exceptions=no
1520 CXXFLAGS="$old_CXXFLAGS"
1524 # This is a tad weird, for hysterical raisins. We have to map enable/disable
1525 # to two different models.
1526 case $enable_sjlj_exceptions in
1528 AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1529 [Define if the compiler is configured for setjmp/longjmp exceptions.])
1530 ac_exception_model_name=sjlj
1533 ac_exception_model_name="call frame"
1536 AC_MSG_ERROR([unable to detect exception model])
1540 AC_MSG_RESULT($ac_exception_model_name)
1545 dnl Add version tags to symbols in shared library (or not), additionally
1546 dnl marking other symbols as private/local (or not).
1548 dnl --enable-symvers=style adds a version script to the linker call when
1549 dnl creating the shared library. The choice of version script is
1550 dnl controlled by 'style'.
1551 dnl --disable-symvers does not.
1552 dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1553 dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
1554 dnl choose a default style based on linker characteristics. Passing
1555 dnl 'no' disables versioning.
1557 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1559 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1560 [enables symbol versioning of the shared library],
1561 [permit yes|no|gnu])
1563 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1564 # don't know enough about $LD to do tricks...
1565 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1566 # FIXME The following test is too strict, in theory.
1567 if test $enable_shared = no ||
1569 test x$glibcxx_gnu_ld_version = x; then
1573 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1574 if test $enable_symvers != no; then
1575 AC_MSG_CHECKING([for shared libgcc])
1576 ac_save_CFLAGS="$CFLAGS"
1578 AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1579 CFLAGS="$ac_save_CFLAGS"
1580 AC_MSG_RESULT($glibcxx_shared_libgcc)
1583 # For GNU ld, we need at least this version. The format is described in
1584 # GLIBCXX_CHECK_LINKER_FEATURES above.
1585 glibcxx_min_gnu_ld_version=21400
1586 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1588 # Check to see if unspecified "yes" value can win, given results above.
1589 # Change "yes" into either "no" or a style name.
1590 if test $enable_symvers = yes; then
1591 if test $with_gnu_ld = yes &&
1592 test $glibcxx_shared_libgcc = yes;
1594 if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1597 # The right tools, the right setup, but too old. Fallbacks?
1598 AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1599 AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1600 AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1601 AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1602 if test $glibcxx_gnu_ld_version -ge 21200 ; then
1603 # Globbing fix is present, proper block support is not.
1604 dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
1605 dnl enable_symvers=???
1606 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1610 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1616 AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1617 AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1618 AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1619 AC_MSG_WARN([=== Symbol versioning will be disabled.])
1624 # Everything parsed; figure out what file to use.
1625 case $enable_symvers in
1627 SYMVER_MAP=config/linker-map.dummy
1630 SYMVER_MAP=config/linker-map.gnu
1631 AC_DEFINE(_GLIBCXX_SYMVER)
1635 AC_SUBST(SYMVER_MAP)
1636 AC_SUBST(port_specific_symbol_files)
1637 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1638 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1643 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1644 dnl We must stage the required headers so that they will be installed
1645 dnl with the library (unlike libgcc, the STL implementation is provided
1646 dnl solely within headers). Since we must not inject random user-space
1647 dnl macro names into user-provided C++ code, we first stage into <file>-in
1648 dnl and process to <file> with an output command. The reason for a two-
1649 dnl stage process here is to correctly handle $srcdir!=$objdir without
1650 dnl having to write complex code (the sed commands to clean the macro
1651 dnl namespace are complex and fragile enough as it is). We must also
1652 dnl add a relative path so that -I- is supported properly.
1655 dnl glibcxx_thread_h
1658 dnl HAVE_GTHR_DEFAULT
1659 dnl _GLIBCXX_SUPPORTS_WEAK
1661 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1662 AC_MSG_CHECKING([for thread model used by GCC])
1663 target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1664 AC_MSG_RESULT([$target_thread_file])
1666 if test $target_thread_file != single; then
1667 AC_DEFINE(HAVE_GTHR_DEFAULT)
1668 AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1671 glibcxx_thread_h=gthr-$target_thread_file.h
1672 AC_SUBST(glibcxx_thread_h)
1676 # Check whether LC_MESSAGES is available in <locale.h>.
1677 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1679 # This file file be copied and used freely without restrictions. It can
1680 # be used in projects which are not available under the GNU Public License
1681 # but which still want to provide support for the GNU gettext functionality.
1682 # Please note that the actual code is *not* freely available.
1685 AC_DEFUN(AC_LC_MESSAGES, [
1686 AC_CHECK_HEADER(locale.h, [
1687 AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1688 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1689 ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1690 if test $ac_cv_val_LC_MESSAGES = yes; then
1691 AC_DEFINE(HAVE_LC_MESSAGES)
1697 sinclude([../libtool.m4])
1698 dnl The lines below arrange for aclocal not to bring an installed
1699 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1700 dnl add a definition of LIBTOOL to Makefile.in.
1701 ifelse(,,,[AC_SUBST(LIBTOOL)
1702 AC_DEFUN([AM_PROG_LIBTOOL])
1703 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1704 AC_DEFUN([AC_PROG_LD])
1707 dnl vim:et:ts=2:sw=2
1709 # AM_CONDITIONAL -*- Autoconf -*-
1711 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1713 # This program is free software; you can redistribute it and/or modify
1714 # it under the terms of the GNU General Public License as published by
1715 # the Free Software Foundation; either version 2, or (at your option)
1716 # any later version.
1718 # This program is distributed in the hope that it will be useful,
1719 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1720 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1721 # GNU General Public License for more details.
1723 # You should have received a copy of the GNU General Public License
1724 # along with this program; if not, write to the Free Software
1725 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1732 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1733 # -------------------------------------
1734 # Define a conditional.
1735 AC_DEFUN([AM_CONDITIONAL],
1736 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1737 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1739 AC_SUBST([$1_FALSE])
1747 AC_CONFIG_COMMANDS_PRE(
1748 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1749 AC_MSG_ERROR([conditional "$1" was never defined.
1750 Usually this means the macro was only invoked conditionally.])
1753 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1755 # This program is free software; you can redistribute it and/or modify
1756 # it under the terms of the GNU General Public License as published by
1757 # the Free Software Foundation; either version 2, or (at your option)
1758 # any later version.
1760 # This program is distributed in the hope that it will be useful,
1761 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1762 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1763 # GNU General Public License for more details.
1765 # You should have received a copy of the GNU General Public License
1766 # along with this program; if not, write to the Free Software
1767 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1772 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1773 # ---------------------------------------------------
1774 # Add --enable-multilib to configure.
1775 AC_DEFUN([AM_ENABLE_MULTILIB],
1776 [# Default to --enable-multilib
1777 AC_ARG_ENABLE(multilib,
1778 [ --enable-multilib build many library versions (default)],
1779 [case "$enableval" in
1780 yes) multilib=yes ;;
1782 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1786 # We may get other options which we leave undocumented:
1787 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1788 # See config-ml.in if you want the gory details.
1790 if test "$srcdir" = "."; then
1791 if test "$with_target_subdir" != "."; then
1792 multi_basedir="$srcdir/$with_multisrctop../$2"
1794 multi_basedir="$srcdir/$with_multisrctop$2"
1797 multi_basedir="$srcdir/$2"
1799 AC_SUBST(multi_basedir)
1801 AC_OUTPUT_COMMANDS([
1802 # Only add multilib support code if we just rebuilt the top-level
1804 case " $CONFIG_FILES " in
1805 *" ]m4_default([$1],Makefile)[ "*)
1806 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1813 with_multisubdir="$with_multisubdir"
1814 with_multisrctop="$with_multisrctop"
1815 with_target_subdir="$with_target_subdir"
1816 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1817 multi_basedir="$multi_basedir"
1818 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1821 # Add --enable-maintainer-mode option to configure.
1824 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
1826 # This program is free software; you can redistribute it and/or modify
1827 # it under the terms of the GNU General Public License as published by
1828 # the Free Software Foundation; either version 2, or (at your option)
1829 # any later version.
1831 # This program is distributed in the hope that it will be useful,
1832 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1833 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1834 # GNU General Public License for more details.
1836 # You should have received a copy of the GNU General Public License
1837 # along with this program; if not, write to the Free Software
1838 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1843 AC_DEFUN([AM_MAINTAINER_MODE],
1844 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1845 dnl maintainer-mode is disabled by default
1846 AC_ARG_ENABLE(maintainer-mode,
1847 [ --enable-maintainer-mode enable make rules and dependencies not useful
1848 (and sometimes confusing) to the casual installer],
1849 USE_MAINTAINER_MODE=$enableval,
1850 USE_MAINTAINER_MODE=no)
1851 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1852 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1853 MAINT=$MAINTAINER_MODE_TRUE
1858 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1860 # Do all the work for Automake. -*- Autoconf -*-
1862 # This macro actually does too much some checks are only needed if
1863 # your package does certain things. But this isn't really a big deal.
1865 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1866 # Free Software Foundation, Inc.
1868 # This program is free software; you can redistribute it and/or modify
1869 # it under the terms of the GNU General Public License as published by
1870 # the Free Software Foundation; either version 2, or (at your option)
1871 # any later version.
1873 # This program is distributed in the hope that it will be useful,
1874 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1875 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1876 # GNU General Public License for more details.
1878 # You should have received a copy of the GNU General Public License
1879 # along with this program; if not, write to the Free Software
1880 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1887 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1888 # the ones we care about.
1889 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1891 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1892 # AM_INIT_AUTOMAKE([OPTIONS])
1893 # -----------------------------------------------
1894 # The call with PACKAGE and VERSION arguments is the old style
1895 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1896 # and VERSION should now be passed to AC_INIT and removed from
1897 # the call to AM_INIT_AUTOMAKE.
1898 # We support both call styles for the transition. After
1899 # the next Automake release, Autoconf can make the AC_INIT
1900 # arguments mandatory, and then we can depend on a new Autoconf
1901 # release and drop the old call support.
1902 AC_DEFUN([AM_INIT_AUTOMAKE],
1903 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1904 AC_REQUIRE([AC_PROG_INSTALL])dnl
1905 # test to see if srcdir already configured
1906 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1907 test -f $srcdir/config.status; then
1908 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1911 # test whether we have cygpath
1912 if test -z "$CYGPATH_W"; then
1913 if (cygpath --version) >/dev/null 2>/dev/null; then
1914 CYGPATH_W='cygpath -w'
1919 AC_SUBST([CYGPATH_W])
1921 # Define the identity of the package.
1922 dnl Distinguish between old-style and new-style calls.
1924 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1925 AC_SUBST([PACKAGE], [$1])dnl
1926 AC_SUBST([VERSION], [$2])],
1927 [_AM_SET_OPTIONS([$1])dnl
1928 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1929 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1931 _AM_IF_OPTION([no-define],,
1932 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1933 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1935 # Some tools Automake needs.
1936 AC_REQUIRE([AM_SANITY_CHECK])dnl
1937 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1938 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1939 AM_MISSING_PROG(AUTOCONF, autoconf)
1940 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1941 AM_MISSING_PROG(AUTOHEADER, autoheader)
1942 AM_MISSING_PROG(MAKEINFO, makeinfo)
1943 AM_MISSING_PROG(AMTAR, tar)
1945 AM_PROG_INSTALL_STRIP
1946 # We need awk for the "check" target. The system "awk" is bad on
1948 AC_REQUIRE([AC_PROG_AWK])dnl
1949 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1950 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1952 _AM_IF_OPTION([no-dependencies],,
1953 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1954 [_AM_DEPENDENCIES(CC)],
1955 [define([AC_PROG_CC],
1956 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1957 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1958 [_AM_DEPENDENCIES(CXX)],
1959 [define([AC_PROG_CXX],
1960 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1965 # When config.status generates a header, we must update the stamp-h file.
1966 # This file resides in the same directory as the config header
1967 # that is generated. The stamp files are numbered to have different names.
1969 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1970 # loop where config.status creates the headers, so we can generate
1971 # our stamp files there.
1972 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1973 [# Compute $1's index in $config_headers.
1975 for _am_header in $config_headers :; do
1980 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1983 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1985 # Copyright 2002 Free Software Foundation, Inc.
1987 # This program is free software; you can redistribute it and/or modify
1988 # it under the terms of the GNU General Public License as published by
1989 # the Free Software Foundation; either version 2, or (at your option)
1990 # any later version.
1992 # This program is distributed in the hope that it will be useful,
1993 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1994 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1995 # GNU General Public License for more details.
1997 # You should have received a copy of the GNU General Public License
1998 # along with this program; if not, write to the Free Software
1999 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2001 # AM_AUTOMAKE_VERSION(VERSION)
2002 # ----------------------------
2003 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2004 # generated from the m4 files accompanying Automake X.Y.
2005 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
2007 # AM_SET_CURRENT_AUTOMAKE_VERSION
2008 # -------------------------------
2009 # Call AM_AUTOMAKE_VERSION so it can be traced.
2010 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
2011 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2012 [AM_AUTOMAKE_VERSION([1.7.8])])
2014 # Helper functions for option handling. -*- Autoconf -*-
2016 # Copyright 2001, 2002 Free Software Foundation, Inc.
2018 # This program is free software; you can redistribute it and/or modify
2019 # it under the terms of the GNU General Public License as published by
2020 # the Free Software Foundation; either version 2, or (at your option)
2021 # any later version.
2023 # This program is distributed in the hope that it will be useful,
2024 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2025 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2026 # GNU General Public License for more details.
2028 # You should have received a copy of the GNU General Public License
2029 # along with this program; if not, write to the Free Software
2030 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2035 # _AM_MANGLE_OPTION(NAME)
2036 # -----------------------
2037 AC_DEFUN([_AM_MANGLE_OPTION],
2038 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2040 # _AM_SET_OPTION(NAME)
2041 # ------------------------------
2042 # Set option NAME. Presently that only means defining a flag for this option.
2043 AC_DEFUN([_AM_SET_OPTION],
2044 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2046 # _AM_SET_OPTIONS(OPTIONS)
2047 # ----------------------------------
2048 # OPTIONS is a space-separated list of Automake options.
2049 AC_DEFUN([_AM_SET_OPTIONS],
2050 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2052 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2053 # -------------------------------------------
2054 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2055 AC_DEFUN([_AM_IF_OPTION],
2056 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2059 # Check to make sure that the build environment is sane.
2062 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2064 # This program is free software; you can redistribute it and/or modify
2065 # it under the terms of the GNU General Public License as published by
2066 # the Free Software Foundation; either version 2, or (at your option)
2067 # any later version.
2069 # This program is distributed in the hope that it will be useful,
2070 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2071 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2072 # GNU General Public License for more details.
2074 # You should have received a copy of the GNU General Public License
2075 # along with this program; if not, write to the Free Software
2076 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2083 AC_DEFUN([AM_SANITY_CHECK],
2084 [AC_MSG_CHECKING([whether build environment is sane])
2087 echo timestamp > conftest.file
2088 # Do `set' in a subshell so we don't clobber the current shell's
2089 # arguments. Must try -L first in case configure is actually a
2090 # symlink; some systems play weird games with the mod time of symlinks
2091 # (eg FreeBSD returns the mod time of the symlink's containing
2094 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2095 if test "$[*]" = "X"; then
2097 set X `ls -t $srcdir/configure conftest.file`
2100 if test "$[*]" != "X $srcdir/configure conftest.file" \
2101 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2103 # If neither matched, then we have a broken ls. This can happen
2104 # if, for instance, CONFIG_SHELL is bash and it inherits a
2105 # broken ls alias from the environment. This has actually
2106 # happened. Such a system could not be considered "sane".
2107 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2108 alias in your environment])
2111 test "$[2]" = conftest.file
2117 AC_MSG_ERROR([newly created file is older than distributed files!
2118 Check your system clock])
2120 AC_MSG_RESULT(yes)])
2125 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2127 # This program is free software; you can redistribute it and/or modify
2128 # it under the terms of the GNU General Public License as published by
2129 # the Free Software Foundation; either version 2, or (at your option)
2130 # any later version.
2132 # This program is distributed in the hope that it will be useful,
2133 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2134 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2135 # GNU General Public License for more details.
2137 # You should have received a copy of the GNU General Public License
2138 # along with this program; if not, write to the Free Software
2139 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2144 # AM_MISSING_PROG(NAME, PROGRAM)
2145 # ------------------------------
2146 AC_DEFUN([AM_MISSING_PROG],
2147 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2148 $1=${$1-"${am_missing_run}$2"}
2152 # AM_MISSING_HAS_RUN
2153 # ------------------
2154 # Define MISSING if not defined so far and test if it supports --run.
2155 # If it does, set am_missing_run to use it, otherwise, to nothing.
2156 AC_DEFUN([AM_MISSING_HAS_RUN],
2157 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2158 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2159 # Use eval to expand $SHELL
2160 if eval "$MISSING --run true"; then
2161 am_missing_run="$MISSING --run "
2164 AC_MSG_WARN([`missing' script is too old or missing])
2170 # Copyright 2001 Free Software Foundation, Inc.
2172 # This program is free software; you can redistribute it and/or modify
2173 # it under the terms of the GNU General Public License as published by
2174 # the Free Software Foundation; either version 2, or (at your option)
2175 # any later version.
2177 # This program is distributed in the hope that it will be useful,
2178 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2180 # GNU General Public License for more details.
2182 # You should have received a copy of the GNU General Public License
2183 # along with this program; if not, write to the Free Software
2184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2187 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2188 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2189 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2191 # Of course, Automake must honor this variable whenever it calls a
2192 # tool from the auxiliary directory. The problem is that $srcdir (and
2193 # therefore $ac_aux_dir as well) can be either absolute or relative,
2194 # depending on how configure is run. This is pretty annoying, since
2195 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2196 # source directory, any form will work fine, but in subdirectories a
2197 # relative path needs to be adjusted first.
2199 # $ac_aux_dir/missing
2200 # fails when called from a subdirectory if $ac_aux_dir is relative
2201 # $top_srcdir/$ac_aux_dir/missing
2202 # fails if $ac_aux_dir is absolute,
2203 # fails when called from a subdirectory in a VPATH build with
2204 # a relative $ac_aux_dir
2206 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2207 # are both prefixed by $srcdir. In an in-source build this is usually
2208 # harmless because $srcdir is `.', but things will broke when you
2209 # start a VPATH build or use an absolute $srcdir.
2211 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2212 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2213 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2214 # and then we would define $MISSING as
2215 # MISSING="\${SHELL} $am_aux_dir/missing"
2216 # This will work as long as MISSING is not called from configure, because
2217 # unfortunately $(top_srcdir) has no meaning in configure.
2218 # However there are other variables, like CC, which are often used in
2219 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2221 # Another solution, used here, is to always expand $ac_aux_dir to an
2222 # absolute PATH. The drawback is that using absolute paths prevent a
2223 # configured tree to be moved without reconfiguration.
2225 # Rely on autoconf to set up CDPATH properly.
2228 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2229 # expand $ac_aux_dir to an absolute path
2230 am_aux_dir=`cd $ac_aux_dir && pwd`
2233 # AM_PROG_INSTALL_SH
2234 # ------------------
2235 # Define $install_sh.
2237 # Copyright 2001 Free Software Foundation, Inc.
2239 # This program is free software; you can redistribute it and/or modify
2240 # it under the terms of the GNU General Public License as published by
2241 # the Free Software Foundation; either version 2, or (at your option)
2242 # any later version.
2244 # This program is distributed in the hope that it will be useful,
2245 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2246 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2247 # GNU General Public License for more details.
2249 # You should have received a copy of the GNU General Public License
2250 # along with this program; if not, write to the Free Software
2251 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2254 AC_DEFUN([AM_PROG_INSTALL_SH],
2255 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2256 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2257 AC_SUBST(install_sh)])
2259 # AM_PROG_INSTALL_STRIP
2261 # Copyright 2001 Free Software Foundation, Inc.
2263 # This program is free software; you can redistribute it and/or modify
2264 # it under the terms of the GNU General Public License as published by
2265 # the Free Software Foundation; either version 2, or (at your option)
2266 # any later version.
2268 # This program is distributed in the hope that it will be useful,
2269 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2270 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2271 # GNU General Public License for more details.
2273 # You should have received a copy of the GNU General Public License
2274 # along with this program; if not, write to the Free Software
2275 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2278 # One issue with vendor `install' (even GNU) is that you can't
2279 # specify the program used to strip binaries. This is especially
2280 # annoying in cross-compiling environments, where the build's strip
2281 # is unlikely to handle the host's binaries.
2282 # Fortunately install-sh will honor a STRIPPROG variable, so we
2283 # always use install-sh in `make install-strip', and initialize
2284 # STRIPPROG with the value of the STRIP variable (set by the user).
2285 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2286 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2287 # Installed binaries are usually stripped using `strip' when the user
2288 # run `make install-strip'. However `strip' might not be the right
2289 # tool to use in cross-compilation environments, therefore Automake
2290 # will honor the `STRIP' environment variable to overrule this program.
2291 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2292 if test "$cross_compiling" != no; then
2293 AC_CHECK_TOOL([STRIP], [strip], :)
2295 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2296 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2299 # Copyright (C) 2003 Free Software Foundation, Inc.
2301 # This program is free software; you can redistribute it and/or modify
2302 # it under the terms of the GNU General Public License as published by
2303 # the Free Software Foundation; either version 2, or (at your option)
2304 # any later version.
2306 # This program is distributed in the hope that it will be useful,
2307 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2308 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2309 # GNU General Public License for more details.
2311 # You should have received a copy of the GNU General Public License
2312 # along with this program; if not, write to the Free Software
2313 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2318 # Check whether the underlying file-system supports filenames
2319 # with a leading dot. For instance MS-DOS doesn't.
2320 AC_DEFUN([AM_SET_LEADING_DOT],
2321 [rm -rf .tst 2>/dev/null
2322 mkdir .tst 2>/dev/null
2323 if test -d .tst; then
2328 rmdir .tst 2>/dev/null
2329 AC_SUBST([am__leading_dot])])
2331 # serial 5 -*- Autoconf -*-
2333 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2335 # This program is free software; you can redistribute it and/or modify
2336 # it under the terms of the GNU General Public License as published by
2337 # the Free Software Foundation; either version 2, or (at your option)
2338 # any later version.
2340 # This program is distributed in the hope that it will be useful,
2341 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2342 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2343 # GNU General Public License for more details.
2345 # You should have received a copy of the GNU General Public License
2346 # along with this program; if not, write to the Free Software
2347 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2351 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2352 # written in clear, in which case automake, when reading aclocal.m4,
2353 # will think it sees a *use*, and therefore will trigger all it's
2354 # C support machinery. Also note that it means that autoscan, seeing
2355 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2359 # _AM_DEPENDENCIES(NAME)
2360 # ----------------------
2361 # See how the compiler implements dependency checking.
2362 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2363 # We try a few techniques and use that to set a single cache variable.
2365 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2366 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2367 # dependency, and given that the user is not expected to run this macro,
2368 # just rely on AC_PROG_CC.
2369 AC_DEFUN([_AM_DEPENDENCIES],
2370 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2371 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2372 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2373 AC_REQUIRE([AM_DEP_TRACK])dnl
2375 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2376 [$1], CXX, [depcc="$CXX" am_compiler_list=],
2377 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2378 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2379 [depcc="$$1" am_compiler_list=])
2381 AC_CACHE_CHECK([dependency style of $depcc],
2382 [am_cv_$1_dependencies_compiler_type],
2383 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2384 # We make a subdir and do the tests there. Otherwise we can end up
2385 # making bogus files that we don't know about and never remove. For
2386 # instance it was reported that on HP-UX the gcc test will end up
2387 # making a dummy file named `D' -- because `-MD' means `put the output
2390 # Copy depcomp to subdir because otherwise we won't find it if we're
2391 # using a relative directory.
2392 cp "$am_depcomp" conftest.dir
2394 # We will build objects and dependencies in a subdirectory because
2395 # it helps to detect inapplicable dependency modes. For instance
2396 # both Tru64's cc and ICC support -MD to output dependencies as a
2397 # side effect of compilation, but ICC will put the dependencies in
2398 # the current directory while Tru64 will put them in the object
2402 am_cv_$1_dependencies_compiler_type=none
2403 if test "$am_compiler_list" = ""; then
2404 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2406 for depmode in $am_compiler_list; do
2407 # Setup a source with many dependencies, because some compilers
2408 # like to wrap large dependency lists on column 80 (with \), and
2409 # we should not choose a depcomp mode which is confused by this.
2411 # We need to recreate these files for each test, as the compiler may
2412 # overwrite some of them when testing with obscure command lines.
2413 # This happens at least with the AIX C compiler.
2415 for i in 1 2 3 4 5 6; do
2416 echo '#include "conftst'$i'.h"' >> sub/conftest.c
2419 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2423 # after this tag, mechanisms are not by side-effect, so they'll
2424 # only be used when explicitly requested
2425 if test "x$enable_dependency_tracking" = xyes; then
2433 # We check with `-c' and `-o' for the sake of the "dashmstdout"
2434 # mode. It turns out that the SunPro C++ compiler does not properly
2435 # handle `-M -o', and we need to detect this.
2436 if depmode=$depmode \
2437 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2438 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2439 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2440 >/dev/null 2>conftest.err &&
2441 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2442 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2443 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2444 # icc doesn't choke on unknown options, it will just issue warnings
2445 # (even with -Werror). So we grep stderr for any message
2446 # that says an option was ignored.
2447 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2448 am_cv_$1_dependencies_compiler_type=$depmode
2457 am_cv_$1_dependencies_compiler_type=none
2460 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2461 AM_CONDITIONAL([am__fastdep$1], [
2462 test "x$enable_dependency_tracking" != xno \
2463 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2469 # Choose a directory name for dependency files.
2470 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2471 AC_DEFUN([AM_SET_DEPDIR],
2472 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2473 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2479 AC_DEFUN([AM_DEP_TRACK],
2480 [AC_ARG_ENABLE(dependency-tracking,
2481 [ --disable-dependency-tracking Speeds up one-time builds
2482 --enable-dependency-tracking Do not reject slow dependency extractors])
2483 if test "x$enable_dependency_tracking" != xno; then
2484 am_depcomp="$ac_aux_dir/depcomp"
2487 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2488 AC_SUBST([AMDEPBACKSLASH])
2491 # Generate code to set up dependency tracking. -*- Autoconf -*-
2493 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2495 # This program is free software; you can redistribute it and/or modify
2496 # it under the terms of the GNU General Public License as published by
2497 # the Free Software Foundation; either version 2, or (at your option)
2498 # any later version.
2500 # This program is distributed in the hope that it will be useful,
2501 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2502 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2503 # GNU General Public License for more details.
2505 # You should have received a copy of the GNU General Public License
2506 # along with this program; if not, write to the Free Software
2507 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2512 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2513 # ------------------------------
2514 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2515 [for mf in $CONFIG_FILES; do
2516 # Strip MF so we end up with the name of the file.
2517 mf=`echo "$mf" | sed -e 's/:.*$//'`
2518 # Check whether this is an Automake generated Makefile or not.
2519 # We used to match only the files named `Makefile.in', but
2520 # some people rename them; so instead we look at the file content.
2521 # Grep'ing the first line is not enough: some people post-process
2522 # each Makefile.in and add a new line on top of each file to say so.
2523 # So let's grep whole file.
2524 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2525 dirpart=`AS_DIRNAME("$mf")`
2529 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2530 # Extract the definition of DEP_FILES from the Makefile without
2532 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2533 test -z "$DEPDIR" && continue
2534 # When using ansi2knr, U may be empty or an underscore; expand it
2535 U=`sed -n -e '/^U = / s///p' < "$mf"`
2536 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2537 # We invoke sed twice because it is the simplest approach to
2538 # changing $(DEPDIR) to its actual value in the expansion.
2539 for file in `sed -n -e '
2540 /^DEP_FILES = .*\\\\$/ {
2549 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2550 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2551 # Make sure the directory exists.
2552 test -f "$dirpart/$file" && continue
2553 fdir=`AS_DIRNAME(["$file"])`
2554 AS_MKDIR_P([$dirpart/$fdir])
2555 # echo "creating $dirpart/$file"
2556 echo '# dummy' > "$dirpart/$file"
2559 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2562 # AM_OUTPUT_DEPENDENCY_COMMANDS
2563 # -----------------------------
2564 # This macro should only be invoked once -- use via AC_REQUIRE.
2566 # This code is only required when automatic dependency tracking
2567 # is enabled. FIXME. This creates each `.P' file that we will
2568 # need in order to bootstrap the dependency handling code.
2569 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2570 [AC_CONFIG_COMMANDS([depfiles],
2571 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2572 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2575 # Check to see how 'make' treats includes. -*- Autoconf -*-
2577 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2579 # This program is free software; you can redistribute it and/or modify
2580 # it under the terms of the GNU General Public License as published by
2581 # the Free Software Foundation; either version 2, or (at your option)
2582 # any later version.
2584 # This program is distributed in the hope that it will be useful,
2585 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2586 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2587 # GNU General Public License for more details.
2589 # You should have received a copy of the GNU General Public License
2590 # along with this program; if not, write to the Free Software
2591 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2598 # Check to see how make treats includes.
2599 AC_DEFUN([AM_MAKE_INCLUDE],
2600 [am_make=${MAKE-make}
2601 cat > confinc << 'END'
2606 # If we don't find an include directive, just comment out the code.
2607 AC_MSG_CHECKING([for style of include used by $am_make])
2611 # First try GNU make style include.
2612 echo "include confinc" > confmf
2613 # We grep out `Entering directory' and `Leaving directory'
2614 # messages which can occur if `w' ends up in MAKEFLAGS.
2615 # In particular we don't look at `^make:' because GNU make might
2616 # be invoked under some other name (usually "gmake"), in which
2617 # case it prints its new name instead of `make'.
2618 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2623 # Now try BSD make style include.
2624 if test "$am__include" = "#"; then
2625 echo '.include "confinc"' > confmf
2626 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2627 am__include=.include
2632 AC_SUBST([am__include])
2633 AC_SUBST([am__quote])
2634 AC_MSG_RESULT([$_am_result])
2635 rm -f confinc confmf