[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] configure: fix incorrect AC_ENABLE_ARG([test-suite], ...)



configure: fix incorrect AC_ENABLE_ARG([test-suite], ...)

Configure incorrectly required --with-test-suite instead of --enable-test-suite and it was
therefore impossible to disable/enable the test-suite option manually as it would always
adopt the 'check' value.

Signed-off-by: TJ <libvirt iam tj>
---
 configure.ac | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index b62170e..f1b41a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1945,24 +1945,24 @@ AC_SUBST([PYTHON_INCLUDES])
 dnl Allow perl overrides
 AC_PATH_PROG([PERL], [perl])
 -AC_ARG_ENABLE([with-test-suite],
-              AC_HELP_STRING([--with-test-suite], [build test suite by default @<:@default=check@:>@]),
-              [case "${withval}" in
+AC_ARG_ENABLE([test-suite],
+              AC_HELP_STRING([--enable-test-suite=yes|no|check], [build test suite by default @<:@default=check@:>@]),
+              [case "${enable_test_suite}" in
                  yes|no|check) ;;
-                 *)      AC_MSG_ERROR([bad value ${withval} for tests option]) ;;
+                 *)      AC_MSG_ERROR([bad value ${enable_test_suite} for tests option]) ;;
               esac],
-              [withval=check])
+              [enable_test_suite=check])
  AC_MSG_CHECKING([Whether to build test suite by default])
-if test "$withval" = "check" ; then
+if test "$enable_test_suite" = "check" ; then
   if test -d $srcdir/.git ; then
-    withval=yes
+    enable_test_suite=yes
   else
-    withval=no
+    enable_test_suite=no
   fi
 fi
-AC_MSG_RESULT([$withval])
-AM_CONDITIONAL([WITH_TESTS], [test "$withval" = "yes"])
+AC_MSG_RESULT([$enable_test_suite])
+AM_CONDITIONAL([WITH_TESTS], [test "$enable_test_suite" = "yes"])
  AC_ARG_ENABLE([test-coverage],
   AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
-- 
1.8.1.2.433.g9808ce0.dirty






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]