Reworked the prior change to preserve cross-OS default behavior by restoring with-lua default to luajit (instead of auto), so downstream builds that rely on historical defaults are not surprised.

Kept Lua fallback probing logic, but now it applies to both with-lua=auto and the default with-lua=luajit: Meson tries luajit, then lua-5.4, lua5.4, lua-5.3, lua5.3, and lua; if none are present it warns and disables the Lua plugin instead of hard-failing configure.

Updated the Lua plugin dependency selection so plugins/lua/meson.build consumes the pre-resolved fallback dependency for both auto and luajit paths, while keeping explicit custom pkg-config names unchanged.
This commit is contained in:
2026-02-18 12:46:59 -07:00
parent bf24249001
commit 2c4da1ff5e

View File

@@ -22,7 +22,31 @@ if get_option('with-fishlim')
subdir('fishlim')
endif
if get_option('with-lua') != 'false'
lua_option = get_option('with-lua')
if lua_option == 'auto' or lua_option == 'luajit'
lua_auto_dep = dependency('luajit', required: false)
if not lua_auto_dep.found()
lua_auto_dep = dependency('lua-5.4', required: false)
endif
if not lua_auto_dep.found()
lua_auto_dep = dependency('lua5.4', required: false)
endif
if not lua_auto_dep.found()
lua_auto_dep = dependency('lua-5.3', required: false)
endif
if not lua_auto_dep.found()
lua_auto_dep = dependency('lua5.3', required: false)
endif
if not lua_auto_dep.found()
lua_auto_dep = dependency('lua', required: false)
endif
if lua_auto_dep.found()
subdir('lua')
else
warning('LuaJIT/Lua development files not found, disabling Lua plugin')
endif
elif lua_option != 'false'
subdir('lua')
endif