1// Boost compiler configuration selection header file
2
3// (C) Copyright John Maddock 2001 - 2003.
4// (C) Copyright Jens Maurer 2001 - 2002.
5// Use, modification and distribution are subject to the
6// Boost Software License, Version 1.0. (See accompanying file
7// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
9
10// See http://www.boost.org for most recent version.
11
12// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
13
14// First, check if __has_include is available and <version> include can be located,
15// otherwise include <cstddef> to determine if some version of STLport is in use as the std lib
16// (do not rely on this header being included since users can short-circuit this header
17// if they know whose std lib they are using.)
18#if defined(__cplusplus) && defined(__has_include)
19# if __has_include(<version>)
20// It should be safe to include `<version>` when it is present without checking
21// the actual C++ language version as it consists solely of macro definitions.
22// [version.syn] p1: The header <version> supplies implementation-dependent
23// information about the C++ standard library (e.g., version number and release date).
24# include <version>
25# else
26# include <cstddef>
27# endif
28#elif defined(__cplusplus)
29# include <cstddef>
30#else
31# include <stddef.h>
32#endif
33
34#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
35// STLPort library; this _must_ come first, otherwise since
36// STLport typically sits on top of some other library, we
37// can end up detecting that first rather than STLport:
38# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
39
40#else
41
42// If our std lib was not some version of STLport, and has not otherwise
43// been detected, then include <utility> as it is about
44// the smallest of the std lib headers that includes real C++ stuff.
45// Some std libs do not include their C++-related macros in <cstddef>
46// so this additional include makes sure we get those definitions.
47// Note: do not rely on this header being included since users can short-circuit this
48// #include if they know whose std lib they are using.
49#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
50 && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
51 && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
52 && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
53#include <utility>
54#endif
55
56#if defined(__LIBCOMO__)
57// Comeau STL:
58#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
59
60#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
61// Rogue Wave library:
62# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
63
64#elif defined(_LIBCPP_VERSION)
65// libc++
66# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
67
68#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
69// GNU libstdc++ 3
70# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
71
72#elif defined(__STL_CONFIG_H)
73// generic SGI STL
74# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
75
76#elif defined(__MSL_CPP__)
77// MSL standard lib:
78# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
79
80#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
81// IBM z/OS XL C/C++
82# define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp"
83
84#elif defined(__IBMCPP__)
85// take the default VACPP std lib
86# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
87
88#elif defined(MSIPL_COMPILE_H)
89// Modena C++ standard library
90# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
91
92#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
93// Dinkumware Library (this has to appear after any possible replacement libraries):
94# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
95
96#elif defined (BOOST_ASSERT_CONFIG)
97// this must come last - generate an error if we don't
98// recognise the library:
99# error "Unknown standard library - please configure and report the results to boost.org"
100
101#endif
102
103#endif
104
105#if 0
106//
107// This section allows dependency scanners to find all the files we *might* include:
108//
109# include "boost/config/stdlib/stlport.hpp"
110# include "boost/config/stdlib/libcomo.hpp"
111# include "boost/config/stdlib/roguewave.hpp"
112# include "boost/config/stdlib/libcpp.hpp"
113# include "boost/config/stdlib/libstdcpp3.hpp"
114# include "boost/config/stdlib/sgi.hpp"
115# include "boost/config/stdlib/msl.hpp"
116# include "boost/config/stdlib/xlcpp_zos.hpp"
117# include "boost/config/stdlib/vacpp.hpp"
118# include "boost/config/stdlib/modena.hpp"
119# include "boost/config/stdlib/dinkumware.hpp"
120#endif
121
122

source code of boost/libs/config/include/boost/config/detail/select_stdlib_config.hpp