dnl CF_WITH_NO_LEAKS version: 4 updated: 2021/01/05 20:08:11
dnl ----------------
AC_DEFUN([CF_WITH_NO_LEAKS],[

AC_REQUIRE([CF_WITH_DMALLOC])
AC_REQUIRE([CF_WITH_DBMALLOC])
AC_REQUIRE([CF_WITH_PURIFY])
AC_REQUIRE([CF_WITH_VALGRIND])

AC_MSG_CHECKING(if you want to perform memory-leak testing)
AC_ARG_WITH(no-leaks,
	[  --with-no-leaks         test: free permanent memory, analyze leaks],
	[AC_DEFINE(NO_LEAKS,1,[Define to 1 to enable leak-checking])
	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
	 case ${cf_doalloc} in
	 (*yes*) ;;
	 (*) AC_DEFINE(DOALLOC,10000,[Define to size of malloc-array]) ;;
	 esac
	 enable_leaks=no],
	[enable_leaks=yes])
dnl TODO - drop with_no_leaks
if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
AC_MSG_RESULT($with_no_leaks)
])dnl
