diff -r a2d5fd4c309a -r 7c0ad6bd6a63 configure.ac --- a/configure.ac Wed Nov 18 14:38:38 2009 +0100 +++ b/configure.ac Wed Nov 18 18:37:21 2009 +0000 @@ -83,6 +83,21 @@ fi AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"]) +dnl Support for running test cases using valgrind. +use_valgrind=no +AC_ARG_ENABLE([valgrind], +AS_HELP_STRING([--enable-valgrind], [use valgrind when running tests]), + [use_valgrind=yes]) + +if [[ "$use_valgrind" = "yes" ]]; then + AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) + + if [[ "$HAVE_VALGRIND" = "no" ]]; then + AC_MSG_ERROR([Valgrind not found in PATH.]) + fi +fi +AM_CONDITIONAL(USE_VALGRIND, [test "$use_valgrind" = "yes"]) + dnl Checks for header files. AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h) @@ -128,6 +143,7 @@ echo CBC support................... : $lx_cbc_found echo echo Build additional tools........ : $enable_tools +echo Use valgrind for tests........ : $use_valgrind echo echo The packace will be installed in echo -n ' '