From 9ba08768a45176f828185281a09c831193fe968f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 25 Sep 2012 17:52:43 +0100 Subject: [PATCH] Don't check for libs that are frameworks under OS X --- SConscript | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/SConscript b/SConscript index a16a7c88e..83179f6b4 100644 --- a/SConscript +++ b/SConscript @@ -68,33 +68,36 @@ if GetOption("toolprefix"): #Check for headers and libraries conf = Configure(env) -try: - env.ParseConfig('sdl-config --cflags') - env.ParseConfig('sdl-config --libs') -except: - conf.CheckLib("SDL") - if(GetOption("sdl-dir")): - if not conf.CheckCHeader(GetOption("sdl-dir") + '/SDL.h'): - print "sdl headers not found or not installed" - raise SystemExit(1) - else: - env.Append(CPPPATH=GetOption("sdl-dir")) +if not GetOption("macosx"): + try: + env.ParseConfig('sdl-config --cflags') + env.ParseConfig('sdl-config --libs') + except: + conf.CheckLib("SDL") + if(GetOption("sdl-dir")): + if not conf.CheckCHeader(GetOption("sdl-dir") + '/SDL.h'): + print "sdl headers not found or not installed" + raise SystemExit(1) + else: + env.Append(CPPPATH=GetOption("sdl-dir")) #Find correct lua include 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")) +if not GetOption("macosx"): + 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'): - print "libfftw3f not found or not installed" - raise SystemExit(1) +if not GetOption("macosx"): + if not conf.CheckLib('fftw3f') and not conf.CheckLib('fftw3f-3'): + print "libfftw3f not found or not installed" + raise SystemExit(1) #Check for Bzip lib if not conf.CheckLib('bz2'):