1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

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.
This commit is contained in:
Frank Denis 2016-03-08 13:15:03 +01:00
parent f92cfae9d8
commit ef843e082e

View File

@ -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])])
])