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

Marc-André Lureau marcandre.lureau at gmail.com
Mon Mar 11 05:24:34 PDT 2013


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
])


http://www.flameeyes.eu/autotools-mythbuster/autoconf/arguments.html


-- 
Marc-André Lureau


More information about the Spice-devel mailing list