sl@0: // (C) Copyright John Maddock 2003. sl@0: // Use, modification and distribution are subject to the sl@0: // Boost Software License, Version 1.0. (See accompanying file sl@0: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: sl@0: #ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP sl@0: #define BOOST_CONFIG_REQUIRES_THREADS_HPP sl@0: sl@0: #ifndef BOOST_CONFIG_HPP sl@0: # include sl@0: #endif sl@0: sl@0: #if defined(BOOST_DISABLE_THREADS) sl@0: sl@0: // sl@0: // special case to handle versions of gcc which don't currently support threads: sl@0: // sl@0: #if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) sl@0: // sl@0: // this is checked up to gcc 3.3: sl@0: // sl@0: #if defined(__sgi) || defined(__hpux) sl@0: # error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" sl@0: #endif sl@0: sl@0: #endif sl@0: sl@0: # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" sl@0: sl@0: #elif !defined(BOOST_HAS_THREADS) sl@0: sl@0: # if defined __COMO__ sl@0: // Comeau C++ sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" sl@0: sl@0: #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) sl@0: // Intel sl@0: #ifdef _WIN32 sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" sl@0: #else sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" sl@0: #endif sl@0: sl@0: # elif defined __GNUC__ sl@0: // GNU C++: sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" sl@0: sl@0: #elif defined __sgi sl@0: // SGI MIPSpro C++ sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" sl@0: sl@0: #elif defined __DECCXX sl@0: // Compaq Tru64 Unix cxx sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" sl@0: sl@0: #elif defined __BORLANDC__ sl@0: // Borland sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" sl@0: sl@0: #elif defined __MWERKS__ sl@0: // Metrowerks CodeWarrior sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" sl@0: sl@0: #elif defined __SUNPRO_CC sl@0: // Sun Workshop Compiler C++ sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" sl@0: sl@0: #elif defined __HP_aCC sl@0: // HP aCC sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" sl@0: sl@0: #elif defined(__IBMCPP__) sl@0: // IBM Visual Age sl@0: # error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" sl@0: sl@0: #elif defined _MSC_VER sl@0: // Microsoft Visual C++ sl@0: // sl@0: // Must remain the last #elif since some other vendors (Metrowerks, for sl@0: // example) also #define _MSC_VER sl@0: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" sl@0: sl@0: #else sl@0: sl@0: # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" sl@0: sl@0: #endif // compilers sl@0: sl@0: #endif // BOOST_HAS_THREADS sl@0: sl@0: #endif // BOOST_CONFIG_REQUIRES_THREADS_HPP