diff --git a/Makefile.am b/Makefile.am index b47a57255..020628eec 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 afc6718a0..97c2c7032 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)