[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

vigra/config.hxx |

    00001 /************************************************************************/
    00002 /*                                                                      */
    00003 /*               Copyright 1998-2002 by Ullrich Koethe                  */
    00004 /*                                                                      */
    00005 /*    This file is part of the VIGRA computer vision library.           */
    00006 /*    The VIGRA Website is                                              */
    00007 /*        http://hci.iwr.uni-heidelberg.de/vigra/                       */
    00008 /*    Please direct questions, bug reports, and contributions to        */
    00009 /*        ullrich.koethe@iwr.uni-heidelberg.de    or                    */
    00010 /*        vigra@informatik.uni-hamburg.de                               */
    00011 /*                                                                      */
    00012 /*    Permission is hereby granted, free of charge, to any person       */
    00013 /*    obtaining a copy of this software and associated documentation    */
    00014 /*    files (the "Software"), to deal in the Software without           */
    00015 /*    restriction, including without limitation the rights to use,      */
    00016 /*    copy, modify, merge, publish, distribute, sublicense, and/or      */
    00017 /*    sell copies of the Software, and to permit persons to whom the    */
    00018 /*    Software is furnished to do so, subject to the following          */
    00019 /*    conditions:                                                       */
    00020 /*                                                                      */
    00021 /*    The above copyright notice and this permission notice shall be    */
    00022 /*    included in all copies or substantial portions of the             */
    00023 /*    Software.                                                         */
    00024 /*                                                                      */
    00025 /*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND    */
    00026 /*    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES   */
    00027 /*    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND          */
    00028 /*    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT       */
    00029 /*    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,      */
    00030 /*    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING      */
    00031 /*    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR     */
    00032 /*    OTHER DEALINGS IN THE SOFTWARE.                                   */
    00033 /*                                                                      */
    00034 /************************************************************************/
    00035
    00036
    00037 #ifndef VIGRA_CONFIG_HXX
    00038 #define VIGRA_CONFIG_HXX
    00039
    00040 #include <vigra/configVersion.hxx>
    00041 #include <stdexcept>
    00042
    00043 ///////////////////////////////////////////////////////////
    00044 //                                                       //
    00045 //                   VisualC++ 5.0                       //
    00046 //                                                       //
    00047 ///////////////////////////////////////////////////////////
    00048
    00049 #ifdef _MSC_VER
    00050     #if(_MSC_VER < 1100)    // before VisualC++ 5.0
    00051         #error "Need VisualC++ 5.0, Service Pack 2, or later"
    00052     #endif // _MSC_VER < 1100
    00053
    00054     #if (_MSC_VER < 1300)
    00055         #define NO_TYPENAME         // no 'typename' keyword
    00056         #define TEMPLATE_COPY_CONSTRUCTOR_BUG
    00057         #define NO_STL_MEMBER_TEMPLATES
    00058         #define NO_INLINE_STATIC_CONST_DEFINITION
    00059         #define CMATH_NOT_IN_STD
    00060         #define NO_COVARIANT_RETURN_TYPES
    00061
    00062         #ifdef VIGRA_NO_STD_MINMAX  // activate if necessary
    00063         namespace std {
    00064
    00065         template<class T>
    00066         const T& min(const T& x, const T& y)
    00067         {
    00068             return (y < x)
    00069                 ? y
    00070                 : x;
    00071         }
    00072
    00073         template<class T>
    00074         const T& max(const T& x, const T& y)
    00075         {
    00076             return (x < y)
    00077                 ? y
    00078                 : x;
    00079         }
    00080         }
    00081         #endif // VIGRA_NO_STD_MINMAX
    00082     #endif // (_MSC_VER < 1300)
    00083
    00084     #if _MSC_VER < 1310
    00085         #pragma warning( disable : 4786 4250 4244 4305)
    00086
    00087         #define NO_PARTIAL_TEMPLATE_SPECIALIZATION
    00088         #define NO_OUT_OF_LINE_MEMBER_TEMPLATES
    00089         #include <cmath>
    00090
    00091         #ifdef _MSC_EXTENSIONS
    00092         #ifndef CMATH_NOT_IN_STD
    00093                 namespace std {
    00094         #endif // CMATH_NOT_IN_STD
    00095                 inline double abs(double v) { return fabs(v); }
    00096                 inline float  abs(float v)  { return fabs(v); }
    00097         #ifndef CMATH_NOT_IN_STD
    00098                 }
    00099         #endif // CMATH_NOT_IN_STD
    00100         #endif // _MSC_EXTENSIONS
    00101     #endif // _MSC_VER < 1310
    00102
    00103     #if _MSC_VER < 1400
    00104         #define VIGRA_NO_WORKING_STRINGSTREAM
    00105     #endif
    00106
    00107     #define VIGRA_NEED_BIN_STREAMS
    00108
    00109     #ifdef VIGRA_DLL
    00110         #define VIGRA_EXPORT __declspec(dllexport)
    00111     #elif defined(VIGRA_STATIC_LIB)
    00112         #define VIGRA_EXPORT
    00113     #else
    00114         #define VIGRA_EXPORT __declspec(dllimport)
    00115     #endif
    00116 #endif // _MSC_VER
    00117
    00118 ///////////////////////////////////////////////////////////
    00119 //                                                       //
    00120 //                           gcc                         //
    00121 //                                                       //
    00122 ///////////////////////////////////////////////////////////
    00123
    00124 #if defined(__GNUC__)
    00125     #if  __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8))
    00126         #error "Need at least g++ 2.95"
    00127     #endif
    00128     #if __GNUC__ < 3
    00129         #define VIGRA_NO_WORKING_STRINGSTREAM
    00130     #endif
    00131     #define HAS_HASH_CONTAINERS
    00132 #endif  // __GNUC__
    00133
    00134 ///////////////////////////////////////////////////////////
    00135 //                                                       //
    00136 //                         MingW                         //
    00137 //                                                       //
    00138 ///////////////////////////////////////////////////////////
    00139
    00140 #if defined(__MINGW32__)
    00141     #define VIGRA_NEED_BIN_STREAMS
    00142
    00143     #ifdef VIGRA_DLL
    00144         #define VIGRA_EXPORT __declspec(dllexport)
    00145     #elif defined(VIGRA_STATIC_LIB)
    00146         #define VIGRA_EXPORT
    00147     #else
    00148         #define VIGRA_EXPORT __declspec(dllimport)
    00149     #endif
    00150 #endif  // __MINGW32__
    00151
    00152 ///////////////////////////////////////////////////////////
    00153 //                                                       //
    00154 //                      SGI C++ 7.2                      //
    00155 //                                                       //
    00156 ///////////////////////////////////////////////////////////
    00157
    00158 #if defined(__sgi) && !defined(__GNUC__)
    00159     #if _COMPILER_VERSION < 720
    00160         #error "Need SGI C++ 7.2 or later"
    00161     #endif
    00162     #if (_COMPILER_VERSION  == 720) || (_COMPILER_VERSION  == 721)
    00163         #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
    00164
    00165         namespace vigra {
    00166             typedef std::exception StdException; // must be above next #define !!
    00167         }
    00168         #define std
    00169         #define NO_NAMESPACE_STD
    00170     #endif // _COMPILER_VERSION
    00171     #define HAS_HASH_CONTAINERS
    00172 #endif // __sgi
    00173
    00174 ///////////////////////////////////////////////////////////
    00175 //                                                       //
    00176 //                      Sun C++ ???                      //
    00177 //                                                       //
    00178 ///////////////////////////////////////////////////////////
    00179
    00180 #if defined(__sun) && !defined(__GNUC__)
    00181     #define VIGRA_HAS_ERF
    00182 #endif // __sun
    00183
    00184 ///////////////////////////////////////////////////////////
    00185 //                                                       //
    00186 //                        general                        //
    00187 //                                                       //
    00188 ///////////////////////////////////////////////////////////
    00189
    00190 #ifdef CMATH_NOT_IN_STD
    00191     #define VIGRA_CSTD
    00192 #else
    00193     #define VIGRA_CSTD std
    00194 #endif
    00195
    00196 #ifdef NO_TYPENAME
    00197     #define typename
    00198 #endif
    00199
    00200 #ifdef NO_EXPLICIT
    00201     #define explicit
    00202 #endif
    00203
    00204 #ifndef VIGRA_EXPORT
    00205     #define VIGRA_EXPORT
    00206 #endif
    00207
    00208 namespace vigra {
    00209
    00210 #ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
    00211      typedef std::exception StdException;
    00212 #endif
    00213
    00214 } // namespace vigra
    00215
    00216 #ifdef DOXYGEN
    00217 #  define doxygen_overloaded_function(fun) fun(...);
    00218 #else
    00219 #  define doxygen_overloaded_function(fun)
    00220 #endif
    00221
    00222
    00223 #endif // VIGRA_CONFIG_HXX

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.7.1 (3 Dec 2010)