Re: Empty else part in AS_IF

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

 



Eric Blake <eblake@xxxxxxxxxx> 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 (rra@xxxxxxxxxxxx)             <http://www.eyrie.org/~eagle/>

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux