m4-patches
[Top][All Lists]
Advanced

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

Re: Aclocal bug?


From: Stepan Kasal
Subject: Re: Aclocal bug?
Date: Thu, 9 Nov 2006 15:59:53 +0100
User-agent: Mutt/1.4.2.1i

Hello Gary,

wow this is an interesting bug, I enjoyed analysing it!

[Ccing bug-autoconf, because a check has to be added to Autoconf's
configure.
Ccing also bug-gnu-gettext, though I'm not sure whether an action is
needed for gettext.m4.]

On Wed, Nov 08, 2006 at 11:49:31PM -0600, Gary V. Vaughan wrote:
> On 8 Nov 2006, at 13:17, Ralf Wildenhues wrote:
> >* Gary V. Vaughan wrote on Wed, Nov 08, 2006 at 06:34:45AM CET:

> >>configure.ac:147: warning: AM_INTL_SUBDIR is m4_require'd but not
> >>m4_defun'd

I tried to reproduce your bug, and I succeeded!  Actually, it was
because I'm still using Fedora Core 4 and have m4 1.4.3.

> As I haven't built CVS m4 yet, the only binary in my path is the Apple
> shipped m4-1.4.2 in /usr/bin.

The cause is the following bug:

$ echo "ifdef(\`MAC', bug)" |m4 --trace=MAC
bug

I observed it in 1.4.[34], while 1.4.5 seems to be fixed.

To build m4 HEAD, upgrade to m4 >= 1.4.5 first and things will just
work!

I think that Autoconf should require m4 >= 1.4.5.

(Autoconf's confgiure should check for it; should it be done in
m4/m4.m4 in AM_PROG_GNU_M4, or in configure.ac?)

A detailed explanation:
-----------------------

autoconf calls autom4te with (among other options)

        --preselect AM_GNU_GETTEXT_INTL_SUBDIR

which is trasformed to --trace=AM_GNU_GETTEXT_INTL_SUBDIR on the m4
command line.  And because the expansion of AM_GNU_GETTEXT([external])
contains something like (see ltdl/m4/gettext.m4):

        ifdef([AM_GNU_GETTEXT_INTL_SUBDIR],
              [AC_REQUIRE([AM_INTL_SUBDIR])])

the buggy m4 expands AM_INTL_SUBDIR though it should not.

At that point, an error occures, because the definition of
AM_INTL_SUBDIR has not been copied to aclocal.m4.

When aclocal determined the list of needed macros, it called
        autom4te --language Autoconf-without-aclocal-m4
which does not include the above --preselect option.
Consequently, the `ifdef' was correctly evaluated as false,
AM_INTL_SUBDIR was not expanded, so aclocal has not included it in
aclocal.m4.

But why has not this bug hit before?
With Autoconf <= 2.60 `--language Autoconf-without-aclocal-m4'
included all the Autoconf --preselect options and thus aclocal has
observed the same incorrect expansion of AM_INTL_SUBDIR as autoconf,
and all seemed to work OK.

> >Cheers, and I'll try following the riding blog... ;-)

Oh, it must be cool, I shall really look there.

> I've spent the last 12 hours in the saddle, so it'll be another 24
> hours until the next entry :-)

Great.  I wish you safe ride without any accident!

Have a nice day,
        Stepan




reply via email to

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