select_stdlib_config.hpp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Boost compiler configuration selection header file
  2. // (C) Copyright John Maddock 2001 - 2003.
  3. // (C) Copyright Jens Maurer 2001 - 2002.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org for most recent version.
  8. // locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
  9. // First include <cstddef> to determine if some version of STLport is in use as the std lib
  10. // (do not rely on this header being included since users can short-circuit this header
  11. // if they know whose std lib they are using.)
  12. #ifdef __cplusplus
  13. # include <cstddef>
  14. #else
  15. # include <stddef.h>
  16. #endif
  17. #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
  18. // STLPort library; this _must_ come first, otherwise since
  19. // STLport typically sits on top of some other library, we
  20. // can end up detecting that first rather than STLport:
  21. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
  22. #else
  23. // If our std lib was not some version of STLport, then include <utility> as it is about
  24. // the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not
  25. // include their C++-related macros in <cstddef> so this additional include makes sure
  26. // we get those definitions)
  27. // (again do not rely on this header being included since users can short-circuit this
  28. // header if they know whose std lib they are using.)
  29. #include <boost/config/no_tr1/utility.hpp>
  30. #if defined(__LIBCOMO__)
  31. // Comeau STL:
  32. #define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
  33. #elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
  34. // Rogue Wave library:
  35. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
  36. #elif defined(_LIBCPP_VERSION)
  37. // libc++
  38. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
  39. #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
  40. // GNU libstdc++ 3
  41. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
  42. #elif defined(__STL_CONFIG_H)
  43. // generic SGI STL
  44. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
  45. #elif defined(__MSL_CPP__)
  46. // MSL standard lib:
  47. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
  48. #elif defined(__IBMCPP__)
  49. // take the default VACPP std lib
  50. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
  51. #elif defined(MSIPL_COMPILE_H)
  52. // Modena C++ standard library
  53. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
  54. #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
  55. // Dinkumware Library (this has to appear after any possible replacement libraries):
  56. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
  57. #elif defined (BOOST_ASSERT_CONFIG)
  58. // this must come last - generate an error if we don't
  59. // recognise the library:
  60. # error "Unknown standard library - please configure and report the results to boost.org"
  61. #endif
  62. #endif