From dcd5ec5133f82d334d838fc9d7593fc181d13071 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 6 Mar 2025 15:13:25 +0000 Subject: [PATCH] configure: Don't run Lua tests if luaunit is not available Signed-off-by: Michael Tremer --- Makefile.am | 2 +- configure.ac | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a381d09..8084f89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -439,7 +439,7 @@ dist_check_SCRIPTS = \ tests/python/test-database.py \ tests/python/test-export.py -if ENABLE_LUA +if ENABLE_LUA_TESTS check_SCRIPTS += \ $(LUA_TESTS) endif diff --git a/configure.ac b/configure.ac index 7fb9731..522afc7 100644 --- a/configure.ac +++ b/configure.ac @@ -198,7 +198,7 @@ AS_IF( PKG_CHECK_MODULES([LUA], [${lua}], [break], [true]) done - AX_PROG_LUA_MODULES([luaunit],, [AC_MSG_ERROR([Lua modules are missing])]) + AX_PROG_LUA_MODULES([luaunit], [enable_lua_tests=yes], [AC_MSG_WARN([luaunit is missing, won't run tests])]) LUA_VERSION=$($PKG_CONFIG --variable=major_version ${lua}) AC_SUBST(LUA_VERSION) @@ -215,6 +215,7 @@ AS_IF( ) AM_CONDITIONAL(ENABLE_LUA, [test "x$enable_lua" = "xyes"]) +AM_CONDITIONAL(ENABLE_LUA_TESTS, [test "x$enable_lua_tests" = "xyes"]) # Perl AC_PATH_PROG(PERL, perl, no) -- 2.39.5