[Top][All Lists]

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

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

From: Eric Blake
Subject: Re: [PATCH 1/3] AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal
Date: Fri, 09 Nov 2012 11:38:21 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 11/03/2012 06:05 AM, Stefano Lattarini wrote:
> Similar to AC_CONFIG_MACRO_DIR, 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:
> <>
> <>
> * 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"): Document AC_CONFIG_MACRO_DIRS rather
> than to the obsolescent AC_CONFIG_MACRO_DIR.
> * NEWS: Update.
> Suggested-by: Eric Blake <address@hidden>
> Helped-by: Nick Bowler <address@hidden>
> Signed-off-by: Stefano Lattarini <address@hidden>

I'm adding my own sign-off and squashing this in; basically, I'm
relaxing the documentation to plan for my subsequent patches where
AC_CONFIG_MACRO_DIR will not be treated as obsolescent, but leaving your
initial implementation separate from my improvements to make it clear
what my improvements accomplish.

diff --git i/NEWS w/NEWS
index 495266a..6d5b5e9 100644
--- i/NEWS
+++ w/NEWS
@@ -11,13 +11,12 @@ GNU Autoconf NEWS - User visible changes.
 ** Macros

-  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).
-  This macro is now obsolescent.  AC_CONFIG_MACRO_DIRS Should be used
-  instead.
+  New macro, used to declare multiple directories when looking for
+  local M4 macros.  This macro overcomes some of the shortfalls in the
+  older AC_CONFIG_MACRO_DIR, which could only be used once; although
+  the older macro remains for compatibility with older tools.  The
+  newer macro will be used by the upcoming Automake 1.13 release to
+  eliminate the need to specify ACLOCAL_AMFLAGS in

 - AC_PROG_CC now prefers C11 if available, falling back on C99 and
   then on C89 as before.
diff --git i/doc/autoconf.texi w/doc/autoconf.texi
index 1d80a6d..de81c25 100644
--- i/doc/autoconf.texi
+++ w/doc/autoconf.texi
@@ -2109,27 +2109,32 @@ Input
 local macros can be found using @code{AC_CONFIG_MACRO_DIRS}.

 @defmac AC_CONFIG_MACRO_DIRS (@var{dir1} address@hidden ... @var{dirN}])
address@hidden AC_CONFIG_MACRO_DIR (@var{dir})
 Specify the given directories as the location of additional local Autoconf
-macros.  This macro is intended for use by future versions of commands like
+macros.  These macros are intended for use by commands like
 @command{autoreconf} or @command{aclocal} that trace macro calls; it should
 be called directly from @file{} so that tools that install
 macros for @command{aclocal} can find the macros' declarations.

-This macro can be called multiple times and with multiple arguments; in
-such cases, directories in earlier calls are expected to be searched
-before directories in later calls, and directories appearing in the same
-call are expected to be searched in the order in which they appear in
-the call.  For example, an usage like
+AC_CONFIG_MACRO_DIRS is the preferred form, and can be called multiple
+times and with multiple arguments; in such cases, directories in earlier
+calls are expected to be searched before directories in later calls, and
+directories appearing in the same call are expected to be searched in
+the order in which they appear in the call.  For historical reasons, the
+macro AC_CONFIG_MACRO_DIR can also be used once, if it appears first,
+for tools such as older @command{libtool} that weren't prepared to
+handle multiple directories.  For example, a usage like

-AC_CONFIG_MACRO_DIRS([dir1 dir2])
-AC_CONFIG_MACRO_DIRS([dir4 dir5])
+AC_CONFIG_MACRO_DIRS([dir3 dir4])
 @end smallexample

 should cause the directories to be searched in this order:
address@hidden dir2 dir3 dir4 dir5}.
address@hidden dir2 dir3 dir4}.

 Note that if you use @command{aclocal} from Automake to generate
 @file{aclocal.m4}, you must also set
diff --git i/lib/autoconf/general.m4 w/lib/autoconf/general.m4
index 44267b1..96deb1e 100644
--- i/lib/autoconf/general.m4
+++ w/lib/autoconf/general.m4
@@ -1737,8 +1737,7 @@ AC_DEFUN([AC_CONFIG_MACRO_DIRS], [])
 # ------------------------
 # 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.
+# backward compatibility.

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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