Author: loonycyborg
Date: Fri Mar 27 13:26:14 2009
New Revision: 34182
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34182&view=rev
Log:
Added support for finding lua without pkg-config.
Modified:
trunk/scons/lua.py
Modified: trunk/scons/lua.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/lua.py?rev=34182&r1=34181&r2=34182&view=diff
==============================================================================
--- trunk/scons/lua.py (original)
+++ trunk/scons/lua.py Fri Mar 27 13:26:14 2009
@@ -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 @@
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 <lualib.h>
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits