[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] warnings: add comments about previous patch
From: |
Eric Blake |
Subject: |
[PATCH] warnings: add comments about previous patch |
Date: |
Tue, 26 Jul 2011 16:08:17 -0600 |
Make sure we don't unintentionally revert this intentional break
in the typical autoconf style because a future change was only
tested with newer autoconf.
* 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 <address@hidden>
---
ChangeLog | 7 +++++++
m4/absolute-header.m4 | 4 +++-
m4/include_next.m4 | 4 +++-
m4/warn-on-use.m4 | 4 +++-
m4/warnings.m4 | 9 +++++----
5 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2752af0..566156b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-07-26 Eric Blake <address@hidden>
+ 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.
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index 5c6130c..dba8dbf 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -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
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index da313b3..ebf081a 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -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]))
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index e0d0f27..e958580 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -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],
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index 877c5a7..a4a750a 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -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
])
--
1.7.4.4
- Re: [libvirt] gnulib compiler warning detection broken on RHEL5 autoconf, Eric Blake, 2011/07/26
- [PATCH] include-next, warnings: support older autoconf, Eric Blake, 2011/07/26
- Re: [PATCH] include-next, warnings: support older autoconf, Stefano Lattarini, 2011/07/26
- Re: [PATCH] include-next, warnings: support older autoconf, Jim Meyering, 2011/07/26
- Re: [PATCH] include-next, warnings: support older autoconf, Eric Blake, 2011/07/26
- [PATCH] warnings: add comments about previous patch,
Eric Blake <=
- Re: [PATCH] warnings: add comments about previous patch, Stefano Lattarini, 2011/07/26
- Re: [PATCH] warnings: add comments about previous patch, Jim Meyering, 2011/07/27