Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | // Boost compiler configuration selection header file |
| 2 | |
| 3 | // (C) Copyright John Maddock 2001 - 2002. |
| 4 | // (C) Copyright Jens Maurer 2001. |
| 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 | // See http://www.boost.org for most recent version. |
| 10 | |
| 11 | // locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. |
| 12 | // Note that we define the headers to include using "header_name" not |
| 13 | // <header_name> in order to prevent macro expansion within the header |
| 14 | // name (for example "linux" is a macro on linux systems). |
| 15 | |
| 16 | #if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) |
| 17 | // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 18 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/linux.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 19 | |
| 20 | #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) |
| 21 | // BSD: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 22 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/bsd.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 23 | |
| 24 | #elif defined(sun) || defined(__sun) |
| 25 | // solaris: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 26 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/solaris.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 27 | |
| 28 | #elif defined(__sgi) |
| 29 | // SGI Irix: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 30 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/irix.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 31 | |
| 32 | #elif defined(__hpux) |
| 33 | // hp unix: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 34 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/hpux.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 35 | |
| 36 | #elif defined(__CYGWIN__) |
| 37 | // cygwin is not win32: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 38 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/cygwin.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 39 | |
| 40 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) |
| 41 | // win32: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 42 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/win32.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 43 | |
| 44 | #elif defined(__BEOS__) |
| 45 | // BeOS |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 46 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/beos.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 47 | |
| 48 | #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) |
| 49 | // MacOS |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 50 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/macos.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 51 | |
| 52 | #elif defined(__IBMCPP__) || defined(_AIX) |
| 53 | // IBM |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 54 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/aix.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 55 | |
| 56 | #elif defined(__amigaos__) |
| 57 | // AmigaOS |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 58 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/amigaos.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 59 | |
| 60 | #elif defined(__QNXNTO__) |
| 61 | // QNX: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 62 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/qnxnto.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 63 | |
| 64 | #elif defined(__VXWORKS__) |
| 65 | // vxWorks: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 66 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/vxworks.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 67 | |
| 68 | #elif defined(__SYMBIAN32__) |
| 69 | // Symbian: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 70 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/symbian.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 71 | |
| 72 | #elif defined(_CRAYC) |
| 73 | // Cray: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 74 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/cray.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 75 | |
| 76 | #elif defined(__VMS) |
| 77 | // VMS: |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 78 | # define BOOST_PLATFORM_CONFIG "ndnboost/config/platform/vms.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 79 | #else |
| 80 | |
| 81 | # if defined(unix) \ |
| 82 | || defined(__unix) \ |
| 83 | || defined(_XOPEN_SOURCE) \ |
| 84 | || defined(_POSIX_SOURCE) |
| 85 | |
| 86 | // generic unix platform: |
| 87 | |
| 88 | # ifndef BOOST_HAS_UNISTD_H |
| 89 | # define BOOST_HAS_UNISTD_H |
| 90 | # endif |
| 91 | |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame^] | 92 | # include <ndnboost/config/posix_features.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 93 | |
| 94 | # endif |
| 95 | |
| 96 | # if defined (BOOST_ASSERT_CONFIG) |
| 97 | // this must come last - generate an error if we don't |
| 98 | // recognise the platform: |
| 99 | # error "Unknown platform - please configure and report the results to boost.org" |
| 100 | # endif |
| 101 | |
| 102 | #endif |
| 103 | |
| 104 | |
| 105 | |