summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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 f467f66..855091f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,23 @@ AC_CHECK_HEADERS([unistd.h])
AC_TYPE_SIZE_T
+AC_MSG_CHECKING([for suitable size_t])
+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <stddef.h>]],
+ [[char dummy[sizeof(size_t) == sizeof(unsigned long) ? 1 : -1];]])],
+ [
+ AC_MSG_RESULT([yes])
+ suitable_size_t=yes
+ ],
+ [
+ AC_MSG_RESULT([no])
+ suitable_size_t=no
+ ]
+ )
+
+if test "x$suitable_size_t" = "xno"; then
+ AC_MSG_FAILURE([Current size of size_t is not supported])
+fi
+
#--- Checks for structures