diff options
Diffstat (limited to 'gl/m4/valgrind-tests.m4')
-rw-r--r-- | gl/m4/valgrind-tests.m4 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4 index 1ffa2ed..f1838d1 100644 --- a/gl/m4/valgrind-tests.m4 +++ b/gl/m4/valgrind-tests.m4 @@ -1,4 +1,4 @@ -# valgrind-tests.m4 serial 2 +# valgrind-tests.m4 serial 3 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -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=no" + + if test -n "$VALGRIND" \ + && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then opt_valgrind_tests=yes - VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=no" + VALGRIND="$VALGRIND $OPTS" else opt_valgrind_tests=no VALGRIND= |