1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the QtCore module of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 #ifndef QSYSTEMDETECTION_H
43 #define QSYSTEMDETECTION_H
46 The operating system, must be one of: (Q_OS_x)
48 DARWIN - Darwin OS (synonym for Q_OS_MAC)
49 MSDOS - MS-DOS and Windows
51 OS2EMX - XFree86 on OS/2 (not PM)
52 WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008)
53 WINCE - WinCE (Windows CE 5.0)
65 SCO - SCO OpenServer 5
66 UNIXWARE - UnixWare 7, Open UNIX 8
70 RELIANT - Reliant UNIX
75 BSD4 - Any BSD 4.4 system
76 UNIX - Any UNIX BSD/SYSV system
79 #if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
83 # define Q_OS_DARWIN64
85 # define Q_OS_DARWIN32
87 #elif defined(__CYGWIN__)
89 #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
92 #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
93 # if defined(WINCE) || defined(_WIN32_WCE)
98 #elif defined(__sun) || defined(sun)
100 #elif defined(hpux) || defined(__hpux)
102 #elif defined(__ultrix) || defined(ultrix)
105 # define Q_OS_RELIANT
106 #elif defined(__native_client__)
108 #elif defined(__linux__) || defined(__linux)
110 #elif defined(__FreeBSD__) || defined(__DragonFly__)
111 # define Q_OS_FREEBSD
113 #elif defined(__NetBSD__)
116 #elif defined(__OpenBSD__)
117 # define Q_OS_OPENBSD
119 #elif defined(__bsdi__)
124 #elif defined(__osf__)
128 #elif defined(__Lynx__)
130 #elif defined(__GNU__)
132 #elif defined(__DGUX__)
134 #elif defined(__QNXNTO__)
136 #elif defined(_SEQUENT_)
138 #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
140 #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
141 # define Q_OS_UNIXWARE
142 #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
143 # define Q_OS_UNIXWARE
144 #elif defined(__INTEGRITY)
145 # define Q_OS_INTEGRITY
146 #elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */
147 # define Q_OS_VXWORKS
148 #elif defined(__MAKEDEPEND__)
150 # error "Qt has not been ported to this OS - see http://www.qt-project.org/"
153 #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINCE)
157 #if defined(Q_OS_DARWIN)
159 # define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/
160 # if defined(Q_OS_DARWIN64)
162 # elif defined(Q_OS_DARWIN32)
167 #if defined(Q_OS_WIN)
169 #elif !defined(Q_OS_UNIX)
174 # ifdef MAC_OS_X_VERSION_MIN_REQUIRED
175 # undef MAC_OS_X_VERSION_MIN_REQUIRED
177 # define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
178 # include <AvailabilityMacros.h>
179 # if !defined(MAC_OS_X_VERSION_10_3)
180 # define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
182 # if !defined(MAC_OS_X_VERSION_10_4)
183 # define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
185 # if !defined(MAC_OS_X_VERSION_10_5)
186 # define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1
188 # if !defined(MAC_OS_X_VERSION_10_6)
189 # define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1
191 # if !defined(MAC_OS_X_VERSION_10_7)
192 # define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1
194 # if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7)
195 # warning "This version of Mac OS X is unsupported"
199 #ifdef __LSB_VERSION__
200 # if __LSB_VERSION__ < 40
201 # error "This version of the Linux Standard Base is unsupported"
204 # define QT_LINUXBASE
208 #endif // QSYSTEMDETECTION_H