[PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])

Dmitry V. Levin ldv@altlinux.org
Tue Dec 15 17:01:43 GMT 2020


On Tue, Dec 15, 2020 at 04:07:02PM +0100, Mark Wielaard wrote:
> On Tue, 2020-12-15 at 17:40 +0300, Dmitry V. Levin wrote:
> > Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4",
> > that is enough for autoreconf to do the right thing.
> 
> But is that a good thing to rely on?

Looks like that's the common practice nowadays.

> The autoconf manual says "be aware that future Automake releases might
> start flagging ACLOCAL_AMFLAGS as obsolescent, or even remove
> support for it."
> 
> And the Autotools Mythbuster says "The search path for local files, as
> of version 1.13 of automake, is defined by the directories listed in
> AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS arguments. Previously, it
> was common to use a variable defined in Makefile.am (ACLOCAL_AMFLAGS)
> to pass extra parameters to aclocal. This behaviour is deprecated and
> will soon not be supported."
> 
> So, might it not be better to keep AC_CONFIG_MACRO_DIR([m4]) and remove
> the ACLOCAL_AMFLAGS?

Hmm, despite all these recommendation, virtually every project that uses
automake also uses ACLOCAL_AMFLAGS, and very few use AC_CONFIG_MACRO_DIR.

The documentation on AC_CONFIG_MACRO_DIR says that
"you must also set 'ACLOCAL_AMFLAGS = -I DIR'",
so this might be the reason why AC_CONFIG_MACRO_DIR is not popular.

We can keep AC_CONFIG_MACRO_DIR, while it doesn't help, it doesn't harm
either.


-- 
ldv


More information about the Elfutils-devel mailing list