From: Michael Tremer Date: Thu, 6 Mar 2025 15:00:58 +0000 (+0000) Subject: configure: Fail if Lua was enabled, but not found X-Git-Tag: 0.9.18~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=234bbd4da7a51a3e04a6e01b22fe93a310e5ab26;p=location%2Flibloc.git configure: Fail if Lua was enabled, but not found Signed-off-by: Michael Tremer --- diff --git a/configure.ac b/configure.ac index d573c94..7fb9731 100644 --- a/configure.ac +++ b/configure.ac @@ -192,10 +192,8 @@ PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) AC_ARG_ENABLE(lua, AS_HELP_STRING([--disable-lua], [do not build the Lua modules]), [], [enable_lua=yes]) -AM_CONDITIONAL(ENABLE_LUA, [test "x$enable_lua" = "xyes"]) - AS_IF( - [test "$enable_lua" = "yes"], [ + [test "x$enable_lua" = "xyes"], [ for lua in lua lua5.4 lua5.3 lua5.2 lua5.1; do PKG_CHECK_MODULES([LUA], [${lua}], [break], [true]) done @@ -208,9 +206,16 @@ AS_IF( AC_SUBST(LUA_INSTALL_LMOD) LUA_INSTALL_CMOD=$($PKG_CONFIG --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${lua}) AC_SUBST(LUA_INSTALL_CMOD) + + # Fail if we could not find anything to link against + if test "x${LUA_VERSION}" = "x"; then + AC_MSG_ERROR([Could not find Lua]) + fi ], ) +AM_CONDITIONAL(ENABLE_LUA, [test "x$enable_lua" = "xyes"]) + # Perl AC_PATH_PROG(PERL, perl, no) AC_SUBST(PERL)