[Spice-devel] [spice-xpi 2/6] Fix AC_ARG_ENABLE use for --enable-generator

Christophe Fergeau cfergeau at redhat.com
Mon Mar 11 05:45:07 PDT 2013


On Mon, Mar 11, 2013 at 01:24:34PM +0100, Marc-André Lureau wrote:
> On Mon, Mar 11, 2013 at 10:16 AM, Christophe Fergeau
> <cfergeau at redhat.com> wrote:
> > AC_ARG_ENABLE 3rd argument is what to do when the argument is
> > specified and the 4th arg is what to do when the argument is
> > not specified. Using [enable_generator=true] as the 3rd argument
> > is wrong as this would enable the generator when using
> > --disable-generator.
> 
> That doesn't seem to be the case, but anyway I prefer the simpler version:
> 
> AC_ARG_ENABLE([foo],
>     AS_HELP_STRING([--disable-foo], [Disable feature foo]))
> 
> AS_IF([test "x$enable_foo" != "xno"], [
>   dnl Do the stuff needed for enabling the feature
> ])

This wouldn't quite work in this case, first the generator build is
disabled by default, so documenting --disable-foo is not what we want.
Second, the AS_IF is not correct either, we need to call AM_CONDITIONAL in
all cases, not only when we want to enable the feature.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130311/33e52eae/attachment.pgp>


More information about the Spice-devel mailing list