diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-05-27 13:32:21 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-05-27 13:32:21 +0200 |
commit | 0c03c730dee081efde77dbf713f95ae22bd337db (patch) | |
tree | adaccc252794fcbc2da7fb1c804bc782771d1c2c /gl/m4 | |
parent | 4f4b34d24fda2a8f40374cc0b5703e91a1d60ab9 (diff) | |
download | gnutls-0c03c730dee081efde77dbf713f95ae22bd337db.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/include_next.m4 | 32 | ||||
-rw-r--r-- | gl/m4/size_max.m4 | 17 |
2 files changed, 36 insertions, 13 deletions
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index d6101fe328..5e22ded936 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 12 +# include_next.m4 serial 14 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -104,8 +104,14 @@ EOF # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # '<foo.h>'; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. +# Also, if #include_next works as first preprocessing directive in a file, +# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to +# be +# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ +# or +# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next <foo.h> # even if the compiler does not support include_next. @@ -123,15 +129,15 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS], m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME]))) + [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( - [absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], - m4_quote(m4_defn([gl_next_header])), + [absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_next_header]), [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME]))) + [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AC_LANG_CONFTEST( [AC_LANG_SOURCE( @@ -153,8 +159,8 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS], dnl so use subshell. AS_VAR_SET([gl_next_header], ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{ - s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1# + sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ + s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# s#^/[^/]#//&# p q @@ -165,7 +171,17 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS], AS_VAR_POPDEF([gl_header_exists])]) fi AC_SUBST( - AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))), + AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET([gl_next_header])]) + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'gl_HEADER_NAME'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) + fi + AC_SUBST( + AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), + [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 index e0e7b3ff95..35bd3d6ae3 100644 --- a/gl/m4/size_max.m4 +++ b/gl/m4/size_max.m4 @@ -1,5 +1,5 @@ -# size_max.m4 serial 7 -dnl Copyright (C) 2003, 2005-2006, 2008 Free Software Foundation, Inc. +# size_max.m4 serial 9 +dnl Copyright (C) 2003, 2005-2006, 2008-2009 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. @@ -10,8 +10,7 @@ AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. - AC_MSG_CHECKING([for SIZE_MAX]) - AC_CACHE_VAL([gl_cv_size_max], [ + AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include <limits.h> @@ -54,11 +53,19 @@ Found it fi fi ]) - AC_MSG_RESULT([$gl_cv_size_max]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi + dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after + dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with + dnl #define by AC_DEFINE_UNQUOTED. + AH_VERBATIM([SIZE_MAX], +[/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +# undef SIZE_MAX +#endif]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. |