]> git.ipfire.org Git - location/libloc.git/commitdiff
configure: Don't run Lua tests if luaunit is not available
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Mar 2025 15:13:25 +0000 (15:13 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Mar 2025 15:13:25 +0000 (15:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac

index a381d09a49b3fbd1e2fa37c70a7ca84ae0004934..8084f89a339245715fb1727e78d8055119f63917 100644 (file)
@@ -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
index 7fb97317d2ca49a67e99ec1e9b878a2d29fabf23..522afc7e2a11e54c8b636364ecde919bd0d95227 100644 (file)
@@ -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)