If statically linking, check static libs for -mt

This commit is contained in:
Kenneth Heafield 2013-01-04 21:02:13 +00:00
parent c8448ded97
commit 3203f7c92d

View File

@ -95,8 +95,7 @@ if $(with-macports) {
boost-search = <search>$(with-macports)/lib ;
I-boost-include = -I$(with-macports)/include ;
boost-include = <include>$(with-macports)/include ;
}
else {
} else {
with-boost = [ option.get "with-boost" ] ;
with-boost ?= [ os.environ "BOOST_ROOT" ] ;
if $(with-boost) {
@ -117,7 +116,11 @@ rule boost-lib ( name macro : deps * ) {
#Link multi-threaded programs against the -mt version if available. Old
#versions of boost do not have -mt tagged versions of all libraries. Sadly,
#boost.jam does not handle this correctly.
if [ test_flags $(L-boost-search)" -lboost_"$(name)"-mt$(boost-lib-version)" ] {
flags = $(L-boost-search)" -lboost_"$(name)"-mt$(boost-lib-version)" ;
if $(boost-auto-shared) != "<link>shared" {
flags += " -static" ;
}
if [ test_flags $(flags) ] {
lib inner_boost_$(name) : : <threading>single $(boost-search) <name>boost_$(name)$(boost-lib-version) : : <library>$(deps) ;
lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt$(boost-lib-version) : : <library>$(deps) ;
} else {