config.hpp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. // (C) Copyright David Abrahams 2000.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // The author gratefully acknowleges the support of Dragon Systems, Inc., in
  7. // producing this work.
  8. // Revision History:
  9. // 04 Mar 01 Some fixes so it will compile with Intel C++ (Dave Abrahams)
  10. #ifndef CONFIG_DWA052200_H_
  11. # define CONFIG_DWA052200_H_
  12. # include <boost/config.hpp>
  13. # include <boost/detail/workaround.hpp>
  14. # ifdef BOOST_NO_OPERATORS_IN_NAMESPACE
  15. // A gcc bug forces some symbols into the global namespace
  16. # define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE
  17. # define BOOST_PYTHON_END_CONVERSION_NAMESPACE
  18. # define BOOST_PYTHON_CONVERSION
  19. # define BOOST_PYTHON_IMPORT_CONVERSION(x) using ::x
  20. # else
  21. # define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE namespace boost { namespace python {
  22. # define BOOST_PYTHON_END_CONVERSION_NAMESPACE }} // namespace boost::python
  23. # define BOOST_PYTHON_CONVERSION boost::python
  24. # define BOOST_PYTHON_IMPORT_CONVERSION(x) void never_defined() // so we can follow the macro with a ';'
  25. # endif
  26. # if defined(BOOST_MSVC)
  27. # if _MSC_VER < 1300
  28. # define BOOST_MSVC6_OR_EARLIER 1
  29. # endif
  30. # pragma warning (disable : 4786) // disable truncated debug symbols
  31. # pragma warning (disable : 4251) // disable exported dll function
  32. # pragma warning (disable : 4800) //'int' : forcing value to bool 'true' or 'false'
  33. # pragma warning (disable : 4275) // non dll-interface class
  34. # elif defined(__ICL) && __ICL < 600 // Intel C++ 5
  35. # pragma warning(disable: 985) // identifier was truncated in debug information
  36. # endif
  37. // The STLport puts all of the standard 'C' library names in std (as far as the
  38. // user is concerned), but without it you need a fix if you're using MSVC or
  39. // Intel C++
  40. # if defined(BOOST_NO_STDC_NAMESPACE)
  41. # define BOOST_CSTD_
  42. # else
  43. # define BOOST_CSTD_ std
  44. # endif
  45. /*****************************************************************************
  46. *
  47. * Set up dll import/export options:
  48. *
  49. ****************************************************************************/
  50. // backwards compatibility:
  51. #ifdef BOOST_PYTHON_STATIC_LIB
  52. # define BOOST_PYTHON_STATIC_LINK
  53. # elif !defined(BOOST_PYTHON_DYNAMIC_LIB)
  54. # define BOOST_PYTHON_DYNAMIC_LIB
  55. #endif
  56. #if defined(BOOST_PYTHON_DYNAMIC_LIB)
  57. # if !defined(_WIN32) && !defined(__CYGWIN__) \
  58. && !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
  59. && BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
  60. # define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
  61. # endif
  62. # if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
  63. # if defined(BOOST_PYTHON_SOURCE)
  64. # define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
  65. # define BOOST_PYTHON_BUILD_DLL
  66. # else
  67. # define BOOST_PYTHON_DECL
  68. # endif
  69. # define BOOST_PYTHON_DECL_FORWARD
  70. # define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
  71. # elif (defined(_WIN32) || defined(__CYGWIN__))
  72. # if defined(BOOST_PYTHON_SOURCE)
  73. # define BOOST_PYTHON_DECL __declspec(dllexport)
  74. # define BOOST_PYTHON_BUILD_DLL
  75. # else
  76. # define BOOST_PYTHON_DECL __declspec(dllimport)
  77. # endif
  78. # endif
  79. #endif
  80. #ifndef BOOST_PYTHON_DECL
  81. # define BOOST_PYTHON_DECL
  82. #endif
  83. #ifndef BOOST_PYTHON_DECL_FORWARD
  84. # define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
  85. #endif
  86. #ifndef BOOST_PYTHON_DECL_EXCEPTION
  87. # define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
  88. #endif
  89. #if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
  90. // Replace broken Tru64/cxx offsetof macro
  91. # define BOOST_PYTHON_OFFSETOF(s_name, s_member) \
  92. ((size_t)__INTADDR__(&(((s_name *)0)->s_member)))
  93. #else
  94. # define BOOST_PYTHON_OFFSETOF offsetof
  95. #endif
  96. // enable automatic library variant selection ------------------------------//
  97. #if !defined(BOOST_PYTHON_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_PYTHON_NO_LIB)
  98. //
  99. // Set the name of our library, this will get undef'ed by auto_link.hpp
  100. // once it's done with it:
  101. //
  102. #define BOOST_LIB_NAME boost_python
  103. //
  104. // If we're importing code from a dll, then tell auto_link.hpp about it:
  105. //
  106. #ifdef BOOST_PYTHON_DYNAMIC_LIB
  107. # define BOOST_DYN_LINK
  108. #endif
  109. //
  110. // And include the header that does the work:
  111. //
  112. #include <boost/config/auto_link.hpp>
  113. #endif // auto-linking disabled
  114. #ifndef BOOST_PYTHON_NO_PY_SIGNATURES
  115. #define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
  116. #endif
  117. #endif // CONFIG_DWA052200_H_