From ee7435001f2e08397d065de52e2e061beb2c9ca6 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 8 Dec 2013 13:15:19 -0500 Subject: [PATCH] fix lua related compiling errors on windows --- SConscript | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/SConscript b/SConscript index 2a1b014cb..6be7c5802 100755 --- a/SConscript +++ b/SConscript @@ -177,19 +177,22 @@ if not GetOption("macosx"): # if lua is enabled try to parse the lua pgk-config, or the lua-dir option if given - - if(GetOption("lua-dir")): - if not conf.CheckCHeader(GetOption("lua-dir") + '/lua.h'): - print "lua5.1 headers not found or not installed" - raise SystemExit(1) + + if not GetOption("nolua"): + if(GetOption("lua-dir")): + if not conf.CheckCHeader(GetOption("lua-dir") + '/lua.h'): + print "lua5.1 headers not found or not installed" + raise SystemExit(1) + else: + env.Append(CPPPATH=[GetOption("lua-dir")]) else: - env.Append(CPPPATH=[GetOption("lua-dir")]) - else: - try: - env.ParseConfig('pkg-config --cflags lua5.1') - except: - print "lua5.1 headers not found or not installed" - raise SystemExit(1) + try: + env.ParseConfig('pkg-config --cflags lua5.1') + except: + #Check for Lua lib + if not conf.CheckLib('lua5.1') and not conf.CheckLib('lua-5.1') and not conf.CheckLib('lua51') and not conf.CheckLib('lua'): + print "liblua5.1 not found or not installed" + raise SystemExit(1) # if fft is enabled try to parse its config, fail otherwise. @@ -215,12 +218,6 @@ if not GetOption("macosx"): print "bzip2 headers not found" raise SystemExit(1) - #Check for Lua lib - if not GetOption("nolua"): - if not conf.CheckLib('lua5.1') and not conf.CheckLib('lua-5.1') and not conf.CheckLib('lua51') and not conf.CheckLib('lua'): - print "liblua not found or not installed" - raise SystemExit(1) - # finish the configuration env = conf.Finish();