diff options
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/aclocal.m4 | 29 | ||||
-rw-r--r-- | autoconf/configure.ac | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4 index 51040fb..da725af 100644 --- a/autoconf/aclocal.m4 +++ b/autoconf/aclocal.m4 @@ -6166,4 +6166,33 @@ AC_DEFUN([AC_CONFIG_MAKEFILE], [AC_CONFIG_COMMANDS($1,${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/$1 $1,${srcdir}/autoconf/mkinstalldirs `dirname $1`) ]) +# +# Determine if the printf() functions have the %a format character. +# This is modified from: +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +AC_DEFUN([AC_C_PRINTF_A], +[ + AC_LANG_SAVE + AC_LANG_C + AC_RUN_IFELSE( + AC_LANG_PROGRAM([#include <stdio.h> + #include <stdlib.h>], + [[[ + volatile double A, B; + char Buffer[100]; + A = 1; + A /= 10.0; + sprintf(Buffer, "%a", A); + B = atof(Buffer); + if (A != B) + return (1); + if (A != 0x1.999999999999ap-4) + return (1); + return (0);]]]), + ac_c_printf_a=yes,ac_c_printf_a=no) + AC_LANG_RESTORE + if test "$ac_c_printf_a" = "yes"; then + AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string]) + fi +]) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 85a319f..62e6740 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -455,6 +455,9 @@ AC_CHECK_TYPES([uint64_t],,AC_MSG_ERROR([Type uint64_t required but not found])) AC_HEADER_TIME AC_STRUCT_TM +dnl Check for various C features +AC_C_PRINTF_A + dnl Check for C++ extensions AC_CXX_HAVE_EXT_HASH_MAP AC_CXX_HAVE_EXT_HASH_SET |