From 4763671c0e4408d2f87e76252fe3f1a0ee22c681 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 5 Oct 2020 15:36:18 +0900 Subject: [PATCH] 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 --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)"] + ) + ] ) ] ) -- 2.47.2