AC_LANG_SAVE
AC_LANG_CPLUSPLUS
- # Use -fno-exceptions so that the C driver can link these tests without
- # hitting undefined references to personality routines.
+ # 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 explicitely
+ # 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"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities may be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+
# Check for the existence of <complex.h> complex math functions used
# by tr1/complex.
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
# Check for the existence of the <stdbool.h> header.
AC_CHECK_HEADERS(stdbool.h)
+ CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
if test x"$ac_system_error_11" = x"yes"; then
AC_DEFINE(HAVE_ECANCELED, 1, [Define if ECANCELED exists.])
fi
+
+ AC_MSG_CHECKING([for EOVERFLOW])
+ AC_CACHE_VAL(ac_system_error_12, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = EOVERFLOW; ],
+ [ac_system_error_12=yes], [ac_system_error_12=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_12)
+ if test x"$ac_system_error_12" = x"yes"; then
+ AC_DEFINE(HAVE_EOVERFLOW, 1, [Define if EOVERFLOW exists.])
+ fi
])
dnl