Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/regex/build/Jamfile.v2 @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

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