autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] use m4_require to implement AS_REQUIRE


From: Paolo Bonzini
Subject: Re: [PATCH] use m4_require to implement AS_REQUIRE
Date: Mon, 13 Oct 2008 18:25:42 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

> I still don't quite understand (but at this point have to admit that I
> haven't looked at the implementation _at all_).  If AC_CHECK_FUNC
> requires the preparation of AC_LINK_IFELSE, then the latter should be
> expanded outside and before the body of the former.  No?

After this patch, yes. :-)

Without it, AS_REQUIRE is a hack that does not guarantee "atomic"
expansion of macros; it just slapped text into the appropriate
diversion, causing intermixed expansion like this one:

   ac_c_check_func() {
     if test $ac_cv...; then
       ...
     else
       ac_c_link_ifelse() {
       }
     fi
  }

and requiring commits like 34b79a8 and 926ed6a9 which could even be
reverted after this patch goes in (though I'd rather not do it to avoid
excessive churn -- there is more than enough already).  Look at those
seemingly innocent patches and you'll realize that, while tolerable, the
situation was anyway all but optimal.

> Ralf (and yes, just ignore me unless you have extra time to explain)

No problem.  Explaining things twice makes sure you have really
understood them.  Also, since I submitted the first shell function
patches 4-5 years ago, and so many prerequisites jump up now years
later, I'd better explain things as much as possible to make sure I'm
doing them right.

Paolo




reply via email to

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