p_config.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  * 
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation the rights to use, copy, modify, merge, publish,
00010  * distribute, sub license, and/or sell copies of the Software, and to
00011  * permit persons to whom the Software is furnished to do so, subject to
00012  * the following conditions:
00013  * 
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial portions
00016  * of the Software.
00017  * 
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  * 
00026  **************************************************************************/
00027 
00046 #ifndef P_CONFIG_H_
00047 #define P_CONFIG_H_
00048 
00049 
00050 /*
00051  * Compiler
00052  */
00053 
00054 #if defined(__GNUC__)
00055 #define PIPE_CC_GCC
00056 #endif
00057 
00058 /*
00059  * Meaning of _MSC_VER value:
00060  * - 1400: Visual C++ 2005
00061  * - 1310: Visual C++ .NET 2003
00062  * - 1300: Visual C++ .NET 2002
00063  * 
00064  * __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC 
00065  * versions.
00066  */
00067 #if defined(_MSC_VER) || defined(__MSC__)
00068 #define PIPE_CC_MSVC
00069 #endif
00070 
00071 #if defined(__ICL)
00072 #define PIPE_CC_ICL
00073 #endif
00074 
00075 
00076 /*
00077  * Processor architecture
00078  */
00079 
00080 #if defined(__i386__) /* gcc */ || defined(_M_IX86) /* msvc */ || defined(_X86_) || defined(__386__) || defined(i386)
00081 #define PIPE_ARCH_X86
00082 #endif
00083 
00084 #if defined(__x86_64__) /* gcc */ || defined(_M_X64) /* msvc */ || defined(_M_AMD64) /* msvc */
00085 #define PIPE_ARCH_X86_64
00086 #endif
00087 
00088 #if 0 /* FIXME */
00089 #define PIPE_ARCH_PPC
00090 #endif
00091 
00092 
00093 /*
00094  * Operating system family.
00095  * 
00096  * See subsystem below for a more fine-grained distinction.
00097  */
00098 
00099 #if defined(__linux__)
00100 #define PIPE_OS_LINUX
00101 #endif
00102 
00103 #if defined(_WIN32) || defined(WIN32)
00104 #define PIPE_OS_WINDOWS
00105 #endif
00106 
00107 
00108 /*
00109  * Subsystem.
00110  * 
00111  * NOTE: There is no way to auto-detect most of these.
00112  */
00113 
00114 #if defined(PIPE_OS_LINUX)
00115 #define PIPE_SUBSYSTEM_DRI
00116 #endif /* PIPE_OS_LINUX */
00117 
00118 #if defined(PIPE_OS_WINDOWS)
00119 #if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
00120 /* Windows 2000/XP Display Driver */ 
00121 #elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
00122 /* Windows 2000/XP Miniport Driver */ 
00123 #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
00124 /* Windows User-space Library */
00125 #elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
00126 /* Windows CE 5.0/6.0 */
00127 #else
00128 #ifdef _WIN32_WCE
00129 #define PIPE_SUBSYSTEM_WINDOWS_CE
00130 #else /* !_WIN32_WCE */
00131 #error No PIPE_SUBSYSTEM_WINDOWS_xxx subsystem defined. 
00132 #endif /* !_WIN32_WCE */
00133 #endif
00134 #endif /* PIPE_OS_WINDOWS */
00135 
00136 
00137 #endif /* P_CONFIG_H_ */

Generated on Tue Sep 29 06:25:17 2009 for Gallium3D by  doxygen 1.5.4