From 318d54e9908d6b76d0adee6521fe0e32bbb4dabd Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 27 Apr 2013 13:40:22 -0700 Subject: [PATCH] Check whether __STDC_LIMIT_MACROS is required --- configure.ac | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6d0ecaf9..e4ee7af1 100644 --- a/configure.ac +++ b/configure.ac @@ -187,7 +187,21 @@ AC_C_BIGENDIAN( AC_MSG_WARN([universal endianess]) ) -AC_MSG_CHECKING(if we can assemble basic amd64 code) +AC_MSG_CHECKING(whether __STDC_LIMIT_MACROS is required) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], [[ +(void) SIZE_MAX; +(void) UINT64_MAX; +]])], + [AC_MSG_RESULT(no) + CPPFLAGS="$CPPFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" + ], + [AC_MSG_RESULT(yes) +]) + +AC_MSG_CHECKING(whether we can assemble basic amd64 code) HAVE_AMD64_ASM_V=0 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[