Re: Empty else part in AS_IF

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

 



On 10/10/2013 04:41 PM, Russ Allbery wrote:
> Eric Blake <eblake@xxxxxxxxxx> writes:
> 
>> Another solution is to ensure that AM_CONDITIONAL is always defined
>> (where its definition is a no-op if using an old automake that did not
>> already define it):
> 
>> m4_define_default([AM_CONDITIONAL])
>> AS_IF([test x"$var" != xfalse],
>>       [$test=1],
>>       [AM_CONDITIONAL([TEST], [false])])
> 
> This would reintroduce the same problem, though, wouldn't it?
> AM_CONDITIONAL would expand to nothing, and then the else branch of AS_IF
> would be empty.  Or does this give AS_IF enough information to figure that
> out because it avoids using the lower-level m4_* function?

If that's the case, then write AM_CONDITIONAL so that it always produces
a shell statement:

m4_define_default([AM_CONDITIONAL], [:])

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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