X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fvalgrind-tests.m4;h=5191a5f0abc5cb425a2d8b4a1cc0c13bad42f450;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=e2434c6b83e28ed0606a8dc922ffb7ff8d2a2484;hpb=6f482faed630f7ed50f5c4ec414ddb7d7e110314;p=gnulib.git diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4 index e2434c6b8..5191a5f0a 100644 --- a/m4/valgrind-tests.m4 +++ b/m4/valgrind-tests.m4 @@ -1,5 +1,5 @@ -# valgrind-tests.m4 serial 1 -dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +# valgrind-tests.m4 serial 3 +dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,9 +21,12 @@ AC_DEFUN([gl_VALGRIND_TESTS], AC_CHECK_PROGS(VALGRIND, valgrind) fi - if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then + OPTS="-q --error-exitcode=1 --leak-check=full" + + if test -n "$VALGRIND" \ + && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then opt_valgrind_tests=yes - VALGRIND="$VALGRIND -q" + VALGRIND="$VALGRIND $OPTS" else opt_valgrind_tests=no VALGRIND=