Bruno Haible wrote:
> Paolo Bonzini wrote:
>>>   - macros defined with AC_DEFUN_IDEMPOTENT are *known* to be expandable
>>>     any number of times, hence they may be both invoked and required,
>>>
>>>   - macros defined with AC_DEFUN_ONCE are *known* to be expandable only
>>>     once, hence the recommendation for them is to AC_REQUIRE them,
>> Do we have any of these?  I'd just change AC_DEFUN_ONCE to the meaning
>> you suggest for AC_DEFUN_IDEMPOTENT
> 
> It's too late for doing that: AC_DEFUN_ONCE was introduced on 2004-10-11.

I know.

> Besides that, AC_DEFUN_ONCE and AC_DEFUN_IDEMPOTENT have really opposite
> semantics. You cannot confuse people more than by using the same name for
> two entities with opposite semantics.

It looks to me like, in the wild, AC_DEFUN_ONCE is used for idempotent
macros (and in Autoconf too, see AC_CANONICAL_*).  The only correct use
of AC_DEFUN_ONCE (where the warning *is* desired) is AC_NO_EXECUTABLES;
and not even fully correct, as you'd want an error there.

You can look at all of them at

http://www.google.com/codesearch?hl=en&sa=N&q=AC_DEFUN_ONCE+-package:autoconf+-file:request+-package:automake+-file:traces*+-file:aclocal*++lang:m4&ct=rr&cs_r=lang:m4

Paolo


Reply via email to