summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-05-23 19:34:33 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-05-23 19:34:33 +0000
commit8e1ea4214c98e381d41bfe4ec01a89de78bce299 (patch)
tree48d1461465f6caec8c7d6a5fb7d602bb5bef248c /configure.ac
parent63307164ff9d6e8780365bd585d203cff8b5d394 (diff)
downloadmailutils-8e1ea4214c98e381d41bfe4ec01a89de78bce299.tar.gz
mailutils-8e1ea4214c98e381d41bfe4ec01a89de78bce299.tar.bz2
Compute the value of ULONG_MAX for use in the testsute.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7b2cf2f19..134a36505 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,6 +306,23 @@ AC_CHECK_TYPE(socklen_t, , AC_DEFINE(socklen_t, int, [Define to int if <sys/type
AC_CHECK_TYPE(long long, , AC_DEFINE(LONG_LONG, long, [Define to long if compiler does not support]))
AC_CHECK_TYPE(long double, , AC_DEFINE(LONG_DOUBLE, double, [Define to double if compiler does not support]))
+AC_SUBST(MU_ULONG_MAX)
+AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>],
+[
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ fprintf(f, "%lu\n", ULONG_MAX);
+ fclose(f);
+ return 0;]
+)],
+ [MU_ULONG_MAX=`cat conftest.val`],
+ [MU_ULONG_MAX=0],
+ [MU_ULONG_MAX=0])
+
AC_STRUCT_TM
AC_CHECK_MEMBERS([struct tm.tm_zone, struct tm.tm_gmtoff, struct tm.tm_isdst],
,,

Return to:

Send suggestions and report system problems to the System administrator.