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

Christophe Fergeau cfergeau at redhat.com
Mon Mar 11 02:16:41 PDT 2013


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.
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4bde0f7..2255531 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,8 +93,8 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 AC_ARG_ENABLE([generator],
   [AS_HELP_STRING([--enable-generator],
                   [Enable compilation of a test page generator])],
-  [enable_generator=true], [enable_generator=false])
-AM_CONDITIONAL([BUILD_GENERATOR], [test x$enable_generator = xtrue])
+  [], [enable_generator=no])
+AM_CONDITIONAL([BUILD_GENERATOR], [test x$enable_generator != xno])
 
 AC_OUTPUT([
 Makefile
-- 
1.8.1.4



More information about the Spice-devel mailing list