OSDN Git Service

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