Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make libcheck fatal if missing with --with-check #255

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,21 @@ AC_ARG_WITH([stack-protector], AS_HELP_STRING([--without-stack-protector], [Buil
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])
# AC_ARG_WITH provides HAVE_CHECK*; but that does not say if the library is present
check_version=0.9.4
AS_IF([test "x$with_check" = "xyes"], [
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
# only check_all gets linked; NOT radvd / radvdump
# PKG_CHECK_MODULES's default behavior does not export any variable that
# says if the module is present or not. $pkg_cv_CHECK_{CFLAGS,LIBS} are
# also taken from either env or package, but the package can have them
# empty, so we must define the true/false.
# See https://autotools.info/pkgconfig/pkg_check_modules.html
PKG_CHECK_MODULES([CHECK], [check >= ${check_version}], [found_yes=yes], [found_check=no])
])
AM_CONDITIONAL(HAVE_CHECK, test x"$with_check" = xyes)
if test "x$found_check" = xno && test "x$with_check" = xyes; then
AC_MSG_ERROR("check >= ${check_version} required but not found")
fi

dnl Determine of netlink is available
AC_MSG_CHECKING(netlink)
Expand Down
Loading