[thread] auto-link configuration macro

Contrary to what http://www.boost.org/more/getting_started.html#auto-link makes you think, BOOST_THREAD_DYN_LINK doesn't cause the Boost.Thread auto-link configuration to choose the DLL version. Inspecting the config.hpp header in the detail directory, one finds: #if defined(BOOST_THREAD_BUILD_DLL) //Build dll #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib #elif defined(BOOST_THREAD_USE_DLL) //Use dll #elif defined(BOOST_THREAD_USE_LIB) //Use lib #else //Use default (...) The attached patch "fixes" this behaviour, in a backwards compatible manner. Is it correct? Am I missing something? -- Pedro Lamarão Desenvolvimento Intersix Technologies S.A. SP: (55 11 3803-9300) RJ: (55 21 3852-3240) www.intersix.com.br Your Security is our Business Index: boost/thread/detail/config.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/thread/detail/config.hpp,v retrieving revision 1.15 diff -u -r1.15 config.hpp --- boost/thread/detail/config.hpp 22 Jan 2005 13:22:29 -0000 1.15 +++ boost/thread/detail/config.hpp 8 Nov 2005 16:53:49 -0000 @@ -17,6 +17,11 @@ // insist on threading support being available: #include <boost/config/requires_threads.hpp> +#if defined(BOOST_THREAD_DYN_DLL) || defined(BOOST_ALL_DYN_LINK) +# undef BOOST_THREAD_USE_LIB +# define BOOST_THREAD_USE_DLL +#endif + #if defined(BOOST_THREAD_BUILD_DLL) //Build dll #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib #elif defined(BOOST_THREAD_USE_DLL) //Use dll
participants (2)
-
John Maddock
-
Pedro Lamarão