summaryrefslogtreecommitdiffstats
path: root/gl/m4/size_max.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/size_max.m4')
-rw-r--r--gl/m4/size_max.m417
1 files changed, 12 insertions, 5 deletions
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index e0e7b3f..ce992db 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
1# size_max.m4 serial 7 1# size_max.m4 serial 9
2dnl Copyright (C) 2003, 2005-2006, 2008 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -10,8 +10,7 @@ AC_DEFUN([gl_SIZE_MAX],
10[ 10[
11 AC_CHECK_HEADERS([stdint.h]) 11 AC_CHECK_HEADERS([stdint.h])
12 dnl First test whether the system already has SIZE_MAX. 12 dnl First test whether the system already has SIZE_MAX.
13 AC_MSG_CHECKING([for SIZE_MAX]) 13 AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
14 AC_CACHE_VAL([gl_cv_size_max], [
15 gl_cv_size_max= 14 gl_cv_size_max=
16 AC_EGREP_CPP([Found it], [ 15 AC_EGREP_CPP([Found it], [
17#include <limits.h> 16#include <limits.h>
@@ -54,11 +53,19 @@ Found it
54 fi 53 fi
55 fi 54 fi
56 ]) 55 ])
57 AC_MSG_RESULT([$gl_cv_size_max])
58 if test "$gl_cv_size_max" != yes; then 56 if test "$gl_cv_size_max" != yes; then
59 AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], 57 AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
60 [Define as the maximum value of type 'size_t', if the system doesn't define it.]) 58 [Define as the maximum value of type 'size_t', if the system doesn't define it.])
61 fi 59 fi
60 dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
61 dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
62 dnl #define by AC_DEFINE_UNQUOTED.
63 AH_VERBATIM([SIZE_MAX],
64[/* Define as the maximum value of type 'size_t', if the system doesn't define
65 it. */
66#ifndef SIZE_MAX
67# undef SIZE_MAX
68#endif])
62]) 69])
63 70
64dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. 71dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.