+#define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+
+/** Presence of compiler features **/
+
+#if (__TBB_GCC_VERSION >= 40400) && !defined(__INTEL_COMPILER)
+ /** warning suppression pragmas available in GCC since 4.4 **/
+ #define __TBB_GCC_WARNING_SUPPRESSION_PRESENT 1
+#endif
+
+/* TODO: The following condition should be extended when new compilers/runtimes
+ with std::exception_ptr support appear. */
+#define __TBB_EXCEPTION_PTR_PRESENT ((_MSC_VER >= 1600 || (__GXX_EXPERIMENTAL_CXX0X__ && __GNUC__==4 && __GNUC_MINOR__>=4)) && !__INTEL_COMPILER)
+
+#if __GNUC__ || __SUNPRO_CC || __IBMCPP__
+ /* ICC defines __GNUC__ and so is covered */
+ #define __TBB_ATTRIBUTE_ALIGNED_PRESENT 1
+#elif _MSC_VER && (_MSC_VER >= 1300 || __INTEL_COMPILER)
+ #define __TBB_DECLSPEC_ALIGN_PRESENT 1
+#endif
+
+#if (__TBB_GCC_VERSION >= 40102) && !defined(__INTEL_COMPILER)
+ /** built-in atomics available in GCC since 4.1.2 **/
+ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
+#endif
+
+/** User controlled TBB features & modes **/