gentoo/app-arch/unadf/files/unadf-0.9.0-make-test-build-conditional.patch
Alfred Wingate d45ab8d1f8
app-arch/unadf: add 0.9.0
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
2025-03-10 02:40:06 +00:00

23 lines
729 B
Diff

diff --git a/configure.ac b/configure.ac
index a37d6f7..ec7d410 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,8 +103,14 @@ AC_PROG_INSTALL
AM_PROG_AR
LT_INIT
-# Checks for libraries.
-PKG_CHECK_MODULES([CHECK], [check >= 0.11.0], [tests=yes], [tests=no])
+AC_ARG_ENABLE([tests],
+ AS_HELP_STRING([--enable-tests], [Build tests]))
+
+AS_IF([test "x$enable_tests" = "xyes"],
+ [PKG_CHECK_MODULES([CHECK], [check >= 0.11.0],
+ [tests=yes],
+ [AC_MSG_FAILURE([--enable-tests was given, but dependency check wasn't found])])],
+ [])
AM_CONDITIONAL([TESTS], [test x${tests} = xyes])
# Checks for typedefs, structures, and compiler characteristics.