Discussion:
[PATCH] gnulib-common.m4: avoid aclocal.m4 bloat
(too old to reply)
Paul Eggert
2017-03-12 02:15:14 UTC
Permalink
Raw Message
* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB):
Hide AM_PROG_AR from aclocal, so that aclocal does not
install irrelevant macro definitions into aclocal.m4.
---
ChangeLog | 7 +++++++
m4/gnulib-common.m4 | 9 ++++++---
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7a1e5ef..d4b2bf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-03-11 Paul Eggert <***@cs.ucla.edu>
+
+ gnulib-common.m4: avoid aclocal.m4 bloat
+ * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB):
+ Hide AM_PROG_AR from aclocal, so that aclocal does not
+ install irrelevant macro definitions into aclocal.m4.
+
2017-03-10 Bruno Haible <***@clisp.org>

vma-iter: Let callers know about error.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 7b957f8..36f2acc 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 37
+# gnulib-common.m4 serial 38
dnl Copyright (C) 2007-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,
@@ -256,7 +256,8 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
dnl library formats. In particular, the GNU binutils programs ar and ranlib
dnl produce libraries that work only with gcc, not with cc.
AC_REQUIRE([AC_PROG_CC])
- AC_BEFORE([$0], [AM_PROG_AR])
+ dnl The '][' hides this use from 'aclocal'.
+ AC_BEFORE([$0], [A][M_PROG_AR])
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[
AC_EGREP_CPP([Amsterdam],
@@ -288,7 +289,9 @@ Amsterdam
dnl __ACK__. It may seem like its easier to avoid calling the macro here,
dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
dnl default value and automake should usually know them).
- m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:])
+ dnl
+ dnl The '][' hides this use from 'aclocal'.
+ m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:])
fi

dnl In case the code above has not helped with setting AR/ARFLAGS, use
--
2.9.3
Loading...