X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fsize_max.m4;h=3e3986e15e96eb8921d59dbcc82b6f6ae2b5f040;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=ce992db1f18336a0775f3bd98bdd12cdb7e4e70f;hpb=a2016c1de6e4884f6c8ed5cc498f3bf821c25ca4;p=debian%2Fgzip diff --git a/m4/size_max.m4 b/m4/size_max.m4 index ce992db..3e3986e 100644 --- a/m4/size_max.m4 +++ b/m4/size_max.m4 @@ -1,11 +1,13 @@ -# size_max.m4 serial 9 -dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. +# size_max.m4 serial 11 +dnl Copyright (C) 2003, 2005-2006, 2008-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. +AC_PREREQ([2.61]) + AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) @@ -34,10 +36,14 @@ Found it if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_TRY_COMPILE([#include - extern size_t foo; - extern unsigned long foo; - ], [], [fits_in_uint=0]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + extern size_t foo; + extern unsigned long foo; + ]], + [[]])], + [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we @@ -67,9 +73,3 @@ Found it # undef SIZE_MAX #endif]) ]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -])