From 9b9f1739f85deeb10e152ac0c1a117625c8ba32c Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 2 Jan 2025 17:27:30 -0800 Subject: [PATCH] fix: make libcheck fatal if missing with --with-check Signed-off-by: Robin H. Johnson --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a0b2804..cdd7454 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,12 @@ AM_CONDITIONAL(HAVE_STACK_PROTECTOR, test x"$with_stack_protector" = xyes) AC_ARG_WITH([check], AS_HELP_STRING([--without-check], [Build without check unit testing framework]),[],[with_check=no]) AS_IF([test "x$with_check" = "xyes"], [ AS_IF([test "x$arch" = "xlinux"], [ - PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) + check_version=0.9.4 + # only check_all gets linked; NOT radvd / radvdump + PKG_CHECK_MODULES([CHECK], [check >= ${check_version}], [found_yes=yes],[found_check=no]) + if test "x$found_check" = xno; then + AC_MSG_ERROR("check >= ${check_version} required but not found") + fi ]) ]) AM_CONDITIONAL(HAVE_CHECK, test x"$with_check" = xyes)