epoc32/include/stdapis/boost/config/auto_link.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/config/auto_link.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,363 @@
     1.4 +//  (C) Copyright John Maddock 2003.
     1.5 +//  Use, modification and distribution are subject to the
     1.6 +//  Boost Software License, Version 1.0. (See accompanying file
     1.7 +//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     1.8 +
     1.9 + /*
    1.10 +  *   LOCATION:    see http://www.boost.org for most recent version.
    1.11 +  *   FILE         auto_link.hpp
    1.12 +  *   VERSION      see <boost/version.hpp>
    1.13 +  *   DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
    1.14 +  */
    1.15 +
    1.16 +/*************************************************************************
    1.17 +
    1.18 +USAGE:
    1.19 +~~~~~~
    1.20 +
    1.21 +Before including this header you must define one or more of define the following macros:
    1.22 +
    1.23 +BOOST_LIB_NAME:           Required: A string containing the basename of the library,
    1.24 +                          for example boost_regex.
    1.25 +BOOST_LIB_TOOLSET:        Optional: the base name of the toolset.
    1.26 +BOOST_DYN_LINK:           Optional: when set link to dll rather than static library.
    1.27 +BOOST_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name
    1.28 +                          of the library selected (useful for debugging).
    1.29 +BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
    1.30 +                          rather than a mangled-name version.
    1.31 +
    1.32 +These macros will be undef'ed at the end of the header, further this header
    1.33 +has no include guards - so be sure to include it only once from your library!
    1.34 +
    1.35 +Algorithm:
    1.36 +~~~~~~~~~~
    1.37 +
    1.38 +Libraries for Borland and Microsoft compilers are automatically
    1.39 +selected here, the name of the lib is selected according to the following
    1.40 +formula:
    1.41 +
    1.42 +BOOST_LIB_PREFIX
    1.43 +   + BOOST_LIB_NAME
    1.44 +   + "_"
    1.45 +   + BOOST_LIB_TOOLSET
    1.46 +   + BOOST_LIB_THREAD_OPT
    1.47 +   + BOOST_LIB_RT_OPT
    1.48 +   "-"
    1.49 +   + BOOST_LIB_VERSION
    1.50 +
    1.51 +These are defined as:
    1.52 +
    1.53 +BOOST_LIB_PREFIX:     "lib" for static libraries otherwise "".
    1.54 +
    1.55 +BOOST_LIB_NAME:       The base name of the lib ( for example boost_regex).
    1.56 +
    1.57 +BOOST_LIB_TOOLSET:    The compiler toolset name (vc6, vc7, bcb5 etc).
    1.58 +
    1.59 +BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
    1.60 +
    1.61 +BOOST_LIB_RT_OPT:     A suffix that indicates the runtime library used,
    1.62 +                      contains one or more of the following letters after
    1.63 +                      a hiphen:
    1.64 +
    1.65 +                      s      static runtime (dynamic if not present).
    1.66 +                      d      debug build (release if not present).
    1.67 +                      g      debug/diagnostic runtime (release if not present).
    1.68 +                      p      STLPort Build.
    1.69 +
    1.70 +BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
    1.71 +
    1.72 +
    1.73 +***************************************************************************/
    1.74 +
    1.75 +#ifdef __cplusplus
    1.76 +#  ifndef BOOST_CONFIG_HPP
    1.77 +#     include <boost/config.hpp>
    1.78 +#  endif
    1.79 +#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
    1.80 +//
    1.81 +// C language compatability (no, honestly)
    1.82 +//
    1.83 +#  define BOOST_MSVC _MSC_VER
    1.84 +#  define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
    1.85 +#  define BOOST_DO_STRINGIZE(X) #X
    1.86 +#endif
    1.87 +//
    1.88 +// Only include what follows for known and supported compilers:
    1.89 +//
    1.90 +#if defined(BOOST_MSVC) \
    1.91 +    || defined(__BORLANDC__) \
    1.92 +    || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
    1.93 +    || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
    1.94 +
    1.95 +#ifndef BOOST_VERSION_HPP
    1.96 +#  include <boost/version.hpp>
    1.97 +#endif
    1.98 +
    1.99 +#ifndef BOOST_LIB_NAME
   1.100 +#  error "Macro BOOST_LIB_NAME not set (internal error)"
   1.101 +#endif
   1.102 +
   1.103 +//
   1.104 +// error check:
   1.105 +//
   1.106 +#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
   1.107 +#  pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
   1.108 +#  pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
   1.109 +#  error "Incompatible build options"
   1.110 +#endif
   1.111 +//
   1.112 +// select toolset if not defined already:
   1.113 +//
   1.114 +#ifndef BOOST_LIB_TOOLSET
   1.115 +// Note: no compilers before 1200 are supported
   1.116 +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
   1.117 +
   1.118 +#  ifdef UNDER_CE
   1.119 +     // vc6:
   1.120 +#    define BOOST_LIB_TOOLSET "evc4"
   1.121 +#  else
   1.122 +     // vc6:
   1.123 +#    define BOOST_LIB_TOOLSET "vc6"
   1.124 +#  endif
   1.125 +
   1.126 +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
   1.127 +
   1.128 +   // vc7:
   1.129 +#  define BOOST_LIB_TOOLSET "vc7"
   1.130 +
   1.131 +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
   1.132 +
   1.133 +   // vc71:
   1.134 +#  define BOOST_LIB_TOOLSET "vc71"
   1.135 +
   1.136 +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
   1.137 +
   1.138 +   // vc80:
   1.139 +#  define BOOST_LIB_TOOLSET "vc80"
   1.140 +
   1.141 +#elif defined(__BORLANDC__)
   1.142 +
   1.143 +   // CBuilder 6:
   1.144 +#  define BOOST_LIB_TOOLSET "bcb"
   1.145 +
   1.146 +#elif defined(__ICL)
   1.147 +
   1.148 +   // Intel C++, no version number:
   1.149 +#  define BOOST_LIB_TOOLSET "iw"
   1.150 +
   1.151 +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
   1.152 +
   1.153 +   // Metrowerks CodeWarrior 8.x
   1.154 +#  define BOOST_LIB_TOOLSET "cw8"
   1.155 +
   1.156 +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
   1.157 +
   1.158 +   // Metrowerks CodeWarrior 9.x
   1.159 +#  define BOOST_LIB_TOOLSET "cw9"
   1.160 +
   1.161 +#endif
   1.162 +#endif // BOOST_LIB_TOOLSET
   1.163 +
   1.164 +//
   1.165 +// select thread opt:
   1.166 +//
   1.167 +#if defined(_MT) || defined(__MT__)
   1.168 +#  define BOOST_LIB_THREAD_OPT "-mt"
   1.169 +#else
   1.170 +#  define BOOST_LIB_THREAD_OPT
   1.171 +#endif
   1.172 +
   1.173 +#if defined(_MSC_VER) || defined(__MWERKS__)
   1.174 +
   1.175 +#  ifdef _DLL
   1.176 +
   1.177 +#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
   1.178 +
   1.179 +#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
   1.180 +#            define BOOST_LIB_RT_OPT "-gdp"
   1.181 +#        elif defined(_DEBUG)
   1.182 +#            define BOOST_LIB_RT_OPT "-gdp"
   1.183 +#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
   1.184 +#            error "Build options aren't compatible with pre-built libraries"
   1.185 +#        else
   1.186 +#            define BOOST_LIB_RT_OPT "-p"
   1.187 +#        endif
   1.188 +
   1.189 +#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
   1.190 +
   1.191 +#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
   1.192 +#            define BOOST_LIB_RT_OPT "-gdpn"
   1.193 +#        elif defined(_DEBUG)
   1.194 +#            define BOOST_LIB_RT_OPT "-gdpn"
   1.195 +#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
   1.196 +#            error "Build options aren't compatible with pre-built libraries"
   1.197 +#        else
   1.198 +#            define BOOST_LIB_RT_OPT "-pn"
   1.199 +#        endif
   1.200 +
   1.201 +#     else
   1.202 +
   1.203 +#        if defined(_DEBUG)
   1.204 +#            define BOOST_LIB_RT_OPT "-gd"
   1.205 +#        else
   1.206 +#            define BOOST_LIB_RT_OPT
   1.207 +#        endif
   1.208 +
   1.209 +#     endif
   1.210 +
   1.211 +#  else
   1.212 +
   1.213 +#     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
   1.214 +
   1.215 +#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
   1.216 +#            define BOOST_LIB_RT_OPT "-sgdp"
   1.217 +#        elif defined(_DEBUG)
   1.218 +#             define BOOST_LIB_RT_OPT "-sgdp"
   1.219 +#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
   1.220 +#            error "Build options aren't compatible with pre-built libraries"
   1.221 +#        else
   1.222 +#            define BOOST_LIB_RT_OPT "-sp"
   1.223 +#        endif
   1.224 +
   1.225 +#     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
   1.226 +
   1.227 +#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
   1.228 +#            define BOOST_LIB_RT_OPT "-sgdpn"
   1.229 +#        elif defined(_DEBUG)
   1.230 +#             define BOOST_LIB_RT_OPT "-sgdpn"
   1.231 +#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
   1.232 +#            error "Build options aren't compatible with pre-built libraries"
   1.233 +#        else
   1.234 +#            define BOOST_LIB_RT_OPT "-spn"
   1.235 +#        endif
   1.236 +
   1.237 +#     else
   1.238 +
   1.239 +#        if defined(_DEBUG)
   1.240 +#             define BOOST_LIB_RT_OPT "-sgd"
   1.241 +#        else
   1.242 +#            define BOOST_LIB_RT_OPT "-s"
   1.243 +#        endif
   1.244 +
   1.245 +#     endif
   1.246 +
   1.247 +#  endif
   1.248 +
   1.249 +#elif defined(__BORLANDC__)
   1.250 +
   1.251 +//
   1.252 +// figure out whether we want the debug builds or not:
   1.253 +//
   1.254 +#if __BORLANDC__ > 0x561
   1.255 +#pragma defineonoption BOOST_BORLAND_DEBUG -v
   1.256 +#endif
   1.257 +//
   1.258 +// sanity check:
   1.259 +//
   1.260 +#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
   1.261 +#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
   1.262 +#endif
   1.263 +
   1.264 +#  ifdef _RTLDLL
   1.265 +
   1.266 +#     ifdef BOOST_BORLAND_DEBUG
   1.267 +#         define BOOST_LIB_RT_OPT "-d"
   1.268 +#     else
   1.269 +#         define BOOST_LIB_RT_OPT
   1.270 +#     endif
   1.271 +
   1.272 +#  else
   1.273 +
   1.274 +#     ifdef BOOST_BORLAND_DEBUG
   1.275 +#         define BOOST_LIB_RT_OPT "-sd"
   1.276 +#     else
   1.277 +#         define BOOST_LIB_RT_OPT "-s"
   1.278 +#     endif
   1.279 +
   1.280 +#  endif
   1.281 +
   1.282 +#endif
   1.283 +
   1.284 +//
   1.285 +// select linkage opt:
   1.286 +//
   1.287 +#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
   1.288 +#  define BOOST_LIB_PREFIX
   1.289 +#elif defined(BOOST_DYN_LINK)
   1.290 +#  error "Mixing a dll boost library with a static runtime is a really bad idea..."
   1.291 +#else
   1.292 +#  define BOOST_LIB_PREFIX "lib"
   1.293 +#endif
   1.294 +
   1.295 +//
   1.296 +// now include the lib:
   1.297 +//
   1.298 +#if defined(BOOST_LIB_NAME) \
   1.299 +      && defined(BOOST_LIB_PREFIX) \
   1.300 +      && defined(BOOST_LIB_TOOLSET) \
   1.301 +      && defined(BOOST_LIB_THREAD_OPT) \
   1.302 +      && defined(BOOST_LIB_RT_OPT) \
   1.303 +      && defined(BOOST_LIB_VERSION)
   1.304 +
   1.305 +#ifndef BOOST_AUTO_LINK_NOMANGLE
   1.306 +#  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")
   1.307 +#  ifdef BOOST_LIB_DIAGNOSTIC
   1.308 +#     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")
   1.309 +#  endif
   1.310 +#else
   1.311 +#  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
   1.312 +#  ifdef BOOST_LIB_DIAGNOSTIC
   1.313 +#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
   1.314 +#  endif
   1.315 +#endif
   1.316 +
   1.317 +#else
   1.318 +#  error "some required macros where not defined (internal logic error)."
   1.319 +#endif
   1.320 +
   1.321 +
   1.322 +#endif // _MSC_VER || __BORLANDC__
   1.323 +
   1.324 +//
   1.325 +// finally undef any macros we may have set:
   1.326 +//
   1.327 +#ifdef BOOST_LIB_PREFIX
   1.328 +#  undef BOOST_LIB_PREFIX
   1.329 +#endif
   1.330 +#if defined(BOOST_LIB_NAME)
   1.331 +#  undef BOOST_LIB_NAME
   1.332 +#endif
   1.333 +// Don't undef this one: it can be set by the user and should be the 
   1.334 +// same for all libraries:
   1.335 +//#if defined(BOOST_LIB_TOOLSET)
   1.336 +//#  undef BOOST_LIB_TOOLSET
   1.337 +//#endif
   1.338 +#if defined(BOOST_LIB_THREAD_OPT)
   1.339 +#  undef BOOST_LIB_THREAD_OPT
   1.340 +#endif
   1.341 +#if defined(BOOST_LIB_RT_OPT)
   1.342 +#  undef BOOST_LIB_RT_OPT
   1.343 +#endif
   1.344 +#if defined(BOOST_LIB_LINK_OPT)
   1.345 +#  undef BOOST_LIB_LINK_OPT
   1.346 +#endif
   1.347 +#if defined(BOOST_LIB_DEBUG_OPT)
   1.348 +#  undef BOOST_LIB_DEBUG_OPT
   1.349 +#endif
   1.350 +#if defined(BOOST_DYN_LINK)
   1.351 +#  undef BOOST_DYN_LINK
   1.352 +#endif
   1.353 +#if defined(BOOST_AUTO_LINK_NOMANGLE)
   1.354 +#  undef BOOST_AUTO_LINK_NOMANGLE
   1.355 +#endif
   1.356 +
   1.357 +
   1.358 +
   1.359 +
   1.360 +
   1.361 +
   1.362 +
   1.363 +
   1.364 +
   1.365 +
   1.366 +