Skip to content

feat: add recognition of Lua5.5 if available#3527

Open
airween wants to merge 1 commit intoowasp-modsecurity:v2/masterfrom
airween:v2/lua55
Open

feat: add recognition of Lua5.5 if available#3527
airween wants to merge 1 commit intoowasp-modsecurity:v2/masterfrom
airween:v2/lua55

Conversation

@airween
Copy link
Copy Markdown
Member

@airween airween commented Mar 28, 2026

what

Add Lua 5.5 version to build/find_lua.m4 script.

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.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants