1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
project boost/regex
: source-location ../src
;
#
# ICU configuration:
#
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
rule check-icu-config ( )
{
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
if ! $(gICU_CONFIG_CHECKED)
{
if $(ICU_PATH)
{
dir = $(ICU_PATH) ;
}
if [ GLOB $(dir)/include/unicode : utypes.h ]
{
ECHO Building Boost.Regex with Unicode/ICU support enabled ;
ECHO Using ICU in $(ICU_PATH:J=" ")/include ;
gHAS_ICU = true ;
# try and find ICU libraries, look for NT versions first:
if [ GLOB $(dir)/lib : icuuc.* ]
{
gICU_CORE_LIB = icuuc ;
}
else if [ GLOB $(dir)/lib : libicuuc.* ]
{
gICU_CORE_LIB = icuuc ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuuc.dll ]
{
gICU_CORE_LIB = cygicuuc.dll ;
}
else
{
ECHO ICU shared common library not found. ;
}
if [ GLOB $(dir)/lib : icuin.* ]
{
gICU_IN_LIB = icuin ;
}
else if [ GLOB $(dir)/lib : libicui18n.* ]
{
gICU_IN_LIB = icui18n ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuin.dll ]
{
gICU_IN_LIB = cygicuin.dll ;
}
else
{
ECHO ICU shared i18n library not found. ;
}
}
else
{
ECHO Building Boost.Regex with the optional Unicode/ICU support disabled. ;
ECHO Please refer to the Boost.Regex documentation for more information ;
ECHO (and if you don't know what ICU is then you probably don't need it). ;
if $(ICU_PATH)
{
ECHO Couldn't find utypes.h in $(ICU_PATH:J=" ")$(SLASH)include$(SLASH)unicode ;
}
}
gICU_CONFIG_CHECKED = true ;
}
if $(gHAS_ICU)
{
return true ;
}
}
if [ check-icu-config ]
{
BOOST_REGEX_ICU_OPTS = "<define>BOOST_HAS_ICU=1" ;
if ($(ICU_PATH) != /usr) && ($(ICU_PATH) != /usr/local)
{
ICU_SEARCH_OPTS = <search>/$(ICU_PATH)/lib ;
}
if $(gICU_CORE_LIB)
{
lib icucore : : <name>$(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) ;
ICU_EXTRA_SOURCE = icucore ;
}
if $(gICU_IN_LIB)
{
lib icuin : : <name>$(gICU_IN_LIB) $(ICU_SEARCH_OPTS) ;
ICU_EXTRA_SOURCE += icuin ;
}
if $(ICU_PATH)
{
if ($(ICU_PATH) != /usr) && ($(ICU_PATH) != /usr/local)
{
BOOST_REGEX_ICU_OPTS += "<include>$(ICU_PATH)/include" ;
}
}
}
SOURCES =
c_regex_traits.cpp
cpp_regex_traits.cpp
cregex.cpp
fileiter.cpp
icu.cpp
instances.cpp
posix_api.cpp
regex.cpp
regex_debug.cpp
regex_raw_buffer.cpp
regex_traits_defaults.cpp
static_mutex.cpp
w32_regex_traits.cpp
wc_regex_traits.cpp
wide_posix_api.cpp
winstances.cpp
usinstances.cpp ;
lib boost_regex : ../src/$(SOURCES) $(ICU_EXTRA_SOURCE)
:
#<link>static:<define>BOOST_REGEX_NO_LIB=1
#<link>static:<define>BOOST_REGEX_STATIC_LINK=1
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
$(BOOST_REGEX_ICU_OPTS)
;
|