OSDN Git Service

e6870fdced79647485acef1850bb23f55d0751f0
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / aclocal.m4
1 # generated automatically by aclocal 1.7.6 -*- Autoconf -*-
2
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.
8
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
12 # PARTICULAR PURPOSE.
13
14
15 dnl
16 dnl GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
17 dnl
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.
22 dnl
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])
27   )dnl
28 ])dnl
29 AC_DEFUN(GLIBCXX_EVALUATE_CONDITIONALS, [m4_undivert([glibcxx_diversion])])dnl
30
31
32 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.
36 dnl
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)
41 ])
42
43
44 dnl
45 dnl Initialize basic configure bits.
46 dnl
47 dnl Substs:
48 dnl  multi_basedir
49 dnl
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(, ..)
54
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
59   # changing anyhow).
60   #
61   # Looking in multi_basedir seems smarter, so actually execute that branch.
62   if false; then
63     # this is for automake
64     AC_CONFIG_AUX_DIR(..)
65   else
66     # this is for autoconf
67     AC_CONFIG_AUX_DIRS(${multi_basedir})
68   fi
69
70   dnl XXX Turn this on.
71   dnl AC_LANG_CPLUSPLUS
72 ])
73
74
75 dnl
76 dnl Initialize the rest of the library configury.  At this point we have
77 dnl variables like $host.
78 dnl
79 dnl Sets:
80 dnl  gcc_version          (x.y.z format)
81 dnl  SUBDIRS
82 dnl Substs:
83 dnl  glibcxx_builddir     (absolute path)
84 dnl  glibcxx_srcdir       (absolute path)
85 dnl  toplevel_srcdir      (absolute path)
86 dnl  with_cross_host
87 dnl  with_newlib
88 dnl  with_target_subdir
89 dnl plus
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
93 dnl
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'
100
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}`
105   case $srcdir in
106     [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
107     *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
108   esac
109   toplevel_srcdir=${glibcxx_srcdir}/..
110   AC_SUBST(glibcxx_builddir)
111   AC_SUBST(glibcxx_srcdir)
112   AC_SUBST(toplevel_srcdir)
113
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]))
119
120   AC_ARG_WITH([cross-host],
121     AC_HELP_STRING([--with-cross-host=HOST],
122                    [configuring with a cross compiler]))
123
124   AC_ARG_WITH([newlib],
125     AC_HELP_STRING([--with-newlib],
126                    [assume newlib as a system C library]))
127
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.
135   #
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.
141   #
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.
144
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"
150   AC_PROG_CC
151   AC_PROG_CXX
152   CXXFLAGS="$save_CXXFLAGS"
153   m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
154   AC_SUBST(CFLAGS)
155   AC_SUBST(CXXFLAGS)
156
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)
161
162   # For some reason, gettext needs this.
163   AC_ISC_POSIX
164
165   # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
166   # available).  Uncomment the next line to force a particular method.
167   AC_PROG_LN_S
168   #LN_S='cp -p'
169
170   AC_CHECK_TOOL(AS, as)
171   AC_CHECK_TOOL(AR, ar)
172   AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
173
174   AM_MAINTAINER_MODE
175
176   # Set up safe default values for all subsequent AM_CONDITIONAL tests
177   # which are themselves conditionally expanded.
178   ## (Right now, this only matters for enable_wchar_t, but nothing prevents
179   ## other macros from doing the same.  This should be automated.)  -pme
180   need_libmath=no
181   enable_wchar_t=no
182   #enable_libstdcxx_debug=no
183   #enable_libstdcxx_pch=no
184   #enable_cheaders=c
185   #c_compatibility=no
186   #enable_abi_check=no
187   #enable_symvers=no
188   #enable_hosted_libstdcxx=yes
189
190   # Find platform-specific directories containing configuration info.
191   # Also possibly modify flags used elsewhere, as needed by the platform.
192   GLIBCXX_CHECK_HOST
193 ])
194
195
196 m4_include([linkage.m4])
197
198
199 dnl
200 dnl Tests for newer compiler features, or features that are present in newer
201 dnl compiler versions but not older compiler versions still in use, should
202 dnl be placed here.
203 dnl
204 dnl Defines:
205 dnl  WERROR='-Werror' if requested and possible; g++'s that lack the
206 dnl   new inlining code or the new system_header pragma will die on -Werror.
207 dnl   Leave it out by default and use maint-mode to use it.
208 dnl  SECTION_FLAGS='-ffunction-sections -fdata-sections' if
209 dnl   compiler supports it and the user has not requested debug mode.
210 dnl
211 AC_DEFUN(GLIBCXX_CHECK_COMPILER_FEATURES, [
212   # All these tests are for C++; save the language and the compiler flags.
213   # The CXXFLAGS thing is suspicious, but based on similar bits previously
214   # found in GLIBCXX_CONFIGURE.
215   AC_LANG_SAVE
216   AC_LANG_CPLUSPLUS
217   ac_test_CXXFLAGS="${CXXFLAGS+set}"
218   ac_save_CXXFLAGS="$CXXFLAGS"
219
220   # Check for maintainer-mode bits.
221   if test x"$USE_MAINTAINER_MODE" = xno; then
222     WERROR=''
223   else
224     WERROR='-Werror'
225   fi
226
227   # Check for -ffunction-sections -fdata-sections
228   AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
229   CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
230   AC_TRY_COMPILE(, [int foo;], [ac_fdsections=yes], [ac_fdsections=no])
231   if test "$ac_test_CXXFLAGS" = set; then
232     CXXFLAGS="$ac_save_CXXFLAGS"
233   else
234     # this is the suspicious part
235     CXXFLAGS=''
236   fi
237   if test x"$ac_fdsections" = x"yes"; then
238     SECTION_FLAGS='-ffunction-sections -fdata-sections'
239   fi
240   AC_MSG_RESULT($ac_fdsections)
241
242   AC_LANG_RESTORE
243   AC_SUBST(WERROR)
244   AC_SUBST(SECTION_FLAGS)
245 ])
246
247
248 dnl
249 dnl If GNU ld is in use, check to see if tricky linker opts can be used.  If
250 dnl the native linker is in use, all variables will be defined to something
251 dnl safe (like an empty string).
252 dnl
253 dnl Defines:
254 dnl  SECTION_LDFLAGS='-Wl,--gc-sections' if possible
255 dnl  OPT_LDFLAGS='-Wl,-O1' if possible
256 dnl  LD (as a side effect of testing)
257 dnl Sets:
258 dnl  with_gnu_ld
259 dnl  glibcxx_gnu_ld_version (possibly)
260 dnl
261 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
262 dnl set glibcxx_gnu_ld_version to 12345.  Zeros cause problems.
263 dnl
264 AC_DEFUN(GLIBCXX_CHECK_LINKER_FEATURES, [
265   # If we're not using GNU ld, then there's no point in even trying these
266   # tests.  Check for that first.  We should have already tested for gld
267   # by now (in libtool), but require it now just to be safe...
268   test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
269   test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
270   AC_REQUIRE([AC_PROG_LD])
271   AC_REQUIRE([AC_PROG_AWK])
272
273   # The name set by libtool depends on the version of libtool.  Shame on us
274   # for depending on an impl detail, but c'est la vie.  Older versions used
275   # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
276   # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
277   # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
278   # set (hence we're using an older libtool), then set it.
279   if test x${with_gnu_ld+set} != xset; then
280     if test x${ac_cv_prog_gnu_ld+set} != xset; then
281       # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
282       with_gnu_ld=no
283     else
284       with_gnu_ld=$ac_cv_prog_gnu_ld
285     fi
286   fi
287
288   # Start by getting the version number.  I think the libtool test already
289   # does some of this, but throws away the result.
290   changequote(,)
291   ldver=`$LD --version 2>/dev/null | head -1 | \
292          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
293   changequote([,])
294   glibcxx_gnu_ld_version=`echo $ldver | \
295          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
296
297   # Set --gc-sections.
298   if test "$with_gnu_ld" = "notbroken"; then
299     # GNU ld it is!  Joy and bunny rabbits!
300
301     # All these tests are for C++; save the language and the compiler flags.
302     # Need to do this so that g++ won't try to link in libstdc++
303     ac_test_CFLAGS="${CFLAGS+set}"
304     ac_save_CFLAGS="$CFLAGS"
305     CFLAGS='-x c++  -Wl,--gc-sections'
306
307     # Check for -Wl,--gc-sections
308     # XXX This test is broken at the moment, as symbols required for linking
309     # are now in libsupc++ (not built yet).  In addition, this test has
310     # cored on solaris in the past.  In addition, --gc-sections doesn't
311     # really work at the moment (keeps on discarding used sections, first
312     # .eh_frame and now some of the glibc sections for iconv).
313     # Bzzzzt.  Thanks for playing, maybe next time.
314     AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
315     AC_TRY_RUN([
316      int main(void)
317      {
318        try { throw 1; }
319        catch (...) { };
320        return 0;
321      }
322     ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
323     if test "$ac_test_CFLAGS" = set; then
324       CFLAGS="$ac_save_CFLAGS"
325     else
326       # this is the suspicious part
327       CFLAGS=''
328     fi
329     if test "$ac_sectionLDflags" = "yes"; then
330       SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
331     fi
332     AC_MSG_RESULT($ac_sectionLDflags)
333   fi
334
335   # Set linker optimization flags.
336   if test x"$with_gnu_ld" = x"yes"; then
337     OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
338   fi
339
340   AC_SUBST(SECTION_LDFLAGS)
341   AC_SUBST(OPT_LDFLAGS)
342 ])
343
344
345 dnl
346 dnl Check to see if this target can enable the wchar_t parts.
347 dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled.  (This
348 dnl must have been previously checked.)  By default, wide characters are
349 dnl disabled.
350 dnl
351 dnl Defines:
352 dnl  HAVE_MBSTATE_T if mbstate_t is not in wchar.h
353 dnl  _GLIBCXX_USE_WCHAR_T if all the bits are found.
354 dnl
355 AC_DEFUN(GLIBCXX_CHECK_WCHAR_T_SUPPORT, [
356   # Test wchar.h for mbstate_t, which is needed for char_traits and
357   # others even if wchar_t support is not on.
358   AC_MSG_CHECKING([for mbstate_t])
359   AC_TRY_COMPILE([#include <wchar.h>],
360   [mbstate_t teststate;],
361   have_mbstate_t=yes, have_mbstate_t=no)
362   AC_MSG_RESULT($have_mbstate_t)
363   if test x"$have_mbstate_t" = xyes; then
364     AC_DEFINE(HAVE_MBSTATE_T)
365   fi
366
367   # Sanity check for existence of ISO C99 headers for extended encoding.
368   AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
369   AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
370
371   # Only continue checking if the ISO C99 headers exist and support is on.
372   if test x"$ac_has_wchar_h" = xyes &&
373      test x"$ac_has_wctype_h" = xyes &&
374      test x"$enable_c_mbchar" != xno; then
375
376     # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
377     # numeric_limits can instantiate type_traits<wchar_t>
378     AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
379     AC_TRY_COMPILE([#include <wchar.h>],
380     [int i = WCHAR_MIN; int j = WCHAR_MAX;],
381     has_wchar_minmax=yes, has_wchar_minmax=no)
382     AC_MSG_RESULT($has_wchar_minmax)
383
384     # Test wchar.h for WEOF, which is what we use to determine whether
385     # to specialize for char_traits<wchar_t> or not.
386     AC_MSG_CHECKING([for WEOF])
387     AC_TRY_COMPILE([
388       #include <wchar.h>
389       #include <stddef.h>],
390     [wint_t i = WEOF;],
391     has_weof=yes, has_weof=no)
392     AC_MSG_RESULT($has_weof)
393
394     # Tests for wide character functions used in char_traits<wchar_t>.
395     ac_wfuncs=yes
396     AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
397     [],[ac_wfuncs=no])
398
399     # Checks for names injected into std:: by the c_std headers.
400     AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
401     fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
402     vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
403     mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
404     wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
405     wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
406     [],[ac_wfuncs=no])
407
408     AC_MSG_CHECKING([for ISO C99 wchar_t support])
409     if test x"$has_weof" = xyes &&
410        test x"$has_wchar_minmax" = xyes &&
411        test x"$ac_wfuncs" = xyes;
412     then
413       ac_isoC99_wchar_t=yes
414     else
415       ac_isoC99_wchar_t=no
416     fi
417     AC_MSG_RESULT($ac_isoC99_wchar_t)
418
419     # Use iconv for wchar_t to char conversions. As such, check for
420     # X/Open Portability Guide, version 2 features (XPG2).
421     AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
422     AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
423
424     # Check for existence of libiconv.a providing XPG2 wchar_t support.
425     AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
426     ac_save_LIBS="$LIBS"
427     LIBS="$LIBS $libiconv"
428
429     AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
430     [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
431
432     LIBS="$ac_save_LIBS"
433
434     AC_MSG_CHECKING([for XPG2 wchar_t support])
435     if test x"$ac_has_iconv_h" = xyes &&
436        test x"$ac_has_langinfo_h" = xyes &&
437        test x"$ac_XPG2funcs" = xyes;
438     then
439       ac_XPG2_wchar_t=yes
440     else
441       ac_XPG2_wchar_t=no
442     fi
443     AC_MSG_RESULT($ac_XPG2_wchar_t)
444
445     # At the moment, only enable wchar_t specializations if all the
446     # above support is present.
447     if test x"$ac_isoC99_wchar_t" = xyes &&
448        test x"$ac_XPG2_wchar_t" = xyes;
449     then
450       AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
451       enable_wchar_t=yes
452     fi
453   fi
454   AC_MSG_CHECKING([for enabled wchar_t specializations])
455   AC_MSG_RESULT($enable_wchar_t)
456 ])
457
458
459 dnl
460 dnl Check for headers for, and arguments to, the setrlimit() function.
461 dnl Used only in testsuite_hooks.h.  Called from GLIBCXX_CONFIGURE_TESTSUITE.
462 dnl
463 dnl Defines:
464 dnl  _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory
465 dnl  various HAVE_MEMLIMIT_* for individual limit names
466 dnl
467 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT_ancilliary, [
468   AC_TRY_COMPILE(
469     [#include <unistd.h>
470      #include <sys/time.h>
471      #include <sys/resource.h>
472     ],
473     [ int f = RLIMIT_$1 ; ],
474     [glibcxx_mresult=1], [glibcxx_mresult=0])
475   AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult,
476                      [Only used in build directory testsuite_hooks.h.])
477 ])
478
479 AC_DEFUN(GLIBCXX_CHECK_SETRLIMIT, [
480   setrlimit_have_headers=yes
481   AC_CHECK_HEADERS(unistd.h sys/time.h sys/resource.h,
482                    [],
483                    [setrlimit_have_headers=no])
484   # If don't have the headers, then we can't run the tests now, and we
485   # won't be seeing any of these during testsuite compilation.
486   if test $setrlimit_have_headers = yes; then
487     # Can't do these in a loop, else the resulting syntax is wrong.
488     GLIBCXX_CHECK_SETRLIMIT_ancilliary(DATA)
489     GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS)
490     GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM)
491     GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS)
492
493     # Check for rlimit, setrlimit.
494     AC_CACHE_VAL(ac_setrlimit, [
495       AC_TRY_COMPILE(
496         [#include <unistd.h>
497          #include <sys/time.h>
498          #include <sys/resource.h>
499         ],
500         [struct rlimit r;
501          setrlimit(0, &r);],
502         [ac_setrlimit=yes], [ac_setrlimit=no])
503     ])
504   fi
505
506   AC_MSG_CHECKING([for testsuite memory limit support])
507   if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
508     ac_mem_limits=yes
509     AC_DEFINE(_GLIBCXX_MEM_LIMITS)
510   else
511     ac_mem_limits=no
512   fi
513   AC_MSG_RESULT($ac_mem_limits)
514 ])
515
516
517 dnl
518 dnl Check whether S_ISREG (Posix) or S_IFREG is available in <sys/stat.h>.
519 dnl Define HAVE_S_ISREG / HAVE_S_IFREG appropriately.
520 dnl
521 AC_DEFUN(GLIBCXX_CHECK_S_ISREG_OR_S_IFREG, [
522   AC_CACHE_VAL(glibcxx_cv_S_ISREG, [
523     AC_TRY_LINK(
524       [#include <sys/stat.h>],
525       [struct stat buffer;
526        fstat(0, &buffer);
527        S_ISREG(buffer.st_mode);],
528       [glibcxx_cv_S_ISREG=yes],
529       [glibcxx_cv_S_ISREG=no])
530   ])
531   AC_CACHE_VAL(glibcxx_cv_S_IFREG, [
532     AC_TRY_LINK(
533       [#include <sys/stat.h>],
534       [struct stat buffer;
535        fstat(0, &buffer);
536        S_IFREG & buffer.st_mode;],
537       [glibcxx_cv_S_IFREG=yes],
538       [glibcxx_cv_S_IFREG=no])
539   ])
540   if test $glibcxx_cv_S_ISREG = yes; then
541     AC_DEFINE(HAVE_S_ISREG)
542   elif test $glibcxx_cv_S_IFREG = yes; then
543     AC_DEFINE(HAVE_S_IFREG)
544   fi
545 ])
546
547
548 dnl
549 dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
550 dnl
551 AC_DEFUN(GLIBCXX_CHECK_POLL, [
552   AC_CACHE_VAL(glibcxx_cv_POLL, [
553     AC_TRY_COMPILE(
554       [#include <poll.h>],
555       [struct pollfd pfd[1];
556        pfd[0].events = POLLIN;
557        poll(pfd, 1, 0);],
558       [glibcxx_cv_POLL=yes],
559       [glibcxx_cv_POLL=no])
560   ])
561   if test $glibcxx_cv_POLL = yes; then
562     AC_DEFINE(HAVE_POLL)
563   fi
564 ])
565
566
567 dnl
568 dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
569 dnl
570 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
571   AC_CACHE_VAL(glibcxx_cv_WRITEV, [
572     AC_TRY_COMPILE(
573       [#include <sys/uio.h>],
574       [struct iovec iov[2];
575        writev(0, iov, 0);],
576       [glibcxx_cv_WRITEV=yes],
577       [glibcxx_cv_WRITEV=no])
578   ])
579   if test $glibcxx_cv_WRITEV = yes; then
580     AC_DEFINE(HAVE_WRITEV)
581   fi
582 ])
583
584
585 dnl
586 dnl Does any necessary configuration of the testsuite directory.  Generates
587 dnl the testsuite_hooks.h header.
588 dnl
589 dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
590 dnl
591 dnl Sets:
592 dnl  enable_abi_check / GLIBCXX_TEST_ABI
593 dnl Substs:
594 dnl  baseline_dir
595 dnl
596 AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
597   if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
598     # Do checks for memory limit functions.
599     GLIBCXX_CHECK_SETRLIMIT
600
601     # Look for setenv, so that extended locale tests can be performed.
602     GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
603   fi
604
605   # Export file names for ABI checking.
606   baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
607   AC_SUBST(baseline_dir)
608
609   # Determine if checking the ABI is desirable.
610   if test $enable_symvers = no || test $is_hosted = no; then
611     enable_abi_check=no
612   else
613     case "$host" in
614       *-*-cygwin*)
615         enable_abi_check=no ;;
616       *)
617         enable_abi_check=yes ;;
618     esac
619   fi
620
621   GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
622   GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
623 ])
624
625
626 dnl
627 dnl Set up *_INCLUDES variables for all sundry Makefile.am's.
628 dnl
629 dnl Substs:
630 dnl  GLIBCXX_INCLUDES
631 dnl  TOPLEVEL_INCLUDES
632 dnl
633 AC_DEFUN(GLIBCXX_EXPORT_INCLUDES, [
634   # Used for every C++ compile we perform.
635   GLIBCXX_INCLUDES="\
636 -I$glibcxx_builddir/include/$host_alias \
637 -I$glibcxx_builddir/include \
638 -I$glibcxx_srcdir/libsupc++"
639
640   # For Canadian crosses, pick this up too.
641   if test $CANADIAN = yes; then
642     GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES '-I${includedir}'"
643   fi
644
645   # Stuff in the actual top level.  Currently only used by libsupc++ to
646   # get unwind* headers from the gcc dir.
647   #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
648   TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
649
650   # Now, export this to all the little Makefiles....
651   AC_SUBST(GLIBCXX_INCLUDES)
652   AC_SUBST(TOPLEVEL_INCLUDES)
653 ])
654
655
656 dnl
657 dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
658 dnl (SECTION_FLAGS is done under CHECK_COMPILER_FEATURES.)
659 dnl
660 dnl Substs:
661 dnl  OPTIMIZE_CXXFLAGS
662 dnl  WARN_FLAGS
663 dnl
664 AC_DEFUN(GLIBCXX_EXPORT_FLAGS, [
665   # Optimization flags that are probably a good idea for thrill-seekers. Just
666   # uncomment the lines below and make, everything else is ready to go...
667   # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
668   OPTIMIZE_CXXFLAGS=
669   AC_SUBST(OPTIMIZE_CXXFLAGS)
670
671   WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings'
672   AC_SUBST(WARN_FLAGS)
673 ])
674
675
676 dnl
677 dnl All installation directory information is determined here.
678 dnl
679 dnl Substs:
680 dnl  gxx_install_dir
681 dnl  glibcxx_prefixdir
682 dnl  glibcxx_toolexecdir
683 dnl  glibcxx_toolexeclibdir
684 dnl
685 dnl Assumes cross_compiling bits already done, and with_cross_host in
686 dnl particular.
687 dnl
688 AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
689   glibcxx_toolexecdir=no
690   glibcxx_toolexeclibdir=no
691   glibcxx_prefixdir=$prefix
692
693   AC_MSG_CHECKING([for gxx-include-dir])
694   AC_ARG_WITH([gxx-include-dir],
695     AC_HELP_STRING([--with-gxx-include-dir=DIR],
696                    [installation directory for include files]),
697     [case "$withval" in
698       yes) AC_MSG_ERROR([Missing directory for --with-gxx-include-dir]) ;;
699       no)  gxx_include_dir=no ;;
700       *)   gxx_include_dir=$withval ;;
701      esac],
702     [gxx_include_dir=no])
703   AC_MSG_RESULT($gxx_include_dir)
704
705   AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
706   AC_ARG_ENABLE([version-specific-runtime-libs],
707     AC_HELP_STRING([--enable-version-specific-runtime-libs],
708                    [Specify that runtime libraries should be installed in a compiler-specific directory]),
709     [case "$enableval" in
710       yes) version_specific_libs=yes ;;
711       no)  version_specific_libs=no ;;
712       *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
713      esac],
714     [version_specific_libs=no])
715   AC_MSG_RESULT($version_specific_libs)
716
717   # Default case for install directory for include files.
718   if test $version_specific_libs = no && test $gxx_include_dir = no; then
719     gxx_include_dir='${prefix}'/include/c++/${gcc_version}
720   fi
721
722   # Version-specific runtime libs processing.
723   if test $version_specific_libs = yes; then
724     # Need the gcc compiler version to know where to install libraries
725     # and header files if --enable-version-specific-runtime-libs option
726     # is selected.
727     if test x"$gxx_include_dir" = x"no"; then
728       gxx_include_dir='${libdir}/gcc-lib/${host_alias}/'$gcc_version/include/c++
729     fi
730     glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
731     glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
732   fi
733
734   # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
735   # Install a library built with a cross compiler in tooldir, not libdir.
736   if test x"$glibcxx_toolexecdir" = x"no"; then
737     if test -n "$with_cross_host" &&
738        test x"$with_cross_host" != x"no"; then
739       glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
740       glibcxx_toolexeclibdir='${toolexecdir}/lib'
741     else
742       glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
743       glibcxx_toolexeclibdir='${libdir}'
744     fi
745     multi_os_directory=`$CXX -print-multi-os-directory`
746     case $multi_os_directory in
747       .) ;; # Avoid trailing /.
748       *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
749     esac
750   fi
751
752   AC_MSG_CHECKING([for install location])
753   AC_MSG_RESULT($gxx_include_dir)
754
755   AC_SUBST(glibcxx_prefixdir)
756   AC_SUBST(gxx_include_dir)
757   AC_SUBST(glibcxx_toolexecdir)
758   AC_SUBST(glibcxx_toolexeclibdir)
759 ])
760
761
762 dnl
763 dnl GLIBCXX_ENABLE
764 dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
765 dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
766 dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
767 dnl
768 dnl See docs/html/17_intro/configury.html#enable for documentation.
769 dnl
770 m4_define([GLIBCXX_ENABLE],[dnl
771 m4_define([_g_switch],[--enable-$1])dnl
772 m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
773  AC_ARG_ENABLE($1,_g_help,
774   m4_bmatch([$5],
775    [^permit ],
776      [[
777       case "$enableval" in
778        m4_bpatsubst([$5],[permit ])) ;;
779        *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
780           dnl Idea for future:  generate a URL pointing to
781           dnl "onlinedocs/configopts.html#whatever"
782       esac
783      ]],
784    [^$],
785      [[
786       case "$enableval" in
787        yes|no) ;;
788        *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
789       esac
790      ]],
791    [[$5]]),
792   [enable_]m4_bpatsubst([$1],-,_)[=][$2])
793 m4_undefine([_g_switch])dnl
794 m4_undefine([_g_help])dnl
795 ])
796
797
798 dnl
799 dnl Check for ISO/IEC 9899:1999 "C99" support.
800 dnl
801 dnl --enable-c99 defines _GLIBCXX_USE_C99
802 dnl --disable-c99 leaves _GLIBCXX_USE_C99 undefined
803 dnl  +  Usage:  GLIBCXX_ENABLE_C99[(DEFAULT)]
804 dnl       Where DEFAULT is either `yes' or `no'.
805 dnl  +  If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
806 dnl
807 AC_DEFUN(GLIBCXX_ENABLE_C99, [
808   GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
809
810   AC_LANG_SAVE
811   AC_LANG_CPLUSPLUS
812
813   # Check for the existence of <math.h> functions used if C99 is enabled.
814   ac_c99_math=yes;
815   AC_MSG_CHECKING([for ISO C99 support in <math.h>])
816   AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
817   AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
818   AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
819   AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
820   AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
821   AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
822   AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
823   AC_TRY_COMPILE([#include <math.h>],
824                  [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
825   AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
826   AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
827   AC_TRY_COMPILE([#include <math.h>],
828                  [islessgreater(0.0,0.0);],, [ac_c99_math=no])
829   AC_TRY_COMPILE([#include <math.h>],
830                  [isunordered(0.0,0.0);],, [ac_c99_math=no])
831   AC_MSG_RESULT($ac_c99_math)
832
833   # Check for the existence in <stdio.h> of vscanf, et. al.
834   ac_c99_stdio=yes;
835   AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
836   AC_TRY_COMPILE([#include <stdio.h>],
837                  [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
838   AC_TRY_COMPILE([#include <stdio.h>
839                   #include <stdarg.h>
840                   void foo(char* fmt, ...)
841                   {va_list args; va_start(args, fmt);
842                   vfscanf(stderr, "%i", args);}],
843                   [],, [ac_c99_stdio=no])
844   AC_TRY_COMPILE([#include <stdio.h>
845                   #include <stdarg.h>
846                   void foo(char* fmt, ...)
847                   {va_list args; va_start(args, fmt);
848                   vscanf("%i", args);}],
849                   [],, [ac_c99_stdio=no])
850   AC_TRY_COMPILE([#include <stdio.h>
851                   #include <stdarg.h>
852                   void foo(char* fmt, ...)
853                   {va_list args; va_start(args, fmt);
854                   vsnprintf(fmt, 0, "%i", args);}],
855                   [],, [ac_c99_stdio=no])
856   AC_TRY_COMPILE([#include <stdio.h>
857                   #include <stdarg.h>
858                   void foo(char* fmt, ...)
859                   {va_list args; va_start(args, fmt);
860                   vsscanf(fmt, "%i", args);}],
861                   [],, [ac_c99_stdio=no])
862   AC_MSG_RESULT($ac_c99_stdio)
863
864   # Check for the existence in <stdlib.h> of lldiv_t, et. al.
865   ac_c99_stdlib=yes;
866   AC_MSG_CHECKING([for lldiv_t declaration])
867   AC_CACHE_VAL(ac_c99_lldiv_t, [
868   AC_TRY_COMPILE([#include <stdlib.h>],
869                    [ lldiv_t mydivt;],
870                    [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
871   ])
872   AC_MSG_RESULT($ac_c99_lldiv_t)
873
874   AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
875   AC_TRY_COMPILE([#include <stdlib.h>],
876                  [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
877   AC_TRY_COMPILE([#include <stdlib.h>],
878                  [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
879   AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
880   AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
881   AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
882   AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
883   if test x"$ac_c99_lldiv_t" = x"no"; then
884     ac_c99_stdlib=no;
885   fi;
886   AC_MSG_RESULT($ac_c99_stdlib)
887
888   # Check for the existence of <wchar.h> functions used if C99 is enabled.
889   # XXX the wchar.h checks should be rolled into the general C99 bits.
890   ac_c99_wchar=yes;
891   AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
892   AC_TRY_COMPILE([#include <wchar.h>],
893                  [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
894   AC_TRY_COMPILE([#include <wchar.h>],
895                  [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
896   AC_TRY_COMPILE([#include <wchar.h>],
897                  [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
898   AC_MSG_RESULT($ac_c99_wchar)
899
900   AC_MSG_CHECKING([for enabled ISO C99 support])
901   if test x"$ac_c99_math" = x"no" ||
902      test x"$ac_c99_stdio" = x"no" ||
903      test x"$ac_c99_stdlib" = x"no" ||
904      test x"$ac_c99_wchar" = x"no"; then
905     enable_c99=no;
906   fi;
907   AC_MSG_RESULT($enable_c99)
908
909   # Option parsed, now set things appropriately
910   if test x"$enable_c99" = x"yes"; then
911     AC_DEFINE(_GLIBCXX_USE_C99)
912   fi
913
914   AC_LANG_RESTORE
915 ])
916
917
918 dnl
919 dnl Check for what type of C headers to use.
920 dnl
921 dnl --enable-cheaders= [does stuff].
922 dnl --disable-cheaders [does not do anything, really].
923 dnl  +  Usage:  GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
924 dnl       Where DEFAULT is either `c' or `c_std'.
925 dnl
926 AC_DEFUN(GLIBCXX_ENABLE_CHEADERS, [
927   GLIBCXX_ENABLE(cheaders,$1,[=KIND],
928     [construct "C" headers for g++], [permit c|c_std])
929   AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
930
931   C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
932
933   AC_SUBST(C_INCLUDE_DIR)
934   GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
935   GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
936   GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
937 ])
938
939
940 dnl
941 dnl Check for which locale library to use.  The choice is mapped to
942 dnl a subdirectory of config/locale.
943 dnl
944 dnl Default is generic.
945 dnl
946 AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
947   AC_MSG_CHECKING([for C locale to use])
948   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
949     [use MODEL for target locale package],
950     [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
951   
952   # If they didn't use this option switch, or if they specified --enable
953   # with no specific model, we'll have to look for one.  If they
954   # specified --disable (???), do likewise.
955   if test $enable_clocale = no || test $enable_clocale = yes; then
956      enable_clocale=auto
957   fi
958
959   # Either a known package, or "auto"
960   enable_clocale_flag=$enable_clocale
961
962   # Probe for locale support if no specific model is specified.
963   # Default to "generic".
964   if test $enable_clocale_flag = auto; then
965     case x${target_os} in
966       xlinux* | xgnu*)
967         AC_EGREP_CPP([_GLIBCXX_ok], [
968         #include <features.h>
969         #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
970           _GLIBCXX_ok
971         #endif
972         ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
973
974         # Test for bugs early in glibc-2.2.x series
975           if test x$enable_clocale_flag = xgnu; then
976           AC_TRY_RUN([
977           #define _GNU_SOURCE 1
978           #include <locale.h>
979           #include <string.h>
980           #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
981           extern __typeof(newlocale) __newlocale;
982           extern __typeof(duplocale) __duplocale;
983           extern __typeof(strcoll_l) __strcoll_l;
984           #endif
985           int main()
986           {
987               const char __one[] = "Äuglein Augmen";
988               const char __two[] = "Äuglein";
989               int i;
990               int j;
991               __locale_t        loc;
992                __locale_t        loc_dup;
993               loc = __newlocale(1 << LC_ALL, "de_DE", 0);
994               loc_dup = __duplocale(loc);
995               i = __strcoll_l(__one, __two, loc);
996               j = __strcoll_l(__one, __two, loc_dup);
997               return 0;
998           }
999           ],
1000           [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
1001           [enable_clocale_flag=generic])
1002           fi
1003
1004         # ... at some point put __strxfrm_l tests in as well.
1005         ;;
1006       *)
1007         enable_clocale_flag=generic
1008         ;;
1009     esac
1010   fi
1011
1012   # Deal with gettext issues.  Default to not using it (=no) until we detect
1013   # support for it later.  Let the user turn it off via --e/d, but let that
1014   # default to on for easier handling.
1015   USE_NLS=no
1016   AC_ARG_ENABLE(nls,
1017     AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
1018     [],
1019     [enable_nls=yes])
1020
1021   # Set configure bits for specified locale package
1022   case ${enable_clocale_flag} in
1023     generic)
1024       AC_MSG_RESULT(generic)
1025
1026       CLOCALE_H=config/locale/generic/c_locale.h
1027       CLOCALE_CC=config/locale/generic/c_locale.cc
1028       CCODECVT_H=config/locale/generic/codecvt_specializations.h
1029       CCODECVT_CC=config/locale/generic/codecvt_members.cc
1030       CCOLLATE_CC=config/locale/generic/collate_members.cc
1031       CCTYPE_CC=config/locale/generic/ctype_members.cc
1032       CMESSAGES_H=config/locale/generic/messages_members.h
1033       CMESSAGES_CC=config/locale/generic/messages_members.cc
1034       CMONEY_CC=config/locale/generic/monetary_members.cc
1035       CNUMERIC_CC=config/locale/generic/numeric_members.cc
1036       CTIME_H=config/locale/generic/time_members.h
1037       CTIME_CC=config/locale/generic/time_members.cc
1038       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1039       ;;
1040     gnu)
1041       AC_MSG_RESULT(gnu)
1042
1043       # Declare intention to use gettext, and add support for specific
1044       # languages.
1045       # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
1046       ALL_LINGUAS="de fr"
1047
1048       # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
1049       AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
1050       if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
1051         USE_NLS=yes
1052       fi
1053       # Export the build objects.
1054       for ling in $ALL_LINGUAS; do \
1055         glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
1056         glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
1057       done
1058       AC_SUBST(glibcxx_MOFILES)
1059       AC_SUBST(glibcxx_POFILES)
1060
1061       CLOCALE_H=config/locale/gnu/c_locale.h
1062       CLOCALE_CC=config/locale/gnu/c_locale.cc
1063       CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1064       CCODECVT_CC=config/locale/gnu/codecvt_members.cc
1065       CCOLLATE_CC=config/locale/gnu/collate_members.cc
1066       CCTYPE_CC=config/locale/gnu/ctype_members.cc
1067       CMESSAGES_H=config/locale/gnu/messages_members.h
1068       CMESSAGES_CC=config/locale/gnu/messages_members.cc
1069       CMONEY_CC=config/locale/gnu/monetary_members.cc
1070       CNUMERIC_CC=config/locale/gnu/numeric_members.cc
1071       CTIME_H=config/locale/gnu/time_members.h
1072       CTIME_CC=config/locale/gnu/time_members.cc
1073       CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
1074       ;;
1075     ieee_1003.1-2001)
1076       AC_MSG_RESULT(IEEE 1003.1)
1077
1078       CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
1079       CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
1080       CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
1081       CCODECVT_CC=config/locale/generic/codecvt_members.cc
1082       CCOLLATE_CC=config/locale/generic/collate_members.cc
1083       CCTYPE_CC=config/locale/generic/ctype_members.cc
1084       CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
1085       CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
1086       CMONEY_CC=config/locale/generic/monetary_members.cc
1087       CNUMERIC_CC=config/locale/generic/numeric_members.cc
1088       CTIME_H=config/locale/generic/time_members.h
1089       CTIME_CC=config/locale/generic/time_members.cc
1090       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
1091       ;;
1092   esac
1093
1094   # This is where the testsuite looks for locale catalogs, using the
1095   # -DLOCALEDIR define during testsuite compilation.
1096   glibcxx_localedir=${glibcxx_builddir}/po/share/locale
1097   AC_SUBST(glibcxx_localedir)
1098
1099   # A standalone libintl (e.g., GNU libintl) may be in use.
1100   if test $USE_NLS = yes; then
1101     AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
1102     AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
1103   fi
1104   if test $USE_NLS = yes; then
1105     AC_DEFINE(_GLIBCXX_USE_NLS)
1106   fi
1107
1108   AC_SUBST(USE_NLS)
1109   AC_SUBST(CLOCALE_H)
1110   AC_SUBST(CCODECVT_H)
1111   AC_SUBST(CMESSAGES_H)
1112   AC_SUBST(CCODECVT_CC)
1113   AC_SUBST(CCOLLATE_CC)
1114   AC_SUBST(CCTYPE_CC)
1115   AC_SUBST(CMESSAGES_CC)
1116   AC_SUBST(CMONEY_CC)
1117   AC_SUBST(CNUMERIC_CC)
1118   AC_SUBST(CTIME_H)
1119   AC_SUBST(CTIME_CC)
1120   AC_SUBST(CLOCALE_CC)
1121   AC_SUBST(CLOCALE_INTERNAL_H)
1122 ])
1123
1124
1125 dnl
1126 dnl Check for whether the Boost-derived checks should be turned on.
1127 dnl
1128 dnl --enable-concept-checks turns them on.
1129 dnl --disable-concept-checks leaves them off.
1130 dnl  +  Usage:  GLIBCXX_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
1131 dnl       Where DEFAULT is either `yes' or `no'.
1132 dnl
1133 AC_DEFUN(GLIBCXX_ENABLE_CONCEPT_CHECKS, [
1134   GLIBCXX_ENABLE(concept-checks,$1,,[use Boost-derived template checks])
1135   if test $enable_concept_checks = yes; then
1136     AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS)
1137   fi
1138 ])
1139
1140
1141 dnl
1142 dnl Check for which I/O library to use:  stdio, or something specific.
1143 dnl
1144 dnl Default is stdio.
1145 dnl
1146 AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
1147   AC_MSG_CHECKING([for underlying I/O to use])
1148   GLIBCXX_ENABLE(cstdio,stdio,[=PACKAGE],
1149     [use target-specific I/O package], [permit stdio])
1150
1151   # Now that libio has been removed, you can have any color you want as long
1152   # as it's black.  This is one big no-op until other packages are added, but
1153   # showing the framework never hurts.
1154   case ${enable_cstdio} in
1155     stdio)
1156       CSTDIO_H=config/io/c_io_stdio.h
1157       BASIC_FILE_H=config/io/basic_file_stdio.h
1158       BASIC_FILE_CC=config/io/basic_file_stdio.cc
1159       AC_MSG_RESULT(stdio)
1160       ;;
1161   esac
1162
1163   dnl Set directory for fpos.h
1164   FPOS_H=$fpos_include_dir
1165
1166   AC_SUBST(CSTDIO_H)
1167   AC_SUBST(FPOS_H)
1168   AC_SUBST(BASIC_FILE_H)
1169   AC_SUBST(BASIC_FILE_CC)
1170 ])
1171
1172
1173 dnl
1174 dnl Check for "unusual" flags to pass to the compiler while building.
1175 dnl
1176 dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
1177 dnl     experimental flags such as -fpch, -fIMI, -Dfloat=char, etc.
1178 dnl --disable-cxx-flags passes nothing.
1179 dnl  +  See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
1180 dnl         http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
1181 dnl         http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
1182 dnl  +  Usage:  GLIBCXX_ENABLE_CXX_FLAGS(default flags)
1183 dnl       If "default flags" is an empty string, the effect is the same
1184 dnl       as --disable or --enable=no.
1185 dnl
1186 AC_DEFUN(GLIBCXX_ENABLE_CXX_FLAGS, [dnl
1187   AC_MSG_CHECKING([for extra compiler flags for building])
1188   GLIBCXX_ENABLE(cxx-flags,$1,[=FLAGS],
1189     [pass compiler FLAGS when building library],
1190     [case "x$enable_cxx_flags" in
1191       xno | x)   enable_cxx_flags= ;;
1192       x-*)       ;;
1193       *)         AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1194      esac])
1195
1196   # Run through flags (either default or command-line) and set anything
1197   # extra (e.g., #defines) that must accompany particular g++ options.
1198   if test -n "$enable_cxx_flags"; then
1199     for f in $enable_cxx_flags; do
1200       case "$f" in
1201         -fhonor-std)  ;;
1202         -*)  ;;
1203         *)   # and we're trying to pass /what/ exactly?
1204              AC_MSG_ERROR([compiler flags start with a -]) ;;
1205       esac
1206     done
1207   fi
1208
1209   EXTRA_CXX_FLAGS="$enable_cxx_flags"
1210   AC_MSG_RESULT($EXTRA_CXX_FLAGS)
1211   AC_SUBST(EXTRA_CXX_FLAGS)
1212 ])
1213
1214
1215 dnl
1216 dnl Check for wide character support.  Has the same effect as the option
1217 dnl in gcc's configure, but in a form that autoconf can mess with.
1218 dnl
1219 dnl --enable-c-mbchar requests all the wchar_t stuff.
1220 dnl --disable-c-mbchar doesn't.
1221 dnl  +  Usage:  GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
1222 dnl       Where DEFAULT is either `yes' or `no'.
1223 dnl
1224 AC_DEFUN(GLIBCXX_ENABLE_C_MBCHAR, [
1225   GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
1226   # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
1227 ])
1228
1229
1230 dnl
1231 dnl Check to see if debugging libraries are to be built.
1232 dnl
1233 dnl --enable-libstdcxx-debug
1234 dnl builds a separate set of debugging libraries in addition to the
1235 dnl normal (shared, static) libstdc++ binaries.
1236 dnl
1237 dnl --disable-libstdcxx-debug
1238 dnl builds only one (non-debug) version of libstdc++.
1239 dnl
1240 dnl --enable-libstdcxx-debug-flags=FLAGS
1241 dnl iff --enable-debug == yes, then use FLAGS to build the debug library.
1242 dnl
1243 dnl  +  Usage:  GLIBCXX_ENABLE_DEBUG[(DEFAULT)]
1244 dnl       Where DEFAULT is either `yes' or `no'.
1245 dnl
1246 AC_DEFUN(GLIBCXX_ENABLE_DEBUG, [
1247   AC_MSG_CHECKING([for additional debug build])
1248   GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
1249   AC_MSG_RESULT($enable_libstdcxx_debug)
1250   GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
1251 ])
1252
1253
1254 dnl
1255 dnl Check for explicit debug flags.
1256 dnl
1257 dnl --enable-libstdcxx-debug-flags='-O1'
1258 dnl is a general method for passing flags to be used when
1259 dnl building debug libraries with --enable-debug.
1260 dnl
1261 dnl --disable-libstdcxx-debug-flags does nothing.
1262 dnl  +  Usage:  GLIBCXX_ENABLE_DEBUG_FLAGS(default flags)
1263 dnl       If "default flags" is an empty string, the effect is the same
1264 dnl       as --disable or --enable=no.
1265 dnl
1266 AC_DEFUN(GLIBCXX_ENABLE_DEBUG_FLAGS, [
1267   GLIBCXX_ENABLE(libstdcxx-debug-flags,[$1],[=FLAGS],
1268     [pass compiler FLAGS when building debug library],
1269     [case "x$enable_libstdcxx_debug_flags" in
1270       xno | x)    enable_libstdcxx_debug_flags= ;;
1271       x-*)        ;;
1272       *)          AC_MSG_ERROR(_g_switch needs compiler flags as arguments) ;;
1273      esac])
1274
1275   # Option parsed, now set things appropriately
1276   DEBUG_FLAGS="$enable_libstdcxx_debug_flags"
1277   AC_SUBST(DEBUG_FLAGS)
1278
1279   AC_MSG_NOTICE([Debug build flags set to $DEBUG_FLAGS])
1280 ])
1281
1282
1283 dnl
1284 dnl Check if the user only wants a freestanding library implementation.
1285 dnl
1286 dnl --disable-hosted-libstdcxx will turn off most of the library build,
1287 dnl installing only the headers required by [17.4.1.3] and the language
1288 dnl support library.  More than that will be built (to keep the Makefiles
1289 dnl conveniently clean), but not installed.
1290 dnl
1291 dnl Sets:
1292 dnl  is_hosted  (yes/no)
1293 dnl
1294 AC_DEFUN(GLIBCXX_ENABLE_HOSTED, [
1295   AC_ARG_ENABLE([hosted-libstdcxx],
1296     AC_HELP_STRING([--disable-hosted-libstdcxx],
1297                    [only build freestanding C++ runtime support]),,
1298     [enable_hosted_libstdcxx=yes])
1299   if test "$enable_hosted_libstdcxx" = no; then
1300     AC_MSG_NOTICE([Only freestanding libraries will be built])
1301     is_hosted=no
1302     enable_abi_check=no
1303     enable_libstdcxx_pch=no
1304   else
1305     is_hosted=yes
1306   fi
1307   GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
1308 ])
1309
1310
1311 dnl
1312 dnl Check for libunwind exception handling support.  If enabled, then
1313 dnl we assume that the _Unwind_* functions that make up the Unwind ABI
1314 dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
1315 dnl libunwind instead of libgcc, and that libstdc++ has a dependency
1316 dnl on libunwind as well as libgcc.
1317 dnl
1318 dnl --enable-libunwind-exceptions forces the use of libunwind.
1319 dnl --disable-libunwind-exceptions assumes there is no libunwind.
1320 dnl
1321 dnl Substs:
1322 dnl  LIBUNWIND_FLAG
1323 dnl
1324 AC_DEFUN(GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS, [
1325   AC_MSG_CHECKING([for use of libunwind])
1326   GLIBCXX_ENABLE(libunwind-exceptions,no,,
1327     [force use of libunwind for exceptions])
1328   AC_MSG_RESULT($use_libunwind_exceptions)
1329   if test $enable_libunwind_exceptions = yes; then
1330     LIBUNWIND_FLAG="-lunwind"
1331   else
1332     LIBUNWIND_FLAG=""
1333   fi
1334   AC_SUBST(LIBUNWIND_FLAG)
1335 ])
1336
1337
1338 dnl
1339 dnl Check for template specializations for the 'long long' type extension.
1340 dnl The result determines only whether 'long long' I/O is enabled; things
1341 dnl like numeric_limits<> specializations are always available.
1342 dnl
1343 dnl --enable-long-long defines _GLIBCXX_USE_LONG_LONG
1344 dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
1345 dnl  +  Usage:  GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
1346 dnl       Where DEFAULT is either `yes' or `no'.
1347 dnl  +  If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
1348 dnl
1349 AC_DEFUN(GLIBCXX_ENABLE_LONG_LONG, [
1350   GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
1351
1352   AC_LANG_SAVE
1353   AC_LANG_CPLUSPLUS
1354
1355   AC_MSG_CHECKING([for enabled long long I/O support])
1356   # iostreams require strtoll, strtoull to compile
1357   AC_TRY_COMPILE([#include <stdlib.h>],
1358                  [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
1359   AC_TRY_COMPILE([#include <stdlib.h>],
1360                  [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
1361
1362   # Option parsed, now set things appropriately
1363   if test $enable_long_long = yes; then
1364     AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
1365   fi
1366   AC_MSG_RESULT($enable_long_long)
1367
1368   AC_LANG_RESTORE
1369 ])
1370
1371
1372 dnl
1373 dnl Check to see if building and using a C++ precompiled header can be done.
1374 dnl
1375 dnl --enable-libstdcxx-pch=yes
1376 dnl default, this shows intent to use stdc++.h.gch If it looks like it
1377 dnl may work, after some light-hearted attempts to puzzle out compiler
1378 dnl support, flip bits on in include/Makefile.am
1379 dnl
1380 dnl --disable-libstdcxx-pch
1381 dnl turns off attempts to use or build stdc++.h.gch.
1382 dnl
1383 dnl Substs:
1384 dnl  glibcxx_PCHFLAGS
1385 dnl
1386 AC_DEFUN(GLIBCXX_ENABLE_PCH, [
1387   AC_MSG_CHECKING([for enabled PCH])
1388   GLIBCXX_ENABLE(libstdcxx-pch,$1,,[build pre-compiled libstdc++ headers])
1389   AC_MSG_RESULT([$enable_libstdcxx_pch])
1390
1391   if test $enable_libstdcxx_pch = yes; then
1392     AC_CACHE_CHECK([for compiler with PCH support],
1393       [glibcxx_cv_prog_CXX_pch],
1394       [ac_save_CXXFLAGS="$CXXFLAGS"
1395        CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
1396        AC_LANG_SAVE
1397        AC_LANG_CPLUSPLUS
1398        echo '#include <math.h>' > conftest.h
1399        if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
1400                           -o conftest.h.gch 1>&5 2>&1 &&
1401                 echo '#error "pch failed"' > conftest.h &&
1402           echo '#include "conftest.h"' > conftest.cc &&
1403                $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
1404        then
1405          glibcxx_cv_prog_CXX_pch=yes
1406        else
1407          glibcxx_cv_prog_CXX_pch=no
1408        fi
1409        rm -f conftest*
1410        CXXFLAGS=$ac_save_CXXFLAGS
1411        AC_LANG_RESTORE
1412       ])
1413     enable_libstdcxx_pch=$glibcxx_cv_prog_CXX_pch
1414   fi
1415
1416   GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
1417   if test $enable_libstdcxx_pch = yes; then
1418     glibcxx_PCHFLAGS="-include bits/stdc++.h"
1419   else
1420     glibcxx_PCHFLAGS=""
1421   fi
1422   AC_SUBST(glibcxx_PCHFLAGS)
1423 ])
1424
1425
1426 dnl
1427 dnl Check for exception handling support.  If an explicit enable/disable
1428 dnl sjlj exceptions is given, we don't have to detect.  Otherwise the
1429 dnl target may or may not support call frame exceptions.
1430 dnl
1431 dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
1432 dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
1433 dnl Neither one forces an attempt at detection.
1434 dnl
1435 dnl Defines:
1436 dnl  _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
1437 dnl
1438 AC_DEFUN(GLIBCXX_ENABLE_SJLJ_EXCEPTIONS, [
1439   AC_MSG_CHECKING([for exception model to use])
1440   AC_LANG_SAVE
1441   AC_LANG_CPLUSPLUS
1442   GLIBCXX_ENABLE(sjlj-exceptions,auto,,
1443     [force use of builtin_setjmp for exceptions],
1444     [permit yes|no|auto])
1445
1446   if test $enable_sjlj_exceptions = auto; then
1447     # Botheration.  Now we've got to detect the exception model.  Link tests
1448     # against libgcc.a are problematic since we've not been given proper -L
1449     # bits for single-tree newlib and libgloss.
1450     #
1451     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
1452     cat > conftest.$ac_ext << EOF
1453 [#]line __oline__ "configure"
1454 struct S { ~S(); };
1455 void bar();
1456 void foo()
1457 {
1458   S s;
1459   bar();
1460 }
1461 EOF
1462     old_CXXFLAGS="$CXXFLAGS"
1463     CXXFLAGS=-S
1464     if AC_TRY_EVAL(ac_compile); then
1465       if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
1466         enable_sjlj_exceptions=yes
1467       elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
1468         enable_sjlj_exceptions=no
1469       fi
1470     fi
1471     CXXFLAGS="$old_CXXFLAGS"
1472     rm -f conftest*
1473   fi
1474
1475   # This is a tad weird, for hysterical raisins.  We have to map enable/disable 
1476   # to two different models.
1477   case $enable_sjlj_exceptions in
1478     yes)
1479       AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
1480         [Define if the compiler is configured for setjmp/longjmp exceptions.])
1481       ac_exception_model_name=sjlj
1482       ;;
1483     no)
1484       ac_exception_model_name="call frame"
1485       ;;
1486     *)
1487       AC_MSG_ERROR([unable to detect exception model])
1488       ;;
1489   esac
1490  AC_LANG_RESTORE
1491  AC_MSG_RESULT($ac_exception_model_name)
1492 ])
1493
1494
1495 dnl
1496 dnl Add version tags to symbols in shared library (or not), additionally
1497 dnl marking other symbols as private/local (or not).
1498 dnl
1499 dnl --enable-symvers=style adds a version script to the linker call when
1500 dnl       creating the shared library.  The choice of version script is
1501 dnl       controlled by 'style'.
1502 dnl --disable-symvers does not.
1503 dnl  +  Usage:  GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
1504 dnl       Where DEFAULT is either 'yes' or 'no'.  Passing `yes' tries to
1505 dnl       choose a default style based on linker characteristics.  Passing
1506 dnl       'no' disables versioning.
1507 dnl
1508 AC_DEFUN(GLIBCXX_ENABLE_SYMVERS, [
1509
1510 GLIBCXX_ENABLE(symvers,$1,[=STYLE],
1511   [enables symbol versioning of the shared library],
1512   [permit yes|no|gnu])
1513
1514 # If we never went through the GLIBCXX_CHECK_LINKER_FEATURES macro, then we
1515 # don't know enough about $LD to do tricks...
1516 AC_REQUIRE([GLIBCXX_CHECK_LINKER_FEATURES])
1517 # FIXME  The following test is too strict, in theory.
1518 if test $enable_shared = no ||
1519         test "x$LD" = x ||
1520         test x$glibcxx_gnu_ld_version = x; then
1521   enable_symvers=no
1522 fi
1523
1524 # Check to see if libgcc_s exists, indicating that shared libgcc is possible.
1525 if test $enable_symvers != no; then
1526   AC_MSG_CHECKING([for shared libgcc])
1527   ac_save_CFLAGS="$CFLAGS"
1528   CFLAGS=' -lgcc_s'
1529   AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no)
1530   CFLAGS="$ac_save_CFLAGS"
1531   AC_MSG_RESULT($glibcxx_shared_libgcc)
1532 fi
1533
1534 # For GNU ld, we need at least this version.  The format is described in
1535 # GLIBCXX_CHECK_LINKER_FEATURES above.
1536 glibcxx_min_gnu_ld_version=21400
1537 # XXXXXXXXXXX glibcxx_gnu_ld_version=21390
1538
1539 # Check to see if unspecified "yes" value can win, given results above.
1540 # Change "yes" into either "no" or a style name.
1541 if test $enable_symvers = yes; then
1542   if test $with_gnu_ld = yes &&
1543      test $glibcxx_shared_libgcc = yes;
1544   then
1545     if test $glibcxx_gnu_ld_version -ge $glibcxx_min_gnu_ld_version ; then
1546       enable_symvers=gnu
1547     else
1548       # The right tools, the right setup, but too old.  Fallbacks?
1549       AC_MSG_WARN(=== Linker version $glibcxx_gnu_ld_version is too old for)
1550       AC_MSG_WARN(=== full symbol versioning support in this release of GCC.)
1551       AC_MSG_WARN(=== You would need to upgrade your binutils to version)
1552       AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
1553       if test $glibcxx_gnu_ld_version -ge 21200 ; then
1554         # Globbing fix is present, proper block support is not.
1555         dnl AC_MSG_WARN([=== Dude, you are soooo close.  Maybe we can fake it.])
1556         dnl enable_symvers=???
1557         AC_MSG_WARN([=== Symbol versioning will be disabled.])
1558         enable_symvers=no
1559       else
1560         # 2.11 or older.
1561         AC_MSG_WARN([=== Symbol versioning will be disabled.])
1562         enable_symvers=no
1563       fi
1564     fi
1565   else
1566     # just fail for now
1567     AC_MSG_WARN([=== You have requested some kind of symbol versioning, but])
1568     AC_MSG_WARN([=== either you are not using a supported linker, or you are])
1569     AC_MSG_WARN([=== not building a shared libgcc_s (which is required).])
1570     AC_MSG_WARN([=== Symbol versioning will be disabled.])
1571     enable_symvers=no
1572   fi
1573 fi
1574
1575 # Everything parsed; figure out what file to use.
1576 case $enable_symvers in
1577   no)
1578     SYMVER_MAP=config/linker-map.dummy
1579     ;;
1580   gnu)
1581     SYMVER_MAP=config/linker-map.gnu
1582     AC_DEFINE(_GLIBCXX_SYMVER)
1583     ;;
1584 esac
1585
1586 AC_SUBST(SYMVER_MAP)
1587 AC_SUBST(port_specific_symbol_files)
1588 GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
1589 AC_MSG_NOTICE(versioning on shared library symbols is $enable_symvers)
1590 ])
1591
1592
1593 dnl
1594 dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
1595 dnl We must stage the required headers so that they will be installed
1596 dnl with the library (unlike libgcc, the STL implementation is provided
1597 dnl solely within headers).  Since we must not inject random user-space
1598 dnl macro names into user-provided C++ code, we first stage into <file>-in
1599 dnl and process to <file> with an output command.  The reason for a two-
1600 dnl stage process here is to correctly handle $srcdir!=$objdir without
1601 dnl having to write complex code (the sed commands to clean the macro
1602 dnl namespace are complex and fragile enough as it is).  We must also
1603 dnl add a relative path so that -I- is supported properly.
1604 dnl
1605 dnl Substs:
1606 dnl  glibcxx_thread_h
1607 dnl
1608 dnl Defines:
1609 dnl  HAVE_GTHR_DEFAULT
1610 dnl  _GLIBCXX_SUPPORTS_WEAK
1611 dnl
1612 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
1613   AC_MSG_CHECKING([for thread model used by GCC])
1614   target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
1615   AC_MSG_RESULT([$target_thread_file])
1616
1617   if test $target_thread_file != single; then
1618     AC_DEFINE(HAVE_GTHR_DEFAULT)
1619     AC_DEFINE(_GLIBCXX_SUPPORTS_WEAK, __GXX_WEAK__)
1620   fi
1621
1622   glibcxx_thread_h=gthr-$target_thread_file.h
1623   AC_SUBST(glibcxx_thread_h)
1624 ])
1625
1626
1627 # Check whether LC_MESSAGES is available in <locale.h>.
1628 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1629 #
1630 # This file file be copied and used freely without restrictions.  It can
1631 # be used in projects which are not available under the GNU Public License
1632 # but which still want to provide support for the GNU gettext functionality.
1633 # Please note that the actual code is *not* freely available.
1634
1635 # serial 1
1636 AC_DEFUN(AC_LC_MESSAGES, [
1637   AC_CHECK_HEADER(locale.h, [
1638     AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
1639       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1640        ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
1641     if test $ac_cv_val_LC_MESSAGES = yes; then
1642       AC_DEFINE(HAVE_LC_MESSAGES)
1643     fi
1644   ])
1645 ])
1646
1647
1648 sinclude([../libtool.m4])
1649 dnl The lines below arrange for aclocal not to bring an installed
1650 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
1651 dnl add a definition of LIBTOOL to Makefile.in.
1652 ifelse(,,,[AC_SUBST(LIBTOOL)
1653 AC_DEFUN([AM_PROG_LIBTOOL])
1654 AC_DEFUN([AC_LIBTOOL_DLOPEN])
1655 AC_DEFUN([AC_PROG_LD])
1656 ])
1657
1658 dnl vim:et:ts=2:sw=2
1659
1660 # AM_CONDITIONAL                                              -*- Autoconf -*-
1661
1662 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1663
1664 # This program is free software; you can redistribute it and/or modify
1665 # it under the terms of the GNU General Public License as published by
1666 # the Free Software Foundation; either version 2, or (at your option)
1667 # any later version.
1668
1669 # This program is distributed in the hope that it will be useful,
1670 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1671 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1672 # GNU General Public License for more details.
1673
1674 # You should have received a copy of the GNU General Public License
1675 # along with this program; if not, write to the Free Software
1676 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1677 # 02111-1307, USA.
1678
1679 # serial 5
1680
1681 AC_PREREQ(2.52)
1682
1683 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1684 # -------------------------------------
1685 # Define a conditional.
1686 AC_DEFUN([AM_CONDITIONAL],
1687 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1688         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1689 AC_SUBST([$1_TRUE])
1690 AC_SUBST([$1_FALSE])
1691 if $2; then
1692   $1_TRUE=
1693   $1_FALSE='#'
1694 else
1695   $1_TRUE='#'
1696   $1_FALSE=
1697 fi
1698 AC_CONFIG_COMMANDS_PRE(
1699 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1700   AC_MSG_ERROR([conditional "$1" was never defined.
1701 Usually this means the macro was only invoked conditionally.])
1702 fi])])
1703
1704 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
1705
1706 # This program is free software; you can redistribute it and/or modify
1707 # it under the terms of the GNU General Public License as published by
1708 # the Free Software Foundation; either version 2, or (at your option)
1709 # any later version.
1710
1711 # This program is distributed in the hope that it will be useful,
1712 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1713 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1714 # GNU General Public License for more details.
1715
1716 # You should have received a copy of the GNU General Public License
1717 # along with this program; if not, write to the Free Software
1718 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1719 # 02111-1307, USA.
1720
1721 # serial 3
1722
1723 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
1724 # ---------------------------------------------------
1725 # Add --enable-multilib to configure.
1726 AC_DEFUN([AM_ENABLE_MULTILIB],
1727 [# Default to --enable-multilib
1728 AC_ARG_ENABLE(multilib,
1729 [  --enable-multilib         build many library versions (default)],
1730 [case "$enableval" in
1731   yes) multilib=yes ;;
1732   no)  multilib=no ;;
1733   *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
1734  esac],
1735               [multilib=yes])
1736
1737 # We may get other options which we leave undocumented:
1738 # --with-target-subdir, --with-multisrctop, --with-multisubdir
1739 # See config-ml.in if you want the gory details.
1740
1741 if test "$srcdir" = "."; then
1742   if test "$with_target_subdir" != "."; then
1743     multi_basedir="$srcdir/$with_multisrctop../$2"
1744   else
1745     multi_basedir="$srcdir/$with_multisrctop$2"
1746   fi
1747 else
1748   multi_basedir="$srcdir/$2"
1749 fi
1750 AC_SUBST(multi_basedir)
1751
1752 AC_OUTPUT_COMMANDS([
1753 # Only add multilib support code if we just rebuilt the top-level
1754 # Makefile.
1755 case " $CONFIG_FILES " in
1756  *" ]m4_default([$1],Makefile)[ "*)
1757    ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
1758    ;;
1759 esac],
1760                    [
1761 srcdir="$srcdir"
1762 host="$host"
1763 target="$target"
1764 with_multisubdir="$with_multisubdir"
1765 with_multisrctop="$with_multisrctop"
1766 with_target_subdir="$with_target_subdir"
1767 ac_configure_args="${multilib_arg} ${ac_configure_args}"
1768 multi_basedir="$multi_basedir"
1769 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1770 CC="$CC"])])dnl
1771
1772 # isc-posix.m4 serial 2 (gettext-0.11.2)
1773 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1774 dnl This file is free software, distributed under the terms of the GNU
1775 dnl General Public License.  As a special exception to the GNU General
1776 dnl Public License, this file may be distributed as part of a program
1777 dnl that contains a configuration script generated by Autoconf, under
1778 dnl the same distribution terms as the rest of that program.
1779
1780 # This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
1781
1782 # This test replaces the one in autoconf.
1783 # Currently this macro should have the same name as the autoconf macro
1784 # because gettext's gettext.m4 (distributed in the automake package)
1785 # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
1786 # give these diagnostics:
1787 #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1788 #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1789
1790 undefine([AC_ISC_POSIX])
1791
1792 AC_DEFUN([AC_ISC_POSIX],
1793   [
1794     dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1795     AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1796   ]
1797 )
1798
1799 # Add --enable-maintainer-mode option to configure.
1800 # From Jim Meyering
1801
1802 # Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
1803
1804 # This program is free software; you can redistribute it and/or modify
1805 # it under the terms of the GNU General Public License as published by
1806 # the Free Software Foundation; either version 2, or (at your option)
1807 # any later version.
1808
1809 # This program is distributed in the hope that it will be useful,
1810 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1811 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1812 # GNU General Public License for more details.
1813
1814 # You should have received a copy of the GNU General Public License
1815 # along with this program; if not, write to the Free Software
1816 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1817 # 02111-1307, USA.
1818
1819 # serial 2
1820
1821 AC_DEFUN([AM_MAINTAINER_MODE],
1822 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1823   dnl maintainer-mode is disabled by default
1824   AC_ARG_ENABLE(maintainer-mode,
1825 [  --enable-maintainer-mode enable make rules and dependencies not useful
1826                           (and sometimes confusing) to the casual installer],
1827       USE_MAINTAINER_MODE=$enableval,
1828       USE_MAINTAINER_MODE=no)
1829   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1830   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1831   MAINT=$MAINTAINER_MODE_TRUE
1832   AC_SUBST(MAINT)dnl
1833 ]
1834 )
1835
1836 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1837
1838 # Do all the work for Automake.                            -*- Autoconf -*-
1839
1840 # This macro actually does too much some checks are only needed if
1841 # your package does certain things.  But this isn't really a big deal.
1842
1843 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1844 # Free Software Foundation, Inc.
1845
1846 # This program is free software; you can redistribute it and/or modify
1847 # it under the terms of the GNU General Public License as published by
1848 # the Free Software Foundation; either version 2, or (at your option)
1849 # any later version.
1850
1851 # This program is distributed in the hope that it will be useful,
1852 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1853 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1854 # GNU General Public License for more details.
1855
1856 # You should have received a copy of the GNU General Public License
1857 # along with this program; if not, write to the Free Software
1858 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1859 # 02111-1307, USA.
1860
1861 # serial 10
1862
1863 AC_PREREQ([2.54])
1864
1865 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
1866 # the ones we care about.
1867 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1868
1869 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1870 # AM_INIT_AUTOMAKE([OPTIONS])
1871 # -----------------------------------------------
1872 # The call with PACKAGE and VERSION arguments is the old style
1873 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1874 # and VERSION should now be passed to AC_INIT and removed from
1875 # the call to AM_INIT_AUTOMAKE.
1876 # We support both call styles for the transition.  After
1877 # the next Automake release, Autoconf can make the AC_INIT
1878 # arguments mandatory, and then we can depend on a new Autoconf
1879 # release and drop the old call support.
1880 AC_DEFUN([AM_INIT_AUTOMAKE],
1881 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1882  AC_REQUIRE([AC_PROG_INSTALL])dnl
1883 # test to see if srcdir already configured
1884 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1885    test -f $srcdir/config.status; then
1886   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1887 fi
1888
1889 # test whether we have cygpath
1890 if test -z "$CYGPATH_W"; then
1891   if (cygpath --version) >/dev/null 2>/dev/null; then
1892     CYGPATH_W='cygpath -w'
1893   else
1894     CYGPATH_W=echo
1895   fi
1896 fi
1897 AC_SUBST([CYGPATH_W])
1898
1899 # Define the identity of the package.
1900 dnl Distinguish between old-style and new-style calls.
1901 m4_ifval([$2],
1902 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1903  AC_SUBST([PACKAGE], [$1])dnl
1904  AC_SUBST([VERSION], [$2])],
1905 [_AM_SET_OPTIONS([$1])dnl
1906  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1907  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1908
1909 _AM_IF_OPTION([no-define],,
1910 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1911  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1912
1913 # Some tools Automake needs.
1914 AC_REQUIRE([AM_SANITY_CHECK])dnl
1915 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1916 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1917 AM_MISSING_PROG(AUTOCONF, autoconf)
1918 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1919 AM_MISSING_PROG(AUTOHEADER, autoheader)
1920 AM_MISSING_PROG(MAKEINFO, makeinfo)
1921 AM_MISSING_PROG(AMTAR, tar)
1922 AM_PROG_INSTALL_SH
1923 AM_PROG_INSTALL_STRIP
1924 # We need awk for the "check" target.  The system "awk" is bad on
1925 # some platforms.
1926 AC_REQUIRE([AC_PROG_AWK])dnl
1927 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1928 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1929
1930 _AM_IF_OPTION([no-dependencies],,
1931 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1932                   [_AM_DEPENDENCIES(CC)],
1933                   [define([AC_PROG_CC],
1934                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1935 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1936                   [_AM_DEPENDENCIES(CXX)],
1937                   [define([AC_PROG_CXX],
1938                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1939 ])
1940 ])
1941
1942
1943 # When config.status generates a header, we must update the stamp-h file.
1944 # This file resides in the same directory as the config header
1945 # that is generated.  The stamp files are numbered to have different names.
1946
1947 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1948 # loop where config.status creates the headers, so we can generate
1949 # our stamp files there.
1950 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1951 [# Compute $1's index in $config_headers.
1952 _am_stamp_count=1
1953 for _am_header in $config_headers :; do
1954   case $_am_header in
1955     $1 | $1:* )
1956       break ;;
1957     * )
1958       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1959   esac
1960 done
1961 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1962
1963 # Copyright 2002  Free Software Foundation, Inc.
1964
1965 # This program is free software; you can redistribute it and/or modify
1966 # it under the terms of the GNU General Public License as published by
1967 # the Free Software Foundation; either version 2, or (at your option)
1968 # any later version.
1969
1970 # This program is distributed in the hope that it will be useful,
1971 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1972 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1973 # GNU General Public License for more details.
1974
1975 # You should have received a copy of the GNU General Public License
1976 # along with this program; if not, write to the Free Software
1977 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1978
1979 # AM_AUTOMAKE_VERSION(VERSION)
1980 # ----------------------------
1981 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1982 # generated from the m4 files accompanying Automake X.Y.
1983 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1984
1985 # AM_SET_CURRENT_AUTOMAKE_VERSION
1986 # -------------------------------
1987 # Call AM_AUTOMAKE_VERSION so it can be traced.
1988 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1989 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1990          [AM_AUTOMAKE_VERSION([1.7.6])])
1991
1992 # Helper functions for option handling.                    -*- Autoconf -*-
1993
1994 # Copyright 2001, 2002  Free Software Foundation, Inc.
1995
1996 # This program is free software; you can redistribute it and/or modify
1997 # it under the terms of the GNU General Public License as published by
1998 # the Free Software Foundation; either version 2, or (at your option)
1999 # any later version.
2000
2001 # This program is distributed in the hope that it will be useful,
2002 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2004 # GNU General Public License for more details.
2005
2006 # You should have received a copy of the GNU General Public License
2007 # along with this program; if not, write to the Free Software
2008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2009 # 02111-1307, USA.
2010
2011 # serial 2
2012
2013 # _AM_MANGLE_OPTION(NAME)
2014 # -----------------------
2015 AC_DEFUN([_AM_MANGLE_OPTION],
2016 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2017
2018 # _AM_SET_OPTION(NAME)
2019 # ------------------------------
2020 # Set option NAME.  Presently that only means defining a flag for this option.
2021 AC_DEFUN([_AM_SET_OPTION],
2022 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2023
2024 # _AM_SET_OPTIONS(OPTIONS)
2025 # ----------------------------------
2026 # OPTIONS is a space-separated list of Automake options.
2027 AC_DEFUN([_AM_SET_OPTIONS],
2028 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2029
2030 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2031 # -------------------------------------------
2032 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2033 AC_DEFUN([_AM_IF_OPTION],
2034 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2035
2036 #
2037 # Check to make sure that the build environment is sane.
2038 #
2039
2040 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2041
2042 # This program is free software; you can redistribute it and/or modify
2043 # it under the terms of the GNU General Public License as published by
2044 # the Free Software Foundation; either version 2, or (at your option)
2045 # any later version.
2046
2047 # This program is distributed in the hope that it will be useful,
2048 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2049 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2050 # GNU General Public License for more details.
2051
2052 # You should have received a copy of the GNU General Public License
2053 # along with this program; if not, write to the Free Software
2054 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2055 # 02111-1307, USA.
2056
2057 # serial 3
2058
2059 # AM_SANITY_CHECK
2060 # ---------------
2061 AC_DEFUN([AM_SANITY_CHECK],
2062 [AC_MSG_CHECKING([whether build environment is sane])
2063 # Just in case
2064 sleep 1
2065 echo timestamp > conftest.file
2066 # Do `set' in a subshell so we don't clobber the current shell's
2067 # arguments.  Must try -L first in case configure is actually a
2068 # symlink; some systems play weird games with the mod time of symlinks
2069 # (eg FreeBSD returns the mod time of the symlink's containing
2070 # directory).
2071 if (
2072    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2073    if test "$[*]" = "X"; then
2074       # -L didn't work.
2075       set X `ls -t $srcdir/configure conftest.file`
2076    fi
2077    rm -f conftest.file
2078    if test "$[*]" != "X $srcdir/configure conftest.file" \
2079       && test "$[*]" != "X conftest.file $srcdir/configure"; then
2080
2081       # If neither matched, then we have a broken ls.  This can happen
2082       # if, for instance, CONFIG_SHELL is bash and it inherits a
2083       # broken ls alias from the environment.  This has actually
2084       # happened.  Such a system could not be considered "sane".
2085       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2086 alias in your environment])
2087    fi
2088
2089    test "$[2]" = conftest.file
2090    )
2091 then
2092    # Ok.
2093    :
2094 else
2095    AC_MSG_ERROR([newly created file is older than distributed files!
2096 Check your system clock])
2097 fi
2098 AC_MSG_RESULT(yes)])
2099
2100 #  -*- Autoconf -*-
2101
2102
2103 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2104
2105 # This program is free software; you can redistribute it and/or modify
2106 # it under the terms of the GNU General Public License as published by
2107 # the Free Software Foundation; either version 2, or (at your option)
2108 # any later version.
2109
2110 # This program is distributed in the hope that it will be useful,
2111 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2112 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2113 # GNU General Public License for more details.
2114
2115 # You should have received a copy of the GNU General Public License
2116 # along with this program; if not, write to the Free Software
2117 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2118 # 02111-1307, USA.
2119
2120 # serial 3
2121
2122 # AM_MISSING_PROG(NAME, PROGRAM)
2123 # ------------------------------
2124 AC_DEFUN([AM_MISSING_PROG],
2125 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2126 $1=${$1-"${am_missing_run}$2"}
2127 AC_SUBST($1)])
2128
2129
2130 # AM_MISSING_HAS_RUN
2131 # ------------------
2132 # Define MISSING if not defined so far and test if it supports --run.
2133 # If it does, set am_missing_run to use it, otherwise, to nothing.
2134 AC_DEFUN([AM_MISSING_HAS_RUN],
2135 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2136 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2137 # Use eval to expand $SHELL
2138 if eval "$MISSING --run true"; then
2139   am_missing_run="$MISSING --run "
2140 else
2141   am_missing_run=
2142   AC_MSG_WARN([`missing' script is too old or missing])
2143 fi
2144 ])
2145
2146 # AM_AUX_DIR_EXPAND
2147
2148 # Copyright 2001 Free Software Foundation, Inc.
2149
2150 # This program is free software; you can redistribute it and/or modify
2151 # it under the terms of the GNU General Public License as published by
2152 # the Free Software Foundation; either version 2, or (at your option)
2153 # any later version.
2154
2155 # This program is distributed in the hope that it will be useful,
2156 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2157 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2158 # GNU General Public License for more details.
2159
2160 # You should have received a copy of the GNU General Public License
2161 # along with this program; if not, write to the Free Software
2162 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2163 # 02111-1307, USA.
2164
2165 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2166 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
2167 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2168 #
2169 # Of course, Automake must honor this variable whenever it calls a
2170 # tool from the auxiliary directory.  The problem is that $srcdir (and
2171 # therefore $ac_aux_dir as well) can be either absolute or relative,
2172 # depending on how configure is run.  This is pretty annoying, since
2173 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2174 # source directory, any form will work fine, but in subdirectories a
2175 # relative path needs to be adjusted first.
2176 #
2177 # $ac_aux_dir/missing
2178 #    fails when called from a subdirectory if $ac_aux_dir is relative
2179 # $top_srcdir/$ac_aux_dir/missing
2180 #    fails if $ac_aux_dir is absolute,
2181 #    fails when called from a subdirectory in a VPATH build with
2182 #          a relative $ac_aux_dir
2183 #
2184 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2185 # are both prefixed by $srcdir.  In an in-source build this is usually
2186 # harmless because $srcdir is `.', but things will broke when you
2187 # start a VPATH build or use an absolute $srcdir.
2188 #
2189 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2190 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
2191 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2192 # and then we would define $MISSING as
2193 #   MISSING="\${SHELL} $am_aux_dir/missing"
2194 # This will work as long as MISSING is not called from configure, because
2195 # unfortunately $(top_srcdir) has no meaning in configure.
2196 # However there are other variables, like CC, which are often used in
2197 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2198 #
2199 # Another solution, used here, is to always expand $ac_aux_dir to an
2200 # absolute PATH.  The drawback is that using absolute paths prevent a
2201 # configured tree to be moved without reconfiguration.
2202
2203 # Rely on autoconf to set up CDPATH properly.
2204 AC_PREREQ([2.50])
2205
2206 AC_DEFUN([AM_AUX_DIR_EXPAND], [
2207 # expand $ac_aux_dir to an absolute path
2208 am_aux_dir=`cd $ac_aux_dir && pwd`
2209 ])
2210
2211 # AM_PROG_INSTALL_SH
2212 # ------------------
2213 # Define $install_sh.
2214
2215 # Copyright 2001 Free Software Foundation, Inc.
2216
2217 # This program is free software; you can redistribute it and/or modify
2218 # it under the terms of the GNU General Public License as published by
2219 # the Free Software Foundation; either version 2, or (at your option)
2220 # any later version.
2221
2222 # This program is distributed in the hope that it will be useful,
2223 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2224 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2225 # GNU General Public License for more details.
2226
2227 # You should have received a copy of the GNU General Public License
2228 # along with this program; if not, write to the Free Software
2229 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2230 # 02111-1307, USA.
2231
2232 AC_DEFUN([AM_PROG_INSTALL_SH],
2233 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2234 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2235 AC_SUBST(install_sh)])
2236
2237 # AM_PROG_INSTALL_STRIP
2238
2239 # Copyright 2001 Free Software Foundation, Inc.
2240
2241 # This program is free software; you can redistribute it and/or modify
2242 # it under the terms of the GNU General Public License as published by
2243 # the Free Software Foundation; either version 2, or (at your option)
2244 # any later version.
2245
2246 # This program is distributed in the hope that it will be useful,
2247 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2248 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2249 # GNU General Public License for more details.
2250
2251 # You should have received a copy of the GNU General Public License
2252 # along with this program; if not, write to the Free Software
2253 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2254 # 02111-1307, USA.
2255
2256 # One issue with vendor `install' (even GNU) is that you can't
2257 # specify the program used to strip binaries.  This is especially
2258 # annoying in cross-compiling environments, where the build's strip
2259 # is unlikely to handle the host's binaries.
2260 # Fortunately install-sh will honor a STRIPPROG variable, so we
2261 # always use install-sh in `make install-strip', and initialize
2262 # STRIPPROG with the value of the STRIP variable (set by the user).
2263 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2264 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2265 # Installed binaries are usually stripped using `strip' when the user
2266 # run `make install-strip'.  However `strip' might not be the right
2267 # tool to use in cross-compilation environments, therefore Automake
2268 # will honor the `STRIP' environment variable to overrule this program.
2269 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2270 if test "$cross_compiling" != no; then
2271   AC_CHECK_TOOL([STRIP], [strip], :)
2272 fi
2273 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2274 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2275
2276 #                                                          -*- Autoconf -*-
2277 # Copyright (C) 2003  Free Software Foundation, Inc.
2278
2279 # This program is free software; you can redistribute it and/or modify
2280 # it under the terms of the GNU General Public License as published by
2281 # the Free Software Foundation; either version 2, or (at your option)
2282 # any later version.
2283
2284 # This program is distributed in the hope that it will be useful,
2285 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2286 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2287 # GNU General Public License for more details.
2288
2289 # You should have received a copy of the GNU General Public License
2290 # along with this program; if not, write to the Free Software
2291 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2292 # 02111-1307, USA.
2293
2294 # serial 1
2295
2296 # Check whether the underlying file-system supports filenames
2297 # with a leading dot.  For instance MS-DOS doesn't.
2298 AC_DEFUN([AM_SET_LEADING_DOT],
2299 [rm -rf .tst 2>/dev/null
2300 mkdir .tst 2>/dev/null
2301 if test -d .tst; then
2302   am__leading_dot=.
2303 else
2304   am__leading_dot=_
2305 fi
2306 rmdir .tst 2>/dev/null
2307 AC_SUBST([am__leading_dot])])
2308
2309 # serial 5                                              -*- Autoconf -*-
2310
2311 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
2312
2313 # This program is free software; you can redistribute it and/or modify
2314 # it under the terms of the GNU General Public License as published by
2315 # the Free Software Foundation; either version 2, or (at your option)
2316 # any later version.
2317
2318 # This program is distributed in the hope that it will be useful,
2319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2321 # GNU General Public License for more details.
2322
2323 # You should have received a copy of the GNU General Public License
2324 # along with this program; if not, write to the Free Software
2325 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2326 # 02111-1307, USA.
2327
2328
2329 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2330 # written in clear, in which case automake, when reading aclocal.m4,
2331 # will think it sees a *use*, and therefore will trigger all it's
2332 # C support machinery.  Also note that it means that autoscan, seeing
2333 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2334
2335
2336
2337 # _AM_DEPENDENCIES(NAME)
2338 # ----------------------
2339 # See how the compiler implements dependency checking.
2340 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2341 # We try a few techniques and use that to set a single cache variable.
2342 #
2343 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2344 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2345 # dependency, and given that the user is not expected to run this macro,
2346 # just rely on AC_PROG_CC.
2347 AC_DEFUN([_AM_DEPENDENCIES],
2348 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2349 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2350 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2351 AC_REQUIRE([AM_DEP_TRACK])dnl
2352
2353 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
2354        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
2355        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2356        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
2357                    [depcc="$$1"   am_compiler_list=])
2358
2359 AC_CACHE_CHECK([dependency style of $depcc],
2360                [am_cv_$1_dependencies_compiler_type],
2361 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2362   # We make a subdir and do the tests there.  Otherwise we can end up
2363   # making bogus files that we don't know about and never remove.  For
2364   # instance it was reported that on HP-UX the gcc test will end up
2365   # making a dummy file named `D' -- because `-MD' means `put the output
2366   # in D'.
2367   mkdir conftest.dir
2368   # Copy depcomp to subdir because otherwise we won't find it if we're
2369   # using a relative directory.
2370   cp "$am_depcomp" conftest.dir
2371   cd conftest.dir
2372   # We will build objects and dependencies in a subdirectory because
2373   # it helps to detect inapplicable dependency modes.  For instance
2374   # both Tru64's cc and ICC support -MD to output dependencies as a
2375   # side effect of compilation, but ICC will put the dependencies in
2376   # the current directory while Tru64 will put them in the object
2377   # directory.
2378   mkdir sub
2379
2380   am_cv_$1_dependencies_compiler_type=none
2381   if test "$am_compiler_list" = ""; then
2382      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2383   fi
2384   for depmode in $am_compiler_list; do
2385     # Setup a source with many dependencies, because some compilers
2386     # like to wrap large dependency lists on column 80 (with \), and
2387     # we should not choose a depcomp mode which is confused by this.
2388     #
2389     # We need to recreate these files for each test, as the compiler may
2390     # overwrite some of them when testing with obscure command lines.
2391     # This happens at least with the AIX C compiler.
2392     : > sub/conftest.c
2393     for i in 1 2 3 4 5 6; do
2394       echo '#include "conftst'$i'.h"' >> sub/conftest.c
2395       : > sub/conftst$i.h
2396     done
2397     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2398
2399     case $depmode in
2400     nosideeffect)
2401       # after this tag, mechanisms are not by side-effect, so they'll
2402       # only be used when explicitly requested
2403       if test "x$enable_dependency_tracking" = xyes; then
2404         continue
2405       else
2406         break
2407       fi
2408       ;;
2409     none) break ;;
2410     esac
2411     # We check with `-c' and `-o' for the sake of the "dashmstdout"
2412     # mode.  It turns out that the SunPro C++ compiler does not properly
2413     # handle `-M -o', and we need to detect this.
2414     if depmode=$depmode \
2415        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2416        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2417        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2418          >/dev/null 2>conftest.err &&
2419        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2420        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2421        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2422       # icc doesn't choke on unknown options, it will just issue warnings
2423       # (even with -Werror).  So we grep stderr for any message
2424       # that says an option was ignored.
2425       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
2426         am_cv_$1_dependencies_compiler_type=$depmode
2427         break
2428       fi
2429     fi
2430   done
2431
2432   cd ..
2433   rm -rf conftest.dir
2434 else
2435   am_cv_$1_dependencies_compiler_type=none
2436 fi
2437 ])
2438 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2439 AM_CONDITIONAL([am__fastdep$1], [
2440   test "x$enable_dependency_tracking" != xno \
2441   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2442 ])
2443
2444
2445 # AM_SET_DEPDIR
2446 # -------------
2447 # Choose a directory name for dependency files.
2448 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2449 AC_DEFUN([AM_SET_DEPDIR],
2450 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2451 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2452 ])
2453
2454
2455 # AM_DEP_TRACK
2456 # ------------
2457 AC_DEFUN([AM_DEP_TRACK],
2458 [AC_ARG_ENABLE(dependency-tracking,
2459 [  --disable-dependency-tracking Speeds up one-time builds
2460   --enable-dependency-tracking  Do not reject slow dependency extractors])
2461 if test "x$enable_dependency_tracking" != xno; then
2462   am_depcomp="$ac_aux_dir/depcomp"
2463   AMDEPBACKSLASH='\'
2464 fi
2465 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2466 AC_SUBST([AMDEPBACKSLASH])
2467 ])
2468
2469 # Generate code to set up dependency tracking.   -*- Autoconf -*-
2470
2471 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2472
2473 # This program is free software; you can redistribute it and/or modify
2474 # it under the terms of the GNU General Public License as published by
2475 # the Free Software Foundation; either version 2, or (at your option)
2476 # any later version.
2477
2478 # This program is distributed in the hope that it will be useful,
2479 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2480 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2481 # GNU General Public License for more details.
2482
2483 # You should have received a copy of the GNU General Public License
2484 # along with this program; if not, write to the Free Software
2485 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2486 # 02111-1307, USA.
2487
2488 #serial 2
2489
2490 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2491 # ------------------------------
2492 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2493 [for mf in $CONFIG_FILES; do
2494   # Strip MF so we end up with the name of the file.
2495   mf=`echo "$mf" | sed -e 's/:.*$//'`
2496   # Check whether this is an Automake generated Makefile or not.
2497   # We used to match only the files named `Makefile.in', but
2498   # some people rename them; so instead we look at the file content.
2499   # Grep'ing the first line is not enough: some people post-process
2500   # each Makefile.in and add a new line on top of each file to say so.
2501   # So let's grep whole file.
2502   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2503     dirpart=`AS_DIRNAME("$mf")`
2504   else
2505     continue
2506   fi
2507   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2508   # Extract the definition of DEP_FILES from the Makefile without
2509   # running `make'.
2510   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
2511   test -z "$DEPDIR" && continue
2512   # When using ansi2knr, U may be empty or an underscore; expand it
2513   U=`sed -n -e '/^U = / s///p' < "$mf"`
2514   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2515   # We invoke sed twice because it is the simplest approach to
2516   # changing $(DEPDIR) to its actual value in the expansion.
2517   for file in `sed -n -e '
2518     /^DEP_FILES = .*\\\\$/ {
2519       s/^DEP_FILES = //
2520       :loop
2521         s/\\\\$//
2522         p
2523         n
2524         /\\\\$/ b loop
2525       p
2526     }
2527     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
2528        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2529     # Make sure the directory exists.
2530     test -f "$dirpart/$file" && continue
2531     fdir=`AS_DIRNAME(["$file"])`
2532     AS_MKDIR_P([$dirpart/$fdir])
2533     # echo "creating $dirpart/$file"
2534     echo '# dummy' > "$dirpart/$file"
2535   done
2536 done
2537 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2538
2539
2540 # AM_OUTPUT_DEPENDENCY_COMMANDS
2541 # -----------------------------
2542 # This macro should only be invoked once -- use via AC_REQUIRE.
2543 #
2544 # This code is only required when automatic dependency tracking
2545 # is enabled.  FIXME.  This creates each `.P' file that we will
2546 # need in order to bootstrap the dependency handling code.
2547 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2548 [AC_CONFIG_COMMANDS([depfiles],
2549      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2550      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2551 ])
2552
2553 # Check to see how 'make' treats includes.      -*- Autoconf -*-
2554
2555 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2556
2557 # This program is free software; you can redistribute it and/or modify
2558 # it under the terms of the GNU General Public License as published by
2559 # the Free Software Foundation; either version 2, or (at your option)
2560 # any later version.
2561
2562 # This program is distributed in the hope that it will be useful,
2563 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2564 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2565 # GNU General Public License for more details.
2566
2567 # You should have received a copy of the GNU General Public License
2568 # along with this program; if not, write to the Free Software
2569 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2570 # 02111-1307, USA.
2571
2572 # serial 2
2573
2574 # AM_MAKE_INCLUDE()
2575 # -----------------
2576 # Check to see how make treats includes.
2577 AC_DEFUN([AM_MAKE_INCLUDE],
2578 [am_make=${MAKE-make}
2579 cat > confinc << 'END'
2580 am__doit:
2581         @echo done
2582 .PHONY: am__doit
2583 END
2584 # If we don't find an include directive, just comment out the code.
2585 AC_MSG_CHECKING([for style of include used by $am_make])
2586 am__include="#"
2587 am__quote=
2588 _am_result=none
2589 # First try GNU make style include.
2590 echo "include confinc" > confmf
2591 # We grep out `Entering directory' and `Leaving directory'
2592 # messages which can occur if `w' ends up in MAKEFLAGS.
2593 # In particular we don't look at `^make:' because GNU make might
2594 # be invoked under some other name (usually "gmake"), in which
2595 # case it prints its new name instead of `make'.
2596 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2597    am__include=include
2598    am__quote=
2599    _am_result=GNU
2600 fi
2601 # Now try BSD make style include.
2602 if test "$am__include" = "#"; then
2603    echo '.include "confinc"' > confmf
2604    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2605       am__include=.include
2606       am__quote="\""
2607       _am_result=BSD
2608    fi
2609 fi
2610 AC_SUBST([am__include])
2611 AC_SUBST([am__quote])
2612 AC_MSG_RESULT([$_am_result])
2613 rm -f confinc confmf
2614 ])
2615