[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/>
- Empty else part in AS_IF, Julien ÉLIE, 2013/10/09
- Re: Empty else part in AS_IF, Eric Blake, 2013/10/09
- Re: Empty else part in AS_IF, Julien ÉLIE, 2013/10/09
- Re: Empty else part in AS_IF, Thomas Jahns, 2013/10/10
- Re: Empty else part in AS_IF, Eric Blake, 2013/10/10
- Re: Empty else part in AS_IF, Julien ÉLIE, 2013/10/10
- Re: Empty else part in AS_IF, Russ Allbery, 2013/10/10
- Re: Empty else part in AS_IF, Eric Blake, 2013/10/10
- Re: Empty else part in AS_IF, Russ Allbery, 2013/10/10
Re: Empty else part in AS_IF,
Russ Allbery <=