summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-10 10:54:29 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-11 09:14:11 +0200
commit8b97662c40c67a6d4087ce6e1f0c6fb6ea4a8b2c (patch)
treee534435871e91e6ab38a3c92bd4989e1a54e74d5 /configure.ac
parent31dcbdee67949c93fd0fc58718285c688d24c099 (diff)
downloadgnutls-8b97662c40c67a6d4087ce6e1f0c6fb6ea4a8b2c.tar.gz
tests: do not enable valgrind in non-git builds
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d9b7d06dab..ca8a18924d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,6 @@ if test "$use_cxx" != "no"; then
AC_LANG_POP(C++)
fi
AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
-AM_CONDITIONAL(WANT_TEST_SUITE, [test -f "${srcdir}/tests/suite/mini-eagain2.c"])
dnl Detect windows build
use_accel=yes
@@ -293,6 +292,13 @@ if test "$ac_have_unicode" != "yes";then
fi
fi
+SUITE_FILE="${srcdir}/tests/suite/mini-eagain2.c"
+if test -f "$SUITE_FILE";then
+ can_do_valgrind_tests=yes
+else
+ can_do_valgrind_tests=no
+fi
+
dnl Note that g*l_INIT are run after we check for library capabilities,
dnl to prevent issues from caching lib dependencies. See discussion
dnl in https://bugs.gentoo.org/show_bug.cgi?id=494940 and
@@ -300,6 +306,14 @@ dnl http://gnu-autoconf.7623.n7.nabble.com/Correct-way-to-check-for-clock-gettim
gl_INIT
ggl_INIT
+if test "$can_do_valgrind_tests" != "yes";then
+ VALGRIND=""
+ AC_SUBST(VALGRIND, [])
+ opt_valgrind_tests=no
+fi
+
+AM_CONDITIONAL(WANT_TEST_SUITE, [test "$opt_valgrind_tests" != no])
+
dnl GCC warnings to enable
AC_ARG_ENABLE([gcc-warnings],
@@ -898,7 +912,6 @@ AC_CONFIG_FILES([
AC_OUTPUT
dnl Warning flags: errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS}
-dnl Valgrind: $opt_valgrind_tests ${VALGRIND}
AC_MSG_NOTICE([summary of build options:
version: ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
@@ -906,6 +919,7 @@ AC_MSG_NOTICE([summary of build options:
Build system: ${build}
Install prefix: ${prefix}
Compiler: ${CC}
+ Valgrind: $opt_valgrind_tests ${VALGRIND}
CFlags: ${CFLAGS}
Library types: Shared=${enable_shared}, Static=${enable_static}
Local libopts: ${included_libopts}