| | 17 | fi |
|---|
| | 18 | |
|---|
| | 19 | # Check for valgrind |
|---|
| | 20 | VALGRIND_ENVIRONMENT="" |
|---|
| | 21 | ac_enable_valgrind=no |
|---|
| | 22 | AC_ARG_ENABLE(valgrind-testing, |
|---|
| | 23 | [ --enable-valgrind-testing enable running of tests inside Valgrind ], [ ac_enable_valgrind=yes ], [ ac_enable_valgrind=no] ) |
|---|
| | 24 | |
|---|
| | 25 | if test "x${ac_enable_valgrind}" = xyes ; then |
|---|
| | 26 | if test "x${enable_shared}" = xyes ; then |
|---|
| | 27 | VALGRIND_ENVIRONMENT="libtool --mode=execute " |
|---|
| | 28 | fi |
|---|
| | 29 | |
|---|
| | 30 | AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) |
|---|
| | 31 | if test "x$HAVE_VALGRIND" = xyes ; then |
|---|
| | 32 | VALGRIND_ENVIRONMENT="$VALGRIND_ENVIRONMENT valgrind -q --leak-check=yes --show-reachable=yes --num-callers=100" |
|---|
| | 33 | AC_SUBST(VALGRIND_ENVIRONMENT) |
|---|
| | 34 | TESTS_INFO="'make check' test suite will be run under: |
|---|
| | 35 | ${VALGRIND_ENVIRONMENT}" |
|---|
| | 36 | else |
|---|
| | 37 | TESTS_INFO="'make check' to run test suite (Valgrind not found)" |
|---|
| | 38 | fi |
|---|
| | 39 | else |
|---|
| | 40 | TESTS_INFO="'make check' to run test suite (Valgrind testing not enabled)" |
|---|