]> Savannah Git Hosting - gnulib.git/commitdiff
warnings: fix compilation with old autoconf
authorEric Blake <eblake@redhat.com>
Fri, 25 Aug 2017 01:28:52 +0000 (20:28 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 25 Aug 2017 01:48:57 +0000 (20:48 -0500)
Autoconf older than 2.63b (such as what ships on CentOS 6) had
a bug that any AC_DEFUN'd macro name that includes shell meta-
characters causes failure due to missing shell quoting during
aclocal's use of autom4te.  We can work around the problem by
using m4_defun instead (same semantics in autom4te, but no
longer traced by aclocal, so no longer tickles the shell
quoting bug).

* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
AC_DEFUN.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
(gl_MANYWARN_ALL_GCC(C++)): Likewise.

Reported-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
m4/manywarnings.m4
m4/warnings.m4

index 05213d62fc9b43491c2eff658f1db1e3991ac0af..e241c9dc1383153088c91774db2af50e393b3b38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-08-24  Eric Blake  <eblake@redhat.com>
+
+       warnings: fix compilation with old autoconf
+       * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
+       (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
+       AC_DEFUN.
+       * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
+       (gl_MANYWARN_ALL_GCC(C++)): Likewise.
+
 2017-08-24  Bruno Haible  <bruno@clisp.org>
 
        glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
index a3d255a9402b4d6c93b3e8a9e07d158a4788331a..eb89325519c93c77d7f1df900b4f3fe4dbebe22a 100644 (file)
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 11
+# manywarnings.m4 serial 12
 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
 
 # Specialization for _AC_LANG = C.
-AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_MANYWARN_ALL_GCC(C)],
 [
   AC_LANG_PUSH([C])
 
@@ -316,7 +317,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
 ])
 
 # Specialization for _AC_LANG = C++.
-AC_DEFUN([gl_MANYWARN_ALL_GCC(C++)],
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_MANYWARN_ALL_GCC(C++)],
 [
   gl_MANYWARN_ALL_GCC_CXX_IMPL([$1])
 ])
index aa2735b77ff726cbc2256d0852c4dea61e4dc1a1..870472b624bc57bf40bf39abe9b97a9c9b7e276d 100644 (file)
@@ -1,4 +1,4 @@
-# warnings.m4 serial 12
+# warnings.m4 serial 13
 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -59,7 +59,8 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
 
 # Specialization for _AC_LANG = C. This macro can be AC_REQUIREd.
-AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
 [
   AC_LANG_PUSH([C])
   gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
@@ -67,7 +68,8 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
 ])
 
 # Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd.
-AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
 [
   AC_LANG_PUSH([C++])
   gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL