Mercurial > hg > octave-kai > gnulib-hg
changeset 15476:d569119b11e7
include-next, warnings: support older autoconf
Older autoconf did not know how to peer through quoting of the
m4 macro created by AS_VAR_PUSHDEF; while newer autoconf has
been patched to allow typical autoconf quoting rules to still
apply, compatibility with autoconf 2.59 requires the unquoted
use of the macro name for all uses prior to AS_VAR_POPDEF.
absolute-header.m4 and warn-on-use.m4 already got this right.
* m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Use
AS_VAR_PUSHDEF in a way that works with older autoconf.
* m4/warnings.m4 (gl_WARN_ADD): Likewise.
Reported by Daniel P. Berrange.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Tue, 26 Jul 2011 13:58:26 -0600 |
parents | 93283e9d4b8c |
children | f10877c6816b |
files | ChangeLog m4/include_next.m4 m4/warnings.m4 |
diffstat | 3 files changed, 19 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-07-26 Eric Blake <eblake@redhat.com> + + 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. + * m4/warnings.m4 (gl_WARN_ADD): Likewise. + Reported by Daniel P. Berrange. + 2011-07-25 Bruno Haible <bruno@clisp.org> fseek, ftell: Fix doc.
--- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 18 +# include_next.m4 serial 19 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, @@ -179,7 +179,7 @@ [AS_VAR_PUSHDEF([gl_next_header], [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'>']) + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], @@ -208,7 +208,7 @@ dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. - AS_VAR_SET([gl_next_header], + AS_VAR_SET(gl_next_header, ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# @@ -218,20 +218,20 @@ }'`'"']) m4_if([$2], [check], [else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET([gl_next_header])]) + [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]) + 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])),
--- a/m4/warnings.m4 +++ b/m4/warnings.m4 @@ -1,4 +1,4 @@ -# warnings.m4 serial 3 +# warnings.m4 serial 4 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, @@ -20,16 +20,16 @@ # gl_WARN_ADD([-Wparentheses]). AC_DEFUN([gl_WARN_ADD], [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl -AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [ +AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [ gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} $1" AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])], - [AS_VAR_SET([gl_Warn], [yes])], - [AS_VAR_SET([gl_Warn], [no])]) + [AS_VAR_SET(gl_Warn, [yes])], + [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_IF(gl_Warn, [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])]) AS_VAR_POPDEF([gl_Flags])dnl AS_VAR_POPDEF([gl_Warn])dnl m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl