[Spice-devel] [spice-xpi 2/6] Fix AC_ARG_ENABLE use for --enable-generator
Marc-André Lureau
mlureau at redhat.com
Mon Mar 11 05:54:43 PDT 2013
----- Mensaje original -----
> 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.
ack
More information about the Spice-devel
mailing list