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

# vigra/config.hxx

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