auto_link.hpp 17 KB

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