casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
aipsenv.h
Go to the documentation of this file.
00001 //# aipsenv.h: Global initialization for special aips++ macros
00002 //# Copyright (C) 2000,2001,2002,2003,2004
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: aipsenv.h 21112 2011-07-20 14:30:54Z gervandiepen $
00027 
00028 // this file contains all the compiler specific defines
00029 
00030 #ifndef CASA_AIPSENV_H
00031 #define CASA_AIPSENV_H
00032 
00033 namespace casa { //# NAMESPACE CASA - BEGIN
00034 
00035 // AIPS++ project compiler
00036 #if defined(AIPS_GCC)
00037 #undef AIPS_GCC
00038 #endif
00039 #if defined(__GNUC__)
00040 #define AIPS_GCC
00041 #endif
00042 
00043 #if defined(AIPS_GCC2)
00044 #undef AIPS_GCC2
00045 #endif
00046 #if (defined(AIPS_GCC) && __GNUC_CC == 2)
00047 #define AIPS_GCC2
00048 #endif
00049 
00050 #if defined(AIPS_GCC295)
00051 #undef AIPS_GCC295
00052 #endif
00053 #if (defined(AIPS_GCC2) && __GNUC_MINOR__ == 95)
00054 #define AIPS_GCC295
00055 #endif
00056 
00057 #if defined(AIPS_GCC3)
00058 #undef AIPS_GCC3
00059 #endif
00060 #if (defined(AIPS_GCC) && __GNUC__ == 3)
00061 #define AIPS_GCC3
00062 #endif
00063 
00064 #if defined(AIPS_GCC4)
00065 #undef AIPS_GCC4
00066 #endif
00067 #if (defined(AIPS_GCC) && __GNUC__ == 4)
00068 #define AIPS_GCC4
00069 #endif
00070 
00071 // Alternate project compiler 
00072 #if defined(AIPS_SGI)
00073 #undef AIPS_SGI
00074 #endif
00075 #if defined(__sgi)
00076 #define AIPS_SGI
00077 #if defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64)
00078 #define AIPS_64B
00079 #define SGI64
00080 #endif
00081 #endif
00082 
00083 // Alternate project compiler 
00084 #if defined(AIPS_SUN_NATIVE)
00085 #undef AIPS_SUN_NATIVE
00086 #endif
00087 #if defined(__SUNPRO_CC)
00088 #define AIPS_SUN_NATIVE
00089 #endif
00090 
00091 #if defined(AIPS_SOLARIS)
00092 #undef AIPS_SOLARIS
00093 #endif
00094 #if defined(__sun)
00095 #define AIPS_SOLARIS
00096 #endif
00097 
00098 #if defined(AIPS_HP)
00099 #undef AIPS_HP
00100 #endif
00101 #if defined(__hp)
00102 #define AIPS_HP
00103 #endif
00104 
00105 #if defined(AIPS_ALPHA)
00106 #undef AIPS_ALPHA
00107 #endif
00108 #if defined(__alpha)
00109 #define AIPS_ALPHA
00110 #define AIPS_64B
00111 #endif
00112 
00113 #if defined(AIPS_BSD)
00114 #undef AIPS_BSD
00115 #endif
00116 #if defined(__FreeBSD__)
00117 #define AIPS_BSD
00118 #define AIPS_NOLARGEFILE
00119 #endif
00120 
00121 #if defined(AIPS_LINUX)
00122 #undef AIPS_LINUX
00123 #endif
00124 #if defined(__linux)
00125 #define AIPS_LINUX
00126 #endif
00127 
00128 #if defined(AIPS_KAI)
00129 #undef AIPS_KAI
00130 #endif
00131 #if defined(__kai)
00132 #define AIPS_KAI
00133 #endif
00134 
00135 #if defined(AIPS_AIX)
00136 #undef AIPS_AIX
00137 #endif
00138 #if defined(_AIX)
00139 #define AIPS_AIX
00140 #endif
00141 
00142 #if defined(AIPS_INTELCC)
00143 #undef AIPS_INTELCC
00144 #endif
00145 #if defined(__INTEL_COMPILER)
00146 #define AIPS_INTELCC
00147 #endif
00148 
00149 #if defined(AIPS_CRAY_PGI)
00150 #undef AIPS_CRAY_PGI
00151 #endif
00152 #if defined(__QK_USER__)
00153 #define AIPS_CRAY_PGI
00154 #if !defined(AIPS_NOLARGEFILE)
00155 #define AIPS_NOLARGEFILE
00156 #endif
00157 #if !defined(AIPS_NO_LEA_MALLOC)
00158 #define AIPS_NO_LEA_MALLOC
00159 #endif
00160 #endif
00161 
00162 #if defined(AIPS_CRAY_CATAMOUNT)
00163 #undef AIPS_CRAY_CATAMOUNT
00164 #endif
00165 #if defined(__LIB_CATAMOUNT__)
00166 #define AIPS_CRAY_CATAMOUNT
00167 #endif
00168 
00169 #if (defined(__ia64) || defined(__x86_64__))
00170 # if !defined(AIPS_64B)
00171 # define AIPS_64B
00172 # endif
00173 #endif
00174 
00175 #if defined(AIPS_I386)
00176 #undef AIPS_I386
00177 #endif
00178 #if defined(i386)
00179 #define AIPS_I386
00180 #endif
00181 
00182 #if defined(AIPS_DARWIN)
00183 #undef AIPS_DARWIN
00184 #endif
00185 #if defined(__APPLE__)
00186 #define AIPS_DARWIN
00187 //  No need for largefile definition as it is the default under DARWIN
00188 #define AIPS_NOLARGEFILE
00189   // Don't use AIPS_LITTLE_ENDIAN as this would prevent universal builds
00190   // from working. Auto-detect from AIPS_I386 for intel Macs
00191 #define AIPS_NO_LEA_MALLOC 
00192 # if defined(AIPS_LITTLE_ENDIAN)
00193 # undef AIPS_LITTLE_ENDIAN
00194 # endif
00195 #endif
00196 
00197 //  Automatically configure for known LITTLE ENDIAN systems
00198 #if !(defined(AIPS_LITTLE_ENDIAN))
00199 #if (defined(AIPS_ALPHA) || defined(AIPS_I386) || defined(__x86_64__))
00200 #define AIPS_LITTLE_ENDIAN
00201 #endif
00202 #endif
00203 
00204 
00205 //  If needed, define the LFS variables (needed in code using cfitsio).
00206 #ifndef AIPS_NOLARGEFILE
00207 # undef _FILE_OFFSET_BITS
00208 # define _FILE_OFFSET_BITS 64
00209 # ifndef _LARGEFILE_SOURCE
00210 #  define _LARGEFILE_SOURCE
00211 # endif
00212 # ifndef _LARGEFILE64_SOURCE
00213 #  define _LARGEFILE64_SOURCE
00214 # endif
00215 #endif
00216 
00217 // Add other platforms here
00218 #if (defined(AIPS_LINUX) || defined(AIPS_DARWIN) || defined(AIPS_BSD))
00219 #if !defined(AIPS_AUTO_STL)
00220 #define AIPS_AUTO_STL
00221 #endif
00222 #if !defined(AIPS_STDLIB)
00223 #define AIPS_STDLIB
00224 #endif
00225 #endif
00226 
00227 // Only use multi-threading if USE_THREADS is defined.
00228 #ifndef USE_THREADS
00229 # ifdef USE_MULTI_THREADING
00230 #  undef USE_MULTI_THREADING
00231 # endif
00232 #endif
00233 
00234 // Toggle on OMP if not clang compiler
00235 #ifndef  __clang__ 
00236 #ifndef HAS_OMP
00237 #define HAS_OMP 1
00238 #endif
00239 #endif
00240 
00241 } //# NAMESPACE CASA - END
00242 #endif