summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-07-26 13:58:26 -0600
committerEric Blake <eblake@redhat.com>2011-07-26 14:11:24 -0600
commit336406c13cc08ee13d6a15cc8cf86efb9132a830 (patch)
treec82a6fd51b00e2191d7a7f386bc9a4fd1b0eeda8 /m4
parentc0ff72b95999d6a0e9fe7151c713352f154ad70a (diff)
downloadgnulib-336406c13cc08ee13d6a15cc8cf86efb9132a830.tar.gz
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>
Diffstat (limited to 'm4')
-rw-r--r--m4/include_next.m412
-rw-r--r--m4/warnings.m410
2 files changed, 11 insertions, 11 deletions
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index b3c7849185..da313b3aa7 100644
--- 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 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
[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 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
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 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
}'`'"'])
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])),
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index b2d1a29e2a..877c5a78fd 100644
--- 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 @@ m4_ifdef([AS_VAR_APPEND],
# 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