mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-29 12:40:01 +01:00
run curl-config on linux; remove hacks for detecting old mac compiler
This commit is contained in:
parent
4734c6e419
commit
ad712272a3
16
SConscript
16
SConscript
@ -104,10 +104,8 @@ else:
|
||||
env = Environment(tools=['default'], ENV=os.environ)
|
||||
|
||||
#attempt to automatically find cross compiler
|
||||
if not tool and compilePlatform == "Linux" and compilePlatform != platform:
|
||||
if platform == "Darwin":
|
||||
crossList = ["i686-apple-darwin9", "i686-apple-darwin10"]
|
||||
elif not GetOption('64bit'):
|
||||
if not tool and compilePlatform == "Linux" and platform == "Windows" and compilePlatform != platform:
|
||||
if not GetOption('64bit'):
|
||||
crossList = ["mingw32", "i686-w64-mingw32", "i386-mingw32msvc", "i486-mingw32msvc", "i586-mingw32msvc", "i686-mingw32msvc"]
|
||||
else:
|
||||
crossList = ["x86_64-w64-mingw32", "amd64-mingw32msvc"]
|
||||
@ -129,10 +127,6 @@ if tool:
|
||||
env['STRIP'] = tool+'strip'
|
||||
if os.path.isdir("/usr/{0}/bin".format(tool[:-1])):
|
||||
env['ENV']['PATH'] = "/usr/{0}/bin:{1}".format(tool[:-1], os.environ['PATH'])
|
||||
if platform == "Darwin":
|
||||
sdlconfigpath = "/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/bin"
|
||||
if os.path.isdir(sdlconfigpath):
|
||||
env['ENV']['PATH'] = "{0}:{1}".format(sdlconfigpath, env['ENV']['PATH'])
|
||||
|
||||
#copy environment variables because scons doesn't do this by default
|
||||
for var in ["CC","CXX","LD","LIBPATH","STRIP"]:
|
||||
@ -336,6 +330,12 @@ def findLibs(env, conf):
|
||||
if not conf.CheckLib(['curl', 'libcurl']):
|
||||
FatalError("libcurl not found or not installed")
|
||||
|
||||
if platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD":
|
||||
if GetOption('static'):
|
||||
env.ParseConfig("curl-config --static-libs")
|
||||
else:
|
||||
env.ParseConfig("curl-config --libs")
|
||||
|
||||
#Look for pthreads
|
||||
if not conf.CheckLib(['pthread', 'pthreadVC2']):
|
||||
FatalError("pthreads development library not found or not installed")
|
||||
|
Loading…
x
Reference in New Issue
Block a user