]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
lua: add fallback to detect LuaJIT 3778/head
authorKentaro Hayashi <hayashi@clear-code.com>
Mon, 5 Oct 2020 06:36:18 +0000 (15:36 +0900)
committerKentaro Hayashi <hayashi@clear-code.com>
Sat, 23 Dec 2023 14:57:35 +0000 (23:57 +0900)
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 <hayashi@clear-code.com>
configure.ac

index 96e196e843001bcd70d6955de9b3eb1e04a387a6..2a8c76c5c60a4d3d48a96ca4c0234c37dfc6e682 100644 (file)
@@ -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)"]
+                                         )
+                                       ]
                                       )
                                     ]
                                   )