OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / configure.in
index f9b1cf8..f73a4c1 100644 (file)
 # Process this file with autoconf to produce a configure script, like so:
-# aclocal, autoconf, autoheader, automake
+# aclocal && autoconf && autoheader && automake
 
 AC_PREREQ(2.13)
 AC_INIT(src/ios.cc)
 
-# When building with srcdir == objdir, links to the source files will
-# be created in directories within the target_subdir.  We have to
-# adjust toplevel_srcdir accordingly, so that configure finds
-# install-sh and other auxiliary files that live in the top-level
-# source directory.
-if test "${srcdir}" = "."; then
-  if test -z "${with_target_subdir}"; then
-    toprel=".."
-  else
-    if test "${with_target_subdir}" != "."; then
-      toprel="${with_multisrctop}../.."
-    else
-      toprel="${with_multisrctop}.."
-    fi
-  fi
-else
-  toprel=".."
-fi
-AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
-toplevel_srcdir=\${top_srcdir}/$toprel
-AC_SUBST(toplevel_srcdir)
-
-dnl This is here just to satisfy automake.
-ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
-
-# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
-# AC 2.50 sets target_alias iff the user specified --target, but we use it
-# everywhere, so we set it here just to be sure.
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.  Only used at the end of this file.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+PACKAGE=libstdc++
+AC_SUBST(PACKAGE)
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=5:1:0
+AC_SUBST(libtool_VERSION)
+
+GLIBCPP_TOPREL_CONFIGURE
+
+# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
+#
+# You will slowly go insane if you do not grok the following fact:  when
+# building v3 as part of the compiler, the top-level /target/ becomes the
+# library's /host/.  `configure' then causes --target to default to --host,
+# exactly like any other package using autoconf.  Therefore, 'target' and
+# 'host' will always be the same.  This makes sense both for native and
+# cross compilers, just think about it for a little while.  :-)
+#
+# Also, if v3 is being configured as part of a cross compiler, the top-level
+# configure script will pass the "real" host as $with_cross_host.
+#
+# AC 2.5x sets target_alias iff the user specified --target, but we use it
+# everywhere, so we set it here just to be sure.  In AC 2.13
+# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
 AC_CANONICAL_SYSTEM
 target_alias=${target_alias-$target}
 AC_SUBST(target_alias)
 
-# We use these options to decide which functions to include.
-AC_ARG_WITH(target-subdir,
-[  --with-target-subdir=SUBDIR
-                           configuring in a subdirectory])
-AC_ARG_WITH(cross-host,
-[  --with-cross-host=HOST  configuring with a cross compiler])
-
-# Runs configure.host and configure.target. Have to run this before
-# the GLIBCPP_ENABLE_* macros below.
+# Runs configure.target, finds CC, CXX and assorted other critical bits.
+# Must run this before the GLIBCPP_ENABLE_* macros below.
 GLIBCPP_CONFIGURE(.)
 
+AM_INIT_AUTOMAKE($PACKAGE, $gcc_version)
+AM_CONFIG_HEADER(config.h)
+
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
-GLIBCPP_CHECK_GNU_MAKE
-
-
-
-AM_CONFIG_HEADER(config.h)
 
 # Check for c++ or library specific bits that don't require linking.
-GLIBCPP_CHECK_COMPILER_VERSION
+#GLIBCPP_CHECK_COMPILER_VERSION
+GLIBCPP_CHECK_GNU_MAKE
 
-# Enable all the crazy c++ stuff.  C_MBCHAR must come early.
+# Enable all the variable C++ stuff.  C_MBCHAR must come early.
 GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
 GLIBCPP_ENABLE_CSTDIO
 GLIBCPP_ENABLE_CLOCALE
 GLIBCPP_ENABLE_C_MBCHAR([yes])
 GLIBCPP_ENABLE_C99([yes])
 GLIBCPP_ENABLE_LONG_LONG([yes])
-GLIBCPP_ENABLE_CHEADERS([c_std])
+GLIBCPP_ENABLE_CHEADERS([$c_model])
 GLIBCPP_ENABLE_THREADS
 GLIBCPP_ENABLE_CXX_FLAGS([none])
 GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
-
-if test -n "$with_cross_host"; then
-
-  # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
-  # may not work correctly, because the compiler may not be able to
-  # link executables.
-  xcompiling=1
-  NATIVE=no
-
-  # If Canadian cross, then don't pick up tools from the build
-  # directory.
-  if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
+GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
+GLIBCPP_ENABLE_CONCEPT_CHECKS
+
+# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
+AC_CHECK_HEADERS(string.h stdlib.h)
+
+if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+
+  # We are being configured with some form of cross compiler.
+  GLIBCPP_IS_CROSS_COMPILING=1
+
+  # This lets us hard-code the functionality we know we'll have in the cross
+  # target environment.  "Let" is a sugar-coated word placed on an especially
+  # dull and tedious hack, actually.
+  #
+  # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
+  # that involve linking, can't be used:
+  #    "cannot open sim-crt0.o"
+  #    "cannot open crt0.o"
+  # etc.  All this is because there currently exists no unified, consistent
+  # way for top level CC information to be passed down to target directories:
+  # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
+  # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
+  # crosses can be removed.
+
+  # If Canadian cross, then don't pick up tools from the build directory.
+  # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
+  if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
     CANADIAN=yes
-    NULL_TARGET=yes
   else
     CANADIAN=no
-    NULL_TARGET=no
   fi
 
+  # Construct crosses by hand, eliminating bits that need ld...
+  # GLIBCPP_CHECK_COMPILER_FEATURES
+  # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+  # GLIBCPP_CHECK_MATH_SUPPORT
+
   case "$target_alias" in
     *-linux*)
-       # Construct linux crosses by hand, eliminating bits that need ld...
-        # Check for available headers.
-        AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
-       machine/endian.h machine/param.h sys/machine.h fp.h locale.h \
-       float.h inttypes.h])
-
-       # GLIBCPP_CHECK_COMPILER_FEATURES
-       SECTION_FLAGS='-ffunction-sections -fdata-sections'
-       AC_SUBST(SECTION_FLAGS)
-       GLIBCPP_CHECK_LINKER_FEATURES
-       # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
-       # GLIBCPP_CHECK_MATH_SUPPORT
-       AC_DEFINE(HAVE_ACOSF)
-       AC_DEFINE(HAVE_ASINF)
-       AC_DEFINE(HAVE_ATAN2F)
-       AC_DEFINE(HAVE_ATANF)
-       AC_DEFINE(HAVE_CEILF)
-       AC_DEFINE(HAVE_COPYSIGN)
-       AC_DEFINE(HAVE_COPYSIGNF)
-       AC_DEFINE(HAVE_COSF)
-       AC_DEFINE(HAVE_COSHF)
-       AC_DEFINE(HAVE_EXPF)
-       AC_DEFINE(HAVE_FABSF)
-       AC_DEFINE(HAVE_FINITE)
-       AC_DEFINE(HAVE_FINITEF)
-       AC_DEFINE(HAVE_FLOORF)
-       AC_DEFINE(HAVE_FMODF)
-       AC_DEFINE(HAVE_FREXPF)
-       AC_DEFINE(HAVE_ISINF)
-       AC_DEFINE(HAVE_ISINFF)
-       AC_DEFINE(HAVE_ISNAN)
-       AC_DEFINE(HAVE_ISNANF)
-       AC_DEFINE(HAVE_LDEXPF)
-       AC_DEFINE(HAVE_LOG10F)
-       AC_DEFINE(HAVE_LOGF)
-       AC_DEFINE(HAVE_MODFF)
-       AC_DEFINE(HAVE_POWF)
-       AC_DEFINE(HAVE_SINCOS)
-       AC_DEFINE(HAVE_SINCOSF)
-       AC_DEFINE(HAVE_SINF)
-       AC_DEFINE(HAVE_SINHF)
-       AC_DEFINE(HAVE_SQRTF)
-       AC_DEFINE(HAVE_TANF)
-       AC_DEFINE(HAVE_TANHF)
-
-       # At some point, we should differentiate between architectures
-       # like x86, which have long double versions, and alpha/powerpc/etc.,
-       # which don't. For the time being, punt.
-       if test x"long_double_math_on_this_cpu" = x"yes"; then
-         AC_DEFINE(HAVE_ACOSL)
-         AC_DEFINE(HAVE_ASINL)
-         AC_DEFINE(HAVE_ATAN2L)
-         AC_DEFINE(HAVE_ATANL)
-         AC_DEFINE(HAVE_CEILL)
-         AC_DEFINE(HAVE_COPYSIGNL)
-         AC_DEFINE(HAVE_COSL)
-         AC_DEFINE(HAVE_COSHL)
-         AC_DEFINE(HAVE_EXPL)
-         AC_DEFINE(HAVE_FABSL)
-         AC_DEFINE(HAVE_FINITEL)
-         AC_DEFINE(HAVE_FLOORL)
-         AC_DEFINE(HAVE_FMODL)
-         AC_DEFINE(HAVE_FREXPL)
-         AC_DEFINE(HAVE_ISINFL)
-         AC_DEFINE(HAVE_ISNANL)
-         AC_DEFINE(HAVE_LDEXPL)
-         AC_DEFINE(HAVE_LOG10L)
-         AC_DEFINE(HAVE_LOGL)
-         AC_DEFINE(HAVE_MODFL)
-         AC_DEFINE(HAVE_POWL)
-         AC_DEFINE(HAVE_SINCOSL)
-         AC_DEFINE(HAVE_SINL)
-         AC_DEFINE(HAVE_SINHL)
-         AC_DEFINE(HAVE_SQRTL)
-         AC_DEFINE(HAVE_TANL)
-         AC_DEFINE(HAVE_TANHL)
-       fi
-       GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
-       GLIBCPP_CHECK_WCHAR_T_SUPPORT
-       os_include_dir="config/os/gnu-linux"
-       # GLIBCPP_CHECK_STDLIB_SUPPORT
-       AC_DEFINE(HAVE_STRTOF)        
-       AC_DEFINE(HAVE_STRTOLD)        
-       # AC_FUNC_MMAP
-       AC_DEFINE(HAVE_MMAP)
-       ;;
+      os_include_dir="os/gnu-linux"
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+        machine/endian.h machine/param.h sys/machine.h sys/types.h \
+        fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS)
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FINITE)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOTF)
+      AC_DEFINE(HAVE_ISINF)
+      AC_DEFINE(HAVE_ISINFF)
+      AC_DEFINE(HAVE_ISNAN)
+      AC_DEFINE(HAVE_ISNANF)
+      AC_DEFINE(HAVE_SINCOS)
+      AC_DEFINE(HAVE_SINCOSF)
+      if test x"long_double_math_on_this_cpu" = x"yes"; then
+        AC_DEFINE(HAVE_FINITEL)
+        AC_DEFINE(HAVE_HYPOTL)
+        AC_DEFINE(HAVE_ISINFL)
+        AC_DEFINE(HAVE_ISNANL)
+      fi
+      ;;
+    *-hpux*)
+      # Check for available headers.
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+        machine/endian.h machine/param.h sys/machine.h sys/types.h \
+        fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS)
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="os/hpux"
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOT)
+      case "$target_alias" in
+        *-hpux10*)
+          AC_DEFINE(HAVE_FINITE)
+          AC_DEFINE(HAVE_FINITEF)
+          AC_DEFINE(HAVE_ISINF)
+          AC_DEFINE(HAVE_ISINFF)
+          AC_DEFINE(HAVE_ISNAN)
+          AC_DEFINE(HAVE_ISNANF)
+          ;;
+      esac
+
+      ;;
+    *-netbsd*)
+      # Check for available headers.
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+        machine/endian.h machine/param.h sys/machine.h sys/types.h \
+        fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS) 
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="os/bsd/netbsd"
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FINITE)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOTF)
+      AC_DEFINE(HAVE_ISINF)
+      AC_DEFINE(HAVE_ISINFF)
+      AC_DEFINE(HAVE_ISNAN)
+      AC_DEFINE(HAVE_ISNANF)
+      if test x"long_double_math_on_this_cpu" = x"yes"; then
+        AC_DEFINE(HAVE_FINITEL)
+        AC_DEFINE(HAVE_ISINFL)
+        AC_DEFINE(HAVE_ISNANL)
+      fi
+      ;;
+    *-mingw32*)
+      AC_CHECK_HEADERS([sys/types.h locale.h float.h])
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="os/mingw32"
+      ;;
+    *-windiss*)
+      os_include_dir="os/windiss"
+      ;;
+changequote(,)dnl
+    *-qnx6.[12]*)
+changequote([,])dnl
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS) 
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="os/qnx/qnx6.1"
+      AC_DEFINE(HAVE_COSF)
+      AC_DEFINE(HAVE_COSL)
+      AC_DEFINE(HAVE_COSHF)
+      AC_DEFINE(HAVE_COSHL)
+      AC_DEFINE(HAVE_LOGF)
+      AC_DEFINE(HAVE_LOGL)
+      AC_DEFINE(HAVE_LOG10F)
+      AC_DEFINE(HAVE_LOG10L)
+      AC_DEFINE(HAVE_SINF)
+      AC_DEFINE(HAVE_SINL)
+      AC_DEFINE(HAVE_SINHF)
+      AC_DEFINE(HAVE_SINHL)
+      ;;
     *)
-       # We assume newlib.  This lets us hard-code the functions we know
-       # we'll have.
-       AC_DEFINE(HAVE_FINITE)
-       AC_DEFINE(HAVE_ISNAN)
-       AC_DEFINE(HAVE_ISNANF)
-       AC_DEFINE(HAVE_ISINF)
-       AC_DEFINE(HAVE_ISINFF)
-
-       os_include_dir="config/os/newlib"
-
-       # need to check for faster f versions of math functions, ie sinf?
-       ;;
+      os_include_dir="os/newlib"
+      AC_DEFINE(HAVE_HYPOT)
+      ;;
   esac
+
+  case "$target_alias" in
+    *-mingw32*)
+      ;;
+    *-windiss*)
+      AC_DEFINE(HAVE_ACOSF)
+      AC_DEFINE(HAVE_ASINF)
+      AC_DEFINE(HAVE_ATAN2F)
+      AC_DEFINE(HAVE_ATANF)
+      AC_DEFINE(HAVE_CEILF)
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_COSF)
+      AC_DEFINE(HAVE_COSHF)
+      AC_DEFINE(HAVE_EXPF)
+      AC_DEFINE(HAVE_FABSF)
+      AC_DEFINE(HAVE_FLOORF)
+      AC_DEFINE(HAVE_FMODF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_LDEXPF)
+      AC_DEFINE(HAVE_LOG10F)
+      AC_DEFINE(HAVE_LOGF)
+      AC_DEFINE(HAVE_MODFF)
+      AC_DEFINE(HAVE_POWF)
+      AC_DEFINE(HAVE_SINF)
+      AC_DEFINE(HAVE_SINHF)
+      AC_DEFINE(HAVE_SQRTF)
+      AC_DEFINE(HAVE_TANF)
+      AC_DEFINE(HAVE_TANHF)
+      ;;
+    *)
+      # GLIBCPP_CHECK_STDLIB_SUPPORT
+      AC_DEFINE(HAVE_STRTOF)        
+      AC_DEFINE(HAVE_STRTOLD)        
+      # AC_FUNC_MMAP
+      AC_DEFINE(HAVE_MMAP)
+
+      AC_DEFINE(HAVE_ACOSF)
+      AC_DEFINE(HAVE_ASINF)
+      AC_DEFINE(HAVE_ATAN2F)
+      AC_DEFINE(HAVE_ATANF)
+      AC_DEFINE(HAVE_CEILF)
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_COSF)
+      AC_DEFINE(HAVE_COSHF)
+      AC_DEFINE(HAVE_EXPF)
+      AC_DEFINE(HAVE_FABSF)
+      AC_DEFINE(HAVE_FLOORF)
+      AC_DEFINE(HAVE_FMODF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_LDEXPF)
+      AC_DEFINE(HAVE_LOG10F)
+      AC_DEFINE(HAVE_LOGF)
+      AC_DEFINE(HAVE_MODFF)
+      AC_DEFINE(HAVE_POWF)
+      AC_DEFINE(HAVE_SINF)
+      AC_DEFINE(HAVE_SINHF)
+      AC_DEFINE(HAVE_SQRTF)
+      AC_DEFINE(HAVE_TANF)
+      AC_DEFINE(HAVE_TANHF)
+      ;;
+  esac
+
+  # At some point, we should differentiate between architectures
+  # like x86, which have long double versions, and alpha/powerpc/etc.,
+  # which don't. For the time being, punt.
+  if test x"long_double_math_on_this_cpu" = x"yes"; then
+    AC_DEFINE(HAVE_ACOSL)
+    AC_DEFINE(HAVE_ASINL)
+    AC_DEFINE(HAVE_ATAN2L)
+    AC_DEFINE(HAVE_ATANL)
+    AC_DEFINE(HAVE_CEILL)
+    AC_DEFINE(HAVE_COPYSIGNL)
+    AC_DEFINE(HAVE_COSL)
+    AC_DEFINE(HAVE_COSHL)
+    AC_DEFINE(HAVE_EXPL)
+    AC_DEFINE(HAVE_FABSL)
+    AC_DEFINE(HAVE_FLOORL)
+    AC_DEFINE(HAVE_FMODL)
+    AC_DEFINE(HAVE_FREXPL)
+    AC_DEFINE(HAVE_LDEXPL)
+    AC_DEFINE(HAVE_LOG10L)
+    AC_DEFINE(HAVE_LOGL)
+    AC_DEFINE(HAVE_MODFL)
+    AC_DEFINE(HAVE_POWL)
+    AC_DEFINE(HAVE_SINCOSL)
+    AC_DEFINE(HAVE_SINL)
+    AC_DEFINE(HAVE_SINHL)
+    AC_DEFINE(HAVE_SQRTL)
+    AC_DEFINE(HAVE_TANL)
+    AC_DEFINE(HAVE_TANHL)
+  fi
+
 else
 
   # We are being configured natively. We can do more elaborate tests
   # that include AC_TRY_COMPILE now, as the linker is assumed to be
   # working.
-  xcompiling=0
-  NATIVE=yes
+  GLIBCPP_IS_CROSS_COMPILING=0
   CANADIAN=no
-  NULL_TARGET=no
 
   # Check for available headers.
   AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
-  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h])
+  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h])
 
   GLIBCPP_CHECK_COMPILER_FEATURES
   GLIBCPP_CHECK_LINKER_FEATURES
@@ -213,30 +336,36 @@ else
   GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
   GLIBCPP_CHECK_WCHAR_T_SUPPORT
   GLIBCPP_CHECK_STDLIB_SUPPORT
+  AC_LC_MESSAGES
 
   AC_TRY_COMPILE([
-#include <setjmp.h>
-], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
-[AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.  ])])
+  #include <setjmp.h>
+  ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
+  [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.  ])
+  ])
 
   AC_FUNC_MMAP
+
+  # Establish limits on memory usage during 'make check'
+  GLIBCPP_CONFIGURE_TESTSUITE
 fi
 
-# Now that ctype is determined for all possible targets, we can do this...
-AC_LINK_FILES($os_include_dir/bits/ctype_base.h, \
-include/bits/ctype_base.h)
-AC_LINK_FILES($os_include_dir/bits/ctype_inline.h, \
-include/bits/ctype_inline.h)
-AC_LINK_FILES($os_include_dir/bits/ctype_noninline.h, \
-include/bits/ctype_noninline.h)
-AC_LINK_FILES($ATOMICITYH/bits/atomicity.h, include/bits/atomicity.h)
-
-AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
-AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
+# This depends on the possibly-skipped linker test above.
+GLIBCPP_ENABLE_SYMVERS([yes])
+
+# Propagate the target-specific source directories through the build chain.
+# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH 
+# uses it, and they only get used here.)
+OS_INC_SRCDIR=config/${os_include_dir}
+ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
+AC_SUBST(OS_INC_SRCDIR)
+AC_SUBST(ATOMICITY_INC_SRCDIR)
+
+# Set up cross-compile flags
+AC_SUBST(GLIBCPP_IS_CROSS_COMPILING)  dnl Unused so far.
 AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
  
 AC_CACHE_SAVE
-AC_LC_MESSAGES
 
 if test "${multilib}" = "yes"; then
   multilib_arg="--enable-multilib"
@@ -244,12 +373,6 @@ else
   multilib_arg=
 fi
 
-
-# Generate the various Makefiles, include files, and scripts.
-
-# Needed so that g++ can find the correct include subdir automatically.
-INTERFACE=v3
-
 # Export all the install information
 GLIBCPP_EXPORT_INSTALL_INFO
 
@@ -265,21 +388,18 @@ else
 fi
 AC_SUBST(LIBSUPCXX_PICFLAGS)
 
-# This should be done by mkincludedir, but hack around it now.
-blddir=`pwd`
-echo "checking for $blddir/include"
-
-if test ! -d "$blddir/include"; then
-  mkdir "$blddir/include"
-fi
-
+# Generate the various Makefiles, include files, and scripts.
 # NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
 # and libsupc++/Makefile.am so that multilib installs will end up
 # installed in the correct place. To work around this not being passed
 # down from config-ml.in -> top_srcdir/Makefile.am ->
 # top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
-AC_OUTPUT(Makefile src/Makefile libmath/Makefile libio/Makefile libsupc++/Makefile testsuite/Makefile mkcheck testsuite_flags,
+AC_OUTPUT(Makefile \
+    include/Makefile src/Makefile \
+    libmath/Makefile libio/Makefile libsupc++/Makefile \
+    po/Makefile testsuite/Makefile mkcheck testsuite_flags,
 [if test -n "$CONFIG_FILES"; then
+  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
   ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
   grep '^MULTISUBDIR =' Makefile >> src/Makefile
   grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
@@ -297,22 +417,31 @@ glibcpp_basedir=${glibcpp_basedir}
 CC="${CC}"
 CXX="${CXX}"
 )
-
-
-# Generate bits/c++config.h
-# NB: This must be the first generated file as others include it. . .
-$srcdir/mkc++config $blddir $srcdir
-
-# Generate bits/std_limits.h and src/limitsMEMBERS.cc
-if test ! -f stamp-limits; then
-  $srcdir/mknumeric_limits $blddir $srcdir $xcompiling
-  if test ! -f include/bits/std_limits.h; then
-    echo "mknumeric_limits failed to execute properly: exiting"
-    exit 1
-  else
-    touch stamp-limits 
-  fi
-fi
+dnl  In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
+dnl  AC_CONFIG_FILES(Makefile \
+dnl      include/Makefile src/Makefile \
+dnl      libmath/Makefile libio/Makefile libsupc++/Makefile \
+dnl      po/Makefile testsuite/Makefile mkcheck testsuite_flags)
+dnl  AC_CONFIG_COMMANDS([default],
+dnl  [if test -n "$CONFIG_FILES"; then
+dnl    ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+dnl    grep '^MULTISUBDIR =' Makefile >> src/Makefile
+dnl    grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+dnl  fi
+dnl  chmod +x mkcheck
+dnl  chmod +x testsuite_flags
+dnl  ],
+dnl  srcdir=${srcdir}
+dnl  host=${host}
+dnl  target=${target}
+dnl  with_multisubdir=${with_multisubdir}
+dnl  ac_configure_args="${multilib_arg} ${ac_configure_args}"
+dnl  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+dnl  glibcpp_basedir=${glibcpp_basedir}
+dnl  CC="${CC}"
+dnl  CXX="${CXX}"
+dnl  )
+dnl  AC_OUTPUT
 
 
 # Sanity checking & User-visible messages.
@@ -327,11 +456,11 @@ if test ! -f stamp-sanity-warned; then
   touch stamp-sanity-warned
   echo ""
   echo "Please make certain that you read the installation information here:"
-  echo "  faster => ${srcdir}/docs/install.html"
+  echo "  faster => ${srcdir}/docs/html/install.html"
   echo "  slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/install.html>"
   echo ""
   echo "and the configuration information here:"
-  echo "  faster => ${srcdir}/docs/configopts.html"
+  echo "  faster => ${srcdir}/docs/html/configopts.html"
   echo "  slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html>"
   echo ""
   echo "before proceeding with ${_cv_gnu_make_command}."