autoconf
[Top][All Lists]
Advanced

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

Re: Confusing sample in autoconf manual


From: Ralf Wildenhues
Subject: Re: Confusing sample in autoconf manual
Date: Wed, 9 Sep 2009 20:28:41 +0200
User-agent: Mutt/1.5.20 (2009-08-09)

Hello santilín, NightStrike,

* NightStrike wrote on Wed, Sep 02, 2009 at 05:44:16PM CEST:
> On Sun, Aug 9, 2009 at 1:08 PM, santilistas wrote:
> > By the way, is this the correct list to send this remarks?

Yes; although bugs in Autoconf can go to the bug-autoconf list.
Sorry for the long delay.

> > In section 3.1.2 The Autoconf language, there is the example on Iron
> > Maiden and AC_DC.
> >
> > @example
> > echo "Hard rock was here!  --[AC_DC]"
> > @end example
> >
> > which results in:
> >
> > @example
> > echo "Hard rock was here!  --AC_DC"
> > @end example
> >
> >
> > that demonstrates the losing of the quotation. However, a little bit
> > below there is this example:
> >
> > @example
> > AC_MSG_WARN([[AC_DC stinks  --Iron Maiden]])
> > @end example
> >
> > which tries to show that the quotation is lost, but there is no quotation.

Yes, there is quotation: [[ at the start and ]] at the end of the first
argument to the AC_MSG_WARN macro.

> > Shouldn't it be written like this?:
> >
> > @example
> > AC_MSG_WARN([[AC_DC stinks  --[Iron Maiden] ]])
> > @end example

No.  AC_DC was quoted in the example before that because it is possible
that Autoconf could have defined a macro of that name, as AC_* is within
its namespace.  Try putting
  AC_DEFUN([AC_DC], [hmm])

before these lines, and you'll see that removing quotation will cause
the macro to be expanded.

However, this example is still not chosen very well, but for a
completely different reason: Both lines will evoke a warning from
autoconf:
| configure.ac:2: error: possibly undefined macro: AC_DC

> Just wondering if there was a reply to this that I can't seem to find....

Now there is.  :-)

Cheers,
Ralf




reply via email to

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