]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/config/auto_link.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
a14f2650fb49602a7320b17773bcf4f6e9eb9a38
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / config / auto_link.hpp
1 //  (C) Copyright John Maddock 2003.\r
2 //  Use, modification and distribution are subject to the\r
3 //  Boost Software License, Version 1.0. (See accompanying file\r
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
5 \r
6  /*\r
7   *   LOCATION:    see http://www.boost.org for most recent version.\r
8   *   FILE         auto_link.hpp\r
9   *   VERSION      see <boost/version.hpp>\r
10   *   DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.\r
11   */\r
12 \r
13 /*************************************************************************\r
14 \r
15 USAGE:\r
16 ~~~~~~\r
17 \r
18 Before including this header you must define one or more of define the following macros:\r
19 \r
20 BOOST_LIB_NAME:           Required: A string containing the basename of the library,\r
21                           for example boost_regex.\r
22 BOOST_LIB_TOOLSET:        Optional: the base name of the toolset.\r
23 BOOST_DYN_LINK:           Optional: when set link to dll rather than static library.\r
24 BOOST_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name\r
25                           of the library selected (useful for debugging).\r
26 BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,\r
27                           rather than a mangled-name version.\r
28 \r
29 These macros will be undef'ed at the end of the header, further this header\r
30 has no include guards - so be sure to include it only once from your library!\r
31 \r
32 Algorithm:\r
33 ~~~~~~~~~~\r
34 \r
35 Libraries for Borland and Microsoft compilers are automatically\r
36 selected here, the name of the lib is selected according to the following\r
37 formula:\r
38 \r
39 BOOST_LIB_PREFIX\r
40    + BOOST_LIB_NAME\r
41    + "_"\r
42    + BOOST_LIB_TOOLSET\r
43    + BOOST_LIB_THREAD_OPT\r
44    + BOOST_LIB_RT_OPT\r
45    "-"\r
46    + BOOST_LIB_VERSION\r
47 \r
48 These are defined as:\r
49 \r
50 BOOST_LIB_PREFIX:     "lib" for static libraries otherwise "".\r
51 \r
52 BOOST_LIB_NAME:       The base name of the lib ( for example boost_regex).\r
53 \r
54 BOOST_LIB_TOOLSET:    The compiler toolset name (vc6, vc7, bcb5 etc).\r
55 \r
56 BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.\r
57 \r
58 BOOST_LIB_RT_OPT:     A suffix that indicates the runtime library used,\r
59                       contains one or more of the following letters after\r
60                       a hiphen:\r
61 \r
62                       s      static runtime (dynamic if not present).\r
63                       d      debug build (release if not present).\r
64                       g      debug/diagnostic runtime (release if not present).\r
65                       p      STLPort Build.\r
66 \r
67 BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.\r
68 \r
69 \r
70 ***************************************************************************/\r
71 \r
72 #ifdef __cplusplus\r
73 #  ifndef BOOST_CONFIG_HPP\r
74 #     include <boost/config.hpp>\r
75 #  endif\r
76 #elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)\r
77 //\r
78 // C language compatability (no, honestly)\r
79 //\r
80 #  define BOOST_MSVC _MSC_VER\r
81 #  define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)\r
82 #  define BOOST_DO_STRINGIZE(X) #X\r
83 #endif\r
84 //\r
85 // Only include what follows for known and supported compilers:\r
86 //\r
87 #if defined(BOOST_MSVC) \\r
88     || defined(__BORLANDC__) \\r
89     || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \\r
90     || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))\r
91 \r
92 #ifndef BOOST_VERSION_HPP\r
93 #  include <boost/version.hpp>\r
94 #endif\r
95 \r
96 #ifndef BOOST_LIB_NAME\r
97 #  error "Macro BOOST_LIB_NAME not set (internal error)"\r
98 #endif\r
99 \r
100 //\r
101 // error check:\r
102 //\r
103 #if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)\r
104 #  pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")\r
105 #  pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")\r
106 #  error "Incompatible build options"\r
107 #endif\r
108 //\r
109 // select toolset if not defined already:\r
110 //\r
111 #ifndef BOOST_LIB_TOOLSET\r
112 // Note: no compilers before 1200 are supported\r
113 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)\r
114 \r
115 #  ifdef UNDER_CE\r
116      // vc6:\r
117 #    define BOOST_LIB_TOOLSET "evc4"\r
118 #  else\r
119      // vc6:\r
120 #    define BOOST_LIB_TOOLSET "vc6"\r
121 #  endif\r
122 \r
123 #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)\r
124 \r
125    // vc7:\r
126 #  define BOOST_LIB_TOOLSET "vc7"\r
127 \r
128 #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)\r
129 \r
130    // vc71:\r
131 #  define BOOST_LIB_TOOLSET "vc71"\r
132 \r
133 #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)\r
134 \r
135    // vc80:\r
136 #  define BOOST_LIB_TOOLSET "vc80"\r
137 \r
138 #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)\r
139 \r
140    // vc90:\r
141 #  define BOOST_LIB_TOOLSET "vc90"\r
142 \r
143 #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)\r
144 \r
145    // vc10:\r
146 #  define BOOST_LIB_TOOLSET "vc100"\r
147 \r
148 #elif defined(__BORLANDC__)\r
149 \r
150    // CBuilder 6:\r
151 #  define BOOST_LIB_TOOLSET "bcb"\r
152 \r
153 #elif defined(__ICL)\r
154 \r
155    // Intel C++, no version number:\r
156 #  define BOOST_LIB_TOOLSET "iw"\r
157 \r
158 #elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )\r
159 \r
160    // Metrowerks CodeWarrior 8.x\r
161 #  define BOOST_LIB_TOOLSET "cw8"\r
162 \r
163 #elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )\r
164 \r
165    // Metrowerks CodeWarrior 9.x\r
166 #  define BOOST_LIB_TOOLSET "cw9"\r
167 \r
168 #endif\r
169 #endif // BOOST_LIB_TOOLSET\r
170 \r
171 //\r
172 // select thread opt:\r
173 //\r
174 #if defined(_MT) || defined(__MT__)\r
175 #  define BOOST_LIB_THREAD_OPT "-mt"\r
176 #else\r
177 #  define BOOST_LIB_THREAD_OPT\r
178 #endif\r
179 \r
180 #if defined(_MSC_VER) || defined(__MWERKS__)\r
181 \r
182 #  ifdef _DLL\r
183 \r
184 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))\r
185 \r
186 #        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
187 #            define BOOST_LIB_RT_OPT "-gdp"\r
188 #        elif defined(_DEBUG)\r
189 #            define BOOST_LIB_RT_OPT "-gdp"\r
190 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
191 #            error "Build options aren't compatible with pre-built libraries"\r
192 #        else\r
193 #            define BOOST_LIB_RT_OPT "-p"\r
194 #        endif\r
195 \r
196 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
197 \r
198 #        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
199 #            define BOOST_LIB_RT_OPT "-gdpn"\r
200 #        elif defined(_DEBUG)\r
201 #            define BOOST_LIB_RT_OPT "-gdpn"\r
202 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
203 #            error "Build options aren't compatible with pre-built libraries"\r
204 #        else\r
205 #            define BOOST_LIB_RT_OPT "-pn"\r
206 #        endif\r
207 \r
208 #     else\r
209 \r
210 #        if defined(_DEBUG)\r
211 #            define BOOST_LIB_RT_OPT "-gd"\r
212 #        else\r
213 #            define BOOST_LIB_RT_OPT\r
214 #        endif\r
215 \r
216 #     endif\r
217 \r
218 #  else\r
219 \r
220 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))\r
221 \r
222 #        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
223 #            define BOOST_LIB_RT_OPT "-sgdp"\r
224 #        elif defined(_DEBUG)\r
225 #             define BOOST_LIB_RT_OPT "-sgdp"\r
226 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
227 #            error "Build options aren't compatible with pre-built libraries"\r
228 #        else\r
229 #            define BOOST_LIB_RT_OPT "-sp"\r
230 #        endif\r
231 \r
232 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
233 \r
234 #        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
235 #            define BOOST_LIB_RT_OPT "-sgdpn"\r
236 #        elif defined(_DEBUG)\r
237 #             define BOOST_LIB_RT_OPT "-sgdpn"\r
238 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
239 #            error "Build options aren't compatible with pre-built libraries"\r
240 #        else\r
241 #            define BOOST_LIB_RT_OPT "-spn"\r
242 #        endif\r
243 \r
244 #     else\r
245 \r
246 #        if defined(_DEBUG)\r
247 #             define BOOST_LIB_RT_OPT "-sgd"\r
248 #        else\r
249 #            define BOOST_LIB_RT_OPT "-s"\r
250 #        endif\r
251 \r
252 #     endif\r
253 \r
254 #  endif\r
255 \r
256 #elif defined(__BORLANDC__)\r
257 \r
258 //\r
259 // figure out whether we want the debug builds or not:\r
260 //\r
261 #if __BORLANDC__ > 0x561\r
262 #pragma defineonoption BOOST_BORLAND_DEBUG -v\r
263 #endif\r
264 //\r
265 // sanity check:\r
266 //\r
267 #if defined(__STL_DEBUG) || defined(_STLP_DEBUG)\r
268 #error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"\r
269 #endif\r
270 \r
271 #  ifdef _RTLDLL\r
272 \r
273 #     ifdef BOOST_BORLAND_DEBUG\r
274 #         define BOOST_LIB_RT_OPT "-d"\r
275 #     else\r
276 #         define BOOST_LIB_RT_OPT\r
277 #     endif\r
278 \r
279 #  else\r
280 \r
281 #     ifdef BOOST_BORLAND_DEBUG\r
282 #         define BOOST_LIB_RT_OPT "-sd"\r
283 #     else\r
284 #         define BOOST_LIB_RT_OPT "-s"\r
285 #     endif\r
286 \r
287 #  endif\r
288 \r
289 #endif\r
290 \r
291 //\r
292 // select linkage opt:\r
293 //\r
294 #if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)\r
295 #  define BOOST_LIB_PREFIX\r
296 #elif defined(BOOST_DYN_LINK)\r
297 #  error "Mixing a dll boost library with a static runtime is a really bad idea..."\r
298 #else\r
299 #  define BOOST_LIB_PREFIX "lib"\r
300 #endif\r
301 \r
302 //\r
303 // now include the lib:\r
304 //\r
305 #if defined(BOOST_LIB_NAME) \\r
306       && defined(BOOST_LIB_PREFIX) \\r
307       && defined(BOOST_LIB_TOOLSET) \\r
308       && defined(BOOST_LIB_THREAD_OPT) \\r
309       && defined(BOOST_LIB_RT_OPT) \\r
310       && defined(BOOST_LIB_VERSION)\r
311 \r
312 #ifndef BOOST_AUTO_LINK_NOMANGLE\r
313 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")\r
314 #  ifdef BOOST_LIB_DIAGNOSTIC\r
315 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")\r
316 #  endif\r
317 #else\r
318 #  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")\r
319 #  ifdef BOOST_LIB_DIAGNOSTIC\r
320 #     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")\r
321 #  endif\r
322 #endif\r
323 \r
324 #else\r
325 #  error "some required macros where not defined (internal logic error)."\r
326 #endif\r
327 \r
328 \r
329 #endif // _MSC_VER || __BORLANDC__\r
330 \r
331 //\r
332 // finally undef any macros we may have set:\r
333 //\r
334 #ifdef BOOST_LIB_PREFIX\r
335 #  undef BOOST_LIB_PREFIX\r
336 #endif\r
337 #if defined(BOOST_LIB_NAME)\r
338 #  undef BOOST_LIB_NAME\r
339 #endif\r
340 // Don't undef this one: it can be set by the user and should be the \r
341 // same for all libraries:\r
342 //#if defined(BOOST_LIB_TOOLSET)\r
343 //#  undef BOOST_LIB_TOOLSET\r
344 //#endif\r
345 #if defined(BOOST_LIB_THREAD_OPT)\r
346 #  undef BOOST_LIB_THREAD_OPT\r
347 #endif\r
348 #if defined(BOOST_LIB_RT_OPT)\r
349 #  undef BOOST_LIB_RT_OPT\r
350 #endif\r
351 #if defined(BOOST_LIB_LINK_OPT)\r
352 #  undef BOOST_LIB_LINK_OPT\r
353 #endif\r
354 #if defined(BOOST_LIB_DEBUG_OPT)\r
355 #  undef BOOST_LIB_DEBUG_OPT\r
356 #endif\r
357 #if defined(BOOST_DYN_LINK)\r
358 #  undef BOOST_DYN_LINK\r
359 #endif\r
360 #if defined(BOOST_AUTO_LINK_NOMANGLE)\r
361 #  undef BOOST_AUTO_LINK_NOMANGLE\r
362 #endif\r
363 \r
364 \r
365 \r
366 \r
367 \r
368 \r
369 \r
370 \r
371 \r
372 \r
373 \r