feat: add recognition of Lua5.5 if available#3527
feat: add recognition of Lua5.5 if available#3527airween wants to merge 1 commit intoowasp-modsecurity:v2/masterfrom
Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates the Autoconf Lua detection macro to recognize Lua 5.5 via pkg-config and to prefer the highest installed Lua version when multiple versions are present.
Changes:
- Add Lua 5.5 pkg-config module name variants to the detection list.
- Reorder the Lua pkg-config module names so newer versions are selected first.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| LUA_LDFLAGS="" | ||
| LUA_CONFIG=${PKG_CONFIG} | ||
| LUA_PKGNAMES="lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua lua5.2 lua-5.2 lua_5.2 lua-52 lua_52 lua52 lua5.3 lua-5.3 lua_5.3 lua-53 lua_53 lua53 " | ||
| LUA_PKGNAMES="lua5.5 lua-5.5 lua_5.5 lua-55 lua_55 lua55 lua5.4 lua-5.4 lua_5.4 lua-54 lua_54 lua54 lua5.3 lua-5.3 lua_5.3 lua-53 lua_53 lua53 lua5.2 lua-5.2 lua_5.2 lua-52 lua_52 lua52 lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua" |
There was a problem hiding this comment.
Adding lua5.5 to LUA_PKGNAMES improves the pkg-config detection path, but the non-pkg-config fallback later in this macro still only probes for liblua5.1/liblua51/liblua. On systems that ship only versioned Lua libraries (e.g., liblua5.5) without a corresponding pkg-config module, configure will still fail to detect Lua despite this update. Consider extending the fallback library probe list to include 5.2–5.5 (or deriving the library names from LUA_PKGNAMES) so the “Lua 5.5 if available” goal is met even when pkg-config metadata is missing.
There was a problem hiding this comment.
@copilot apply changes based on this feedback



what
Add Lua 5.5 version to
build/find_lua.m4script.why
This helps to recognize Lua 5.5 if it's available.
The code didn't need to align as in #3525 for v3.
Note, that I installed Lua5.5, built the source with it and run all regression tests - everything was perfect. GH workflow for Windows also uses Lua 5.5.
notes
I changed the order of the versions because the script recognized the installed Lua versions from the lower version to the highest ones. Now the highest version will be used.