warnings: add comments about previous patch
authorEric Blake <eblake@redhat.com>
Tue, 26 Jul 2011 21:55:05 +0000 (15:55 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 26 Jul 2011 21:55:05 +0000 (15:55 -0600)
* 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>
ChangeLog
m4/absolute-header.m4
m4/include_next.m4
m4/warn-on-use.m4
m4/warnings.m4

index 2752af0..566156b 100644 (file)
--- 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.
index 5c6130c..dba8dbf 100644 (file)
@@ -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 @@ dnl From Derek Price.
 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
index da313b3..ebf081a 100644 (file)
@@ -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_DEFUN([gl_NEXT_HEADERS_INTERNAL],
     [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]))
index e0d0f27..e958580 100644 (file)
@@ -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 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
     [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],
index 877c5a7..a4a750a 100644 (file)
@@ -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 @@ m4_ifdef([AS_VAR_APPEND],
 # 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 @@ AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
                     [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
 ])