diff options
Diffstat (limited to 'SConscript')
| -rwxr-xr-x | SConscript | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -135,12 +135,12 @@ if((not GetOption('lin')) and (not GetOption('win')) and (not GetOption('rpi')) # if the platform is windows switch to a mingw toolset, use the default otherwise if(GetOption('win')): - env = Environment(tools = ['mingw']) + env = Environment(tools = ['mingw'], ENV = os.environ) else: - env = Environment(tools = ['default']) + env = Environment(tools = ['default'], ENV = os.environ) if(GetOption("copy_env")): - lstvar=["CC","CXX","LD","CFLAGS"] + lstvar=["CC","CXX","LD","CFLAGS","LIBPATH"] print "WARNING: enviroment copying enabled. changes in the enviroment can easily break the build process." for var in lstvar: if var in os.environ: @@ -176,19 +176,20 @@ if not GetOption("macosx"): raise SystemExit(1) -# if lua is enabled try to parse the lua pgk-config, if that fails try the lua-dir option -# .. : TODO: make this look the same as the SDL check, maybe make a function for it. keep it DRY. +# if lua is enabled try to parse the lua pgk-config, or the lua-dir option if given - 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: try: env.ParseConfig('pkg-config --cflags lua5.1') except: - 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")]) + print "lua5.1 headers not found or not installed" + raise SystemExit(1) # if fft is enabled try to parse its config, fail otherwise. |
