From 929d99f80c7913677195e69235d99c0e954cf07d Mon Sep 17 00:00:00 2001 From: Savely Skresanov Date: Sat, 4 Aug 2012 18:39:08 +0700 Subject: [PATCH] Autodetect lua5.1 (not sure how to detect lua-5.1 or just lua) --- SConscript | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SConscript b/SConscript index 7b15a24ab..397fae001 100644 --- a/SConscript +++ b/SConscript @@ -77,12 +77,15 @@ except: env.Append(CPPPATH=GetOption("sdl-dir")) #Find correct lua include dir -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")) +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")) #Check for FFT lib if not conf.CheckLib('fftw3f') and not conf.CheckLib('fftw3f-3'):