diff options
-rw-r--r-- | jam-files/sanity.jam | 20 | ||||
-rw-r--r-- | util/Jamfile | 4 |
2 files changed, 14 insertions, 10 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam index ab126c9fb..e15bfb2b7 100644 --- a/jam-files/sanity.jam +++ b/jam-files/sanity.jam @@ -46,8 +46,19 @@ rule test_header ( name ) { return [ test_flags "-include $(name)" ] ; } +requirements = ; + +FORCE-STATIC = [ option.get "static" : : "yes" ] ; +if $(FORCE-STATIC) { + requirements += <link>static <runtime-link>static ; +} + rule test_library ( name ) { - return [ test_flags "-l$(name)" ] ; + if $(FORCE-STATIC) { + return [ test_flags "-l$(name) -static" ] ; + } else { + return [ test_flags "-l$(name)" ] ; + } } { @@ -59,13 +70,6 @@ rule test_library ( name ) { constant CLEANING : $(cleaning) ; } -requirements = ; - -FORCE-STATIC = [ option.get "static" : : "yes" ] ; -if $(FORCE-STATIC) { - requirements += <link>static <runtime-link>static ; -} - #Determine if a library can be compiled statically. rule auto-shared ( name : additional * ) { additional ?= "" ; diff --git a/util/Jamfile b/util/Jamfile index 202c376ad..0d271d307 100644 --- a/util/Jamfile +++ b/util/Jamfile @@ -1,11 +1,11 @@ local compressed_flags = <include>.. <define>HAVE_ZLIB ; local compressed_deps = /top//z ; -if [ test_flags "-lbz2" ] { +if [ test_library "bz2" ] { external-lib bz2 ; compressed_flags += <define>HAVE_BZLIB ; compressed_deps += bz2 ; } -if [ test_flags "-llzma" ] { +if [ test_library "lzma" ] { external-lib lzma ; compressed_flags += <define>HAVE_XZLIB ; compressed_deps += lzma ; |