opt_profiler_mode=$enableval)
AC_MSG_RESULT($opt_profiler_mode)
+if test "$cross_compiling" != no; then
+ AC_CHECK_PROGS(VALGRIND, valgrind)
+fi
+if test -z "$VALGRIND"; then
+ opt_valgrind_tests=no
+else
+ opt_valgrind_tests=yes
+fi
+AC_MSG_CHECKING([whether self tests are run under valgrind])
+AC_ARG_ENABLE(valgrind-tests,
+ AS_HELP_STRING([--enable-valgrind-tests],
+ [run self tests under valgrind]),
+ opt_valgrind_tests=$enableval)
+AC_MSG_RESULT($opt_valgrind_tests)
+
AC_MSG_RESULT([***
*** Checking for compilation programs...
])
TESTS = pkcs12_neon pkcs8 $(ctests)
-VALGRIND=valgrind --tool=memcheck --leak-check=full --leak-resolution=high \
- --show-reachable=yes --num-callers=50
TESTS_ENVIRONMENT = \
PKCS12FILE=$(srcdir)/client.p12 \
PKCS12PASSWORD=foobar \
- `if $(VALGRIND) /bin/true > /dev/null 2>&1; then echo $(VALGRIND); else echo $$SHELL -c; fi`
+ $(VALGRIND)