Author: loonycyborg
Date: Fri Mar 27 14:48:45 2009
New Revision: 34184

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34184&view=rev
Log:
Added some diagnostic output to lua and pkg-config checks.

(written to build/config.log)

Modified:
    trunk/scons/lua.py
    trunk/scons/pkgconfig.py

Modified: trunk/scons/lua.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/lua.py?rev=34184&r1=34183&r2=34184&view=diff
==============================================================================
--- trunk/scons/lua.py (original)
+++ trunk/scons/lua.py Fri Mar 27 14:48:45 2009
@@ -16,11 +16,12 @@
         env.Append(LIBPATH = ["$luadir"], CPPPATH = ["$luadir/include"], LIBS 
= "lua" + version)
         found = True
     else:
-        found = run_pkg_config(env, "lua >= " + require_version) or 
run_pkg_config(env, "lua" + version + " >= " + require_version)
+        found = run_pkg_config(context, "lua >= " + 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]
                 found = True
+                context.Log("Found Lua header " + include + ".\n")
                 env.Append(LIBPATH = [join(prefix, "lib")], CPPPATH = 
[join(prefix, "include")], LIBS = ["lua"])
             except IndexError:
                 pass

Modified: trunk/scons/pkgconfig.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/pkgconfig.py?rev=34184&r1=34183&r2=34184&view=diff
==============================================================================
--- trunk/scons/pkgconfig.py (original)
+++ trunk/scons/pkgconfig.py Fri Mar 27 14:48:45 2009
@@ -2,18 +2,21 @@
 
 import os
 
-def run_pkg_config(env, name):
+def run_pkg_config(context, name):
+    env = context.env
     try:
         env["ENV"]["PKG_CONFIG_PATH"] = os.environ.get("PKG_CONFIG_PATH")
         env.ParseConfig("pkg-config --libs --cflags --silence-errors 
$PKGCONFIG_FLAGS \"" + name + "\"")
+        context.Log("Found '" + name + "' with pkg-config.\n")
         return True
     except OSError:
+        context.Log("Failed to find '" + name + "' with pkg-config.\n")
         return False
 
 def CheckPKG(context, name):
     env = context.env
     context.Message( 'Checking for %s... ' % name )
-    if run_pkg_config(env, name):
+    if run_pkg_config(context, name):
         context.Result("yes")
         return True
     else:


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to