The LLONG_MAX constant is only declared on some systems if gcc is ran in
a mode compatible with C99.
This commit requires C99 (-std=gnu99 in fact) and check that LLONG_MAX is
properly defined. At least, the user will be informed about the problem as
soon as possible if such a problem occurs again.
The bug describing this problem is here:
http://sourceforge.net/tracker/index.php?func=detail&aid=
3482261&group_id=68910&atid=522791
dnl CFLAGS="${CFLAGS} -g -O2 -Aa"
dnl fi
+dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7)
+AC_PROG_CC_C99
+
# Report more warnings to improve code quality.
CFLAGS="${CFLAGS} -Wall -Wno-sign-compare"
AC_MSG_WARN([can not detect the size of your system\'s rlim_t type])
fi
+dnl check for the long long int max constant
+AC_CHECK_DECL(LLONG_MAX,HAVE_LLONG_MAX="yes",HAVE_LLONG_MAX="no",[[#include <limits.h>]])
+if ( test "x$ac_cv_have_decl_LLONG_MAX" != "xyes" ) ; then
+ AC_MSG_ERROR([LLONG_MAX is not defined on your system.])
+fi
+
dnl Select sarg-php directory
AC_ARG_ENABLE(sargphp,
AS_HELP_STRING([--enable-sargphp=sargphpdir],