Mercurial > hg > octave-kai > gnulib-hg
changeset 15477:f10877c6816b
warnings: add comments about previous patch
* m4/absolute-header.m4: Document AS_VAR_PUSHDEF limitation.
* m4/include_next.m4: Likewise.
* m4/warn-on-use.m4: Likewise.
* m4/warnings.m4: Likewise, and simplify use.
Suggested by Stefano Lattarini.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Tue, 26 Jul 2011 15:55:05 -0600 |
parents | d569119b11e7 |
children | 206163b08a1f |
files | ChangeLog m4/absolute-header.m4 m4/include_next.m4 m4/warn-on-use.m4 m4/warnings.m4 |
diffstat | 5 files changed, 21 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-07-26 Eric Blake <eblake@redhat.com> + warnings: add comments about previous patch + * m4/absolute-header.m4: Document AS_VAR_PUSHDEF limitation. + * m4/include_next.m4: Likewise. + * m4/warn-on-use.m4: Likewise. + * m4/warnings.m4: Likewise, and simplify use. + Suggested by Stefano Lattarini. + include-next, warnings: support older autoconf * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Use AS_VAR_PUSHDEF in a way that works with older autoconf.
--- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -1,4 +1,4 @@ -# absolute-header.m4 serial 12 +# absolute-header.m4 serial 13 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -22,6 +22,8 @@ AC_DEFUN([gl_ABSOLUTE_HEADER], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PREPROC_REQUIRE()dnl +dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_absolute_header], [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
--- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 19 +# include_next.m4 serial 20 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -175,6 +175,8 @@ [AC_CHECK_HEADERS_ONCE([$1]) ]) +dnl FIXME: gl_next_header and gl_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
--- a/m4/warn-on-use.m4 +++ b/m4/warn-on-use.m4 @@ -1,4 +1,4 @@ -# warn-on-use.m4 serial 2 +# warn-on-use.m4 serial 3 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -27,6 +27,8 @@ [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl +dnl FIXME: gl_Symbol must be used unquoted until we can assume +dnl autoconf 2.64 or newer. for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro],
--- a/m4/warnings.m4 +++ b/m4/warnings.m4 @@ -1,4 +1,4 @@ -# warnings.m4 serial 4 +# warnings.m4 serial 5 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,6 +19,8 @@ # Adds parameter to WARN_CFLAGS if the compiler supports it. For example, # gl_WARN_ADD([-Wparentheses]). AC_DEFUN([gl_WARN_ADD], +dnl FIXME: gl_Warn must be used unquoted until we can assume +dnl autoconf 2.64 or newer. [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [ gl_save_CPPFLAGS="$CPPFLAGS" @@ -28,9 +30,8 @@ [AS_VAR_SET(gl_Warn, [no])]) CPPFLAGS="$gl_save_CPPFLAGS" ]) -AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl -AS_VAR_IF(gl_Warn, [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])]) -AS_VAR_POPDEF([gl_Flags])dnl +AS_VAR_IF(gl_Warn, [yes], + [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])]) AS_VAR_POPDEF([gl_Warn])dnl m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl ])