From b2829b1a1af453e9ffec41e90fb8e5dbefdfd56b Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Fri, 27 Mar 2009 12:26:14 +0000 Subject: [PATCH] Added support for finding lua without pkg-config. --- scons/lua.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scons/lua.py b/scons/lua.py index 8274e82d2b2..0ff018399e8 100644 --- a/scons/lua.py +++ b/scons/lua.py @@ -1,5 +1,8 @@ # vi: syntax=python:et:ts=4 from pkgconfig import run_pkg_config +from config_check_utils import find_include + +from os.path import join def CheckLua(context, require_version): env = context.env @@ -14,6 +17,13 @@ def CheckLua(context, require_version): found = True else: found = run_pkg_config(env, "lua >= " + require_version) or run_pkg_config(env, "lua" + version + " >= " + require_version) + if not found: + try: + prefix, include = find_include([env["prefix"]], "lualib.h", "", not env["host"])[0] + found = True + env.Append(LIBPATH = [join(prefix, "lib")], CPPPATH = [join(prefix, "include")], LIBS = ["lua"]) + except IndexError: + pass result = found and context.TryLink(""" #include