aboutsummaryrefslogtreecommitdiff
path: root/libgm2
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-11-13 15:11:50 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-11-13 15:11:50 +0000
commit0036702555195d3fd8089577b7c1e2ce5f2ff5b1 (patch)
tree98d169797e960bb5a82d7d1ca425e6973545061e /libgm2
parenta6ac36d80a072639cc7029fc24c7c0f2c3e2fb7c (diff)
PR modula2/110779: Add reduced acinclude.m4 to allow interrogation of time features
This patch adds libgm2/acinclude.m4 and libgm2/configure.host which are reduced versions from libstdc++-v3. They currently allow for discovering the time features available in libc and will be extended to discover availability of ieee128 long double support in the near future. These files were also added to provide the functions: GLIBCXX_CONFIGURE, GLIBCXX_CHECK_GETTIMEOFDAY and GLIBCXX_ENABLE_LIBSTDCXX_TIME called by configure.ac. libgm2/ChangeLog: PR modula2/110779 * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Remove newline. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.in: Regenerate. * acinclude.m4: New file. * configure.host: New file. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgm2')
-rw-r--r--libgm2/Makefile.in11
-rw-r--r--libgm2/acinclude.m4784
-rw-r--r--libgm2/aclocal.m41
-rw-r--r--libgm2/config.h.in34
-rwxr-xr-xlibgm2/configure2154
-rw-r--r--libgm2/configure.ac1
-rw-r--r--libgm2/configure.host381
-rw-r--r--libgm2/libm2cor/Makefile.in11
-rw-r--r--libgm2/libm2iso/Makefile.in11
-rw-r--r--libgm2/libm2log/Makefile.in11
-rw-r--r--libgm2/libm2min/Makefile.in11
-rw-r--r--libgm2/libm2pim/Makefile.in11
12 files changed, 3194 insertions, 227 deletions
diff --git a/libgm2/Makefile.in b/libgm2/Makefile.in
index add0dd25665..5a96f98edc9 100644
--- a/libgm2/Makefile.in
+++ b/libgm2/Makefile.in
@@ -98,7 +98,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -169,6 +172,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -197,6 +201,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -264,6 +269,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -305,6 +312,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
# Makefile for libgm2.
# Copyright 2013-2022 Free Software Foundation, Inc.
diff --git a/libgm2/acinclude.m4 b/libgm2/acinclude.m4
new file mode 100644
index 00000000000..e4d0bf4a18e
--- /dev/null
+++ b/libgm2/acinclude.m4
@@ -0,0 +1,784 @@
+dnl acinclude.m4
+dnl
+dnl This file was derived from libstdc++-v3/acinclude.m4 and heavily pruned.
+dnl Its purpose is to check for glibc time, gettimeofday and
+dnl float128 availability.
+dnl
+dnl GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
+dnl
+dnl Exactly like AM_CONDITIONAL, but delays evaluation of the test until the
+dnl end of configure. This lets tested variables be reassigned, and the
+dnl conditional will depend on the final state of the variable. For a simple
+dnl example of why this is needed, see GLIBCXX_ENABLE_HOSTED.
+dnl
+m4_define([_m4_divert(glibcxx_diversion)], 8000)dnl
+AC_DEFUN([GLIBCXX_CONDITIONAL], [dnl
+ m4_divert_text([glibcxx_diversion],dnl
+ AM_CONDITIONAL([$1],[$2])
+ )dnl
+])dnl
+AC_DEFUN([GLIBCXX_EVALUATE_CONDITIONALS], [m4_undivert([glibcxx_diversion])])dnl
+
+
+dnl
+dnl Check to see what architecture and operating system we are compiling
+dnl for. Also, if architecture- or OS-specific flags are required for
+dnl compilation, pick them up here.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_HOST], [
+ . $glibcxx_srcdir/configure.host
+ AC_MSG_NOTICE([CPU config directory is $cpu_include_dir])
+ AC_MSG_NOTICE([OS config directory is $os_include_dir])
+])
+
+
+dnl
+dnl Initialize the rest of the library configury. At this point we have
+dnl variables like $host.
+dnl
+dnl Sets:
+dnl SUBDIRS
+dnl Substs:
+dnl glibcxx_builddir (absolute path)
+dnl glibcxx_srcdir (absolute path)
+dnl toplevel_builddir (absolute path)
+dnl toplevel_srcdir (absolute path)
+dnl with_cross_host
+dnl with_newlib
+dnl with_target_subdir
+dnl plus
+dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
+dnl - default settings for all AM_CONFITIONAL test variables
+dnl - lots of tools, like CC and CXX
+dnl
+AC_DEFUN([GLIBCXX_CONFIGURE], [
+ # Keep these sync'd with the list in Makefile.am. The first provides an
+ # expandable list at autoconf time; the second provides an expandable list
+ # (i.e., shell variable) at configure time.
+ m4_define([glibcxx_SUBDIRS],[])
+ SUBDIRS='glibcxx_SUBDIRS'
+
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ glibcxx_builddir=`${PWDCMD-pwd}`
+ case $srcdir in
+ [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
+ *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+ esac
+ toplevel_builddir=${glibcxx_builddir}/..
+ toplevel_srcdir=${glibcxx_srcdir}/..
+ AC_SUBST(glibcxx_builddir)
+ AC_SUBST(glibcxx_srcdir)
+ AC_SUBST(toplevel_builddir)
+ AC_SUBST(toplevel_srcdir)
+
+ # We use these options to decide which functions to include. They are
+ # set from the top level.
+ AC_ARG_WITH([target-subdir],
+ AC_HELP_STRING([--with-target-subdir=SUBDIR],
+ [configuring in a subdirectory]))
+
+ AC_ARG_WITH([cross-host],
+ AC_HELP_STRING([--with-cross-host=HOST],
+ [configuring with a cross compiler]))
+
+ AC_ARG_WITH([newlib],
+ AC_HELP_STRING([--with-newlib],
+ [assume newlib as a system C library]))
+
+ # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
+ # available). Uncomment the next line to force a particular method.
+ AC_PROG_LN_S
+ #LN_S='cp -p'
+
+ AC_CHECK_TOOL(AS, as)
+ AC_CHECK_TOOL(AR, ar)
+ AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
+
+ AM_MAINTAINER_MODE
+
+ # Set up safe default values for all subsequent AM_CONDITIONAL tests
+ # which are themselves conditionally expanded.
+ ## (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 GNU/Linux platforms use different
+ # configuration directories depending on the C library in use.
+ AC_EGREP_CPP([_using_uclibc], [
+ #include <stdio.h>
+ #if __UCLIBC__
+ _using_uclibc
+ #endif
+ ], uclibc=yes, uclibc=no)
+
+ AC_EGREP_CPP([_using_bionic], [
+ #include <stdio.h>
+ #if __BIONIC__
+ _using_bionic
+ #endif
+ ], bionic=yes, bionic=no)
+
+ # Find platform-specific directories containing configuration info.
+ # Also possibly modify flags used elsewhere, as needed by the platform.
+ GLIBCXX_CHECK_HOST
+])
+
+
+dnl
+dnl GLIBCXX_ENABLE
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
+dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
+dnl
+dnl See manual/appendix_porting.html#appendix.porting.build_hacking for
+dnl documentation.
+dnl
+m4_define([GLIBCXX_ENABLE],[dnl
+m4_define([_g_switch],[--enable-$1])dnl
+m4_define([_g_help],[AC_HELP_STRING([_g_switch$3],[$4 @<:@default=$2@:>@])])dnl
+ AC_ARG_ENABLE([$1],m4_dquote(_g_help),
+ m4_bmatch([$5],
+ [^permit ],
+ [[
+ case "$enableval" in
+ m4_bpatsubst([$5],[permit ])) ;;
+ *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
+ dnl Idea for future: generate a URL pointing to
+ dnl "onlinedocs/configopts.html#whatever"
+ esac
+ ]],
+ [^$],
+ [[
+ case "$enableval" in
+ yes|no) ;;
+ *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
+ esac
+ ]],
+ [[$5]]),
+ [enable_]m4_bpatsubst([$1],-,_)[=][$2])
+m4_undefine([_g_switch])dnl
+m4_undefine([_g_help])dnl
+])
+
+
+dnl
+dnl Check for clock_gettime, nanosleep and sched_yield, used in the
+dnl implementation of 20.11.7 [time.clock], and 30.3.2 [thread.thread.this]
+dnl in the C++11 standard.
+dnl
+dnl --enable-libstdcxx-time
+dnl --enable-libstdcxx-time=yes
+dnl checks for the availability of monotonic and realtime clocks,
+dnl nanosleep and sched_yield in libc.
+dnl --enable-libstdcxx-time=rt
+dnl also searches (and, if needed, links) librt. Note that this is
+dnl not always desirable because, in glibc 2.16 and earlier, for
+dnl example, in turn it triggers the linking of libpthread too,
+dnl which activates locking,
+dnl a large overhead for single-thread programs.
+dnl --enable-libstdcxx-time=no
+dnl --disable-libstdcxx-time
+dnl disables the checks completely
+dnl
+dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX
+dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test
+dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in
+dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD.
+dnl
+dnl needed
+AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
+
+ GLIBCXX_ENABLE(libstdcxx-time,auto,[[[=KIND]]],
+ [use KIND for check type],
+ [permit yes|no|rt])
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ ac_save_LIBS="$LIBS"
+
+ ac_has_clock_monotonic=no
+ ac_has_clock_realtime=no
+ ac_has_nanosleep=no
+ ac_has_sched_yield=no
+
+ if test x"$enable_libstdcxx_time" = x"auto"; then
+
+ case "${target_os}" in
+ cygwin*)
+ ac_has_nanosleep=yes
+ ;;
+ mingw*)
+ ac_has_win32_sleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ darwin*)
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ # VxWorks has nanosleep as soon as the kernel is configured with
+ # INCLUDE_POSIX_TIMERS, which is normally/most-often the case.
+ vxworks*)
+ ac_has_nanosleep=yes
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+ # Don't use link test for freestanding library, in case gcc_no_link=yes
+ if test x"$is_hosted" = xyes; then
+ # Versions of glibc before 2.17 needed -lrt for clock_gettime.
+ AC_SEARCH_LIBS(clock_gettime, [rt])
+ if test x"$ac_cv_search_clock_gettime" = x"none required"; then
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ fi
+ fi
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ freebsd*|netbsd*|dragonfly*|rtems*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ openbsd*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ;;
+ solaris*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ uclinux*)
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ esac
+
+ elif test x"$enable_libstdcxx_time" != x"no"; then
+
+ if test x"$enable_libstdcxx_time" = x"rt"; then
+ AC_SEARCH_LIBS(clock_gettime, [rt])
+ AC_SEARCH_LIBS(nanosleep, [rt])
+ else
+ AC_CHECK_FUNC(clock_gettime)
+ AC_CHECK_FUNC(nanosleep)
+ fi
+
+ case "$ac_cv_search_clock_gettime" in
+ -l*) GLIBCXX_LIBS=$ac_cv_search_clock_gettime
+ ;;
+ esac
+ case "$ac_cv_search_nanosleep" in
+ -l*) GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_nanosleep"
+ ;;
+ esac
+
+ AC_SEARCH_LIBS(sched_yield, [rt])
+
+ case "$ac_cv_search_sched_yield" in
+ -lrt*)
+ if test x"$enable_libstdcxx_time" = x"rt"; then
+ GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
+ ac_has_sched_yield=yes
+ fi
+ ;;
+ *)
+ ac_has_sched_yield=yes
+ ;;
+ esac
+
+ AC_CHECK_HEADERS(unistd.h, ac_has_unistd_h=yes, ac_has_unistd_h=no)
+
+ if test x"$ac_has_unistd_h" = x"yes"; then
+ AC_MSG_CHECKING([for monotonic clock])
+ AC_TRY_LINK(
+ [#include <unistd.h>
+ #include <time.h>
+ ],
+ [#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
+ timespec tp;
+ #endif
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+ ], [ac_has_clock_monotonic=yes], [ac_has_clock_monotonic=no])
+
+ AC_MSG_RESULT($ac_has_clock_monotonic)
+
+ AC_MSG_CHECKING([for realtime clock])
+ AC_TRY_LINK(
+ [#include <unistd.h>
+ #include <time.h>
+ ],
+ [#if _POSIX_TIMERS > 0
+ timespec tp;
+ #endif
+ clock_gettime(CLOCK_REALTIME, &tp);
+ ], [ac_has_clock_realtime=yes], [ac_has_clock_realtime=no])
+
+ AC_MSG_RESULT($ac_has_clock_realtime)
+
+ AC_MSG_CHECKING([for nanosleep])
+ AC_TRY_LINK(
+ [#include <unistd.h>
+ #include <time.h>
+ ],
+ [#if _POSIX_TIMERS > 0
+ timespec tp;
+ #endif
+ nanosleep(&tp, 0);
+ ], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])
+
+ AC_MSG_RESULT($ac_has_nanosleep)
+ fi
+ fi
+
+ if test x"$ac_has_clock_monotonic" != x"yes"; then
+ case ${target_os} in
+ linux* | uclinux*)
+ AC_MSG_CHECKING([for clock_gettime syscall])
+ AC_TRY_COMPILE(
+ [#include <unistd.h>
+ #include <time.h>
+ #include <sys/syscall.h>
+ ],
+ [#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
+ timespec tp;
+ #endif
+ syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp);
+ syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp);
+ ], [ac_has_clock_gettime_syscall=yes], [ac_has_clock_gettime_syscall=no])
+ AC_MSG_RESULT($ac_has_clock_gettime_syscall)
+ if test x"$ac_has_clock_gettime_syscall" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, 1,
+ [Defined if clock_gettime syscall has monotonic and realtime clock support. ])
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ AC_MSG_CHECKING([for struct timespec that matches syscall])
+ AC_TRY_COMPILE(
+ [#include <time.h>
+ #include <sys/syscall.h>
+ ],
+ [#ifdef SYS_clock_gettime64
+ #if SYS_clock_gettime64 != SYS_clock_gettime
+ // We need to use SYS_clock_gettime and libc appears to
+ // also know about the SYS_clock_gettime64 syscall.
+ // Check that userspace doesn't use time64 version of timespec.
+ static_assert(sizeof(timespec::tv_sec) == sizeof(long),
+ "struct timespec must be compatible with SYS_clock_gettime");
+ #endif
+ #endif
+ ],
+ [ac_timespec_matches_syscall=yes],
+ [ac_timespec_matches_syscall=no])
+ AC_MSG_RESULT($ac_timespec_matches_syscall)
+ if test x"$ac_timespec_matches_syscall" = no; then
+ AC_MSG_ERROR([struct timespec is not compatible with SYS_clock_gettime, please report a bug to http://gcc.gnu.org/bugzilla])
+ fi
+ fi;;
+ esac
+ fi
+
+ if test x"$ac_has_clock_monotonic" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_CLOCK_MONOTONIC, 1,
+ [ Defined if clock_gettime has monotonic clock support. ])
+ fi
+
+ if test x"$ac_has_clock_realtime" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_CLOCK_REALTIME, 1,
+ [ Defined if clock_gettime has realtime clock support. ])
+ fi
+
+ if test x"$ac_has_sched_yield" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_SCHED_YIELD, 1,
+ [ Defined if sched_yield is available. ])
+ fi
+
+ if test x"$ac_has_nanosleep" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_NANOSLEEP, 1,
+ [ Defined if nanosleep is available. ])
+ elif test x"$ac_has_win32_sleep" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_WIN32_SLEEP, 1,
+ [Defined if Sleep exists.])
+ else
+ AC_MSG_CHECKING([for sleep])
+ AC_TRY_COMPILE([#include <unistd.h>],
+ [sleep(1)],
+ [ac_has_sleep=yes],[ac_has_sleep=no])
+ if test x"$ac_has_sleep" = x"yes"; then
+ AC_DEFINE(HAVE_SLEEP,1, [Defined if sleep exists.])
+ fi
+ AC_MSG_RESULT($ac_has_sleep)
+ AC_MSG_CHECKING([for usleep])
+ AC_TRY_COMPILE([#include <unistd.h>],
+ [sleep(1);
+ usleep(100);],
+ [ac_has_usleep=yes],[ac_has_usleep=no])
+ if test x"$ac_has_usleep" = x"yes"; then
+ AC_DEFINE(HAVE_USLEEP,1, [Defined if usleep exists.])
+ fi
+ AC_MSG_RESULT($ac_has_usleep)
+ fi
+
+ if test x"$ac_has_nanosleep$ac_has_win32_sleep$ac_has_sleep" = x"nonono"; then
+ AC_DEFINE(_GLIBCXX_NO_SLEEP,1, [Defined if no way to sleep is available.])
+ fi
+
+ AC_SUBST(GLIBCXX_LIBS)
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ LIBS="$ac_save_LIBS"
+ AC_LANG_RESTORE
+])
+
+dnl
+dnl Check for gettimeofday, used in the implementation of 20.11.7
+dnl [time.clock] in the C++11 standard.
+dnl
+dnl needed
+AC_DEFUN([GLIBCXX_CHECK_GETTIMEOFDAY], [
+
+ AC_MSG_CHECKING([for gettimeofday])
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
+ ac_has_gettimeofday=no;
+ AC_CHECK_HEADERS(sys/time.h, ac_has_sys_time_h=yes, ac_has_sys_time_h=no)
+ if test x"$ac_has_sys_time_h" = x"yes"; then
+ AC_MSG_CHECKING([for gettimeofday])
+ GCC_TRY_COMPILE_OR_LINK([#include <sys/time.h>],
+ [timeval tv; gettimeofday(&tv, 0);],
+ [ac_has_gettimeofday=yes], [ac_has_gettimeofday=no])
+
+ AC_MSG_RESULT($ac_has_gettimeofday)
+ fi
+
+ if test x"$ac_has_gettimeofday" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_GETTIMEOFDAY, 1,
+ [ Defined if gettimeofday is available. ])
+ fi
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
+
+dnl
+dnl Check for which locale library to use. The choice is mapped to
+dnl a subdirectory of config/locale.
+dnl
+dnl Default is generic.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ GLIBCXX_ENABLE(clocale,auto,[[[=MODEL]]],
+ [use MODEL for target locale package],
+ [permit generic|gnu|ieee_1003.1-2001|newlib|yes|no|auto])
+
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+ # default to on for easier handling.
+ USE_NLS=no
+ AC_ARG_ENABLE(nls,
+ AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
+ [],
+ [enable_nls=yes])
+
+ # Either a known package, or "auto"
+ if test $enable_clocale = no || test $enable_clocale = yes; then
+ enable_clocale=auto
+ fi
+ enable_clocale_flag=$enable_clocale
+
+ # Probe for locale model to use if none specified.
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+ darwin*)
+ enable_clocale_flag=darwin
+ ;;
+ vxworks*)
+ enable_clocale_flag=vxworks
+ ;;
+ dragonfly* | freebsd*)
+ enable_clocale_flag=dragonfly
+ ;;
+ openbsd*)
+ enable_clocale_flag=newlib
+ ;;
+ *)
+ if test x"$with_newlib" = x"yes"; then
+ enable_clocale_flag=newlib
+ else
+ enable_clocale_flag=generic
+ fi
+ ;;
+ esac
+ fi
+
+ # Sanity check model, and test for special functionality.
+ if test $enable_clocale_flag = gnu; then
+ AC_EGREP_CPP([_GLIBCXX_ok], [
+ #include <features.h>
+ #if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined(__UCLIBC__)
+ _GLIBCXX_ok
+ #endif
+ ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
+
+ # Set it to scream when it hurts.
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="-Wimplicit-function-declaration -Werror"
+
+ # Use strxfrm_l if available.
+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
+ #include <string.h>
+ #include <locale.h>],
+ [char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);],
+ AC_DEFINE(HAVE_STRXFRM_L, 1,
+ [Define if strxfrm_l is available in <string.h>.]),)
+
+ # Use strerror_l if available.
+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
+ #include <string.h>
+ #include <locale.h>],
+ [__locale_t loc; strerror_l(5, loc);],
+ AC_DEFINE(HAVE_STRERROR_L, 1,
+ [Define if strerror_l is available in <string.h>.]),)
+
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+
+ # Perhaps use strerror_r if available, and strerror_l isn't.
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="-Wimplicit-function-declaration -Werror"
+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
+ #include <string.h>
+ #include <locale.h>],
+ [char s[128]; strerror_r(5, s, 128);],
+ AC_DEFINE(HAVE_STRERROR_R, 1,
+ [Define if strerror_r is available in <string.h>.]),)
+ CFLAGS="$ac_save_CFLAGS"
+
+ # Set configure bits for specified locale package
+ AC_MSG_CHECKING([for C locale to use])
+ case ${enable_clocale_flag} in
+ generic)
+ AC_MSG_RESULT(generic)
+
+ 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/generic/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
+ ;;
+ darwin)
+ AC_MSG_RESULT(darwin)
+
+ 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/darwin/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
+ ;;
+ vxworks)
+ AC_MSG_RESULT(vxworks)
+
+ 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/vxworks/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
+ ;;
+ dragonfly)
+ AC_MSG_RESULT(dragonfly or freebsd)
+
+ CLOCALE_H=config/locale/dragonfly/c_locale.h
+ CLOCALE_CC=config/locale/dragonfly/c_locale.cc
+ CCODECVT_CC=config/locale/dragonfly/codecvt_members.cc
+ CCOLLATE_CC=config/locale/dragonfly/collate_members.cc
+ CCTYPE_CC=config/locale/dragonfly/ctype_members.cc
+ CMESSAGES_H=config/locale/generic/messages_members.h
+ CMESSAGES_CC=config/locale/generic/messages_members.cc
+ CMONEY_CC=config/locale/dragonfly/monetary_members.cc
+ CNUMERIC_CC=config/locale/dragonfly/numeric_members.cc
+ CTIME_H=config/locale/dragonfly/time_members.h
+ CTIME_CC=config/locale/dragonfly/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
+
+ gnu)
+ AC_MSG_RESULT(gnu)
+
+ # Declare intention to use gettext, and add support for specific
+ # languages.
+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
+ ALL_LINGUAS="de fr"
+
+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+ 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"; \
+ done
+ AC_SUBST(glibcxx_MOFILES)
+ AC_SUBST(glibcxx_POFILES)
+
+ CLOCALE_H=config/locale/gnu/c_locale.h
+ CLOCALE_CC=config/locale/gnu/c_locale.cc
+ CCODECVT_CC=config/locale/gnu/codecvt_members.cc
+ CCOLLATE_CC=config/locale/gnu/collate_members.cc
+ CCTYPE_CC=config/locale/gnu/ctype_members.cc
+ CMESSAGES_H=config/locale/gnu/messages_members.h
+ CMESSAGES_CC=config/locale/gnu/messages_members.cc
+ CMONEY_CC=config/locale/gnu/monetary_members.cc
+ CNUMERIC_CC=config/locale/gnu/numeric_members.cc
+ CTIME_H=config/locale/gnu/time_members.h
+ CTIME_CC=config/locale/gnu/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
+ ;;
+ ieee_1003.1-2001)
+ AC_MSG_RESULT(IEEE 1003.1)
+
+ CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
+ CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
+ CCODECVT_CC=config/locale/generic/codecvt_members.cc
+ CCOLLATE_CC=config/locale/generic/collate_members.cc
+ CCTYPE_CC=config/locale/generic/ctype_members.cc
+ CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
+ CMESSAGES_CC=config/locale/ieee_1003.1-2001/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
+ ;;
+ newlib)
+ AC_MSG_RESULT(newlib)
+
+ 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
+ # -DLOCALEDIR define during testsuite compilation.
+ glibcxx_localedir=${glibcxx_builddir}/po/share/locale
+ AC_SUBST(glibcxx_localedir)
+
+ # A standalone libintl (e.g., GNU libintl) may be in use.
+ if test $USE_NLS = yes; then
+ AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
+ AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
+ fi
+ if test $USE_NLS = yes; then
+ AC_DEFINE(_GLIBCXX_USE_NLS, 1,
+ [Define if NLS translations are to be used.])
+ fi
+
+ AC_SUBST(USE_NLS)
+ AC_SUBST(CLOCALE_H)
+ AC_SUBST(CMESSAGES_H)
+ AC_SUBST(CCODECVT_CC)
+ AC_SUBST(CCOLLATE_CC)
+ AC_SUBST(CCTYPE_CC)
+ AC_SUBST(CMESSAGES_CC)
+ AC_SUBST(CMONEY_CC)
+ AC_SUBST(CNUMERIC_CC)
+ AC_SUBST(CTIME_H)
+ AC_SUBST(CTIME_CC)
+ AC_SUBST(CLOCALE_CC)
+ AC_SUBST(CLOCALE_INTERNAL_H)
+])
+
+
+dnl
+dnl Check for GNU 128-bit floating point type.
+dnl
+dnl Note: also checks that the type isn't a standard types.
+dnl
+dnl Defines:
+dnl ENABLE_FLOAT128
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_FLOAT128], [
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ # Fake what AC_TRY_COMPILE does, without linking as this is
+ # unnecessary for this test.
+
+ cat > conftest.$ac_ext << EOF
+[#]line __oline__ "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
+
+ AC_MSG_CHECKING([for __float128])
+ if AC_TRY_EVAL(ac_compile); then
+ enable_float128=yes
+ else
+ enable_float128=no
+ fi
+ AC_MSG_RESULT($enable_float128)
+ GLIBCXX_CONDITIONAL(ENABLE_FLOAT128, test $enable_float128 = yes)
+ rm -f conftest*
+
+ AC_LANG_RESTORE
+])
+
+# Macros from the top-level gcc directory.
+m4_include([../config/gc++filt.m4])
+m4_include([../config/tls.m4])
+m4_include([../config/gthr.m4])
+m4_include([../config/cet.m4])
diff --git a/libgm2/aclocal.m4 b/libgm2/aclocal.m4
index c352303012d..bee67b05dee 100644
--- a/libgm2/aclocal.m4
+++ b/libgm2/aclocal.m4
@@ -1198,3 +1198,4 @@ m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/no-executables.m4])
m4_include([../config/override.m4])
+m4_include([acinclude.m4])
diff --git a/libgm2/config.h.in b/libgm2/config.h.in
index a9d932f99be..0cf4906468d 100644
--- a/libgm2/config.h.in
+++ b/libgm2/config.h.in
@@ -6,6 +6,9 @@
/* function brk exists */
#undef HAVE_BRK
+/* Define to 1 if the target assembler supports thread-local storage. */
+#undef HAVE_CC_TLS
+
/* function cfmakeraw exists */
#undef HAVE_CFMAKERAW
@@ -162,6 +165,9 @@
/* function signbitl exists */
#undef HAVE_SIGNBITL
+/* Defined if sleep exists. */
+#undef HAVE_SLEEP
+
/* function stat exists */
#undef HAVE_STAT
@@ -273,6 +279,9 @@
/* function unlink exists */
#undef HAVE_UNLINK
+/* Defined if usleep exists. */
+#undef HAVE_USLEEP
+
/* function wait exists */
#undef HAVE_WAIT
@@ -335,6 +344,31 @@
/* Version number of package */
#undef VERSION
+/* Defined if no way to sleep is available. */
+#undef _GLIBCXX_NO_SLEEP
+
+/* Defined if clock_gettime syscall has monotonic and realtime clock support.
+ */
+#undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL
+
+/* Defined if clock_gettime has monotonic clock support. */
+#undef _GLIBCXX_USE_CLOCK_MONOTONIC
+
+/* Defined if clock_gettime has realtime clock support. */
+#undef _GLIBCXX_USE_CLOCK_REALTIME
+
+/* Defined if gettimeofday is available. */
+#undef _GLIBCXX_USE_GETTIMEOFDAY
+
+/* Defined if nanosleep is available. */
+#undef _GLIBCXX_USE_NANOSLEEP
+
+/* Defined if sched_yield is available. */
+#undef _GLIBCXX_USE_SCHED_YIELD
+
+/* Defined if Sleep exists. */
+#undef _GLIBCXX_USE_WIN32_SLEEP
+
/* Define to 1 if on MINIX. */
#undef _MINIX
diff --git a/libgm2/configure b/libgm2/configure
index a0ad71e7c6c..f0f5f2686ba 100755
--- a/libgm2/configure
+++ b/libgm2/configure
@@ -651,39 +651,26 @@ enable_static
enable_shared
ENABLE_DARWIN_AT_RPATH_FALSE
ENABLE_DARWIN_AT_RPATH_TRUE
-CXXCPP
OTOOL64
OTOOL
LIPO
NMEDIT
DSYMUTIL
OBJDUMP
-LN_S
ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
SED
LIBTOOL
-RANLIB
NM
-AR
am__fastdepCCAS_FALSE
am__fastdepCCAS_TRUE
CCASDEPMODE
CCASFLAGS
CCAS
-am__fastdepCXX_FALSE
-am__fastdepCXX_TRUE
-CXXDEPMODE
-ac_ct_CXX
-CXXFLAGS
-CXX
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
toolexeclibdir
toolexecdir
-MAINT
slibdir
target_subdir
host_subdir
@@ -695,6 +682,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -728,6 +718,22 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+GLIBCXX_LIBS
+CXXCPP
+ac_ct_CXX
+CXXFLAGS
+CXX
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+RANLIB
+AR
+AS
+LN_S
+toplevel_srcdir
+toplevel_builddir
+glibcxx_srcdir
+glibcxx_builddir
target_os
target_vendor
target_cpu
@@ -794,13 +800,16 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_multilib
+with_target_subdir
+with_cross_host
+with_newlib
+enable_maintainer_mode
+enable_libstdcxx_time
enable_dependency_tracking
enable_silent_rules
-with_cross_host
with_build_libsubdir
enable_version_specific_runtime_libs
with_slibdir
-enable_maintainer_mode
enable_shared
enable_static
with_pic
@@ -819,6 +828,9 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
+CXX
+CXXFLAGS
+CCC
CXXCPP'
@@ -1440,6 +1452,11 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-multilib build many library versions (default)
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
+ --enable-libstdcxx-time[=KIND]
+ use KIND for check type [default=auto]
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1450,9 +1467,6 @@ Optional Features:
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
- --enable-maintainer-mode
- enable make rules and dependencies not useful (and
- sometimes confusing) to the casual installer
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1465,6 +1479,10 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-target-subdir=SUBDIR
+ configuring in a subdirectory
+ --with-cross-host=HOST configuring with a cross compiler
+ --with-newlib assume newlib as a system C library
--with-cross-host=HOST Configuring with a cross compiler
--with-build-libsubdir=DIR Directory where to find libraries for build system
--with-slibdir=DIR shared libraries in DIR LIBDIR
@@ -1485,9 +1503,9 @@ Some influential environment variables:
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
CCAS assembler compiler command (defaults to CC)
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
- CXXCPP C++ preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1842,10 +1860,134 @@ fi
} # ac_fn_cxx_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_header_mongrel
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
@@ -1865,7 +2007,7 @@ $as_echo "$ac_try_echo"; } >&5
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
+ test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
@@ -1886,12 +2028,12 @@ fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_cxx_try_link
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
+ac_fn_cxx_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -1943,7 +2085,7 @@ return $2 ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
@@ -1956,49 +2098,12 @@ eval ac_res=\$$3
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_func
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
+} # ac_fn_cxx_check_func
-# ac_fn_cxx_try_link LINENO
-# -------------------------
+# ac_fn_c_try_link LINENO
+# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
+ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
@@ -2018,7 +2123,7 @@ $as_echo "$ac_try_echo"; } >&5
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
+ test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
@@ -2039,7 +2144,77 @@ fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_cxx_try_link
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+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. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
@@ -4009,13 +4184,1560 @@ fi
# Runs configure.host, and assorted other critical bits. Sets
# up critical shell variables.
-GLIBCXX_CONFIGURE
+
+ # Keep these sync'd with the list in Makefile.am. The first provides an
+ # expandable list at autoconf time; the second provides an expandable list
+ # (i.e., shell variable) at configure time.
+
+ SUBDIRS=''
+
+ # These need to be absolute paths, yet at the same time need to
+ # canonicalize only relative paths, because then amd will not unmount
+ # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+ glibcxx_builddir=`${PWDCMD-pwd}`
+ case $srcdir in
+ \\/$* | ?:\\/*) 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.
+
+# Check whether --with-target-subdir was given.
+if test "${with_target_subdir+set}" = set; then :
+ withval=$with_target_subdir;
+fi
+
+
+
+# Check whether --with-cross-host was given.
+if test "${with_cross_host+set}" = set; then :
+ withval=$with_cross_host;
+fi
+
+
+
+# Check whether --with-newlib was given.
+if test "${with_newlib+set}" = set; then :
+ withval=$with_newlib;
+fi
+
+
+ # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
+ # available). Uncomment the next line to force a particular method.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+ #LN_S='cp -p'
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB="ranlib-not-found-in-path-error"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+ # Set up safe default values for all subsequent AM_CONDITIONAL tests
+ # which are themselves conditionally expanded.
+ ## (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 GNU/Linux platforms use different
+ # configuration directories depending on the C library in use.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdio.h>
+ #if __UCLIBC__
+ _using_uclibc
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "_using_uclibc" >/dev/null 2>&1; then :
+ uclibc=yes
+else
+ uclibc=no
+fi
+rm -f conftest*
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdio.h>
+ #if __BIONIC__
+ _using_bionic
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "_using_bionic" >/dev/null 2>&1; then :
+ bionic=yes
+else
+ bionic=no
+fi
+rm -f conftest*
+
+
+ # Find platform-specific directories containing configuration info.
+ # Also possibly modify flags used elsewhere, as needed by the platform.
+
+ . $glibcxx_srcdir/configure.host
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CPU config directory is $cpu_include_dir" >&5
+$as_echo "$as_me: CPU config directory is $cpu_include_dir" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: OS config directory is $os_include_dir" >&5
+$as_echo "$as_me: OS config directory is $os_include_dir" >&6;}
+
+
# For gettimeofday support.
-GLIBCXX_CHECK_GETTIMEOFDAY
+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
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if ${ac_cv_prog_CXXCPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+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
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday" >&5
+$as_echo_n "checking for gettimeofday... " >&6; }
+
+
+ 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"
+
+ ac_has_gettimeofday=no;
+ for ac_header in sys/time.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIME_H 1
+_ACEOF
+ ac_has_sys_time_h=yes
+else
+ ac_has_sys_time_h=no
+fi
+
+done
+
+ if test x"$ac_has_sys_time_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday" >&5
+$as_echo_n "checking for gettimeofday... " >&6; }
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+int
+main ()
+{
+timeval tv; gettimeofday(&tv, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_gettimeofday=yes
+else
+ ac_has_gettimeofday=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/time.h>
+int
+main ()
+{
+timeval tv; gettimeofday(&tv, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_has_gettimeofday=yes
+else
+ ac_has_gettimeofday=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_gettimeofday" >&5
+$as_echo "$ac_has_gettimeofday" >&6; }
+ fi
+
+ if test x"$ac_has_gettimeofday" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_GETTIMEOFDAY 1" >>confdefs.h
+
+ fi
+
+ 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 clock_gettime, nanosleep and sched_yield support.
-GLIBCXX_ENABLE_LIBSTDCXX_TIME
+
+
+ # Check whether --enable-libstdcxx-time was given.
+if test "${enable_libstdcxx_time+set}" = set; then :
+ enableval=$enable_libstdcxx_time;
+ case "$enableval" in
+ yes|no|rt) ;;
+ *) as_fn_error $? "Unknown argument to enable/disable libstdcxx-time" "$LINENO" 5 ;;
+ esac
+
+else
+ enable_libstdcxx_time=auto
+fi
+
+
+
+
+ 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"
+ ac_save_LIBS="$LIBS"
+
+ ac_has_clock_monotonic=no
+ ac_has_clock_realtime=no
+ ac_has_nanosleep=no
+ ac_has_sched_yield=no
+
+ if test x"$enable_libstdcxx_time" = x"auto"; then
+
+ case "${target_os}" in
+ cygwin*)
+ ac_has_nanosleep=yes
+ ;;
+ mingw*)
+ ac_has_win32_sleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ darwin*)
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ # VxWorks has nanosleep as soon as the kernel is configured with
+ # INCLUDE_POSIX_TIMERS, which is normally/most-often the case.
+ vxworks*)
+ ac_has_nanosleep=yes
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+ # Don't use link test for freestanding library, in case gcc_no_link=yes
+ if test x"$is_hosted" = xyes; then
+ # Versions of glibc before 2.17 needed -lrt for clock_gettime.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ if test x"$ac_cv_search_clock_gettime" = x"none required"; then
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ fi
+ fi
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ freebsd*|netbsd*|dragonfly*|rtems*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ openbsd*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ;;
+ solaris*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ ;;
+ uclinux*)
+ ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
+ esac
+
+ elif test x"$enable_libstdcxx_time" != x"no"; then
+
+ if test x"$enable_libstdcxx_time" = x"rt"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
+$as_echo_n "checking for library containing nanosleep... " >&6; }
+if ${ac_cv_search_nanosleep+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_search_nanosleep=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_nanosleep+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_nanosleep+:} false; then :
+
+else
+ ac_cv_search_nanosleep=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
+$as_echo "$ac_cv_search_nanosleep" >&6; }
+ac_res=$ac_cv_search_nanosleep
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ else
+ ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes; then :
+
+fi
+
+ ac_fn_cxx_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes; then :
+
+fi
+
+ fi
+
+ case "$ac_cv_search_clock_gettime" in
+ -l*) GLIBCXX_LIBS=$ac_cv_search_clock_gettime
+ ;;
+ esac
+ case "$ac_cv_search_nanosleep" in
+ -l*) GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_nanosleep"
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
+$as_echo_n "checking for library containing sched_yield... " >&6; }
+if ${ac_cv_search_sched_yield+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_search_sched_yield=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_sched_yield+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_sched_yield+:} false; then :
+
+else
+ ac_cv_search_sched_yield=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
+$as_echo "$ac_cv_search_sched_yield" >&6; }
+ac_res=$ac_cv_search_sched_yield
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+ case "$ac_cv_search_sched_yield" in
+ -lrt*)
+ if test x"$enable_libstdcxx_time" = x"rt"; then
+ GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
+ ac_has_sched_yield=yes
+ fi
+ ;;
+ *)
+ ac_has_sched_yield=yes
+ ;;
+ esac
+
+ for ac_header in unistd.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+ ac_has_unistd_h=yes
+else
+ ac_has_unistd_h=no
+fi
+
+done
+
+
+ if test x"$ac_has_unistd_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clock" >&5
+$as_echo_n "checking for monotonic clock... " >&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. */
+#include <unistd.h>
+ #include <time.h>
+
+int
+main ()
+{
+#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
+ timespec tp;
+ #endif
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_has_clock_monotonic=yes
+else
+ ac_has_clock_monotonic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_clock_monotonic" >&5
+$as_echo "$ac_has_clock_monotonic" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for realtime clock" >&5
+$as_echo_n "checking for realtime clock... " >&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. */
+#include <unistd.h>
+ #include <time.h>
+
+int
+main ()
+{
+#if _POSIX_TIMERS > 0
+ timespec tp;
+ #endif
+ clock_gettime(CLOCK_REALTIME, &tp);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_has_clock_realtime=yes
+else
+ ac_has_clock_realtime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_clock_realtime" >&5
+$as_echo "$ac_has_clock_realtime" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep" >&5
+$as_echo_n "checking for nanosleep... " >&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. */
+#include <unistd.h>
+ #include <time.h>
+
+int
+main ()
+{
+#if _POSIX_TIMERS > 0
+ timespec tp;
+ #endif
+ nanosleep(&tp, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_has_nanosleep=yes
+else
+ ac_has_nanosleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_nanosleep" >&5
+$as_echo "$ac_has_nanosleep" >&6; }
+ fi
+ fi
+
+ if test x"$ac_has_clock_monotonic" != x"yes"; then
+ case ${target_os} in
+ linux* | uclinux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5
+$as_echo_n "checking for clock_gettime syscall... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <time.h>
+ #include <sys/syscall.h>
+
+int
+main ()
+{
+#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
+ timespec tp;
+ #endif
+ syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp);
+ syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_clock_gettime_syscall=yes
+else
+ ac_has_clock_gettime_syscall=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_clock_gettime_syscall" >&5
+$as_echo "$ac_has_clock_gettime_syscall" >&6; }
+ if test x"$ac_has_clock_gettime_syscall" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL 1" >>confdefs.h
+
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec that matches syscall" >&5
+$as_echo_n "checking for struct timespec that matches syscall... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+ #include <sys/syscall.h>
+
+int
+main ()
+{
+#ifdef SYS_clock_gettime64
+ #if SYS_clock_gettime64 != SYS_clock_gettime
+ // We need to use SYS_clock_gettime and libc appears to
+ // also know about the SYS_clock_gettime64 syscall.
+ // Check that userspace doesn't use time64 version of timespec.
+ static_assert(sizeof(timespec::tv_sec) == sizeof(long),
+ "struct timespec must be compatible with SYS_clock_gettime");
+ #endif
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_timespec_matches_syscall=yes
+else
+ ac_timespec_matches_syscall=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_timespec_matches_syscall" >&5
+$as_echo "$ac_timespec_matches_syscall" >&6; }
+ if test x"$ac_timespec_matches_syscall" = no; then
+ as_fn_error $? "struct timespec is not compatible with SYS_clock_gettime, please report a bug to http://gcc.gnu.org/bugzilla" "$LINENO" 5
+ fi
+ fi;;
+ esac
+ fi
+
+ if test x"$ac_has_clock_monotonic" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_CLOCK_MONOTONIC 1" >>confdefs.h
+
+ fi
+
+ if test x"$ac_has_clock_realtime" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_CLOCK_REALTIME 1" >>confdefs.h
+
+ fi
+
+ if test x"$ac_has_sched_yield" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_SCHED_YIELD 1" >>confdefs.h
+
+ fi
+
+ if test x"$ac_has_nanosleep" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_NANOSLEEP 1" >>confdefs.h
+
+ elif test x"$ac_has_win32_sleep" = x"yes"; then
+
+$as_echo "#define _GLIBCXX_USE_WIN32_SLEEP 1" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sleep" >&5
+$as_echo_n "checking for sleep... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+sleep(1)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_sleep=yes
+else
+ ac_has_sleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test x"$ac_has_sleep" = x"yes"; then
+
+$as_echo "#define HAVE_SLEEP 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_sleep" >&5
+$as_echo "$ac_has_sleep" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usleep" >&5
+$as_echo_n "checking for usleep... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+sleep(1);
+ usleep(100);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_usleep=yes
+else
+ ac_has_usleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test x"$ac_has_usleep" = x"yes"; then
+
+$as_echo "#define HAVE_USLEEP 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_usleep" >&5
+$as_echo "$ac_has_usleep" >&6; }
+ fi
+
+ if test x"$ac_has_nanosleep$ac_has_win32_sleep$ac_has_sleep" = x"nonono"; then
+
+$as_echo "#define _GLIBCXX_NO_SLEEP 1" >>confdefs.h
+
+ fi
+
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ LIBS="$ac_save_LIBS"
+ 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
+
am__api_version='1.15'
@@ -4733,6 +6455,134 @@ else
fi
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
@@ -5994,134 +7844,6 @@ 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
-depcc="$CXX" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named 'D' -- because '-MD' means "put the output
- # in D".
- rm -rf conftest.dir
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
- # Solaris 10 /bin/sh.
- echo '/* dummy */' > sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with '-c' and '-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle '-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs.
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # After this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested.
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok '-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
# By default we simply use the C compiler to build assembly code.
test "${CCAS+set}" = set || CCAS=$CC
@@ -7157,17 +8879,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
$as_echo "$lt_cv_nm_interface" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
# find the maximum length of command line arguments
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
$as_echo_n "checking the maximum length of command line arguments... " >&6; }
@@ -9225,7 +10936,6 @@ done
-
# Set options
@@ -12788,7 +14498,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12791 "configure"
+#line 14501 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12894,7 +14604,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12897 "configure"
+#line 14607 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20528,6 +22238,10 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
$as_echo_n "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
@@ -20544,6 +22258,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -20556,10 +22274,6 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libgm2/configure.ac b/libgm2/configure.ac
index 11f4b506781..07f82e8dfd5 100644
--- a/libgm2/configure.ac
+++ b/libgm2/configure.ac
@@ -77,7 +77,6 @@ GLIBCXX_CHECK_GETTIMEOFDAY
# For clock_gettime, nanosleep and sched_yield support.
GLIBCXX_ENABLE_LIBSTDCXX_TIME
-
AM_INIT_AUTOMAKE([1.15.1 no-define foreign no-dist -Wall -Wno-portability])
AH_TEMPLATE(PACKAGE, [Name of package])
diff --git a/libgm2/configure.host b/libgm2/configure.host
new file mode 100644
index 00000000000..633678cb3b2
--- /dev/null
+++ b/libgm2/configure.host
@@ -0,0 +1,381 @@
+# configure.host
+#
+# This shell script handles all host based configuration for libstdc++.
+# It sets various shell variables based on the the host and the
+# configuration options. You can modify this shell script without needing
+# to rerun autoconf/aclocal/etc. This file is "sourced" not executed.
+#
+# You should read docs/html/17_intro/porting.* to make sense of this file.
+#
+#
+# It uses the following shell variables as set by config.guess:
+# host The configuration host (full CPU-vendor-OS triplet)
+# host_cpu The configuration host CPU
+# host_os The configuration host OS
+#
+#
+# It sets the following shell variables:
+#
+# cpu_include_dir CPU-specific directory, defaults to cpu/generic
+# if cpu/host_cpu doesn't exist. This is not used
+# directly, but sets the default for others.
+#
+# os_include_dir OS-specific directory, defaults to os/generic.
+#
+# c_model the "C" header model, defaults to c_global.
+#
+# c_compatibility if "C" compatibility headers are necessary,
+# defaults to no.
+#
+# abi_baseline_pair directory name for ABI compat testing,
+# defaults to host_cpu-host_os (as per config.guess)
+#
+# abi_baseline_subdir_switch
+# g++ switch to determine ABI baseline subdir for
+# multilibbed targets,
+# defaults to --print-multi-directory
+#
+# abi_tweaks_dir location of cxxabi_tweaks.h,
+# defaults to cpu_include_dir
+#
+# atomicity_dir location of atomicity.h,
+# defaults to cpu_include_dir
+#
+# atomic_word_dir location of atomic_word.h
+# defaults to generic.
+#
+# atomic_flags extra flags to pass to use atomic instructions
+# defaults to nothing.
+#
+# cpu_defines_dir location of cpu_defines.h
+# defaults to generic.
+#
+# cpu_opt_bits_random path name of random.h containing CPU-specific
+# optimizations
+#
+# cpu_opt_ext_random path name of random.h containing CPU-specific
+# optimizations for extensions
+#
+# error_constants_dir location of error_constants.h
+# defaults to os/generic.
+#
+# It possibly modifies the following variables:
+#
+# OPT_LDFLAGS extra flags to pass when linking the library, of
+# the form '-Wl,blah'
+# (defaults to empty in acinclude.m4)
+#
+# port_specific_symbol_files
+# whitespace-separated list of files containing
+# additional symbols to export from the shared
+# library, when symbol versioning is in use
+#
+# tmake_file A list of machine-description-specific
+# makefile fragments.
+#
+#
+# If the defaults will not work for your platform, you need only change the
+# variables that won't work, i.e., you do not need to explicitly set a
+# working variable to its default. Most hosts only need to change the two
+# *_include_dir variables.
+
+
+# DEFAULTS
+# Try to guess a default cpu_include_dir based on the name of the CPU. We
+# cannot do this for os_include_dir; there are too many portable operating
+# systems out there. :-)
+c_model=c_global
+c_compatibility=no
+atomic_word_dir=cpu/generic
+atomic_flags=""
+atomicity_dir="cpu/generic"
+cpu_defines_dir="cpu/generic"
+try_cpu=generic
+abi_baseline_subdir_switch=--print-multi-directory
+abi_tweaks_dir="cpu/generic"
+error_constants_dir="os/generic"
+tmake_file=
+
+# HOST-SPECIFIC OVERRIDES
+# Set any CPU-dependent bits.
+
+# Provide a way to funnel exotic flavors and prefixed/postfixed chip
+# variants into the established source config/cpu/* sub-directories.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_cpu}" in
+ alpha*)
+ try_cpu=alpha
+ ;;
+ arm*)
+ try_cpu=arm
+ ;;
+ crisv32)
+ try_cpu=cris
+ ;;
+ i[567]86 | x86_64)
+ try_cpu=i486
+ ;;
+ hppa*)
+ try_cpu=hppa
+ ;;
+ mips*)
+ try_cpu=mips
+ ;;
+ powerpc* | rs6000)
+ try_cpu=powerpc
+ ;;
+ sparc* | ultrasparc)
+ try_cpu=sparc
+ ;;
+ *)
+ if test -d ${glibcxx_srcdir}/config/cpu/${host_cpu}; then
+ try_cpu=${host_cpu}
+ fi
+esac
+
+
+# Now look for the file(s) usually tied to a CPU model, and make
+# default choices for those if they haven't been explicitly set
+# already.
+cpu_include_dir=cpu/${try_cpu}
+
+
+# Set specific CPU overrides for cpu_defines_dir. Most can just use generic.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_cpu}" in
+ arm*)
+ cpu_defines_dir=cpu/arm
+ ;;
+ powerpc* | rs6000)
+ cpu_defines_dir=cpu/powerpc
+ ;;
+esac
+
+
+# Set specific CPU overrides for atomic_word_dir and atomic_flags.
+# Most can just use generic.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_cpu}" in
+ cris*)
+ atomic_word_dir=cpu/cris
+ ;;
+ i[4567]86 | x86_64)
+ atomic_flags="-march=native"
+ ;;
+ sparc* | ultrasparc)
+ atomic_word_dir=cpu/sparc
+ atomic_flags="-mcpu=v9"
+ ;;
+esac
+
+
+# Set specific CPU overrides for atomicity_dir.
+# This can be over-ridden in GLIBCXX_ENABLE_ATOMIC_BUILTINS.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/atomicity.h ; then
+ atomicity_dir=$cpu_include_dir
+fi
+
+
+if test -f ${glibcxx_srcdir}/config/${cpu_include_dir}/cxxabi_tweaks.h ; then
+ abi_tweaks_dir=$cpu_include_dir
+fi
+
+
+# Set directory with CPU-specific optimization
+cpu_opt_dir=${cpu_include_dir}/opt
+test -d ${glibcxx_srcdir}/config/${cpu_include_dir}/opt ||
+cpu_opt_dir=cpu/generic/opt
+# For each header with CPU-specific optimizations check whether it
+# exists in ${cpu_opt_dir}. If not, point the variable at the
+# appropriate file in the generic directory.
+cpu_opt_ext_random=${cpu_opt_dir}/ext/opt_random.h
+test -f ${glibcxx_srcdir}/config/${cpu_opt_ext_random} ||
+cpu_opt_ext_random=cpu/generic/opt/ext/opt_random.h
+
+cpu_opt_bits_random=${cpu_opt_dir}/bits/opt_random.h
+test -f ${glibcxx_srcdir}/config/${cpu_opt_ext_random} ||
+cpu_opt_ext_random=cpu/generic/opt/bits/opt_random.h
+
+
+# Set any OS-dependent bits.
+# Set the os_include_dir.
+# Set the error_costants_dir.
+# Set c_model, c_compatibility here.
+# If atomic ops and/or numeric limits are OS-specific rather than
+# CPU-specifc, set those here too.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host_os}" in
+ aix[56789]*)
+ # Newer versions of AIX only support PowerPC architecture, so use
+ # atomic instructions directly.
+ os_include_dir="os/aix"
+ tmake_file="os/aix/t-aix"
+ ;;
+ aix*)
+ os_include_dir="os/generic"
+ atomicity_dir="cpu/generic"
+ ;;
+ bsd*)
+ # Plain BSD attempts to share FreeBSD files.
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ cygwin*)
+ os_include_dir="os/newlib"
+ OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
+ ;;
+ darwin[4-7] | darwin[4-7].*)
+ # For earlier Darwin, performance is improved if libstdc++ is
+ # single-module. Up to at least 10.3.7, -flat_namespace is required
+ # for proper treatment of coalesced symbols.
+ OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module -Wl,-flat_namespace"
+ os_include_dir="os/bsd/darwin"
+ ;;
+ darwin8 | darwin8.* )
+ # For 8+ compatibility is better if not -flat_namespace.
+ OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module"
+ case "${host_cpu}" in
+ i[34567]86 | x86_64)
+ OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines-hidden"
+ ;;
+ esac
+ os_include_dir="os/bsd/darwin"
+ ;;
+ darwin*)
+ # Post Darwin8, defaults should be sufficient.
+ os_include_dir="os/bsd/darwin"
+ ;;
+ *djgpp*) # leading * picks up "msdosdjgpp"
+ os_include_dir="os/djgpp"
+ error_constants_dir="os/djgpp"
+ ;;
+ dragonfly*)
+ os_include_dir="os/bsd/dragonfly"
+ ;;
+ freebsd*)
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ linux-musl*)
+ os_include_dir="os/generic"
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | uclinux*)
+ if [ "$uclibc" = "yes" ]; then
+ os_include_dir="os/uclibc"
+ elif [ "$bionic" = "yes" ]; then
+ os_include_dir="os/bionic"
+ else
+ os_include_dir="os/gnu-linux"
+ fi
+ ;;
+ hpux*)
+ os_include_dir="os/hpux"
+ ;;
+ mingw32*)
+ case "$host" in
+ *-w64-*)
+ os_include_dir="os/mingw32-w64"
+ error_constants_dir="os/mingw32-w64"
+ ;;
+ *)
+ os_include_dir="os/mingw32"
+ error_constants_dir="os/mingw32"
+ ;;
+ esac
+ OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
+ ;;
+ netbsd*)
+ os_include_dir="os/bsd/netbsd"
+ ;;
+ openbsd*)
+ os_include_dir="os/bsd/openbsd"
+ ;;
+ qnx6.[12]*)
+ os_include_dir="os/qnx/qnx6.1"
+ c_model=c
+ ;;
+ rtems*)
+ # Use libatomic if necessary and avoid libstdc++ specific atomicity support
+ atomicity_dir="cpu/generic/atomicity_builtins"
+ ;;
+ solaris2*)
+ os_include_dir="os/solaris"
+ ;;
+ tpf)
+ os_include_dir="os/tpf"
+ ;;
+ vxworks*)
+ os_include_dir="os/vxworks"
+ ;;
+ *)
+ os_include_dir="os/generic"
+ ;;
+esac
+
+
+# Set any OS-dependent and CPU-dependent bits.
+# THIS TABLE IS SORTED. KEEP IT THAT WAY.
+case "${host}" in
+ loongarch*)
+ tmake_file="cpu/loongarch/t-loongarch"
+ ;;
+ *-*-linux* | *-*-uclinux*)
+ case "${host_cpu}" in
+ i[567]86)
+ abi_baseline_pair=i486-linux-gnu
+ ;;
+ mips64*)
+ abi_baseline_pair=mips64-linux-gnu
+ ;;
+ powerpc64le*)
+ abi_baseline_pair=powerpc64le-linux-gnu
+ ;;
+ powerpc64*)
+ abi_baseline_pair=powerpc64-linux-gnu
+ ;;
+ s390)
+ abi_baseline_pair=s390-linux-gnu
+ ;;
+ s390x)
+ abi_baseline_pair=s390x-linux-gnu
+ ;;
+ sparc64)
+ abi_baseline_pair=sparc64-linux-gnu
+ ;;
+ x86_64)
+ abi_baseline_pair=x86_64-linux-gnu
+ ;;
+ *)
+ if test $try_cpu = generic; then
+ try_abi_cpu=$host_cpu
+ else
+ try_abi_cpu=$try_cpu
+ fi
+ if test -d ${glibcxx_srcdir}/config/abi/post/${try_abi_cpu}-linux-gnu; then
+ abi_baseline_pair=${try_abi_cpu}-linux-gnu
+ fi
+ esac
+ case "${host}" in
+ arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
+ port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
+ ;;
+ esac
+ ;;
+ arm*-*-freebsd*)
+ port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
+ ;;
+ powerpc*-*-darwin*)
+ port_specific_symbol_files="\$(srcdir)/../config/os/bsd/darwin/ppc-extra.ver"
+ ;;
+ *-*-solaris2*)
+ abi_baseline_pair=solaris
+ case "${host_cpu}" in
+ i?86 | x86_64)
+ abi_baseline_pair=i386-${abi_baseline_pair}
+ ;;
+ sparc*)
+ abi_baseline_pair=sparc-${abi_baseline_pair}
+ ;;
+ esac
+ abi_baseline_subdir_switch=--print-multi-os-directory
+ ;;
+esac
diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in
index a8a311ef4dd..faf2433249f 100644
--- a/libgm2/libm2cor/Makefile.in
+++ b/libgm2/libm2cor/Makefile.in
@@ -116,7 +116,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am
@@ -246,6 +249,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -274,6 +278,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -341,6 +346,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -383,6 +390,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
ACLOCAL_AMFLAGS = -I .. -I ../config
diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in
index 21632b49503..97de40c034b 100644
--- a/libgm2/libm2iso/Makefile.in
+++ b/libgm2/libm2iso/Makefile.in
@@ -116,7 +116,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am
@@ -270,6 +273,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -298,6 +302,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -365,6 +370,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -408,6 +415,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
ACLOCAL_AMFLAGS = -I .. -I ../config
diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in
index e1e26f758c7..bc64692c0fa 100644
--- a/libgm2/libm2log/Makefile.in
+++ b/libgm2/libm2log/Makefile.in
@@ -116,7 +116,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am
@@ -235,6 +238,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -263,6 +267,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -330,6 +335,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -372,6 +379,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
SUFFIXES = .c .mod .def .o .obj .lo .a .la
ACLOCAL_AMFLAGS = -I .. -I ../config
diff --git a/libgm2/libm2min/Makefile.in b/libgm2/libm2min/Makefile.in
index 9d348b0f943..1d723e4d721 100644
--- a/libgm2/libm2min/Makefile.in
+++ b/libgm2/libm2min/Makefile.in
@@ -116,7 +116,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am
@@ -225,6 +228,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -253,6 +257,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -320,6 +325,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -362,6 +369,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
SUFFIXES = .c .mod .def .o .obj .lo .a .la
ACLOCAL_AMFLAGS = -I .. -I ../config
diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in
index d0256f846ef..c9817bc4746 100644
--- a/libgm2/libm2pim/Makefile.in
+++ b/libgm2/libm2pim/Makefile.in
@@ -116,7 +116,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../config/gc++filt.m4 \
+ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \
+ $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am
@@ -260,6 +263,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -288,6 +292,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GLIBCXX_LIBS = @GLIBCXX_LIBS@
GM2_FOR_TARGET = @GM2_FOR_TARGET@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -355,6 +360,8 @@ enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
get_gcc_base_ver = @get_gcc_base_ver@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_srcdir = @glibcxx_srcdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -397,6 +404,8 @@ toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+toplevel_builddir = @toplevel_builddir@
+toplevel_srcdir = @toplevel_srcdir@
SUFFIXES = .c .mod .def .o .obj .lo .a .la
ACLOCAL_AMFLAGS = -I .. -I ../config