From ef843e082eaced0b6031ec37835c333e5b3ef5c3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 8 Mar 2016 13:15:03 +0100 Subject: [PATCH] Enable Valgrind for the unit tests only if --enable-valgrind is passed Also mention that the Valgrind checks currently require GNU make, unlike all other targets. --- m4/ax_valgrind_check.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/m4/ax_valgrind_check.m4 b/m4/ax_valgrind_check.m4 index ad6c8730..80ca09b1 100644 --- a/m4/ax_valgrind_check.m4 +++ b/m4/ax_valgrind_check.m4 @@ -60,8 +60,8 @@ AC_DEFUN([AX_VALGRIND_CHECK],[ dnl Check for --enable-valgrind AC_ARG_ENABLE([valgrind], - [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], - [enable_valgrind=$enableval],[enable_valgrind=]) + [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])], + [enable_valgrind=$enableval],[enable_valgrind=no]) AS_IF([test "$enable_valgrind" != "no"],[ # Check for Valgrind. @@ -180,6 +180,11 @@ MOSTLYCLEANFILES += $(valgrind_log_files) .PHONY: check-valgrind check-valgrind-tool '] + AS_IF([test "$enable_valgrind" != "yes"],[ +VALGRIND_CHECK_RULES=' +check-valgrind: +@echo "Need to use GNU make and reconfigure with --enable-valgrind"' +]) AC_SUBST([VALGRIND_CHECK_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) ])