[Top][All Lists]

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

Re: AC_DEFUN_ONCE semantics

From: Eric Blake
Subject: Re: AC_DEFUN_ONCE semantics
Date: Tue, 27 Jan 2009 06:04:54 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20081209 Thunderbird/ Mnenhy/

Hash: SHA1

According to Paolo Bonzini on 1/27/2009 1:11 AM:
>> On the other hand, the manual already said that inside the body of an
>> AC_DEFUN'd macro (such as AS_IF), you should use AC_REQUIRE([foo]), never
>> direct foo.  So if you were already obeying the manual, you should never
>> run into this particular change in semantics.
> I never knew about this, and I actually disagree with it.  (It is
> redundant with the new AC_DEFUN_ONCE).

The statement has existed since 1d037b8 (Oct 11, 2004, 2.59-178), so
macros written for 2.59 were not aware of it:

+Obviously it is not sensible to evaluate a macro defined by
address@hidden in a macro defined by @code{AC_DEFUN}, most of the
+times you will want to use @code{AC_REQUIRE} (@pxref{Prerequisite

Part of my patch this week was rewording it to the following (which
relaxes the requirement), since you are correct that the original
statement is no longer true:

+Prior to Autoconf 2.64, a macro defined by @code{AC_DEFUN_ONCE} would
+emit a warning if it was directly expanded a second time, so for
+portability, it is better to use @code{AC_REQUIRE} than direct
+invocation of @var{macro-name} inside a macro defined by @code{AC_DEFUN}
+(@pxref{Prerequisite Macros}).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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