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