summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-12 16:35:31 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-12 16:39:29 (GMT)
commit40499c9dffdc1ac676f66ae51ba42513a726f1cb (patch)
tree168b79e9c4868308830365bdbd4ab165a43d82ed /BuildTools/SCons
parent710cf2f8f1941fa8beb9f7d92e3de03fee9265e3 (diff)
downloadswift-40499c9dffdc1ac676f66ae51ba42513a726f1cb.zip
swift-40499c9dffdc1ac676f66ae51ba42513a726f1cb.tar.bz2
Fix Boost detection in Ubuntu 9.10.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConstruct12
1 files changed, 10 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 3a41be4..c3ad8d1 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -267,16 +267,24 @@ else :
# Boost
boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")]
allLibsPresent = True
+libNames = []
for (lib, header) in boostLibs :
if header :
header = "boost/" + header
else :
header = "boost/" + lib + ".hpp"
- if not conf.CheckCXXHeader(header) or not conf.CheckLib("boost_" + lib) :
+ if not conf.CheckCXXHeader(header) :
allLibsPresent = False
break
+ libName = "boost_" + lib
+ if not conf.CheckLib(libName) :
+ libName += "-mt"
+ if not conf.CheckLib(libName) :
+ allLibsPresent = False
+ break
+ libNames.append(libName)
if allLibsPresent :
- env["BOOST_FLAGS"] = { "LIBS": ["boost_" + lib for lib, header in boostLibs] }
+ env["BOOST_FLAGS"] = { "LIBS": libNames }
if not conf.CheckCXXHeader("boost/uuid/uuid.hpp") :
# FIXME: Remove this workaround when UUID is available in most distros
env["BOOST_BUNDLED_UUID_ONLY"] = True