bug-autoconf
[Top][All Lists]
Advanced

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

Re: Bug: "possibly undefined macro: AC_MSG_ERROR"


From: Axel Simon
Subject: Re: Bug: "possibly undefined macro: AC_MSG_ERROR"
Date: Tue, 04 Mar 2008 10:24:17 +0100

On Tue, 2008-03-04 at 10:09 +0100, Hans Aberg wrote:
> > You need to run aclocal before running autoconf.
> 
> It id not work for me.
> 
> > If you don't do that, autoconf will not see the macro definitions
> for
> > AM_INIT_AUTOMAKE, AM_CONDITIONAL, GTKHS_PROG_CHECK_VERSION, ...
> 
> I think autoconf runs aclocal, but running aclocal first did not
> work  
> for me.

I agree with Ralf: autoconf alone will not work. aclocal first has to
copy macros from /usr/local/share/... and acinclude.m4 to aclocal.m4
which are then used by autoconf to create configure. Thus you need to
run autoreconf = aclocal && autoheader && automake && autoconf. Having
an up-to-date aclocal.m4 is a prerequisite for running automake (and
autoheader, I think). Specifically, in the documentation for automake,
it says that it uses autoconf to scan configure.ac in order to determine
what variables to put in the Makefile.in (which automake generates from
Makefile.am).

The fact that you can run autoreconf twice and it runs through is
interesting.

On 4 Mar 2008, at 08:16, Ralf Wildenhues wrote:
> The fact that autoconf doesn't warn the second time is due to caching
> (it doesn't even run the autom4te program the second time, which is  
> the
> one that is warning).

AFAIK autom4te is the program that does the actual work, so this
observation is interesting. However, I don't think that caching is the
reason for this, as caching seems to be disabled in recent versions of
autoconf. It's seems more likely that there is a time-stamp file being
up-to-date in the second case. (You can see these stamps when running
autoconf -v).

> As a workaround, you should consider adding
>   m4_pattern_forbid([^GTKHS_])

I'd be glad if you could check if this gives at least a better error
message. Then I'd add that to the configure script.

My 2p,
Axel.






reply via email to

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