Subject: Re: bug#7990: Quoting problem with AM_COND_IF

From: Eric Blake <[email-masked]>
Date: Sat, 05 Feb 2011 13:49:09 -0700

On 02/05/2011 12:26 PM, Dennis Schridde wrote:
> AM_CONDITIONAL([CONDITION],[test -x /tmp])
> AS_IF([test -x /bin],
>     AM_COND_IF([CONDITION],,
>         AC_MSG_ERROR([comma separated, message])
>     )
> )

The quoting problem is with you, not with AM_COND_IF.  This should be
written:

AS_IF([test -x /bin],
      [AM_COND_IF([CONDITION],,
           [AC_MSG_ERROR([comma separated, message])
      ])
])

Remember the quoting rule of thumb - every argument to a macro should be
inside a single layer of quotes unless you really want the macro
expanded first (which is rare)

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org