[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AS_IF breakage
From: |
Eric Blake |
Subject: |
Re: AS_IF breakage |
Date: |
Tue, 14 Apr 2009 15:52:06 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
>
> which puts the burden back on the user, where calling:
>
> AS_IF([false], [], [AC_REQUIRE(...)])
>
> causes a syntax error.
>
> If I could get AC_REQUIRE to play nicely with m4_expand, then that would be
the
> solution - pre-expand the user's text, at which point we then know for
certain
> whether the expansion is empty. But right now, I don't know how to pull that
> trick off.
Here's a thought - right now, AC_REQUIRE is identical to m4_require, and
expands to an empty string. What if we instead did:
m4_define([AC_REQUIRE], [m4_require($@):;])
which makes every use of AC_REQUIRE output a valid shell command? The ; is
necessary, since "AC_REQUIRE(...)dnl" is a common idiom.
That only helps one particular case of a macro that used to expand to an empty
string, but it is probably the most common case.
--
Eric Blake