autoconf
[Top][All Lists]
Advanced

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

Re: Empty else part in AS_IF


From: Russ Allbery
Subject: Re: Empty else part in AS_IF
Date: Thu, 10 Oct 2013 15:42:33 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> Indeed.  The problem is that autoconf cannot tell if a non-empty literal
> will expand to empty text (m4_ifdef results in no output).  You'll have
> to workaround it yourself:

> AS_IF([test x"$var" != xfalse],
>     [$test=1],
>     [: m4_ifdef(...)])

But if the contents of m4_ifdef expand into shell code, doesn't this
prepend : to the first line of that shell code, effectively commenting it
out?  It seems cleaner to use [:] in the else branch of m4_ifdef for that
reason.

-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

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