3
* Copyright (c) 1998-2002
6
* Permission to use, copy, modify, distribute and sell this software
7
* and its documentation for any purpose is hereby granted without fee,
8
* provided that the above copyright notice appear in all copies and
9
* that both that copyright notice and this permission notice appear
10
* in supporting documentation. Dr John Maddock makes no representations
11
* about the suitability of this software for any purpose.
12
* It is provided "as is" without express or implied warranty.
17
* LOCATION: see http://www.boost.org for most recent version.
18
* FILE regex_libary_include.hpp
19
* VERSION see <boost/version.hpp>
20
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
21
* Note this is an internal header file included
22
* by regex.hpp, do not include on its own.
25
/*************************************************************************
27
Libraries for Borland and Microsoft compilers are automatically
28
selected here, the name of the lib is selected according to the following
35
+ BOOST_LIB_THREAD_OPT
42
BOOST_LIB_NAME: The base name of the lib (boost_regex).
44
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
46
BOOST_LIB_THREAD_OPT: "s" for single thread builds,
47
"m" for multithread builds.
49
BOOST_LIB_RT_OPT: "s" for static runtime,
50
"d" for dynamic runtime.
52
BOOST_LIB_LINK_OPT: "s" for static link,
55
BOOST_LIB_DEBUG_OPT: nothing for release builds,
57
"dd" for debug-diagnostic builds (_STLP_DEBUG).
59
***************************************************************************/
61
#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
62
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
64
#define BOOST_LIB_NAME "boost_regex"
69
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
72
# define BOOST_LIB_TOOLSET "vc6-stlport"
74
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
77
# define BOOST_LIB_TOOLSET "vc6"
79
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1300)
82
# define BOOST_LIB_TOOLSET "vc7"
84
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
87
# define BOOST_LIB_TOOLSET "bcb6"
89
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
92
# define BOOST_LIB_TOOLSET "bcb5"
94
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
97
# define BOOST_LIB_TOOLSET "bcb4"
102
// select thread opt:
104
#if defined(_MT) || defined(__MT__)
105
# define BOOST_LIB_THREAD_OPT "m"
107
# define BOOST_LIB_THREAD_OPT "s"
111
// select runtime opt:
113
#if defined(_DLL) || defined(_RTLDLL)
114
# define BOOST_LIB_RT_OPT "d"
116
# define BOOST_LIB_RT_OPT "s"
120
// select linkage opt:
122
#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
123
# define BOOST_LIB_LINK_OPT "i"
125
# define BOOST_LIB_LINK_OPT "s"
131
#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
132
# define BOOST_LIB_DEBUG_OPT "dd"
133
#elif defined(BOOST_MSVC) && defined(_DEBUG)
134
# define BOOST_LIB_DEBUG_OPT "d"
135
#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
136
# define BOOST_LIB_DEBUG_OPT "dd"
138
# define BOOST_LIB_DEBUG_OPT
142
// now include the lib:
144
#if defined(BOOST_LIB_NAME) \
145
&& defined(BOOST_LIB_TOOLSET) \
146
&& defined(BOOST_LIB_THREAD_OPT) \
147
&& defined(BOOST_LIB_RT_OPT) \
148
&& defined(BOOST_LIB_LINK_OPT) \
149
&& defined(BOOST_LIB_DEBUG_OPT)
151
# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib")
156
// finally undef any macros we may have set:
158
#if defined(BOOST_LIB_NAME)
159
# undef BOOST_LIB_NAME
161
#if defined(BOOST_LIB_TOOLSET)
162
# undef BOOST_LIB_TOOLSET
164
#if defined(BOOST_LIB_THREAD_OPT)
165
# undef BOOST_LIB_THREAD_OPT
167
#if defined(BOOST_LIB_RT_OPT)
168
# undef BOOST_LIB_RT_OPT
170
#if defined(BOOST_LIB_LINK_OPT)
171
# undef BOOST_LIB_LINK_OPT
173
#if defined(BOOST_LIB_DEBUG_OPT)
174
# undef BOOST_LIB_DEBUG_OPT
178
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP