|
1 // Copyright (C) 2001-2003 |
|
2 // William E. Kempf |
|
3 // |
|
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying |
|
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
|
6 |
|
7 #ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP |
|
8 #define BOOST_THREAD_CONFIG_WEK01032003_HPP |
|
9 |
|
10 #include <boost/config.hpp> |
|
11 #include <boost/detail/workaround.hpp> |
|
12 |
|
13 #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) |
|
14 # pragma warn -8008 // Condition always true/false |
|
15 # pragma warn -8080 // Identifier declared but never used |
|
16 # pragma warn -8057 // Parameter never used |
|
17 # pragma warn -8066 // Unreachable code |
|
18 #endif |
|
19 |
|
20 #include "platform.hpp" |
|
21 |
|
22 // compatibility with the rest of Boost's auto-linking code: |
|
23 #if defined(BOOST_THREAD_DYN_DLL) || defined(BOOST_ALL_DYN_LINK) |
|
24 # undef BOOST_THREAD_USE_LIB |
|
25 # define BOOST_THREAD_USE_DLL |
|
26 #endif |
|
27 |
|
28 #if defined(BOOST_THREAD_BUILD_DLL) //Build dll |
|
29 #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib |
|
30 #elif defined(BOOST_THREAD_USE_DLL) //Use dll |
|
31 #elif defined(BOOST_THREAD_USE_LIB) //Use lib |
|
32 #else //Use default |
|
33 # if defined(BOOST_THREAD_PLATFORM_WIN32) |
|
34 # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) |
|
35 //For compilers supporting auto-tss cleanup |
|
36 //with Boost.Threads lib, use Boost.Threads lib |
|
37 # define BOOST_THREAD_USE_LIB |
|
38 # else |
|
39 //For compilers not yet supporting auto-tss cleanup |
|
40 //with Boost.Threads lib, use Boost.Threads dll |
|
41 # define BOOST_THREAD_USE_DLL |
|
42 # endif |
|
43 # else |
|
44 # define BOOST_THREAD_USE_LIB |
|
45 # endif |
|
46 #endif |
|
47 |
|
48 #if defined(BOOST_HAS_DECLSPEC) |
|
49 # if defined(BOOST_THREAD_BUILD_DLL) //Build dll |
|
50 # define BOOST_THREAD_DECL __declspec(dllexport) |
|
51 # elif defined(BOOST_THREAD_USE_DLL) //Use dll |
|
52 # define BOOST_THREAD_DECL __declspec(dllimport) |
|
53 # else |
|
54 # define BOOST_THREAD_DECL |
|
55 # endif |
|
56 #else |
|
57 # define BOOST_THREAD_DECL |
|
58 #endif // BOOST_HAS_DECLSPEC |
|
59 |
|
60 // |
|
61 // Automatically link to the correct build variant where possible. |
|
62 // |
|
63 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB) |
|
64 // |
|
65 // Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp |
|
66 // once it's done with it: |
|
67 // |
|
68 #if defined(BOOST_THREAD_USE_DLL) |
|
69 # define BOOST_DYN_LINK |
|
70 #endif |
|
71 // |
|
72 // Set the name of our library, this will get undef'ed by auto_link.hpp |
|
73 // once it's done with it: |
|
74 // |
|
75 #if defined(BOOST_THREAD_LIB_NAME) |
|
76 # define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME |
|
77 #else |
|
78 # define BOOST_LIB_NAME boost_thread |
|
79 #endif |
|
80 // |
|
81 // If we're importing code from a dll, then tell auto_link.hpp about it: |
|
82 // |
|
83 // And include the header that does the work: |
|
84 // |
|
85 #include <boost/config/auto_link.hpp> |
|
86 #endif // auto-linking disabled |
|
87 |
|
88 #endif // BOOST_THREAD_CONFIG_WEK1032003_HPP |
|
89 |
|
90 // Change Log: |
|
91 // 22 Jan 05 Roland Schwarz (speedsnail) |
|
92 // Usage of BOOST_HAS_DECLSPEC macro. |
|
93 // Default again is static lib usage. |
|
94 // BOOST_DYN_LINK only defined when autolink included. |