Improved lua detection to work on FreeBSD7...

...(which uses lua-5.1.pc) Now scons can compile trunk on FreeBSD7
without any os-specific patches.
This commit is contained in:
Iurii Chernyi 2009-04-25 15:47:25 +00:00
parent 5e3d5fce29
commit af320fc046

View file

@ -16,7 +16,7 @@ def CheckLua(context, require_version):
env.Append(LIBPATH = ["$luadir"], CPPPATH = ["$luadir/include"], LIBS = "lua" + version)
found = True
else:
found = run_pkg_config(context, "lua >= " + require_version) or run_pkg_config(context, "lua" + version + " >= " + require_version)
found = run_pkg_config(context, "lua >= " + require_version) or run_pkg_config(context, "lua" + version + " >= " + require_version) or run_pkg_config(context, "lua-" + version + " >= " + require_version)
if not found:
try:
prefix, include = find_include([env["prefix"]], "lualib.h", "", not env["host"])[0]