]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/config/auto_link.hpp
Add forgotten test to distribution
[lyx.git] / boost / boost / config / auto_link.hpp
index b4e580ffa308116b816ba5bee07f44561b85e900..13cbad43609244a4a4b89038c6c513199874b0bf 100644 (file)
@@ -17,11 +17,17 @@ USAGE:
 
 Before including this header you must define one or more of define the following macros:
 
-BOOST_LIB_NAME:       Required: A string containing the basename of the library,
-                      for example boost_regex.
-BOOST_DYN_LINK:       Optional: when set link to dll rather than static library.
-BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
-                      of the library selected (useful for debugging).
+BOOST_LIB_NAME:           Required: A string containing the basename of the library,
+                          for example boost_regex.
+BOOST_LIB_TOOLSET:        Optional: the base name of the toolset.
+BOOST_DYN_LINK:           Optional: when set link to dll rather than static library.
+BOOST_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name
+                          of the library selected (useful for debugging).
+BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
+                          rather than a mangled-name version.
+BOOST_AUTO_LINK_TAGGED:   Specifies that we link to libraries built with the --layout=tagged option.
+                          This is essentially the same as the default name-mangled version, but without
+                          the compiler name and version, or the Boost version.  Just the build options.
 
 These macros will be undef'ed at the end of the header, further this header
 has no include guards - so be sure to include it only once from your library!
@@ -54,12 +60,14 @@ BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
 
 BOOST_LIB_RT_OPT:     A suffix that indicates the runtime library used,
                       contains one or more of the following letters after
-                      a hiphen:
+                      a hyphen:
 
                       s      static runtime (dynamic if not present).
-                      d      debug build (release if not present).
                       g      debug/diagnostic runtime (release if not present).
-                      p      STLPort Build.
+                      y      Python debug/diagnostic runtime (release if not present).
+                      d      debug build (release if not present).
+                      p      STLport build.
+                      n      STLport build without its IOStreams.
 
 BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
@@ -103,49 +111,78 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #  error "Incompatible build options"
 #endif
 //
-// select toolset:
+// select toolset if not defined already:
 //
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
+#ifndef BOOST_LIB_TOOLSET
+#  if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
+    // Note: no compilers before 1200 are supported
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
 
-   // vc6:
-#  define BOOST_LIB_TOOLSET "vc6"
+#    ifdef UNDER_CE
+       // eVC4:
+#      define BOOST_LIB_TOOLSET "evc4"
+#    else
+       // vc6:
+#      define BOOST_LIB_TOOLSET "vc6"
+#    endif
 
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
 
-   // vc7:
-#  define BOOST_LIB_TOOLSET "vc7"
+     // vc7:
+#    define BOOST_LIB_TOOLSET "vc7"
 
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
 
-   // vc71:
-#  define BOOST_LIB_TOOLSET "vc71"
+     // vc71:
+#    define BOOST_LIB_TOOLSET "vc71"
 
-#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
 
-   // vc80:
-#  define BOOST_LIB_TOOLSET "vc80"
+     // vc80:
+#    define BOOST_LIB_TOOLSET "vc80"
 
-#elif defined(__BORLANDC__)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
 
-   // CBuilder 6:
-#  define BOOST_LIB_TOOLSET "bcb"
+     // vc90:
+#    define BOOST_LIB_TOOLSET "vc90"
 
-#elif defined(__ICL)
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
 
-   // Intel C++, no version number:
-#  define BOOST_LIB_TOOLSET "iw"
+     // vc10:
+#    define BOOST_LIB_TOOLSET "vc100"
 
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
+#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
 
-   // Metrowerks CodeWarrior 8.x
-#  define BOOST_LIB_TOOLSET "cw8"
+     // vc11:
+#    define BOOST_LIB_TOOLSET "vc110"
 
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
+#  elif defined(BOOST_MSVC)
 
-   // Metrowerks CodeWarrior 9.x
-#  define BOOST_LIB_TOOLSET "cw9"
+     // vc12:
+#    define BOOST_LIB_TOOLSET "vc120"
 
-#endif
+#  elif defined(__BORLANDC__)
+
+     // CBuilder 6:
+#    define BOOST_LIB_TOOLSET "bcb"
+
+#  elif defined(__ICL)
+
+     // Intel C++, no version number:
+#    define BOOST_LIB_TOOLSET "iw"
+
+#  elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
+
+     // Metrowerks CodeWarrior 8.x
+#    define BOOST_LIB_TOOLSET "cw8"
+
+#  elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
+
+     // Metrowerks CodeWarrior 9.x
+#    define BOOST_LIB_TOOLSET "cw9"
+
+#  endif
+#endif // BOOST_LIB_TOOLSET
 
 //
 // select thread opt:
@@ -162,11 +199,19 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-gdp"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gdp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
 #            error "Build options aren't compatible with pre-built libraries"
 #        else
 #            define BOOST_LIB_RT_OPT "-p"
@@ -174,11 +219,19 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-gdpn"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gdpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
 #            error "Build options aren't compatible with pre-built libraries"
 #        else
 #            define BOOST_LIB_RT_OPT "-pn"
@@ -186,7 +239,9 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     else
 
-#        if defined(_DEBUG)
+#        if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gyd"
+#        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gd"
 #        else
 #            define BOOST_LIB_RT_OPT
@@ -198,11 +253,19 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-sgydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-sgdp"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgydp"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgdp"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
 #            error "Build options aren't compatible with pre-built libraries"
 #        else
 #            define BOOST_LIB_RT_OPT "-sp"
@@ -210,11 +273,19 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-sgydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-sgdpn"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgydpn"
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgdpn"
-#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
 #            error "Build options aren't compatible with pre-built libraries"
 #        else
 #            define BOOST_LIB_RT_OPT "-spn"
@@ -222,7 +293,10 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     else
 
-#        if defined(_DEBUG)
+#        if defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgyd"
+#        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgd"
 #        else
 #            define BOOST_LIB_RT_OPT "-s"
@@ -237,26 +311,38 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 //
 // figure out whether we want the debug builds or not:
 //
+#if __BORLANDC__ > 0x561
 #pragma defineonoption BOOST_BORLAND_DEBUG -v
+#endif
 //
 // sanity check:
 //
 #if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
-#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
+#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form"
 #endif
 
 #  ifdef _RTLDLL
 
-#     ifdef BOOST_BORLAND_DEBUG
+#     if defined(BOOST_BORLAND_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-yd"
+#     elif defined(BOOST_BORLAND_DEBUG)
 #         define BOOST_LIB_RT_OPT "-d"
+#     elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT -y
 #     else
 #         define BOOST_LIB_RT_OPT
 #     endif
 
 #  else
 
-#     ifdef BOOST_BORLAND_DEBUG
+#     if defined(BOOST_BORLAND_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-syd"
+#     elif defined(BOOST_BORLAND_DEBUG)
 #         define BOOST_LIB_RT_OPT "-sd"
+#     elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-sy"
 #     else
 #         define BOOST_LIB_RT_OPT "-s"
 #     endif
@@ -286,9 +372,21 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
       && defined(BOOST_LIB_RT_OPT) \
       && defined(BOOST_LIB_VERSION)
 
+#ifdef BOOST_AUTO_LINK_TAGGED
+#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
+#  ifdef BOOST_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
+#  endif
+#elif defined(BOOST_AUTO_LINK_NOMANGLE)
+#  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+#  ifdef BOOST_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+#  endif
+#else
 #  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")
-#ifdef BOOST_LIB_DIAGNOSTIC
-#  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")
+#  ifdef BOOST_LIB_DIAGNOSTIC
+#     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")
+#  endif
 #endif
 
 #else
@@ -307,9 +405,11 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #if defined(BOOST_LIB_NAME)
 #  undef BOOST_LIB_NAME
 #endif
-#if defined(BOOST_LIB_TOOLSET)
-#  undef BOOST_LIB_TOOLSET
-#endif
+// Don't undef this one: it can be set by the user and should be the 
+// same for all libraries:
+//#if defined(BOOST_LIB_TOOLSET)
+//#  undef BOOST_LIB_TOOLSET
+//#endif
 #if defined(BOOST_LIB_THREAD_OPT)
 #  undef BOOST_LIB_THREAD_OPT
 #endif
@@ -327,10 +427,3 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #endif
 
 
-
-
-
-
-
-
-