config.hpp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. # pragma warning (disable : 4786) // disable truncated debug symbols
  28. # pragma warning (disable : 4251) // disable exported dll function
  29. # pragma warning (disable : 4800) //'int' : forcing value to bool 'true' or 'false'
  30. # pragma warning (disable : 4275) // non dll-interface class
  31. # elif defined(__ICL) && __ICL < 600 // Intel C++ 5
  32. # pragma warning(disable: 985) // identifier was truncated in debug information
  33. # endif
  34. // The STLport puts all of the standard 'C' library names in std (as far as the
  35. // user is concerned), but without it you need a fix if you're using MSVC or
  36. // Intel C++
  37. # if defined(BOOST_NO_STDC_NAMESPACE)
  38. # define BOOST_CSTD_
  39. # else
  40. # define BOOST_CSTD_ std
  41. # endif
  42. /*****************************************************************************
  43. *
  44. * Set up dll import/export options:
  45. *
  46. ****************************************************************************/
  47. // backwards compatibility:
  48. #ifdef BOOST_PYTHON_STATIC_LIB
  49. # define BOOST_PYTHON_STATIC_LINK
  50. # elif !defined(BOOST_PYTHON_DYNAMIC_LIB)
  51. # define BOOST_PYTHON_DYNAMIC_LIB
  52. #endif
  53. #if defined(BOOST_PYTHON_DYNAMIC_LIB)
  54. # if !defined(_WIN32) && !defined(__CYGWIN__) \
  55. && !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
  56. && BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
  57. # define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
  58. # endif
  59. # if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
  60. # if defined(BOOST_PYTHON_SOURCE)
  61. # define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
  62. # define BOOST_PYTHON_BUILD_DLL
  63. # else
  64. # define BOOST_PYTHON_DECL
  65. # endif
  66. # define BOOST_PYTHON_DECL_FORWARD
  67. # define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
  68. # elif (defined(_WIN32) || defined(__CYGWIN__))
  69. # if defined(BOOST_PYTHON_SOURCE)
  70. # define BOOST_PYTHON_DECL __declspec(dllexport)
  71. # define BOOST_PYTHON_BUILD_DLL
  72. # else
  73. # define BOOST_PYTHON_DECL __declspec(dllimport)
  74. # endif
  75. # endif
  76. #endif
  77. #ifndef BOOST_PYTHON_DECL
  78. # define BOOST_PYTHON_DECL
  79. #endif
  80. #ifndef BOOST_PYTHON_DECL_FORWARD
  81. # define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
  82. #endif
  83. #ifndef BOOST_PYTHON_DECL_EXCEPTION
  84. # define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
  85. #endif
  86. #if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
  87. // Replace broken Tru64/cxx offsetof macro
  88. # define BOOST_PYTHON_OFFSETOF(s_name, s_member) \
  89. ((size_t)__INTADDR__(&(((s_name *)0)->s_member)))
  90. #else
  91. # define BOOST_PYTHON_OFFSETOF offsetof
  92. #endif
  93. // enable automatic library variant selection ------------------------------//
  94. #if !defined(BOOST_PYTHON_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_PYTHON_NO_LIB)
  95. //
  96. // Set the name of our library, this will get undef'ed by auto_link.hpp
  97. // once it's done with it:
  98. //
  99. #define BOOST_LIB_NAME boost_python
  100. //
  101. // If we're importing code from a dll, then tell auto_link.hpp about it:
  102. //
  103. #ifdef BOOST_PYTHON_DYNAMIC_LIB
  104. # define BOOST_DYN_LINK
  105. #endif
  106. //
  107. // And include the header that does the work:
  108. //
  109. #include <boost/config/auto_link.hpp>
  110. #endif // auto-linking disabled
  111. #ifndef BOOST_PYTHON_NO_PY_SIGNATURES
  112. #define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
  113. #endif
  114. #endif // CONFIG_DWA052200_H_