mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 14:34:13 +00:00

scons/lua.py makes use of the vestigial luadir option from commit e94dcecf171. Like FindLua.cmake, scons/lua.py searches for the Lua headers and library, instead of using pkg-config like the old scons/lua.py (removed in commit 9929d3ca1cf) did, because even though distributions typically provide .pc files for Lua, upstream Lua doesn't. It's likely that all distributions that compile Lua as a C++ library will also provide .pc files, but this check doesn't rely on that (just as the CMake module doesn't). Unfortunately, SCons.Conftest.CheckLib() prints up to eight messages like "Checking for C++ library lua54-c++... no" until a working library name is found. Also conditionally include system Lua headers in src/lua/*.h and update documentation in src/modules/lua_README.md, src/wesnoth_lua_config.h, and src/wesnoth_lua_config.md. The two lines about "The primary commit, after replacing the sources," in src/wesnoth_lua_config.md don't make sense since the instructions were updated for submodule Lua in commit d32cfb88c4f and make even less sense now with preceding commits for updating CMake modules.