| 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 | //  See http://www.boost.org/libs/config for the most recent version. | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef BOOST_LINK_TEST_HPP | 
|---|
| 9 | #define BOOST_LINK_TEST_HPP | 
|---|
| 10 |  | 
|---|
| 11 | #include <boost/config.hpp> | 
|---|
| 12 |  | 
|---|
| 13 | // | 
|---|
| 14 | // set up code to determine our compilers options,  | 
|---|
| 15 | // we will check that these are the same in the | 
|---|
| 16 | // .exe and the .dll: | 
|---|
| 17 | // | 
|---|
| 18 | #ifdef BOOST_DYN_LINK | 
|---|
| 19 | static const bool dyn_link = true; | 
|---|
| 20 | #else | 
|---|
| 21 | static const bool dyn_link = false; | 
|---|
| 22 | #endif | 
|---|
| 23 | #if defined(_DLL) || defined(_RTLDLL) | 
|---|
| 24 | static const bool dyn_rtl = true; | 
|---|
| 25 | #else | 
|---|
| 26 | static const bool dyn_rtl = false; | 
|---|
| 27 | #endif | 
|---|
| 28 | #if defined(BOOST_HAS_THREADS) | 
|---|
| 29 | static const bool has_threads = true; | 
|---|
| 30 | #else | 
|---|
| 31 | static const bool has_threads = false; | 
|---|
| 32 | #endif | 
|---|
| 33 | #if defined(_DEBUG) | 
|---|
| 34 | static const bool debug = true; | 
|---|
| 35 | #else | 
|---|
| 36 | static const bool debug = false; | 
|---|
| 37 | #endif | 
|---|
| 38 | #if defined(__STL_DEBUG) || defined(_STLP_DEBUG) | 
|---|
| 39 | static const bool stl_debug = true; | 
|---|
| 40 | #else | 
|---|
| 41 | static const bool stl_debug = false; | 
|---|
| 42 | #endif | 
|---|
| 43 |  | 
|---|
| 44 | // | 
|---|
| 45 | // set up import and export options: | 
|---|
| 46 | // | 
|---|
| 47 | #if defined(BOOST_HAS_DECLSPEC) && defined(BOOST_DYN_LINK) | 
|---|
| 48 | #  ifdef BOOST_CONFIG_SOURCE | 
|---|
| 49 | #      define BOOST_CONFIG_DECL __declspec(dllexport) | 
|---|
| 50 | #  else | 
|---|
| 51 | #      define BOOST_CONFIG_DECL __declspec(dllimport) | 
|---|
| 52 | #  endif | 
|---|
| 53 | #endif | 
|---|
| 54 | #ifndef BOOST_CONFIG_DECL | 
|---|
| 55 | #  define BOOST_CONFIG_DECL | 
|---|
| 56 | #endif | 
|---|
| 57 |  | 
|---|
| 58 | // | 
|---|
| 59 | // define our entry point: | 
|---|
| 60 | // | 
|---|
| 61 | bool BOOST_CONFIG_DECL check_options( | 
|---|
| 62 |                    bool m_dyn_link, | 
|---|
| 63 |                    bool m_dyn_rtl, | 
|---|
| 64 |                    bool m_has_threads, | 
|---|
| 65 |                    bool m_debug, | 
|---|
| 66 |                    bool m_stlp_debug); | 
|---|
| 67 |  | 
|---|
| 68 | // | 
|---|
| 69 | // set up automatic linking: | 
|---|
| 70 | // | 
|---|
| 71 | #if !defined(BOOST_CONFIG_SOURCE) && !defined(BOOST_CONFIG_NO_LIB) | 
|---|
| 72 | #  define BOOST_LIB_NAME link_test | 
|---|
| 73 | #  include <boost/config/auto_link.hpp> | 
|---|
| 74 | #endif | 
|---|
| 75 |  | 
|---|
| 76 | #endif // BOOST_LINK_TEST_HPP | 
|---|
| 77 |  | 
|---|