diff --git a/configure.ac b/configure.ac
index 91a2a5ae767428e95352efbd5e272597636ee6fa..dcb24ccc51c017e44bbfeb043531909977cd8f6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ then
   AC_PATH_PROG(VALGRIND,valgrind,)
   if test "x$VALGRIND" != "x"
   then
-    VALGRIND="$VALGRIND -q --leak-check=full --show-reachable=yes --num-callers=50"
+    VALGRIND="$VALGRIND -q --error-exitcode=99 --leak-check=full --show-reachable=yes --num-callers=50"
     TESTS_INFO="Test suite will be run under:
     ${VALGRIND}"
   else