[Libguestfs] [PATCH] Disable gnulib tests by default

Richard W.M. Jones rjones at redhat.com
Fri Mar 7 15:27:13 UTC 2014


From: Hilko Bengen <bengen at debian.org>

RWMJ:

 - Patch taken from Debian downstream package.

 - The default in the original patch was to disable the tests.  I have
   changed this to default to enable them instead.

 - Removed AC_SUBST as the variable was not being used.

Cc: Hilko Bengen <bengen at debian.org>
---
 Makefile.am  | 5 ++++-
 configure.ac | 8 ++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index b47a572..020628e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,10 @@ include $(top_srcdir)/common-rules.mk
 ACLOCAL_AMFLAGS = -I m4
 
 # Gnulib - must be built and tested before the library.
-SUBDIRS = gnulib/lib gnulib/tests
+SUBDIRS = gnulib/lib
+if ENABLE_GNULIB_TESTS
+SUBDIRS += gnulib/tests
+endif
 
 # Basic source for the library.
 SUBDIRS += tests/data generator src examples po
diff --git a/configure.ac b/configure.ac
index afc6718..97c2c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1553,6 +1553,14 @@ dnl For search paths.
 AC_DEFINE_UNQUOTED([PATH_SEPARATOR],["$PATH_SEPARATOR"],
                    [Character that separates path elements in search paths])
 
+AC_ARG_ENABLE([gnulib-tests],
+    [AS_HELP_STRING([--disable-gnulib-tests],
+        [disable running GNU Portability library tests @<:@default=yes@:>@])],
+        [ENABLE_GNULIB_TESTS="$enableval"],
+        [ENABLE_GNULIB_TESTS=yes])
+AM_CONDITIONAL([ENABLE_GNULIB_TESTS],[test "x$ENABLE_GNULIB_TESTS" = "xyes"])
+AC_MSG_RESULT([$ENABLE_GNULIB_TESTS])
+
 dnl Library versioning.
 MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR`
 AC_SUBST(MAX_PROC_NR)
-- 
1.8.5.3




More information about the Libguestfs mailing list