00001 ////////////////////////////////////////////////////////////////////// 00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca> 00003 // 00004 // This program is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public License 00006 // as published by the Free Software Foundation; either 00007 // version 2 of the License, or (at your option) any later 00008 // version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 00019 #ifndef freecloth_base_config_h 00020 #define freecloth_base_config_h 00021 00022 //////////////////////////////////////////////////////////////////////////////// 00023 // Compiler definitions 00024 // 00025 // COMPILER_MSVC 00026 // COMPILER_GCC 00027 // 00028 00029 #ifdef _MSC_VER 00030 #define COMPILER_MSVC 1 00031 #else 00032 #define COMPILER_MSVC 0 00033 #endif 00034 00035 #ifdef __GNUC__ 00036 #define COMPILER_GCC 1 00037 #else 00038 #define COMPILER_GCC 0 00039 #endif 00040 00041 //////////////////////////////////////////////////////////////////////////////// 00042 // Operating system definitions 00043 // 00044 // OPSYS_WIN32 00045 // OPSYS_CYGWIN32 (should also define OPSYS_WIN32) 00046 // 00047 00048 #ifdef _WIN32 00049 #define OPSYS_WIN32 1 00050 #else 00051 #define OPSYS_WIN32 0 00052 #endif 00053 00054 #ifdef __CYGWIN32__ 00055 #define OPSYS_CYGWIN32 1 00056 #else 00057 #define OPSYS_CYGWIN32 0 00058 #endif 00059 00060 #if !OPSYS_WIN32 00061 #define OPSYS_UNIX 00062 #else 00063 #define OPSYS_UNIX 00064 #endif 00065 00066 00067 00068 //////////////////////////////////////////////////////////////////////////////// 00069 // Configuration-dependent settings 00070 00071 #if COMPILER_MSVC 00072 // Disable "C++ Exception Specification ignored" warning 00073 #pragma warning( disable: 4290 ) 00074 // Disable "identifier was truncated to 255 characters in the debug 00075 // information" warning 00076 #pragma warning( disable: 4786 ) 00077 //#define HAVE_TEMPLATE_FRIENDS 00078 //#define HAVE_MEMBER_TEMPLATES 00079 00080 // Strange MSVC bug: if a template class is contained in a namespace, the 00081 // namespace must be explicitly specified for class. 00082 #define TEMPLATE_NAMESPACE_PREFIX freecloth:: 00083 #else 00084 #define TEMPLATE_NAMESPACE_PREFIX 00085 #endif 00086 00087 #if COMPILER_GCC 00088 #include <freecloth/base/autoconf.h> 00089 #undef PACKAGE 00090 #undef VERSION 00091 #endif 00092 00093 #if OPSYS_WIN32 00094 #define NOMINMAX 00095 #endif 00096 00097 #endif