1.1 --- a/configure.ac Wed Nov 18 14:38:38 2009 +0100
1.2 +++ b/configure.ac Wed Nov 18 18:37:21 2009 +0000
1.3 @@ -83,6 +83,21 @@
1.4 fi
1.5 AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
1.6
1.7 +dnl Support for running test cases using valgrind.
1.8 +use_valgrind=no
1.9 +AC_ARG_ENABLE([valgrind],
1.10 +AS_HELP_STRING([--enable-valgrind], [use valgrind when running tests]),
1.11 + [use_valgrind=yes])
1.12 +
1.13 +if [[ "$use_valgrind" = "yes" ]]; then
1.14 + AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
1.15 +
1.16 + if [[ "$HAVE_VALGRIND" = "no" ]]; then
1.17 + AC_MSG_ERROR([Valgrind not found in PATH.])
1.18 + fi
1.19 +fi
1.20 +AM_CONDITIONAL(USE_VALGRIND, [test "$use_valgrind" = "yes"])
1.21 +
1.22 dnl Checks for header files.
1.23 AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
1.24
1.25 @@ -128,6 +143,7 @@
1.26 echo CBC support................... : $lx_cbc_found
1.27 echo
1.28 echo Build additional tools........ : $enable_tools
1.29 +echo Use valgrind for tests........ : $use_valgrind
1.30 echo
1.31 echo The packace will be installed in
1.32 echo -n ' '