From: Kentaro Hayashi Date: Mon, 5 Oct 2020 06:36:18 +0000 (+0900) Subject: lua: add fallback to detect LuaJIT X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3778%2Fhead;p=thirdparty%2Fcollectd.git lua: add fallback to detect LuaJIT Before: LIBLUA_PKG_CONFIG_NAME=luajit ./configure --enable-lua After: ./configure --enable-lua In the previous versions, for enabling LuaJIT, it needs to specify LIBLUA_PKG_CONFIG_NAME=luajit explicitly. In this commit, add fallback to detect LuaJIT without specifying LIBLUA_PKG_CONFIG_NAME=luajit explicitly by default (just use --enable-lua). Note that if both of lua and luajit exists, then lua is used. Signed-off-by: Kentaro Hayashi --- diff --git a/configure.ac b/configure.ac index 96e196e84..2a8c76c5c 100644 --- a/configure.ac +++ b/configure.ac @@ -3221,7 +3221,14 @@ else [ PKG_CHECK_MODULES([LUA], [lua51], [with_liblua="yes"], - [with_liblua="no (pkg-config cannot find liblua)"] + [ + PKG_CHECK_MODULES([LUA], [luajit], + [ + with_liblua="yes" + ], + [with_liblua="no (pkg-config cannot find libluajit)"] + ) + ] ) ] )