* 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>
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.
-# 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,
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
-# 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,
[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]))
-# 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,
[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],
-# 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,
# 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"
[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
])