OSDN Git Service

2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / configure
index 8433a1a..428cdc5 100755 (executable)
@@ -632,17 +632,20 @@ BUILD_HTML_FALSE
 BUILD_HTML_TRUE
 BUILD_XML_FALSE
 BUILD_XML_TRUE
+XSL_STYLE_DIR
 XMLLINT
 XSLTPROC
 DOT
 DOXYGEN
 BUILD_INFO_FALSE
 BUILD_INFO_TRUE
+baseline_subdir_switch
 baseline_dir
 GLIBCXX_LDBL_COMPAT_FALSE
 GLIBCXX_LDBL_COMPAT_TRUE
 ENABLE_VISIBILITY_FALSE
 ENABLE_VISIBILITY_TRUE
+libtool_VERSION
 ENABLE_SYMVERS_SOL2_FALSE
 ENABLE_SYMVERS_SOL2_TRUE
 ENABLE_SYMVERS_SUN_FALSE
@@ -663,6 +666,8 @@ LIBICONV
 OPT_LDFLAGS
 SECTION_LDFLAGS
 GLIBCXX_LIBS
+ENABLE_EXTERN_TEMPLATE_FALSE
+ENABLE_EXTERN_TEMPLATE_TRUE
 EXTRA_CXX_FLAGS
 ENABLE_PARALLEL_FALSE
 ENABLE_PARALLEL_TRUE
@@ -702,7 +707,6 @@ BASIC_FILE_H
 CSTDIO_H
 SECTION_FLAGS
 WERROR
-glibcxx_thread_h
 glibcxx_PCHFLAGS
 GLIBCXX_BUILD_PCH_FALSE
 GLIBCXX_BUILD_PCH_TRUE
@@ -736,6 +740,7 @@ AR
 AS
 LN_S
 toplevel_srcdir
+toplevel_builddir
 glibcxx_srcdir
 glibcxx_builddir
 ac_ct_CXX
@@ -784,7 +789,6 @@ build_vendor
 build_cpu
 build
 multi_basedir
-libtool_VERSION
 target_alias
 host_alias
 build_alias
@@ -853,6 +857,7 @@ enable_libstdcxx_debug_flags
 enable_libstdcxx_debug
 enable_cxx_flags
 enable_fully_dynamic_string
+enable_extern_template
 enable_libstdcxx_time
 enable_tls
 enable_rpath
@@ -1539,6 +1544,8 @@ Optional Features:
   --enable-fully-dynamic-string
                           do not put empty strings in per-process static
                           memory [default=no]
+  --enable-extern-template
+                          enable extern template [default=yes]
   --enable-libstdcxx-time[=KIND]
                           use KIND for check type [default=no]
   --enable-tls            Use thread-local storage [default=yes]
@@ -2818,10 +2825,6 @@ ac_config_headers="$ac_config_headers config.h"
 # exported.  Only used at the end of this file.
 ### am handles this now?  ORIGINAL_LD_FOR_MULTILIBS=$LD
 
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:15:0
-
-
 # Find the rest of the source tree framework.
 # Default to --enable-multilib
 # Check whether --enable-multilib was given.
@@ -4867,11 +4870,13 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
     \\/$* | ?:\\/*) glibcxx_srcdir=${srcdir} ;;
     *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
   esac
+  toplevel_builddir=${glibcxx_builddir}/..
   toplevel_srcdir=${glibcxx_srcdir}/..
 
 
 
 
+
   # We use these options to decide which functions to include.  They are
   # set from the top level.
 
@@ -5216,8 +5221,8 @@ fi
   ## (Right now, this only matters for enable_wchar_t, but nothing prevents
   ## other macros from doing the same.  This should be automated.)  -pme
 
-  # Check for C library flavor since Linux platforms use different configuration
-  # directories depending on the C library in use.
+  # Check for C library flavor since GNU/Linux platforms use different
+  # configuration directories depending on the C library in use.
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -9684,10 +9689,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -10609,10 +10610,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -11490,7 +11487,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11493 "configure"
+#line 11490 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11596,7 +11593,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11599 "configure"
+#line 11596 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14296,10 +14293,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -14901,7 +14894,7 @@ else
        arm*-*-symbianelf*)
            enable_hosted_libstdcxx=no
            ;;
-        *)
+       *)
            enable_hosted_libstdcxx=yes
            ;;
      esac
@@ -14943,7 +14936,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then :
       case "$enableval" in
        yes|no|auto) ;;
        *) as_fn_error "Unknown argument to enable/disable sjlj-exceptions" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_sjlj_exceptions=auto
@@ -14958,7 +14951,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 14961 "configure"
+#line 14954 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -14975,11 +14968,11 @@ EOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
       if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
-        enable_sjlj_exceptions=yes
+       enable_sjlj_exceptions=yes
       elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
-        enable_sjlj_exceptions=no
+       enable_sjlj_exceptions=no
       elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
-        enable_sjlj_exceptions=no
+       enable_sjlj_exceptions=no
       fi
     fi
     CXXFLAGS="$old_CXXFLAGS"
@@ -15042,14 +15035,14 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
        echo '#include <math.h>' > conftest.h
        if $CXX $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
-                         -o conftest.h.gch 1>&5 2>&1 &&
-               echo '#error "pch failed"' > conftest.h &&
-          echo '#include "conftest.h"' > conftest.cc &&
+                         -o conftest.h.gch 1>&5 2>&1 &&
+               echo '#error "pch failed"' > conftest.h &&
+         echo '#include "conftest.h"' > conftest.cc &&
               $CXX -c $CXXFLAGS $CPPFLAGS conftest.cc 1>&5 2>&1 ;
        then
-         glibcxx_cv_prog_CXX_pch=yes
+        glibcxx_cv_prog_CXX_pch=yes
        else
-         glibcxx_cv_prog_CXX_pch=no
+        glibcxx_cv_prog_CXX_pch=no
        fi
        rm -f conftest*
        CXXFLAGS=$ac_save_CXXFLAGS
@@ -15086,23 +15079,6 @@ $as_echo_n "checking for thread model used by GCC... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
-  if test $target_thread_file != single; then
-
-$as_echo "#define HAVE_GTHR_DEFAULT 1" >>confdefs.h
-
-  fi
-
-  glibcxx_thread_h=gthr-$target_thread_file.h
-
-    gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h}
-  if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then
-    enable_thread=yes
-  else
-   enable_thread=no
-  fi
-
-
-
 
 
   ac_ext=cpp
@@ -15122,7 +15098,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     case "$host" in
       *-*-linux* | *-*-uclinux* | *-*-kfreebsd*-gnu | *-*-gnu*)
        atomic_builtins_link_tests=yes
-        ;;
+       ;;
     esac
   fi
 
@@ -15326,7 +15302,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15329 "configure"
+#line 15305 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15350,12 +15326,12 @@ $as_echo_n "checking for atomic builtins for bool... " >&6; }
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
       if grep __sync_ conftest.s >/dev/null 2>&1 ; then
-        glibcxx_cv_atomic_bool=no
+       glibcxx_cv_atomic_bool=no
       else
 
 $as_echo "#define _GLIBCXX_ATOMIC_BUILTINS_1 1" >>confdefs.h
 
-        glibcxx_cv_atomic_bool=yes
+       glibcxx_cv_atomic_bool=yes
       fi
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_atomic_bool" >&5
@@ -15363,7 +15339,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15366 "configure"
+#line 15342 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15387,12 +15363,12 @@ $as_echo_n "checking for atomic builtins for short... " >&6; }
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
       if grep __sync_ conftest.s >/dev/null 2>&1 ; then
-        glibcxx_cv_atomic_short=no
+       glibcxx_cv_atomic_short=no
       else
 
 $as_echo "#define _GLIBCXX_ATOMIC_BUILTINS_2 1" >>confdefs.h
 
-        glibcxx_cv_atomic_short=yes
+       glibcxx_cv_atomic_short=yes
       fi
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_atomic_short" >&5
@@ -15400,7 +15376,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15403 "configure"
+#line 15379 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15425,12 +15401,12 @@ $as_echo_n "checking for atomic builtins for int... " >&6; }
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
       if grep __sync_ conftest.s >/dev/null 2>&1 ; then
-        glibcxx_cv_atomic_int=no
+       glibcxx_cv_atomic_int=no
       else
 
 $as_echo "#define _GLIBCXX_ATOMIC_BUILTINS_4 1" >>confdefs.h
 
-        glibcxx_cv_atomic_int=yes
+       glibcxx_cv_atomic_int=yes
       fi
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_atomic_int" >&5
@@ -15438,7 +15414,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15441 "configure"
+#line 15417 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15462,12 +15438,12 @@ $as_echo_n "checking for atomic builtins for long long... " >&6; }
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
       if grep __sync_ conftest.s >/dev/null 2>&1 ; then
-        glibcxx_cv_atomic_long_long=no
+       glibcxx_cv_atomic_long_long=no
       else
 
 $as_echo "#define _GLIBCXX_ATOMIC_BUILTINS_8 1" >>confdefs.h
 
-        glibcxx_cv_atomic_long_long=yes
+       glibcxx_cv_atomic_long_long=yes
       fi
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_atomic_long_long" >&5
@@ -15495,14 +15471,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No native atomic operations are provided for this platform." >&5
 $as_echo "$as_me: WARNING: No native atomic operations are provided for this platform." >&2;}
       if test "x$target_thread_file" = xsingle; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: They cannot be faked when thread support is disabled." >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: They cannot be faked when thread support is disabled." >&5
 $as_echo "$as_me: WARNING: They cannot be faked when thread support is disabled." >&2;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Thread-safety of certain classes is not guaranteed." >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Thread-safety of certain classes is not guaranteed." >&5
 $as_echo "$as_me: WARNING: Thread-safety of certain classes is not guaranteed." >&2;}
       else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: They will be faked using a mutex." >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: They will be faked using a mutex." >&5
 $as_echo "$as_me: WARNING: They will be faked using a mutex." >&2;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Performance of certain classes will degrade as a result." >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Performance of certain classes will degrade as a result." >&5
 $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a result." >&2;}
       fi
   fi
@@ -15514,7 +15490,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15517 "configure"
+#line 15493 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15543,6 +15519,94 @@ $as_echo "$enable_dfp" >&6; }
     rm -f conftest*
 
 
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+  # Fake what AC_TRY_COMPILE does, without linking as this is
+  # unnecessary for this test.
+
+    cat > conftest.$ac_ext << EOF
+#line 15535 "configure"
+template<typename T1, typename T2>
+  struct same
+  { typedef T2 type; };
+
+template<typename T>
+  struct same<T, T>;
+
+int main()
+{
+  typename same<long, __int128>::type                i1;
+  typename same<long long, __int128>::type           i2;
+}
+EOF
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
+$as_echo_n "checking for __int128... " >&6; }
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+
+$as_echo "#define _GLIBCXX_USE_INT128 1" >>confdefs.h
+
+      enable_int128=yes
+    else
+      enable_int128=no
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_int128" >&5
+$as_echo "$enable_int128" >&6; }
+    rm -f conftest*
+
+    cat > conftest.$ac_ext << EOF
+#line 15569 "configure"
+template<typename T1, typename T2>
+  struct same
+  { typedef T2 type; };
+
+template<typename T>
+  struct same<T, T>;
+
+int main()
+{
+  typename same<double, __float128>::type      f1;
+  typename same<long double, __float128>::type f2;
+}
+EOF
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5
+$as_echo_n "checking for __float128... " >&6; }
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+
+$as_echo "#define _GLIBCXX_USE_FLOAT128 1" >>confdefs.h
+
+      enable_float128=yes
+    else
+      enable_float128=no
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float128" >&5
+$as_echo "$enable_float128" >&6; }
+    rm -f conftest*
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
 # Checks for compiler support that doesn't require linking.
 
   # All these tests are for C++; save the language and the compiler flags.
@@ -15618,7 +15682,7 @@ if test "${enable_cstdio+set}" = set; then :
       case "$enableval" in
        stdio) ;;
        *) as_fn_error "Unknown argument to enable/disable cstdio" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_cstdio=stdio
@@ -15648,9 +15712,9 @@ $as_echo "stdio" >&6; }
 if test "${enable_clocale+set}" = set; then :
   enableval=$enable_clocale;
       case "$enableval" in
-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
+       generic|gnu|ieee_1003.1-2001|newlib|yes|no|auto) ;;
        *) as_fn_error "Unknown argument to enable/disable clocale" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_clocale=auto
@@ -15670,7 +15734,7 @@ else
 fi
 
 
-  # Either a known packaage, or "auto"
+  # Either a known package, or "auto"
   if test $enable_clocale = no || test $enable_clocale = yes; then
      enable_clocale=auto
   fi
   if test $enable_clocale_flag = auto; then
     case ${target_os} in
       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-        enable_clocale_flag=gnu
-        ;;
+       enable_clocale_flag=gnu
+       ;;
       darwin* | freebsd*)
-        enable_clocale_flag=darwin
+       enable_clocale_flag=darwin
        ;;
       *)
-        enable_clocale_flag=generic
-        ;;
+       if test x"$with_newlib" = x"yes"; then
+         enable_clocale_flag=newlib
+       else
+         enable_clocale_flag=generic
+       fi
+       ;;
     esac
   fi
 
 
 
       if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-        USE_NLS=yes
+       USE_NLS=yes
       fi
       # Export the build objects.
       for ling in $ALL_LINGUAS; do \
-        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
+       glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
+       glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
       done
 
 
@@ -15913,6 +15981,23 @@ $as_echo "IEEE 1003.1" >&6; }
       CTIME_CC=config/locale/generic/time_members.cc
       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
       ;;
+    newlib)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: newlib" >&5
+$as_echo "newlib" >&6; }
+
+      CLOCALE_H=config/locale/generic/c_locale.h
+      CLOCALE_CC=config/locale/generic/c_locale.cc
+      CCODECVT_CC=config/locale/generic/codecvt_members.cc
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/newlib/ctype_members.cc
+      CMESSAGES_H=config/locale/generic/messages_members.h
+      CMESSAGES_CC=config/locale/generic/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_H=config/locale/generic/time_members.h
+      CTIME_CC=config/locale/generic/time_members.cc
+      CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+      ;;
   esac
 
   # This is where the testsuite looks for locale catalogs, using the
@@ -16027,7 +16112,7 @@ if test "${enable_libstdcxx_allocator+set}" = set; then :
       case "$enableval" in
        new|malloc|mt|bitmap|pool|yes|no|auto) ;;
        *) as_fn_error "Unknown argument to enable/disable libstdcxx-allocator" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_libstdcxx_allocator=auto
   if test $enable_libstdcxx_allocator_flag = auto; then
     case ${target_os} in
       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-        enable_libstdcxx_allocator_flag=new
-        ;;
+       enable_libstdcxx_allocator_flag=new
+       ;;
       *)
-        enable_libstdcxx_allocator_flag=new
-        ;;
+       enable_libstdcxx_allocator_flag=new
+       ;;
     esac
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libstdcxx_allocator_flag" >&5
@@ -16098,7 +16183,7 @@ if test "${enable_cheaders+set}" = set; then :
       case "$enableval" in
        c|c_std|c_global) ;;
        *) as_fn_error "Unknown argument to enable/disable cheaders" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_cheaders=$c_model
@@ -16233,13 +16318,13 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                      #include <stddef.h>
-                      wint_t i;
+                     #include <stddef.h>
+                     wint_t i;
                      long l = WEOF;
                      long j = WCHAR_MIN;
                      long k = WCHAR_MAX;
-                      namespace test
-                      {
+                     namespace test
+                     {
                        using ::btowc;
                        using ::fgetwc;
                        using ::fgetws;
@@ -16859,8 +16944,8 @@ $as_echo_n "checking for ISO C99 support in <wchar.h>... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                    namespace test
-                    {
+                   namespace test
+                   {
                      using ::wcstold;
                      using ::wcstoll;
                      using ::wcstoull;
@@ -16888,7 +16973,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                    namespace test { using ::vfwscanf; }
+                   namespace test { using ::vfwscanf; }
 int
 main ()
 {
@@ -16907,7 +16992,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                    namespace test { using ::vswscanf; }
+                   namespace test { using ::vswscanf; }
 int
 main ()
 {
@@ -16926,7 +17011,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                    namespace test { using ::vwscanf; }
+                   namespace test { using ::vwscanf; }
 int
 main ()
 {
@@ -16945,7 +17030,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <wchar.h>
-                    namespace test { using ::wcstof; }
+                   namespace test { using ::wcstof; }
 int
 main ()
 {
   if test -n "$enable_cxx_flags"; then
     for f in $enable_cxx_flags; do
       case "$f" in
-        -fhonor-std)  ;;
-        -*)  ;;
-        *)   # and we're trying to pass /what/ exactly?
-             as_fn_error "compiler flags start with a -" "$LINENO" 5 ;;
+       -fhonor-std)  ;;
+       -*)  ;;
+       *)   # and we're trying to pass /what/ exactly?
+            as_fn_error "compiler flags start with a -" "$LINENO" 5 ;;
       esac
     done
   fi
 
 
   if test $enable_fully_dynamic_string = yes; then
+    enable_fully_dynamic_string_def=1
+  else
+    enable_fully_dynamic_string_def=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define _GLIBCXX_FULLY_DYNAMIC_STRING ${enable_fully_dynamic_string_def}
+_ACEOF
+
+
+
+
+   # Check whether --enable-extern-template was given.
+if test "${enable_extern_template+set}" = set; then :
+  enableval=$enable_extern_template;
+      case "$enableval" in
+       yes|no) ;;
+       *) as_fn_error "Argument to enable/disable extern-template must be yes or no" "$LINENO" 5 ;;
+      esac
+
+else
+  enable_extern_template=yes
+fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extern template support" >&5
+$as_echo_n "checking for extern template support... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_extern_template" >&5
+$as_echo "$enable_extern_template" >&6; }
 
-$as_echo "#define _GLIBCXX_FULLY_DYNAMIC_STRING 1" >>confdefs.h
 
-  fi
 
 
 # Checks for operating systems support that doesn't require linking.
 
 
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+  case "$host" in
+    *-*-solaris2.*)
+      # Solaris 8 FCS only had an overload for double std::abs(double) in
+      # <iso/math_iso.h>.  Patches 111721-04 (SPARC) and 112757-01 (x86)
+      # introduced the full set also found from Solaris 9 onwards.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for float std::abs(float) overload" >&5
+$as_echo_n "checking for float std::abs(float) overload... " >&6; }
+      if test "${glibcxx_cv_abs_float+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+          namespace std {
+            inline float abs(float __x)
+            {  return __builtin_fabsf(__x); }
+          }
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  glibcxx_cv_abs_float=no
+else
+  glibcxx_cv_abs_float=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+      # autoheader cannot handle indented templates.
+
+
+
+      if test $glibcxx_cv_abs_float = yes; then
+        $as_echo "#define __CORRECT_ISO_CPP_MATH_H_PROTO1 1" >>confdefs.h
+
+      else
+        $as_echo "#define __CORRECT_ISO_CPP_MATH_H_PROTO2 1" >>confdefs.h
+
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_abs_float" >&5
+$as_echo "$glibcxx_cv_abs_float" >&6; }
+      ;;
+  esac
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+  case "$host" in
+    *-*-solaris2.*)
+      # Solaris 8 FCS lacked the overloads for long std::abs(long) and
+      # ldiv_t std::div(long, long) in <iso/stdlib_iso.h>.  Patches 109607-02
+      # (SPARC) and 109608-02 (x86) introduced them.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long std::abs(long) overload" >&5
+$as_echo_n "checking for long std::abs(long) overload... " >&6; }
+      if test "${glibcxx_cv_abs_long+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+          namespace std {
+            inline long
+            abs(long __i) { return labs(__i); }
+          }
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  glibcxx_cv_abs_long=no
+else
+  glibcxx_cv_abs_long=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+      # autoheader cannot handle indented templates.
+
+      if test $glibcxx_cv_abs_long = yes; then
+        $as_echo "#define __CORRECT_ISO_CPP_STDLIB_H_PROTO 1" >>confdefs.h
+
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_abs_long" >&5
+$as_echo "$glibcxx_cv_abs_long" >&6; }
+      ;;
+  esac
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOWNERDEAD" >&5
 $as_echo_n "checking for EOWNERDEAD... " >&6; }
 if test "${glibcxx_cv_system_error1+set}" = set; then :
@@ -17611,6 +17845,171 @@ if test x"$glibcxx_cv_system_error14" = x"yes"; then
 $as_echo "#define HAVE_ETXTBSY 1" >>confdefs.h
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHILD" >&5
+$as_echo_n "checking for ECHILD... " >&6; }
+if test "${glibcxx_cv_system_error15+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+int i = ECHILD;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_system_error15=yes
+else
+  glibcxx_cv_system_error15=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error15" >&5
+$as_echo "$glibcxx_cv_system_error15" >&6; }
+if test x"$glibcxx_cv_system_error15" = x"yes"; then
+
+$as_echo "#define HAVE_ECHILD 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOSPC" >&5
+$as_echo_n "checking for ENOSPC... " >&6; }
+if test "${glibcxx_cv_system_error16+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+int i = ENOSPC;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_system_error16=yes
+else
+  glibcxx_cv_system_error16=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error16" >&5
+$as_echo "$glibcxx_cv_system_error16" >&6; }
+if test x"$glibcxx_cv_system_error16" = x"yes"; then
+
+$as_echo "#define HAVE_ENOSPC 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EPERM" >&5
+$as_echo_n "checking for EPERM... " >&6; }
+if test "${glibcxx_cv_system_error17+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+int i = EPERM;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_system_error17=yes
+else
+  glibcxx_cv_system_error17=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error17" >&5
+$as_echo "$glibcxx_cv_system_error17" >&6; }
+if test x"$glibcxx_cv_system_error17" = x"yes"; then
+
+$as_echo "#define HAVE_EPERM 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETIMEDOUT" >&5
+$as_echo_n "checking for ETIMEDOUT... " >&6; }
+if test "${glibcxx_cv_system_error18+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+int i = ETIMEDOUT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_system_error18=yes
+else
+  glibcxx_cv_system_error18=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error18" >&5
+$as_echo "$glibcxx_cv_system_error18" >&6; }
+if test x"$glibcxx_cv_system_error18" = x"yes"; then
+
+$as_echo "#define HAVE_ETIMEDOUT 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EWOULDBLOCK" >&5
+$as_echo_n "checking for EWOULDBLOCK... " >&6; }
+if test "${glibcxx_cv_system_error19+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+int i = EWOULDBLOCK;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_system_error19=yes
+else
+  glibcxx_cv_system_error19=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error19" >&5
+$as_echo "$glibcxx_cv_system_error19" >&6; }
+if test x"$glibcxx_cv_system_error19" = x"yes"; then
+
+$as_echo "#define HAVE_EWOULDBLOCK 1" >>confdefs.h
+
+fi
 
 
 
@@ -17668,9 +18067,9 @@ else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdint.h>
-        template<typename, typename> struct same { enum { value = -1 }; };
-        template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
-        int array[same<int64_t, long>::value];
+       template<typename, typename> struct same { enum { value = -1 }; };
+       template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+       int array[same<int64_t, long>::value];
 int
 main ()
 {
@@ -17706,9 +18105,9 @@ else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdint.h>
-        template<typename, typename> struct same { enum { value = -1 }; };
-        template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
-        int array[same<int64_t, long long>::value];
+       template<typename, typename> struct same { enum { value = -1 }; };
+       template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+       int array[same<int64_t, long long>::value];
 int
 main ()
 {
@@ -18215,26 +18614,26 @@ int
 main ()
 {
 typedef __complex__ float float_type; float_type tmpf;
-                   cacosf(tmpf);
-                   casinf(tmpf);
-                   catanf(tmpf);
-                   cacoshf(tmpf);
-                   casinhf(tmpf);
-                   catanhf(tmpf);
+                   cacosf(tmpf);
+                   casinf(tmpf);
+                   catanf(tmpf);
+                   cacoshf(tmpf);
+                   casinhf(tmpf);
+                   catanhf(tmpf);
                    typedef __complex__ double double_type; double_type tmpd;
-                   cacos(tmpd);
-                   casin(tmpd);
-                   catan(tmpd);
-                   cacosh(tmpd);
-                   casinh(tmpd);
-                   catanh(tmpd);
+                   cacos(tmpd);
+                   casin(tmpd);
+                   catan(tmpd);
+                   cacosh(tmpd);
+                   casinh(tmpd);
+                   catanh(tmpd);
                    typedef __complex__ long double ld_type; ld_type tmpld;
-                   cacosl(tmpld);
-                   casinl(tmpld);
-                   catanl(tmpld);
-                   cacoshl(tmpld);
-                   casinhl(tmpld);
-                   catanhl(tmpld);
+                   cacosl(tmpld);
+                   casinl(tmpld);
+                   catanl(tmpld);
+                   cacoshl(tmpld);
+                   casinhl(tmpld);
+                   catanhl(tmpld);
 
   ;
   return 0;
@@ -18269,8 +18668,8 @@ int
 main ()
 {
 int ch;
-                 int ret;
-                 ret = isblank(ch);
+                 int ret;
+                 ret = isblank(ch);
 
   ;
   return 0;
@@ -18319,20 +18718,20 @@ int
 main ()
 {
 int except, mode;
-                   fexcept_t* pflag;
-                    fenv_t* penv;
-                   int ret;
-                   ret = feclearexcept(except);
-                   ret = fegetexceptflag(pflag, except);
-                   ret = feraiseexcept(except);
-                   ret = fesetexceptflag(pflag, except);
-                   ret = fetestexcept(except);
-                   ret = fegetround();
-                   ret = fesetround(mode);
-                   ret = fegetenv(penv);
-                   ret = feholdexcept(penv);
-                   ret = fesetenv(penv);
-                   ret = feupdateenv(penv);
+                   fexcept_t* pflag;
+                   fenv_t* penv;
+                   int ret;
+                   ret = feclearexcept(except);
+                   ret = fegetexceptflag(pflag, except);
+                   ret = feraiseexcept(except);
+                   ret = fesetexceptflag(pflag, except);
+                   ret = fetestexcept(except);
+                   ret = fegetround();
+                   ret = fesetround(mode);
+                   ret = fegetenv(penv);
+                   ret = feholdexcept(penv);
+                   ret = fesetenv(penv);
+                   ret = feupdateenv(penv);
 
   ;
   return 0;
@@ -18363,45 +18762,45 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #define __STDC_LIMIT_MACROS
-                  #define __STDC_CONSTANT_MACROS
-                  #include <stdint.h>
+                 #define __STDC_CONSTANT_MACROS
+                 #include <stdint.h>
 int
 main ()
 {
 typedef int8_t          my_int8_t;
                  my_int8_t               i8 = INT8_MIN;
                  i8 = INT8_MAX;
-                 typedef int16_t         my_int16_t;
+                 typedef int16_t         my_int16_t;
                  my_int16_t              i16 = INT16_MIN;
                  i16 = INT16_MAX;
-                 typedef int32_t         my_int32_t;
+                 typedef int32_t         my_int32_t;
                  my_int32_t              i32 = INT32_MIN;
                  i32 = INT32_MAX;
-                 typedef int64_t         my_int64_t;
+                 typedef int64_t         my_int64_t;
                  my_int64_t              i64 = INT64_MIN;
                  i64 = INT64_MAX;
-                 typedef int_fast8_t     my_int_fast8_t;
+                 typedef int_fast8_t     my_int_fast8_t;
                  my_int_fast8_t          if8 = INT_FAST8_MIN;
                  if8 = INT_FAST8_MAX;
-                 typedef int_fast16_t    my_int_fast16_t;
+                 typedef int_fast16_t    my_int_fast16_t;
                  my_int_fast16_t         if16 = INT_FAST16_MIN;
                  if16 = INT_FAST16_MAX;
-                 typedef int_fast32_t    my_int_fast32_t;
+                 typedef int_fast32_t    my_int_fast32_t;
                  my_int_fast32_t         if32 = INT_FAST32_MIN;
                  if32 = INT_FAST32_MAX;
-                 typedef int_fast64_t    my_int_fast64_t;
+                 typedef int_fast64_t    my_int_fast64_t;
                  my_int_fast64_t         if64 = INT_FAST64_MIN;
                  if64 = INT_FAST64_MAX;
-                 typedef int_least8_t    my_int_least8_t;
+                 typedef int_least8_t    my_int_least8_t;
                  my_int_least8_t         il8 = INT_LEAST8_MIN;
                  il8 = INT_LEAST8_MAX;
-                 typedef int_least16_t   my_int_least16_t;
+                 typedef int_least16_t   my_int_least16_t;
                  my_int_least16_t        il16 = INT_LEAST16_MIN;
                  il16 = INT_LEAST16_MAX;
-                 typedef int_least32_t   my_int_least32_t;
+                 typedef int_least32_t   my_int_least32_t;
                  my_int_least32_t        il32 = INT_LEAST32_MIN;
                  il32 = INT_LEAST32_MAX;
-                 typedef int_least64_t   my_int_least64_t;
+                 typedef int_least64_t   my_int_least64_t;
                  my_int_least64_t        il64 = INT_LEAST64_MIN;
                  il64 = INT_LEAST64_MAX;
                  typedef intmax_t        my_intmax_t;
@@ -18410,40 +18809,40 @@ typedef int8_t          my_int8_t;
                  typedef intptr_t        my_intptr_t;
                  my_intptr_t             ip = INTPTR_MAX;
                  ip = INTPTR_MIN;
-                 typedef uint8_t         my_uint8_t;
+                 typedef uint8_t         my_uint8_t;
                  my_uint8_t              ui8 = UINT8_MAX;
                  ui8 = UINT8_MAX;
-                 typedef uint16_t        my_uint16_t;
+                 typedef uint16_t        my_uint16_t;
                  my_uint16_t             ui16 = UINT16_MAX;
                  ui16 = UINT16_MAX;
-                 typedef uint32_t        my_uint32_t;
+                 typedef uint32_t        my_uint32_t;
                  my_uint32_t             ui32 = UINT32_MAX;
                  ui32 = UINT32_MAX;
-                 typedef uint64_t        my_uint64_t;
+                 typedef uint64_t        my_uint64_t;
                  my_uint64_t             ui64 = UINT64_MAX;
                  ui64 = UINT64_MAX;
-                 typedef uint_fast8_t    my_uint_fast8_t;
+                 typedef uint_fast8_t    my_uint_fast8_t;
                  my_uint_fast8_t         uif8 = UINT_FAST8_MAX;
                  uif8 = UINT_FAST8_MAX;
-                 typedef uint_fast16_t   my_uint_fast16_t;
+                 typedef uint_fast16_t   my_uint_fast16_t;
                  my_uint_fast16_t        uif16 = UINT_FAST16_MAX;
                  uif16 = UINT_FAST16_MAX;
-                 typedef uint_fast32_t   my_uint_fast32_t;
+                 typedef uint_fast32_t   my_uint_fast32_t;
                  my_uint_fast32_t        uif32 = UINT_FAST32_MAX;
                  uif32 = UINT_FAST32_MAX;
-                 typedef uint_fast64_t   my_uint_fast64_t;
+                 typedef uint_fast64_t   my_uint_fast64_t;
                  my_uint_fast64_t        uif64 = UINT_FAST64_MAX;
                  uif64 = UINT_FAST64_MAX;
-                 typedef uint_least8_t   my_uint_least8_t;
+                 typedef uint_least8_t   my_uint_least8_t;
                  my_uint_least8_t        uil8 = UINT_LEAST8_MAX;
                  uil8 = UINT_LEAST8_MAX;
-                 typedef uint_least16_t  my_uint_least16_t;
+                 typedef uint_least16_t  my_uint_least16_t;
                  my_uint_least16_t       uil16 = UINT_LEAST16_MAX;
                  uil16 = UINT_LEAST16_MAX;
-                 typedef uint_least32_t  my_uint_least32_t;
+                 typedef uint_least32_t  my_uint_least32_t;
                  my_uint_least32_t       uil32 = UINT_LEAST32_MAX;
                  uil32 = UINT_LEAST32_MAX;
-                 typedef uint_least64_t  my_uint_least64_t;
+                 typedef uint_least64_t  my_uint_least64_t;
                  my_uint_least64_t       uil64 = UINT_LEAST64_MAX;
                  uil64 = UINT_LEAST64_MAX;
                  typedef uintmax_t       my_uintmax_t;
 main ()
 {
 typedef double_t  my_double_t;
-                 typedef float_t   my_float_t;
-                 acosh(0.0);
-                 acoshf(0.0f);
-                 acoshl(0.0l);
-                 asinh(0.0);
-                 asinhf(0.0f);
-                 asinhl(0.0l);
-                 atanh(0.0);
-                 atanhf(0.0f);
-                 atanhl(0.0l);
-                 cbrt(0.0);
-                 cbrtf(0.0f);
-                 cbrtl(0.0l);
-                 copysign(0.0, 0.0);
-                 copysignf(0.0f, 0.0f);
-                 copysignl(0.0l, 0.0l);
-                 erf(0.0);
-                 erff(0.0f);
-                 erfl(0.0l);
-                 erfc(0.0);
-                 erfcf(0.0f);
-                 erfcl(0.0l);
-                 exp2(0.0);
-                 exp2f(0.0f);
-                 exp2l(0.0l);
-                 expm1(0.0);
-                 expm1f(0.0f);
-                 expm1l(0.0l);
-                 fdim(0.0, 0.0);
-                 fdimf(0.0f, 0.0f);
-                 fdiml(0.0l, 0.0l);
-                 fma(0.0, 0.0, 0.0);
-                 fmaf(0.0f, 0.0f, 0.0f);
-                 fmal(0.0l, 0.0l, 0.0l);
-                 fmax(0.0, 0.0);
-                 fmaxf(0.0f, 0.0f);
-                 fmaxl(0.0l, 0.0l);
-                 fmin(0.0, 0.0);
-                 fminf(0.0f, 0.0f);
-                 fminl(0.0l, 0.0l);
-                 hypot(0.0, 0.0);
-                 hypotf(0.0f, 0.0f);
-                 hypotl(0.0l, 0.0l);
-                 ilogb(0.0);
-                 ilogbf(0.0f);
-                 ilogbl(0.0l);
-                 lgamma(0.0);
-                 lgammaf(0.0f);
-                 lgammal(0.0l);
-                 llrint(0.0);
-                 llrintf(0.0f);
-                 llrintl(0.0l);
-                 llround(0.0);
-                 llroundf(0.0f);
-                 llroundl(0.0l);
-                 log1p(0.0);
-                 log1pf(0.0f);
-                 log1pl(0.0l);
-                 log2(0.0);
-                 log2f(0.0f);
-                 log2l(0.0l);
-                 logb(0.0);
-                 logbf(0.0f);
-                 logbl(0.0l);
-                 lrint(0.0);
-                 lrintf(0.0f);
-                 lrintl(0.0l);
-                 lround(0.0);
-                 lroundf(0.0f);
-                 lroundl(0.0l);
-                 nan(0);
-                 nanf(0);
-                 nanl(0);
-                 nearbyint(0.0);
-                 nearbyintf(0.0f);
-                 nearbyintl(0.0l);
-                 nextafter(0.0, 0.0);
-                 nextafterf(0.0f, 0.0f);
-                 nextafterl(0.0l, 0.0l);
-                 nexttoward(0.0, 0.0);
-                 nexttowardf(0.0f, 0.0f);
-                 nexttowardl(0.0l, 0.0l);
-                 remainder(0.0, 0.0);
-                 remainderf(0.0f, 0.0f);
-                 remainderl(0.0l, 0.0l);
-                 remquo(0.0, 0.0, 0);
-                 remquof(0.0f, 0.0f, 0);
-                 remquol(0.0l, 0.0l, 0);
-                 rint(0.0);
-                 rintf(0.0f);
-                 rintl(0.0l);
-                 round(0.0);
-                 roundf(0.0f);
-                 roundl(0.0l);
-                 scalbln(0.0, 0l);
-                 scalblnf(0.0f, 0l);
-                 scalblnl(0.0l, 0l);
-                 scalbn(0.0, 0);
-                 scalbnf(0.0f, 0);
-                 scalbnl(0.0l, 0);
-                 tgamma(0.0);
-                 tgammaf(0.0f);
-                 tgammal(0.0l);
-                 trunc(0.0);
-                 truncf(0.0f);
-                 truncl(0.0l);
+                 typedef float_t   my_float_t;
+                 acosh(0.0);
+                 acoshf(0.0f);
+                 acoshl(0.0l);
+                 asinh(0.0);
+                 asinhf(0.0f);
+                 asinhl(0.0l);
+                 atanh(0.0);
+                 atanhf(0.0f);
+                 atanhl(0.0l);
+                 cbrt(0.0);
+                 cbrtf(0.0f);
+                 cbrtl(0.0l);
+                 copysign(0.0, 0.0);
+                 copysignf(0.0f, 0.0f);
+                 copysignl(0.0l, 0.0l);
+                 erf(0.0);
+                 erff(0.0f);
+                 erfl(0.0l);
+                 erfc(0.0);
+                 erfcf(0.0f);
+                 erfcl(0.0l);
+                 exp2(0.0);
+                 exp2f(0.0f);
+                 exp2l(0.0l);
+                 expm1(0.0);
+                 expm1f(0.0f);
+                 expm1l(0.0l);
+                 fdim(0.0, 0.0);
+                 fdimf(0.0f, 0.0f);
+                 fdiml(0.0l, 0.0l);
+                 fma(0.0, 0.0, 0.0);
+                 fmaf(0.0f, 0.0f, 0.0f);
+                 fmal(0.0l, 0.0l, 0.0l);
+                 fmax(0.0, 0.0);
+                 fmaxf(0.0f, 0.0f);
+                 fmaxl(0.0l, 0.0l);
+                 fmin(0.0, 0.0);
+                 fminf(0.0f, 0.0f);
+                 fminl(0.0l, 0.0l);
+                 hypot(0.0, 0.0);
+                 hypotf(0.0f, 0.0f);
+                 hypotl(0.0l, 0.0l);
+                 ilogb(0.0);
+                 ilogbf(0.0f);
+                 ilogbl(0.0l);
+                 lgamma(0.0);
+                 lgammaf(0.0f);
+                 lgammal(0.0l);
+                 llrint(0.0);
+                 llrintf(0.0f);
+                 llrintl(0.0l);
+                 llround(0.0);
+                 llroundf(0.0f);
+                 llroundl(0.0l);
+                 log1p(0.0);
+                 log1pf(0.0f);
+                 log1pl(0.0l);
+                 log2(0.0);
+                 log2f(0.0f);
+                 log2l(0.0l);
+                 logb(0.0);
+                 logbf(0.0f);
+                 logbl(0.0l);
+                 lrint(0.0);
+                 lrintf(0.0f);
+                 lrintl(0.0l);
+                 lround(0.0);
+                 lroundf(0.0f);
+                 lroundl(0.0l);
+                 nan(0);
+                 nanf(0);
+                 nanl(0);
+                 nearbyint(0.0);
+                 nearbyintf(0.0f);
+                 nearbyintl(0.0l);
+                 nextafter(0.0, 0.0);
+                 nextafterf(0.0f, 0.0f);
+                 nextafterl(0.0l, 0.0l);
+                 nexttoward(0.0, 0.0);
+                 nexttowardf(0.0f, 0.0f);
+                 nexttowardl(0.0l, 0.0l);
+                 remainder(0.0, 0.0);
+                 remainderf(0.0f, 0.0f);
+                 remainderl(0.0l, 0.0l);
+                 remquo(0.0, 0.0, 0);
+                 remquof(0.0f, 0.0f, 0);
+                 remquol(0.0l, 0.0l, 0);
+                 rint(0.0);
+                 rintf(0.0f);
+                 rintl(0.0l);
+                 round(0.0);
+                 roundf(0.0f);
+                 roundl(0.0l);
+                 scalbln(0.0, 0l);
+                 scalblnf(0.0f, 0l);
+                 scalblnl(0.0l, 0l);
+                 scalbn(0.0, 0);
+                 scalbnf(0.0f, 0);
+                 scalbnl(0.0l, 0);
+                 tgamma(0.0);
+                 tgammaf(0.0f);
+                 tgammal(0.0l);
+                 trunc(0.0);
+                 truncf(0.0f);
+                 truncl(0.0l);
 
   ;
   return 0;
@@ -18629,12 +19028,12 @@ int
 main ()
 {
 intmax_t i, numer, denom, base;
-                   const char* s;
-                   char** endptr;
-                   intmax_t ret = imaxabs(i);
-                   imaxdiv_t dret = imaxdiv(numer, denom);
-                   ret = strtoimax(s, endptr, base);
-                   uintmax_t uret = strtoumax(s, endptr, base);
+                   const char* s;
+                   char** endptr;
+                   intmax_t ret = imaxabs(i);
+                   imaxdiv_t dret = imaxdiv(numer, denom);
+                   ret = strtoimax(s, endptr, base);
+                   uintmax_t uret = strtoumax(s, endptr, base);
 
   ;
   return 0;
@@ -18669,9 +19068,9 @@ main ()
 {
 intmax_t base;
                    const wchar_t* s;
-                   wchar_t** endptr;
-                   intmax_t ret = wcstoimax(s, endptr, base);
-                   uintmax_t uret = wcstoumax(s, endptr, base);
+                   wchar_t** endptr;
+                   intmax_t ret = wcstoimax(s, endptr, base);
+                   uintmax_t uret = wcstoumax(s, endptr, base);
 
   ;
   return 0;
@@ -18892,7 +19291,7 @@ if test "${enable_libstdcxx_time+set}" = set; then :
       case "$enableval" in
        yes|no|rt) ;;
        *) as_fn_error "Unknown argument to enable/disable libstdcxx-time" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_libstdcxx_time=no
@@ -19236,7 +19635,7 @@ $as_echo "#define _GLIBCXX_USE_SCHED_YIELD 1" >>confdefs.h
       ;;
       -lrt*)
       if test x"$enable_libstdcxx_time" = x"rt"; then
-        GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
+       GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
 
 $as_echo "#define _GLIBCXX_USE_SCHED_YIELD 1" >>confdefs.h
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-         #include <time.h>
+        #include <time.h>
 
 int
 main ()
 {
 #if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
-          timespec tp;
-         #endif
-          clock_gettime(CLOCK_MONOTONIC, &tp);
+         timespec tp;
+        #endif
+         clock_gettime(CLOCK_MONOTONIC, &tp);
 
   ;
   return 0;
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-         #include <time.h>
+        #include <time.h>
 
 int
 main ()
 {
 #if _POSIX_TIMERS > 0
-          timespec tp;
-         #endif
-          clock_gettime(CLOCK_REALTIME, &tp);
+         timespec tp;
+        #endif
+         clock_gettime(CLOCK_REALTIME, &tp);
 
   ;
   return 0;
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-         #include <time.h>
+        #include <time.h>
 
 int
 main ()
 {
 #if _POSIX_TIMERS > 0
-          timespec tp;
-         #endif
-          nanosleep(&tp, 0);
+         timespec tp;
+        #endif
+         nanosleep(&tp, 0);
 
   ;
   return 0;
@@ -19407,7 +19806,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
   ac_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fno-exceptions -I${toplevel_srcdir}/gcc"
+  CXXFLAGS="$CXXFLAGS -fno-exceptions \
+       -I${toplevel_srcdir}/libgcc -I${toplevel_builddir}/libgcc"
 
   target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
   case $target_thread_file in
@@ -19415,6 +19815,44 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
       CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
   esac
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it can be safely assumed that mutex_timedlock is available" >&5
+$as_echo_n "checking whether it can be safely assumed that mutex_timedlock is available... " >&6; }
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+
+      // In case of POSIX threads check _POSIX_TIMEOUTS.
+      #if (defined(_PTHREADS) \
+          && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
+      #error
+      #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_gthread_use_mutex_timedlock=1
+else
+  ac_gthread_use_mutex_timedlock=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+cat >>confdefs.h <<_ACEOF
+#define _GTHREAD_USE_MUTEX_TIMEDLOCK $ac_gthread_use_mutex_timedlock
+_ACEOF
+
+
+  if test $ac_gthread_use_mutex_timedlock = 1 ; then res_mutex_timedlock=yes ;
+  else res_mutex_timedlock=no ; fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res_mutex_timedlock" >&5
+$as_echo "$res_mutex_timedlock" >&6; }
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gthreads library" >&5
 $as_echo_n "checking for gthreads library... " >&6; }
 
@@ -19429,12 +19867,6 @@ main ()
       #error
       #endif
 
-      // In case of POSIX threads check _POSIX_TIMEOUTS too.
-      #if (defined(_PTHREADS) \
-           && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
-      #error
-      #endif
-
   ;
   return 0;
 }
 
 
 
+# For hardware_concurrency
+for ac_header in sys/sysinfo.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sysinfo_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SYSINFO_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for get_nprocs" >&5
+$as_echo_n "checking for get_nprocs... " >&6; }
+  if test "${glibcxx_cv_GET_NPROCS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    if test x$gcc_no_link = xyes; then
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/sysinfo.h>
+int
+main ()
+{
+int n = get_nprocs();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  glibcxx_cv_GET_NPROCS=yes
+else
+  glibcxx_cv_GET_NPROCS=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/sysinfo.h>
+int
+main ()
+{
+int n = get_nprocs();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  glibcxx_cv_GET_NPROCS=yes
+else
+  glibcxx_cv_GET_NPROCS=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+  if test $glibcxx_cv_GET_NPROCS = yes; then
+
+$as_echo "#define _GLIBCXX_USE_GET_NPROCS 1" >>confdefs.h
+
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_GET_NPROCS" >&5
+$as_echo "$glibcxx_cv_GET_NPROCS" >&6; }
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+for ac_header in unistd.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_NPROCESSORS_ONLN" >&5
+$as_echo_n "checking for _SC_NPROCESSORS_ONLN... " >&6; }
+  if test "${glibcxx_cv_SC_NPROCESSORS_ONLN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    if test x$gcc_no_link = xyes; then
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+int n = sysconf(_SC_NPROCESSORS_ONLN);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  glibcxx_cv_SC_NPROCESSORS_ONLN=yes
+else
+  glibcxx_cv_SC_NPROCESSORS_ONLN=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+int
+main ()
+{
+int n = sysconf(_SC_NPROCESSORS_ONLN);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  glibcxx_cv_SC_NPROCESSORS_ONLN=yes
+else
+  glibcxx_cv_SC_NPROCESSORS_ONLN=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+  if test $glibcxx_cv_SC_NPROCESSORS_ONLN = yes; then
+
+$as_echo "#define _GLIBCXX_USE_SC_NPROCESSORS_ONLN 1" >>confdefs.h
+
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_SC_NPROCESSORS_ONLN" >&5
+$as_echo "$glibcxx_cv_SC_NPROCESSORS_ONLN" >&6; }
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
 # Check for available headers.
 for ac_header in endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
 locale.h machine/endian.h machine/param.h nan.h stdint.h stdlib.h string.h \
@@ -19678,7 +20292,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -26580,7 +27194,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -32395,7 +33009,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -44040,7 +44654,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -44254,7 +44868,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -44729,7 +45343,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -50898,7 +51512,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -56698,7 +57312,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -56824,155 +57438,6 @@ $as_echo "$ac_ld_relro" >&6; }
 
     fi
     ;;
-  *-netware)
-    SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
-
-  # If we're not using GNU ld, then there's no point in even trying these
-  # tests.  Check for that first.  We should have already tested for gld
-  # by now (in libtool), but require it now just to be safe...
-  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
-  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
-
-
-
-  # The name set by libtool depends on the version of libtool.  Shame on us
-  # for depending on an impl detail, but c'est la vie.  Older versions used
-  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
-  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
-  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
-  # set (hence we're using an older libtool), then set it.
-  if test x${with_gnu_ld+set} != xset; then
-    if test x${ac_cv_prog_gnu_ld+set} != xset; then
-      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
-      with_gnu_ld=no
-    else
-      with_gnu_ld=$ac_cv_prog_gnu_ld
-    fi
-  fi
-
-  # Start by getting the version number.  I think the libtool test already
-  # does some of this, but throws away the result.
-  glibcxx_ld_is_gold=no
-  if test x"$with_gnu_ld" = x"yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld version" >&5
-$as_echo_n "checking for ld version... " >&6; }
-
-    if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then
-      glibcxx_ld_is_gold=yes
-    fi
-    ldver=`$LD --version 2>/dev/null |
-          sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
-
-    glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
-$as_echo "$glibcxx_gnu_ld_version" >&6; }
-  fi
-
-  # Set --gc-sections.
-  glibcxx_have_gc_sections=no
-  if test "$glibcxx_ld_is_gold" = "yes"; then
-    if $LD --help 2>/dev/null | grep gc-sections >/dev/null 2>&1; then
-      glibcxx_have_gc_sections=yes
-    fi
-  else
-    glibcxx_gcsections_min_ld=21602
-    if test x"$with_gnu_ld" = x"yes" &&
-       test $glibcxx_gnu_ld_version -gt $glibcxx_gcsections_min_ld ; then
-      glibcxx_have_gc_sections=yes
-    fi
-  fi
-  if test "$glibcxx_have_gc_sections" = "yes"; then
-    # Sufficiently young GNU ld it is!  Joy and bunny rabbits!
-    # NB: This flag only works reliably after 2.16.1. Configure tests
-    # for this are difficult, so hard wire a value that should work.
-
-    ac_test_CFLAGS="${CFLAGS+set}"
-    ac_save_CFLAGS="$CFLAGS"
-    CFLAGS='-Wl,--gc-sections'
-
-    # Check for -Wl,--gc-sections
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5
-$as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; }
-    if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- int one(void) { return 1; }
-     int two(void) { return 2; }
-
-int
-main ()
-{
- two();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_gcsections=yes
-else
-  ac_gcsections=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$ac_gcsections" = "yes"; then
-      rm -f conftest.c
-      touch conftest.c
-      if $CC -c conftest.c; then
-       if $LD --gc-sections -o conftest conftest.o 2>&1 | \
-          grep "Warning: gc-sections option ignored" > /dev/null; then
-         ac_gcsections=no
-       fi
-      fi
-      rm -f conftest.c conftest.o conftest
-    fi
-    if test "$ac_gcsections" = "yes"; then
-      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5
-$as_echo "$ac_gcsections" >&6; }
-
-    if test "$ac_test_CFLAGS" = set; then
-      CFLAGS="$ac_save_CFLAGS"
-    else
-      # this is the suspicious part
-      CFLAGS=''
-    fi
-  fi
-
-  # Set -z,relro.
-  # Note this is only for shared objects.
-  ac_ld_relro=no
-  if test x"$with_gnu_ld" = x"yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
-$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
-    cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
-    if test -n "$cxx_z_relo"; then
-      OPT_LDFLAGS="-Wl,-z,relro"
-      ac_ld_relro=yes
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ld_relro" >&5
-$as_echo "$ac_ld_relro" >&6; }
-  fi
-
-  # Set linker optimization flags.
-  if test x"$with_gnu_ld" = x"yes"; then
-    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
-  fi
-
-
-
-
-    $as_echo "#define HAVE_HYPOT 1" >>confdefs.h
-
-    $as_echo "#define HAVE_ISINF 1" >>confdefs.h
-
-    $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
-
-    ;;
   *-qnx6.1* | *-qnx6.2*)
     SECTION_FLAGS='-ffunction-sections -fdata-sections'
 
@@ -57014,7 +57479,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -57242,7 +57707,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -63042,7 +63507,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -63214,7 +63679,7 @@ $as_echo_n "checking for ld version... " >&6; }
           sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
 
     glibcxx_gnu_ld_version=`echo $ldver | \
-           $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+          $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5
 $as_echo "$glibcxx_gnu_ld_version" >&6; }
   fi
@@ -63486,7 +63951,6 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
   fi
 
 
-
  # Check whether --enable-linux-futex was given.
 if test "${enable_linux_futex+set}" = set; then :
   enableval=$enable_linux_futex;
@@ -64012,7 +64476,6 @@ ac_config_commands="$ac_config_commands include/gstdint.h"
 
 
 
-# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU c++filt" >&5
 $as_echo_n "checking for GNU c++filt... " >&6; }
@@ -64062,7 +64525,7 @@ if test "${enable_symvers+set}" = set; then :
       case "$enableval" in
        yes|no|gnu|gnu-versioned-namespace|darwin|darwin-export|sun) ;;
        *) as_fn_error "Unknown argument to enable/disable symvers" "$LINENO" 5 ;;
-                          esac
+                       esac
 
 else
   enable_symvers=yes
@@ -64084,14 +64547,14 @@ if test x$enable_symvers = xyes ; then
   else
     if test $with_gnu_ld = yes ; then
       case ${target_os} in
-        hpux*)
-          enable_symvers=no ;;
-        *)
-          enable_symvers=gnu ;;
+       hpux*)
+         enable_symvers=no ;;
+       *)
+         enable_symvers=gnu ;;
       esac
     else
       case ${target_os} in
-        darwin*)
+       darwin*)
          enable_symvers=darwin ;;
        # Sun symbol versioning exists since Solaris 2.5.
        solaris2.[5-9]* | solaris2.1[0-9]*)
@@ -64110,8 +64573,8 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
            enable_symvers=sun
          fi
          ;;
-        *)
-          enable_symvers=no ;;
+       *)
+         enable_symvers=no ;;
       esac
     fi
   fi
@@ -64250,7 +64713,10 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
   fi
 fi
 
-# Everything parsed; figure out what file to use.
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=6:17:0
+
+# Everything parsed; figure out what files and settings to use.
 case $enable_symvers in
   no)
     SYMVER_FILE=config/abi/pre/none.ver
@@ -64262,6 +64728,7 @@ $as_echo "#define _GLIBCXX_SYMVER_GNU 1" >>confdefs.h
 
     ;;
   gnu-versioned-namespace)
+    libtool_VERSION=7:0:0
     SYMVER_FILE=config/abi/pre/gnu-versioned-namespace.ver
 
 $as_echo "#define _GLIBCXX_SYMVER_GNU_NAMESPACE 1" >>confdefs.h
@@ -64412,6 +64879,8 @@ fi
 $as_echo "$glibcxx_ptrdiff_t_is_i" >&6; }
 
 
+
+
  # Check whether --enable-visibility was given.
 if test "${enable_visibility+set}" = set; then :
   enableval=$enable_visibility;
@@ -64469,7 +64938,6 @@ $as_echo "$as_me: visibility supported: $enable_visibility" >&6;}
 ac_ldbl_compat=no
 case "$target" in
   powerpc*-*-linux* | \
-  powerpc*-*-gnu* | \
   sparc*-*-linux* | \
   s390*-*-linux* | \
   alpha*-*-linux*)
@@ -64698,14 +65166,14 @@ else
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-         #include <sys/time.h>
-         #include <sys/resource.h>
+        #include <sys/time.h>
+        #include <sys/resource.h>
 
 int
 main ()
 {
 struct rlimit r;
-         setrlimit(0, &r);
+        setrlimit(0, &r);
   ;
   return 0;
 }
@@ -64800,9 +65268,9 @@ done
      test $enable_symvers != no; then
     case "$host" in
       *-*-cygwin*)
-        enable_abi_check=no ;;
+       enable_abi_check=no ;;
       *)
-        enable_abi_check=yes ;;
+       enable_abi_check=yes ;;
     esac
   else
     # Only build this as native, since automake does not understand
@@ -64813,6 +65281,8 @@ done
   # Export file names for ABI checking.
   baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}"
 
+  baseline_subdir_switch="$abi_baseline_subdir_switch"
+
 
 
 # Define documentation rules conditionally.
 
 
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stylesheets used in generation of documentation" >&5
+$as_echo_n "checking for stylesheets used in generation of documentation... " >&6; }
 glibcxx_stylesheets=no
-if test -f /usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION; then
+if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
   glibcxx_stylesheets=yes
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5
+$as_echo "$glibcxx_stylesheets" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5
+$as_echo_n "checking for local stylesheet directory... " >&6; }
+glibcxx_local_stylesheets=no
+if test x"$glibcxx_stylesheets" = x"yes"; then
+  if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then
+    glibcxx_local_stylesheets=yes
+    XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets
+  fi
+  if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then
+    glibcxx_local_stylesheets=yes
+    XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_local_stylesheets" >&5
+$as_echo "$glibcxx_local_stylesheets" >&6; }
+
+if test x"$glibcxx_local_stylesheets" = x"yes"; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: $XSL_STYLE_DIR" >&5
+$as_echo "$as_me: $XSL_STYLE_DIR" >&6;}
+else
+  glibcxx_stylesheets=no
+fi
+
 
 # Check for xml/html dependencies.
  if test $ac_cv_prog_DOXYGEN = "yes" &&
@@ -65216,8 +65716,8 @@ $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "dbtoepubm", so it can be a program name with args.
-set dummy dbtoepubm; ac_word=$2
+# Extract the first word of "dbtoepub", so it can be a program name with args.
+set dummy dbtoepub; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_DBTOEPUB+set}" = set; then :
@@ -65357,6 +65857,15 @@ else
 fi
 
 
+    if test $enable_extern_template = yes; then
+  ENABLE_EXTERN_TEMPLATE_TRUE=
+  ENABLE_EXTERN_TEMPLATE_FALSE='#'
+else
+  ENABLE_EXTERN_TEMPLATE_TRUE='#'
+  ENABLE_EXTERN_TEMPLATE_FALSE=
+fi
+
+
     if test $enable_symvers != no; then
   ENABLE_SYMVERS_TRUE=
   ENABLE_SYMVERS_FALSE='#'
@@ -65618,9 +66127,9 @@ $as_echo "$gxx_include_dir" >&6; }
   fi
 
   # Stuff in the actual top level.  Currently only used by libsupc++ to
-  # get unwind* headers from the gcc dir.
-  #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include'
-  TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc'
+  # get unwind* headers from the libgcc dir.
+  #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/libgcc -I$(toplevel_srcdir)/include'
+  TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/libgcc'
 
   # Now, export this to all the little Makefiles....
 
@@ -65806,6 +66315,10 @@ if test -z "${ENABLE_PARALLEL_TRUE}" && test -z "${ENABLE_PARALLEL_FALSE}"; then
   as_fn_error "conditional \"ENABLE_PARALLEL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_EXTERN_TEMPLATE_TRUE}" && test -z "${ENABLE_EXTERN_TEMPLATE_FALSE}"; then
+  as_fn_error "conditional \"ENABLE_EXTERN_TEMPLATE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_SYMVERS_TRUE}" && test -z "${ENABLE_SYMVERS_FALSE}"; then
   as_fn_error "conditional \"ENABLE_SYMVERS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5