Skip to content

Commit

Permalink
run curl-config on linux; remove hacks for detecting old mac compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Mar 20, 2019
1 parent 4734c6e commit ad71227
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions SConscript
Expand Up @@ -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"]
Expand All @@ -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"]:
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit ad71227

Please sign in to comment.