1 // (C) Copyright John Maddock 2001.
2 // (C) Copyright Jens Maurer 2001.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // 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.
9 // config for libstdc++ v3
10 // not much to go in here:
12 #define BOOST_GNU_STDLIB 1
15 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
17 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
20 #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
21 # define BOOST_NO_CWCHAR
22 # define BOOST_NO_CWCTYPE
23 # define BOOST_NO_STD_WSTRING
24 # define BOOST_NO_STD_WSTREAMBUF
27 #if defined(__osf__) && !defined(_REENTRANT) \
28 && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
29 // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
30 // file is included, therefore for consistency we define it here as well.
34 #ifdef __GLIBCXX__ // gcc 3.4 and greater:
35 # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
36 || defined(_GLIBCXX__PTHREADS) \
37 || defined(_GLIBCXX_HAS_GTHREADS) \
41 // If the std lib has thread support turned on, then turn it on in Boost
42 // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
43 // while others do not...
45 # define BOOST_HAS_THREADS
47 # define BOOST_DISABLE_THREADS
49 #elif defined(__GLIBCPP__) \
50 && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
51 && !defined(_GLIBCPP__PTHREADS)
52 // disable thread support if the std lib was built single threaded:
53 # define BOOST_DISABLE_THREADS
56 #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
57 // linux on arm apparently doesn't define _REENTRANT
58 // so just turn on threading support whenever the std lib is thread safe:
59 # define BOOST_HAS_THREADS
62 #if !defined(_GLIBCPP_USE_LONG_LONG) \
63 && !defined(_GLIBCXX_USE_LONG_LONG)\
64 && defined(BOOST_HAS_LONG_LONG)
65 // May have been set by compiler/*.hpp, but "long long" without library
66 // support is useless.
67 # undef BOOST_HAS_LONG_LONG
70 // Apple doesn't seem to reliably defined a *unix* macro
71 #if !defined(CYGWIN) && ( defined(__unix__) \
74 || defined(__APPLE__) \
80 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
81 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
82 # define BOOST_HAS_SLIST
83 # define BOOST_HAS_HASH
84 # define BOOST_SLIST_HEADER <ext/slist>
85 # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
86 # define BOOST_HASH_SET_HEADER <ext/hash_set>
87 # define BOOST_HASH_MAP_HEADER <ext/hash_map>
89 # define BOOST_HASH_SET_HEADER <backward/hash_set>
90 # define BOOST_HASH_MAP_HEADER <backward/hash_map>
94 // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
95 // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++
96 // developers. He also commented:
98 // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
99 // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
100 // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
101 // than any release in the 4.2 series."
103 // Another resource for understanding stdlibc++ features is:
104 // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
106 // C++0x headers in GCC 4.3.0 and later
108 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
109 # define BOOST_NO_CXX11_HDR_ARRAY
110 # define BOOST_NO_CXX11_HDR_REGEX
111 # define BOOST_NO_CXX11_HDR_TUPLE
112 # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
113 # define BOOST_NO_CXX11_HDR_UNORDERED_SET
114 # define BOOST_NO_CXX11_HDR_FUNCTIONAL
117 // C++0x headers in GCC 4.4.0 and later
119 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
120 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
121 # define BOOST_NO_CXX11_HDR_FORWARD_LIST
122 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
123 # define BOOST_NO_CXX11_HDR_MUTEX
124 # define BOOST_NO_CXX11_HDR_RATIO
125 # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
126 # define BOOST_NO_CXX11_SMART_PTR
128 # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
129 # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
132 #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX))
133 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
134 # define BOOST_NO_CXX11_HDR_MUTEX
137 // C++0x features in GCC 4.5.0 and later
139 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
140 # define BOOST_NO_CXX11_NUMERIC_LIMITS
141 # define BOOST_NO_CXX11_HDR_FUTURE
142 # define BOOST_NO_CXX11_HDR_RANDOM
145 // C++0x features in GCC 4.6.0 and later
147 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
148 # define BOOST_NO_CXX11_HDR_TYPEINDEX
151 // C++0x features in GCC 4.7.0 and later
153 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
154 // Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock"
155 // so 4.7.0 is the first truely conforming one.
156 # define BOOST_NO_CXX11_HDR_CHRONO
157 # define BOOST_NO_CXX11_ALLOCATOR
159 // C++0x headers not yet (fully!) implemented
161 # define BOOST_NO_CXX11_HDR_THREAD
162 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
163 # define BOOST_NO_CXX11_HDR_CODECVT
164 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR