diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 7eab6fda..4cfaa478 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -24,6 +24,7 @@ rule check-icu-config ( ) gHAS_ICU = true ; gICU_CORE_LIB = icuuc ; gICU_IN_LIB = icui18n ; + gICU_DATA_LIB = icudata ; gICU_CONFIG_CHECKED = true ; } else if $(ICU_PATH) @@ -53,17 +54,10 @@ rule check-icu-config ( ) { gICU_CORE_LIB = icuuc ; } - else if [ GLOB $(dir)/lib : libicuuc.* ] - { - gICU_CORE_LIB = icuuc ; - } - else if [ GLOB $(ICU_PATH)/lib : cygicuuc.dll ] + else if [ GLOB $(ICU_PATH)/lib : cygicuuc*.dll ] { gICU_CORE_LIB = cygicuuc.dll ; - } - else if [ GLOB $(ICU_PATH)/lib : cygicuuc32.dll ] - { - gICU_CORE_LIB = cygicuuc32.dll ; + gICU_CYGWIN = true ; } else { @@ -92,13 +86,10 @@ rule check-icu-config ( ) { gICU_IN_LIB = icui18n ; } - else if [ GLOB $(ICU_PATH)/lib : cygicuin.dll ] + else if [ GLOB $(ICU_PATH)/lib : cygicuin*.dll ] { gICU_IN_LIB = cygicuin.dll ; - } - else if [ GLOB $(ICU_PATH)/lib : cygicuin32.dll ] - { - gICU_IN_LIB = cygicuin32.dll ; + gICU_CYGWIN = true ; } else { @@ -109,8 +100,42 @@ rule check-icu-config ( ) ECHO Defaulting to look for libicui18n ... ; gICU_IN_LIB = icui18n ; } +#Added by Tommy Nordgren - libicudata muct be linked against on Mac OS X + if $(ICU_LINK) + { + # nothing to do, it's already been done! + # gICU_LIBS += $(ICU_LINK) ; + } + else if [ GLOB $(dir)/lib64 : icudt.* ] + { + gICU_DATA_LIB = icudt ; + } + else if [ GLOB $(dir)/lib : icudt.* ] + { + gICU_DATA_LIB = icudt ; + } + else if [ GLOB $(dir)/lib : libicudata.* ] + { + gICU_DATA_LIB = icudata ; + } + else if [ GLOB $(ICU_PATH)/lib : cygicudt*.dll ] + { + gICU_DATA_LIB = cygicudt.dll ; + gICU_CYGWIN = true ; + } + else + { + ECHO WARNING: ICU shared data library not found in path. ; + ECHO HINT: If the regex library fails to link then try again ; + ECHO with the environment variable ICU_LINK set to contain ; + ECHO the linker options required to link to ICU. ; + ECHO Defaulting to look for libicudata ... ; + gICU_DATA_LIB = icudata ; + } +#End of addition by Tommy Nordgren } } + gICU_CONFIG_CHECKED = true ; } @@ -143,15 +168,36 @@ if [ check-icu-config ] } } - if $(gICU_CORE_LIB) + if $(gICU_CYGWIN) { - lib icucore : : $(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) ; - ICU_EXTRA_SOURCE = icucore ; + if $(gICU_CORE_LIB) + { + BOOST_REGEX_ICU_OPTS += "$(gICU_CORE_LIB) ; + } + if $(gICU_IN_LIB) + { + BOOST_REGEX_ICU_OPTS += "$(gICU_IN_LIB) ; + } } - if $(gICU_IN_LIB) + else { - lib icuin : : $(gICU_IN_LIB) $(ICU_SEARCH_OPTS) ; - ICU_EXTRA_SOURCE += icuin ; + if $(gICU_CORE_LIB) + { + lib icucore : : $(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) ; + ICU_EXTRA_SOURCE = icucore ; + } + if $(gICU_IN_LIB) + { + lib icuin : : $(gICU_IN_LIB) $(ICU_SEARCH_OPTS) ; + ICU_EXTRA_SOURCE += icuin ; + } +#Added by Tommy Nordgren libicudata must be linked against on Mac OS X + if $(gICU_DATA_LIB) + { + lib icudata : : $(gICU_DATA_LIB) $(ICU_SEARCH_OPTS) ; + ICU_EXTRA_SOURCE += icudata ; + } +#End of addition by Tommy Nordgren } } @@ -193,3 +239,7 @@ lib boost_regex : ../src/$(SOURCES) $(ICU_EXTRA_SOURCE) + + + + diff --git a/include/boost/regex/v4/match_flags.hpp b/include/boost/regex/v4/match_flags.hpp index a86fe461..9585aca8 100644 --- a/include/boost/regex/v4/match_flags.hpp +++ b/include/boost/regex/v4/match_flags.hpp @@ -23,8 +23,6 @@ # include #endif -#include - #ifdef __cplusplus namespace boost{ namespace regex_constants{ @@ -73,7 +71,7 @@ typedef enum _match_flags } match_flags; -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__) typedef unsigned long match_flag_type; #else typedef match_flags match_flag_type;