aipsenv.h

Go to the documentation of this file.
00001 //# aipsenv.h: Global initialization for special Casacore 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$
00027 
00028 // this file contains all the compiler specific defines
00029 
00030 #ifndef CASA_AIPSENV_H
00031 #define CASA_AIPSENV_H
00032 
00033 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00034 
00035 // Set if compiler supports C++11 or newer
00036 #if __cplusplus >= 201103L
00037 #define AIPS_CXX11
00038 #endif
00039 
00040 // Set if GCC compiler is used.
00041 #if defined(AIPS_GCC)
00042 #undef AIPS_GCC
00043 #endif
00044 #if defined(__GNUC__)
00045 #define AIPS_GCC
00046 #endif
00047 
00048 /* ONLY USE IF CODE WILL _NOT_ WORK WITH NEWER VERSIONS */
00049 #if defined(AIPS_GCC2)
00050 #undef AIPS_GCC2
00051 #endif
00052 #if (defined(AIPS_GCC) && __GNUC_CC == 2)
00053 #define AIPS_GCC2
00054 #endif
00055 
00056 /* ONLY USE IF CODE WILL _NOT_ WORK WITH NEWER VERSIONS */
00057 #if defined(AIPS_GCC295)
00058 #undef AIPS_GCC295
00059 #endif
00060 #if (defined(AIPS_GCC2) && __GNUC_MINOR__ == 95)
00061 #define AIPS_GCC295
00062 #endif
00063 
00064 /* ONLY USE IF CODE WILL _NOT_ WORK WITH NEWER VERSIONS */
00065 #if defined(AIPS_GCC3)
00066 #undef AIPS_GCC3
00067 #endif
00068 #if (defined(AIPS_GCC) && __GNUC__ == 3)
00069 #define AIPS_GCC3
00070 #endif
00071 
00072 /* ONLY USE IF CODE WILL _NOT_ WORK WITH NEWER VERSIONS */
00073 #if defined(AIPS_GCC4)
00074 #undef AIPS_GCC4
00075 #endif
00076 #if (defined(AIPS_GCC) && __GNUC__ == 4)
00077 #define AIPS_GCC4
00078 #endif
00079 
00080 // Alternate project compiler 
00081 #if defined(AIPS_SGI)
00082 #undef AIPS_SGI
00083 #endif
00084 #if defined(__sgi)
00085 #define AIPS_SGI
00086 #if defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64)
00087 #define AIPS_64B
00088 #define SGI64
00089 #endif
00090 #endif
00091 
00092 // Alternate project compiler 
00093 #if defined(AIPS_SUN_NATIVE)
00094 #undef AIPS_SUN_NATIVE
00095 #endif
00096 #if defined(__SUNPRO_CC)
00097 #define AIPS_SUN_NATIVE
00098 #endif
00099 
00100 #if defined(AIPS_SOLARIS)
00101 #undef AIPS_SOLARIS
00102 #endif
00103 #if defined(__sun)
00104 #define AIPS_SOLARIS
00105 #endif
00106 
00107 #if defined(AIPS_HP)
00108 #undef AIPS_HP
00109 #endif
00110 #if defined(__hp)
00111 #define AIPS_HP
00112 #endif
00113 
00114 #if defined(AIPS_ALPHA)
00115 #undef AIPS_ALPHA
00116 #endif
00117 #if defined(__alpha)
00118 #define AIPS_ALPHA
00119 #define AIPS_64B
00120 #endif
00121 
00122 #if defined(AIPS_BSD)
00123 #undef AIPS_BSD
00124 #endif
00125 #if defined(__FreeBSD__)
00126 #define AIPS_BSD
00127 #define AIPS_NOLARGEFILE
00128 #endif
00129 
00130 #if defined(AIPS_LINUX)
00131 #undef AIPS_LINUX
00132 #endif
00133 #if defined(__linux)
00134 #define AIPS_LINUX
00135 #endif
00136 
00137 #if defined(AIPS_KAI)
00138 #undef AIPS_KAI
00139 #endif
00140 #if defined(__kai)
00141 #define AIPS_KAI
00142 #endif
00143 
00144 #if defined(AIPS_AIX)
00145 #undef AIPS_AIX
00146 #endif
00147 #if defined(_AIX)
00148 #define AIPS_AIX
00149 #endif
00150 
00151 #if defined(AIPS_INTELCC)
00152 #undef AIPS_INTELCC
00153 #endif
00154 #if defined(__INTEL_COMPILER)
00155 #define AIPS_INTELCC
00156 #endif
00157 
00158 #if defined(AIPS_CRAY_PGI)
00159 #undef AIPS_CRAY_PGI
00160 #endif
00161 #if defined(__QK_USER__)
00162 #define AIPS_CRAY_PGI
00163 #if !defined(AIPS_NOLARGEFILE)
00164 #define AIPS_NOLARGEFILE
00165 #endif
00166 #if !defined(AIPS_NO_LEA_MALLOC)
00167 #define AIPS_NO_LEA_MALLOC
00168 #endif
00169 #endif
00170 
00171 #if defined(AIPS_CRAY_CATAMOUNT)
00172 #undef AIPS_CRAY_CATAMOUNT
00173 #endif
00174 #if defined(__LIB_CATAMOUNT__)
00175 #define AIPS_CRAY_CATAMOUNT
00176 #endif
00177 
00178 #if (defined(__ia64) || defined(__x86_64__) || defined(__aarch64__))
00179 # if !defined(AIPS_64B)
00180 # define AIPS_64B
00181 # endif
00182 #endif
00183 
00184 #if defined(AIPS_I386)
00185 #undef AIPS_I386
00186 #endif
00187 #if defined(i386)
00188 #define AIPS_I386
00189 #endif
00190 
00191 #if defined(AIPS_DARWIN)
00192 #undef AIPS_DARWIN
00193 #endif
00194 #if defined(__APPLE__)
00195 #define AIPS_DARWIN
00196 //  No need for largefile definition as it is the default under DARWIN
00197 #define AIPS_NOLARGEFILE
00198   // Don't use AIPS_LITTLE_ENDIAN as this would prevent universal builds
00199   // from working. Auto-detect from AIPS_I386 for intel Macs
00200 #define AIPS_NO_LEA_MALLOC 
00201 # if defined(AIPS_LITTLE_ENDIAN)
00202 # undef AIPS_LITTLE_ENDIAN
00203 # endif
00204 #endif
00205 
00206 //  If the compiler specifies endianness, use that
00207 #if !(defined(AIPS_LITTLE_ENDIAN))
00208 #if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__))
00209 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
00210 #define AIPS_LITTLE_ENDIAN
00211 #endif
00212 #else
00213 //  Automatically configure for known LITTLE ENDIAN systems
00214 #if (defined(AIPS_ALPHA) || defined(AIPS_I386) || defined(__x86_64__) || defined(__ARMEL__) || defined(__AARCH64EL__))
00215 #define AIPS_LITTLE_ENDIAN
00216 #endif
00217 #endif
00218 #endif
00219 
00220 
00221 //  If needed, define the LFS variables (needed in code using cfitsio).
00222 #ifndef AIPS_NOLARGEFILE
00223 # undef _FILE_OFFSET_BITS
00224 # define _FILE_OFFSET_BITS 64
00225 # ifndef _LARGEFILE_SOURCE
00226 #  define _LARGEFILE_SOURCE
00227 # endif
00228 # ifndef _LARGEFILE64_SOURCE
00229 #  define _LARGEFILE64_SOURCE
00230 # endif
00231 #endif
00232 
00233 
00234 } //# NAMESPACE CASACORE - END
00235 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1