$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r55685 - trunk/libs/regex/build
From: ghost_at_[hidden]
Date: 2009-08-20 08:05:55
Author: vladimir_prus
Date: 2009-08-20 08:05:55 EDT (Thu, 20 Aug 2009)
New Revision: 55685
URL: http://svn.boost.org/trac/boost/changeset/55685
Log:
Force shared runtime if using ICU.
Text files modified: 
   trunk/libs/regex/build/Jamfile.v2 |    30 ++++++++++++++++++++++++++++++          
   1 files changed, 30 insertions(+), 0 deletions(-)
Modified: trunk/libs/regex/build/Jamfile.v2
==============================================================================
--- trunk/libs/regex/build/Jamfile.v2	(original)
+++ trunk/libs/regex/build/Jamfile.v2	2009-08-20 08:05:55 EDT (Thu, 20 Aug 2009)
@@ -221,17 +221,20 @@
       {
          lib icucore : : <name>$(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE = icucore ;
+         explicit icucore ;
       }
       if $(gICU_IN_LIB)
       {
          lib icuin : : <name>$(gICU_IN_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE += icuin ;
+         explicit icuin ;
       }
 #Added by Tommy Nordgren libicudata must be linked against on Mac OS X
       if $(gICU_DATA_LIB)
       {
          lib icudata : : <name>$(gICU_DATA_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE += icudata ;
+         explicit icudata ; 
       }
 #End of addition by Tommy Nordgren
    }
@@ -267,9 +270,36 @@
              <toolset>gcc-mingw:<link>static
              <toolset>gcc-cygwin:<link>static
              $(BOOST_REGEX_ICU_OPTS)
+             <conditional>@force-shared-linking
     ;
 
+shared-linking-warning-emitted = ;
+
+# The ICU is shipped as shared libraries with dynamic runtime.
+# If Boost.Regex is built against static runtime, the combination
+# will not work. The below rule forces shared runtime, and
+# prints an explanation.
+rule force-shared-linking ( properties * )
+{
+    if $(gHAS_ICU)
+    {
+        if <runtime-link>static in $(properties)
+        {
+            if ! $(shared-linking-warning-emitted)
+            {
+                shared-linking-warning-emitted = 1 ;
+                ECHO "warning: forcing runtime-link=shared for Boost.Regex" ;
+                ECHO "warning: this is required when using the ICU library" ;
+            }
+        }        
+        return <runtime-link>shared ;
+    }    
+}
+
+
+
 alias icu_options : $(ICU_EXTRA_SOURCE) : : : $(BOOST_REGEX_ICU_OPTS) ;
+explicit icu_options ;
 
 boost-install boost_regex ;