summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-13 14:51:25 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-13 14:51:25 +0000
commitbdb62e6a5583c7e41c438d1c29789aee41f8d519 (patch)
tree016605b19b096572e3039c93cd9cad0d7940b26d /libstdc++-v3/configure
parent07816e94227ec05205dfbb6a44445787776c4346 (diff)
downloadgcc-bdb62e6a5583c7e41c438d1c29789aee41f8d519.tar.gz
More fine-grained autoconf checks for C99 library
2015-11-13 Jennifer Yao <jenny.hyphen.fa@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/58393 PR libstdc++/61580 * acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with -std=c++11 as well as -std=c++98, and define separate macros for each. Cache the results of checking for complex math and wide character functions. Reformat for readability. * config.h.in: Regenerate. * include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to language standard in use. * config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * config/locale/generic/c_locale.h (std::__convert_from_v): Likewise. * config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise. * config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR. * configure: Regenerate. * include/bits/basic_string.h: Make numeric conversion functions depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99. * include/ext/vstring.h: Likewise. * include/bits/locale_facets.tcc (std::num_put::_M_insert_float): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/bits/locale_facets_nonio.tcc (std::money_put::do_put): Likewise. * include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH. * include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * src/c++98/locale_facets.cc (std::__num_base::_S_format_float): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * testsuite/18_support/exception_ptr/60612-terminate.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc (test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ to_wstring.cc: Likewise. * testsuite/26_numerics/headers/cstdlib/13943.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise. * testsuite/lib/libstdc++.exp (check_v3_target_string_conversions): Change preprocessor #if conditional so that it uses _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99. * testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH. * testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise. * testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure1201
1 files changed, 901 insertions, 300 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 1eb6db4ec4c..991818b3707 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -16542,29 +16542,26 @@ fi
if test x"$enable_c99" = x"yes"; then
-
- ac_ext=cpp
+ 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
- # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
- # undefined and fake C99 facilities - like pre-standard snprintf - may be
- # spuriously enabled.
- # Long term, -std=c++0x could be even better, could manage to explicitly
- # request C99 facilities to the underlying C headers.
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++98"
- ac_save_LIBS="$LIBS"
- ac_save_gcc_no_link="$gcc_no_link"
+ # Use -std=c++98 (instead of -std=gnu++98) because leaving __STRICT_ANSI__
+ # undefined may cause fake C99 facilities, like pre-standard snprintf,
+ # to be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
- if test x$gcc_no_link != xyes; then
- # Use -fno-exceptions to that the C driver can link these tests without
- # hitting undefined references to personality routines.
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
$as_echo_n "checking for sin in -lm... " >&6; }
if test "${ac_cv_lib_m_sin+set}" = set; then :
$as_echo_n "(cached) " >&6
@@ -16604,56 +16601,646 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
$as_echo "$ac_cv_lib_m_sin" >&6; }
if test "x$ac_cv_lib_m_sin" = x""yes; then :
+ LIBS="$LIBS -lm"
+else
+
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
- LIBS="$LIBS -lm"
+fi
+
+ fi
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <math.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_math_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
- gcc_no_link=yes
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_math_cxx98=yes
+else
+ glibcxx_cv_c99_math_cxx98=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 <math.h>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_math_cxx98=yes
+else
+ glibcxx_cv_c99_math_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
- fi
+fi
- # Check for the existence of <math.h> functions used if C99 is enabled.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h>" >&5
-$as_echo_n "checking for ISO C99 support in <math.h>... " >&6; }
- if test "${glibcxx_cv_c99_math+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_math_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_MATH 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ for ac_header in tgmath.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "tgmath.h" "ac_cv_header_tgmath_h" "$ac_includes_default"
+if test "x$ac_cv_header_tgmath_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TGMATH_H 1
+_ACEOF
+ ac_has_tgmath_h=yes
+else
+ ac_has_tgmath_h=no
+fi
+
+done
+
+ for ac_header in complex.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default"
+if test "x$ac_cv_header_complex_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_COMPLEX_H 1
+_ACEOF
+ ac_has_complex_h=yes
+else
+ ac_has_complex_h=no
+fi
+
+done
+
+ if test x"$ac_has_complex_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <complex.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_complex_cxx98+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx98=yes
+else
+ glibcxx_cv_c99_complex_cxx98=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 <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx98=yes
+else
+ glibcxx_cv_c99_complex_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_complex_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_complex_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_COMPLEX 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <stdio.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_stdio_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_stdio_cxx98=yes
+else
+ glibcxx_cv_c99_stdio_cxx98=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 <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_stdio_cxx98=yes
+else
+ glibcxx_cv_c99_stdio_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_stdio_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_stdio_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_STDIO 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <wchar.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_wchar_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_wchar_cxx98=yes
+else
+ glibcxx_cv_c99_wchar_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vfwscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VFWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vswscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VSWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vwscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::wcstof; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_WCSTOF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wctype.h>
+int
+main ()
+{
+wint_t t; int i = iswblank(t);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_ISWBLANK 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_wchar_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_wchar_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_WCHAR 1" >>confdefs.h
+
+ fi
+ fi
+
+ # Option parsed, now set things appropriately.
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_complex_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdio_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdlib_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_wchar_cxx98" = x"no"; then
+ enable_c99=no;
+ else
+
+$as_echo "#define _GLIBCXX_USE_C99 1" >>confdefs.h
+
+ fi
+
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ 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
+
+
+
+ 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
+
+
+ # Use -std=c++11 and test again for C99 library feature in C++11 mode.
+ # For the reasons given above we use -std=c++11 not -std=gnu++11.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
+$as_echo_n "checking for sin in -lm... " >&6; }
+if test "${ac_cv_lib_m_sin+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+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. */
+
+/* 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 sin ();
+int
+main ()
+{
+return sin ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_m_sin=yes
+else
+ ac_cv_lib_m_sin=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
+$as_echo "$ac_cv_lib_m_sin" >&6; }
+if test "x$ac_cv_lib_m_sin" = x""yes; then :
+ LIBS="$LIBS -lm"
+else
+
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+
+fi
+
+ fi
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <math.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_math_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- volatile double d1, d2;
- volatile int i;
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
i = fpclassify(d1);
- i = isfinite(d1);
- i = isinf(d1);
- i = isnan(d1);
- i = isnormal(d1);
- i = signbit(d1);
- i = isgreater(d1, d2);
- i = isgreaterequal(d1, d2);
- i = isless(d1, d2);
- i = islessequal(d1, d2);
- i = islessgreater(d1, d2);
- i = islessgreater(d1, d2);
- i = isunordered(d1, d2);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_math=yes
+ glibcxx_cv_c99_math_cxx11=yes
else
- glibcxx_cv_c99_math=no
+ glibcxx_cv_c99_math_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16663,33 +17250,33 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- volatile double d1, d2;
- volatile int i;
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
i = fpclassify(d1);
- i = isfinite(d1);
- i = isinf(d1);
- i = isnan(d1);
- i = isnormal(d1);
- i = signbit(d1);
- i = isgreater(d1, d2);
- i = isgreaterequal(d1, d2);
- i = isless(d1, d2);
- i = islessequal(d1, d2);
- i = islessgreater(d1, d2);
- i = islessgreater(d1, d2);
- i = isunordered(d1, d2);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_math=yes
+ glibcxx_cv_c99_math_cxx11=yes
else
- glibcxx_cv_c99_math=no
+ glibcxx_cv_c99_math_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -16697,19 +17284,19 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math" >&5
-$as_echo "$glibcxx_cv_c99_math" >&6; }
- if test x"$glibcxx_cv_c99_math" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_math_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_math_cxx11" = x"yes"; then
-$as_echo "#define _GLIBCXX_USE_C99_MATH 1" >>confdefs.h
+$as_echo "#define _GLIBCXX11_USE_C99_MATH 1" >>confdefs.h
- fi
+ fi
- # Check for the existence of <complex.h> complex math functions.
- # This is necessary even though libstdc++ uses the builtin versions
- # of these functions, because if the builtin cannot be used, a reference
- # to the library function is emitted.
- for ac_header in tgmath.h
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ for ac_header in tgmath.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "tgmath.h" "ac_cv_header_tgmath_h" "$ac_includes_default"
if test "x$ac_cv_header_tgmath_h" = x""yes; then :
@@ -16723,7 +17310,7 @@ fi
done
- for ac_header in complex.h
+ for ac_header in complex.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default"
if test "x$ac_cv_header_complex_h" = x""yes; then :
@@ -16737,74 +17324,77 @@ fi
done
- glibcxx_cv_c99_complex=no;
- if test x"$ac_has_complex_h" = x"yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h>" >&5
-$as_echo_n "checking for ISO C99 support in <complex.h>... " >&6; }
- if test x$gcc_no_link = xyes; then
+ if test x"$ac_has_complex_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <complex.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_complex_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
- typedef __complex__ float float_type;
- typedef __complex__ double double_type;
- typedef __complex__ long double ld_type;
- volatile float_type tmpf;
- volatile double_type tmpd;
- volatile ld_type tmpld;
- volatile float f;
- volatile double d;
- volatile long double ld;
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
int
main ()
{
f = cabsf(tmpf);
- f = cargf(tmpf);
- tmpf = ccosf(tmpf);
- tmpf = ccoshf(tmpf);
- tmpf = cexpf(tmpf);
- tmpf = clogf(tmpf);
- tmpf = csinf(tmpf);
- tmpf = csinhf(tmpf);
- tmpf = csqrtf(tmpf);
- tmpf = ctanf(tmpf);
- tmpf = ctanhf(tmpf);
- tmpf = cpowf(tmpf, tmpf);
- tmpf = cprojf(tmpf);
- d = cabs(tmpd);
- d = carg(tmpd);
- tmpd = ccos(tmpd);
- tmpd = ccosh(tmpd);
- tmpd = cexp(tmpd);
- tmpd = clog(tmpd);
- tmpd = csin(tmpd);
- tmpd = csinh(tmpd);
- tmpd = csqrt(tmpd);
- tmpd = ctan(tmpd);
- tmpd = ctanh(tmpd);
- tmpd = cpow(tmpd, tmpd);
- tmpd = cproj(tmpd);
- ld = cabsl(tmpld);
- ld = cargl(tmpld);
- tmpld = ccosl(tmpld);
- tmpld = ccoshl(tmpld);
- tmpld = cexpl(tmpld);
- tmpld = clogl(tmpld);
- tmpld = csinl(tmpld);
- tmpld = csinhl(tmpld);
- tmpld = csqrtl(tmpld);
- tmpld = ctanl(tmpld);
- tmpld = ctanhl(tmpld);
- tmpld = cpowl(tmpld, tmpld);
- tmpld = cprojl(tmpld);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_complex=yes
-else
- glibcxx_cv_c99_complex=no
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx11=yes
+else
+ glibcxx_cv_c99_complex_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16814,100 +17404,103 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
- typedef __complex__ float float_type;
- typedef __complex__ double double_type;
- typedef __complex__ long double ld_type;
- volatile float_type tmpf;
- volatile double_type tmpd;
- volatile ld_type tmpld;
- volatile float f;
- volatile double d;
- volatile long double ld;
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
int
main ()
{
f = cabsf(tmpf);
- f = cargf(tmpf);
- tmpf = ccosf(tmpf);
- tmpf = ccoshf(tmpf);
- tmpf = cexpf(tmpf);
- tmpf = clogf(tmpf);
- tmpf = csinf(tmpf);
- tmpf = csinhf(tmpf);
- tmpf = csqrtf(tmpf);
- tmpf = ctanf(tmpf);
- tmpf = ctanhf(tmpf);
- tmpf = cpowf(tmpf, tmpf);
- tmpf = cprojf(tmpf);
- d = cabs(tmpd);
- d = carg(tmpd);
- tmpd = ccos(tmpd);
- tmpd = ccosh(tmpd);
- tmpd = cexp(tmpd);
- tmpd = clog(tmpd);
- tmpd = csin(tmpd);
- tmpd = csinh(tmpd);
- tmpd = csqrt(tmpd);
- tmpd = ctan(tmpd);
- tmpd = ctanh(tmpd);
- tmpd = cpow(tmpd, tmpd);
- tmpd = cproj(tmpd);
- ld = cabsl(tmpld);
- ld = cargl(tmpld);
- tmpld = ccosl(tmpld);
- tmpld = ccoshl(tmpld);
- tmpld = cexpl(tmpld);
- tmpld = clogl(tmpld);
- tmpld = csinl(tmpld);
- tmpld = csinhl(tmpld);
- tmpld = csqrtl(tmpld);
- tmpld = ctanl(tmpld);
- tmpld = ctanhl(tmpld);
- tmpld = cpowl(tmpld, tmpld);
- tmpld = cprojl(tmpld);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_complex=yes
+ glibcxx_cv_c99_complex_cxx11=yes
else
- glibcxx_cv_c99_complex=no
+ glibcxx_cv_c99_complex_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex" >&5
-$as_echo "$glibcxx_cv_c99_complex" >&6; }
- if test x"$glibcxx_cv_c99_complex" = x"yes"; then
-$as_echo "#define _GLIBCXX_USE_C99_COMPLEX 1" >>confdefs.h
+fi
- fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_complex_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_complex_cxx11" = x"yes"; then
+
+$as_echo "#define _GLIBCXX11_USE_C99_COMPLEX 1" >>confdefs.h
- # Check for the existence in <stdio.h> of vscanf, et. al.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h>" >&5
-$as_echo_n "checking for ISO C99 support in <stdio.h>... " >&6; }
- if test "${glibcxx_cv_c99_stdio+set}" = set; then :
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <stdio.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_stdio_cxx11+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test x$gcc_no_link = xyes; then
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- snprintf(fmt, 0, "%i");
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
int
main ()
{
@@ -16917,9 +17510,9 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_stdio=yes
+ glibcxx_cv_c99_stdio_cxx11=yes
else
- glibcxx_cv_c99_stdio=no
+ glibcxx_cv_c99_stdio_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16929,16 +17522,16 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- snprintf(fmt, 0, "%i");
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
int
main ()
{
@@ -16948,9 +17541,9 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_stdio=yes
+ glibcxx_cv_c99_stdio_cxx11=yes
else
- glibcxx_cv_c99_stdio=no
+ glibcxx_cv_c99_stdio_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -16958,47 +17551,52 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio" >&5
-$as_echo "$glibcxx_cv_c99_stdio" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_stdio_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_stdio_cxx11" = x"yes"; then
+
+$as_echo "#define _GLIBCXX11_USE_C99_STDIO 1" >>confdefs.h
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdlib.h>" >&5
-$as_echo_n "checking for ISO C99 support in <stdlib.h>... " >&6; }
- if test "${glibcxx_cv_c99_stdlib+set}" = set; then :
+ fi
+
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdlib.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <stdlib.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_stdlib_cxx11+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test x$gcc_no_link = xyes; then
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- volatile float f;
- volatile long double ld;
- volatile unsigned long long ll;
- lldiv_t mydivt;
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- f = strtof("gnu", &tmp);
- ld = strtold("gnu", &tmp);
- ll = strtoll("gnu", &tmp, 10);
- ll = strtoull("gnu", &tmp, 10);
- ll = llabs(10);
- mydivt = lldiv(10,1);
- ll = mydivt.quot;
- ll = mydivt.rem;
- ll = atoll("10");
- _Exit(0);
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_stdlib=yes
+ glibcxx_cv_c99_stdlib_cxx11=yes
else
- glibcxx_cv_c99_stdlib=no
+ glibcxx_cv_c99_stdlib_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -17008,33 +17606,33 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- volatile float f;
- volatile long double ld;
- volatile unsigned long long ll;
- lldiv_t mydivt;
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- f = strtof("gnu", &tmp);
- ld = strtold("gnu", &tmp);
- ll = strtoll("gnu", &tmp, 10);
- ll = strtoull("gnu", &tmp, 10);
- ll = llabs(10);
- mydivt = lldiv(10,1);
- ll = mydivt.quot;
- ll = mydivt.rem;
- ll = atoll("10");
- _Exit(0);
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_stdlib=yes
+ glibcxx_cv_c99_stdlib_cxx11=yes
else
- glibcxx_cv_c99_stdlib=no
+ glibcxx_cv_c99_stdlib_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -17042,24 +17640,32 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdlib" >&5
-$as_echo "$glibcxx_cv_c99_stdlib" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdlib_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_stdlib_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_stdlib_cxx11" = x"yes"; then
- # Check for the existence in <wchar.h> of wcstold, etc.
- glibcxx_cv_c99_wchar=no;
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h>" >&5
-$as_echo_n "checking for ISO C99 support in <wchar.h>... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+$as_echo "#define _GLIBCXX11_USE_C99_STDLIB 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <wchar.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_wchar_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test
- {
- using ::wcstold;
- using ::wcstoll;
- using ::wcstoull;
- }
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
int
main ()
@@ -17070,20 +17676,23 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_wchar=yes
+ glibcxx_cv_c99_wchar_cxx11=yes
else
- glibcxx_cv_c99_wchar=no
+ glibcxx_cv_c99_wchar_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- # Checks for wide character functions that may not be present.
- # Injection of these is wrapped with guard macros.
- # NB: only put functions here, instead of immediately above, if
- # absolutely necessary.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+fi
+
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vfwscanf; }
+ namespace test { using ::vfwscanf; }
int
main ()
{
@@ -17099,10 +17708,10 @@ $as_echo "#define HAVE_VFWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vswscanf; }
+ namespace test { using ::vswscanf; }
int
main ()
{
@@ -17118,10 +17727,10 @@ $as_echo "#define HAVE_VSWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vwscanf; }
+ namespace test { using ::vwscanf; }
int
main ()
{
@@ -17137,10 +17746,10 @@ $as_echo "#define HAVE_VWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::wcstof; }
+ namespace test { using ::wcstof; }
int
main ()
{
@@ -17156,13 +17765,13 @@ $as_echo "#define HAVE_WCSTOF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wctype.h>
int
main ()
{
- wint_t t; int i = iswblank(t);
+wint_t t; int i = iswblank(t);
;
return 0;
}
@@ -17174,27 +17783,19 @@ $as_echo "#define HAVE_ISWBLANK 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar" >&5
-$as_echo "$glibcxx_cv_c99_wchar" >&6; }
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_wchar_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_wchar_cxx11" = x"yes"; then
- # Option parsed, now set things appropriately.
- if test x"$glibcxx_cv_c99_math" = x"no" ||
- test x"$glibcxx_cv_c99_complex" = x"no" ||
- test x"$glibcxx_cv_c99_stdio" = x"no" ||
- test x"$glibcxx_cv_c99_stdlib" = x"no" ||
- test x"$glibcxx_cv_c99_wchar" = x"no"; then
- enable_c99=no;
- else
+$as_echo "#define _GLIBCXX11_USE_C99_WCHAR 1" >>confdefs.h
-$as_echo "#define _GLIBCXX_USE_C99 1" >>confdefs.h
-
- fi
+ fi
+ fi
- gcc_no_link="$ac_save_gcc_no_link"
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
- ac_ext=c
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ 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'