autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal


From: Stefano Lattarini
Subject: [PATCH 1/2] AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal
Date: Tue, 16 Oct 2012 21:30:07 +0200

Similar to AC_CONFIG_MACRO_DIRS, but accepts more than one argument.
This will allow projects to use several m4 macro local dirs.  This is
especially important for projects that are used as nested subpackages
of larger projects.

See also:
<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00037.html>
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS): New.  Expands to the
empty anyway, since it is only meant to be traced by tools like aclocal
and autoreconf.
(AC_CONFIG_MACRO_DIR): Updated comments to mark it as obsolescent.  It
does not elicit warnings yet, for backward-compatibility.
* doc/autoconf.texi (@node "Input"): Refer to AC_CONFIG_MACRO_DIRS rather
than to the obsolescent AC_CONFIG_MACRO_DIR.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 NEWS                    |  9 +++++++++
 doc/autoconf.texi       | 21 +++++++++++----------
 lib/autoconf/general.m4 | 10 +++++++++-
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/NEWS b/NEWS
index 8b35cb8..bef1a60 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,15 @@ GNU Autoconf NEWS - User visible changes.
 
 ** Macros
 
+- AC_CONFIG_MACRO_DIRS
+  Use this macro to declare the directory for local M4 macros for aclocal.
+  It will be supported by future versions of aclocal (starting from the
+  Automake 1.13 release).
+
+- AC_CONFIG_MACRO_DIR
+  This macro is now obsolescent.  AC_CONFIG_MACRO_DIRS Should be used
+  instead.
+
 - AC_PROG_CC now prefers C11 if available, falling back on C99 and
   then on C89 as before.
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index e0666d4..d806f93 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -2106,19 +2106,20 @@ files.  For instance it is called by macros like 
@code{AC_PROG_INSTALL}
 @end defmac
 
 Similarly, packages that use @command{aclocal} should declare where
-local macros can be found using @code{AC_CONFIG_MACRO_DIR}.
+local macros can be found using @code{AC_CONFIG_MACRO_DIRS}.
 
address@hidden AC_CONFIG_MACRO_DIR (@var{dir})
address@hidden
-Specify @var{dir} as the location of additional local Autoconf macros.
-This macro is intended for use by future versions of commands like
address@hidden that trace macro calls.  It should be called
-directly from @file{configure.ac} so that tools that install macros for
address@hidden can find the macros' declarations.
address@hidden AC_CONFIG_MACRO_DIRS (@var{dir1} address@hidden ... @var{dirN}])
address@hidden
+Specify the given directories as the location of additional local Autoconf
+macros.  This macro is intended for use by future versions of commands like
address@hidden or @command{aclocal} that trace macro calls.
+It should be called directly from @file{configure.ac} so that tools that
+install macros for @command{aclocal} can find the macros' declarations.
 
 Note that if you use @command{aclocal} from Automake to generate
address@hidden, you must also set @code{ACLOCAL_AMFLAGS = -I
address@hidden in your top-level @file{Makefile.am}.  Due to a limitation in
address@hidden, you must also set
address@hidden = -I @var{dir1} [-I @var{dir2} ... -I @var{dirN}]}
+in your top-level @file{Makefile.am}.  Due to a limitation in
 the Autoconf implementation of @command{autoreconf}, these include
 directives currently must be set on a single line in @file{Makefile.am},
 without any backslash-newlines.
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 51cee30..44267b1 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1727,13 +1727,21 @@ AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 ## ------------------------ ##
 
 
+# AC_CONFIG_MACRO_DIRS(DIR-1 [DIR-2 ... DIR-n])
+# --------------------------------------------
+# Declare directories containing additional macros for aclocal.
+# This macro can be called multiple times, and with multiple arguments.
+AC_DEFUN([AC_CONFIG_MACRO_DIRS], [])
+
 # AC_CONFIG_MACRO_DIR(DIR)
 # ------------------------
 # Declare directory containing additional macros for aclocal.
+# This is obsoleted by AC_CONFIG_MACRO_DIRS, and kept only for
+# backward compatibility.  Future Autoconf versions should start
+# warning about it, in a year or so.
 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
 
 
-
 ## --------------------- ##
 ## Requiring aux files.  ##
 ## --------------------- ##
-- 
1.7.12.317.g1c54b74




reply via email to

[Prev in Thread] Current Thread [Next in Thread]