AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$ac_have_unistring" = "yes")
+# specify our own suppressions file; this needs to be set before gl_INIT
+DEFAULT_VALGRINDFLAGS='-q --error-exitcode=1 --leak-check=full --track-origins=yes --gen-suppressions=all --suppressions=\$(srcdir)/suppressions.valgrind'
+
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
gl_WARN_ADD([-fdiagnostics-show-option])
fi
+gl_VALGRIND_TESTS_DEFAULT_NO
+
if test "$gl_cv_opt_valgrind_tests" != no; then
gl_WARN_ADD([-fno-builtin-strcmp])
fi
+++ /dev/null
-diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4
-index 50d90e145..5e198b455 100644
---- a/m4/valgrind-tests.m4
-+++ b/m4/valgrind-tests.m4
-@@ -12,9 +12,9 @@ dnl From Simon Josefsson
- AC_DEFUN([gl_VALGRIND_TESTS],
- [
- AC_ARG_ENABLE([valgrind-tests],
-- AS_HELP_STRING([--disable-valgrind-tests],
-- [don't try to run self tests under valgrind]),
-- [opt_valgrind_tests=$enableval], [opt_valgrind_tests=yes])
-+ AS_HELP_STRING([--enable-valgrind-tests],
-+ [try to run self tests under valgrind]),
-+ [opt_valgrind_tests=$enableval], [opt_valgrind_tests=no])
-
- # Run self-tests under valgrind?
- if test "$opt_valgrind_tests" = "yes" && test "$cross_compiling" = no; then
-@@ -45,7 +45,7 @@ AC_DEFUN([gl_VALGRIND_TESTS],
- if test -n "$VALGRIND"; then
- AC_CACHE_CHECK([for valgrind options for tests],
- [gl_cv_opt_valgrind_tests],
-- [gl_valgrind_opts='-q --error-exitcode=1 --leak-check=full'
-+ [gl_valgrind_opts='-q --error-exitcode=1 --leak-check=full --track-origins=yes --gen-suppressions=all --suppressions=\$(srcdir)/suppressions.valgrind'
- if $VALGRIND $gl_valgrind_opts ls > /dev/null 2>&1; then
- gl_cv_opt_valgrind_tests="$gl_valgrind_opts"
- else