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 2752af0da4bd9fa66ceb6e3482d9c36869bcdc8f..566156b1ef9d8b8a76510092b136f4d02aa4c682 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 5c6130cf3c4216c66bbac6fdc7ebf4da161a5d46..dba8dbfe496eb8f6ca4d86d2c6d774f1d0da5bc3 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 da313b3aa72496e337dc962350f17f5a88f6e1c5..ebf081a11012928a4dabf5570dc02b3bb38b27d1 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 e0d0f276403dbd19132bb6a2a1b0e62b5392fe75..e958580e2e59d7e1bffe3db0b7f535d4c86dfeb9 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 877c5a78fde3deae92bff07376a7de6f447d53d6..a4a750af36d5fc45889f7eb82dd2e78672cb287d 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
 ])