1 // -*- Mode: C++; tab-width: 2; -*- 2 // vi: set ts=2: 3 4 #ifndef BALL_CONFIG_CONFIG_H 5 #define BALL_CONFIG_CONFIG_H 6 7 #include <QtGlobal> 8 9 #ifdef _WINDOWS 10 typedef signed char int8_t; 11 typedef unsigned char uint8_t; 12 typedef signed short int16_t; 13 typedef unsigned short uint16_t; 14 typedef signed int int32_t; 15 typedef unsigned int uint32_t; 16 typedef long long int int64_t; 17 typedef unsigned long long int uint64_t; 18 #else 19 #include <stdint.h> 20 #endif // _WINDOWS 21 22 // Here are some global configuration flags for BALL 23 24 // BALL_DEBUG enables some debugging methods 25 // change the DEBUG entry in configure to define this flag. 26 // If in debug mode, inline functions won't be compiled 27 // as inline by defining BALL_NO_INLINE_FUNCTIONS 28 // This facilitates debugging, as the debugger can always 29 // find the corresponding source code line. 30 // See also COMMON/debug.h for these symbols. 31 /* #undef BALL_DEBUG */ 32 /* #undef BALL_NO_INLINE_FUNCTIONS */ 33 34 // The path to the folder where BALL is installed. 35 //#define BALL_PATH "/usr/local" 36 //#define BALL_DATA_PATH "/usr/local/share/BALL/data" 37 38 // The string describes the binary format. 39 //#define BALL_BINFMT "Linux-x86_64" 40 41 // The processor architecture 42 //#define BALL_ARCH "x86_64" 43 44 // The operating system 45 //#define BALL_OS "Linux" 46 47 // Some convenient shortcuts for operating systems we often encounter 48 // NOTE: we'd like to deprecate these, so try using BALL_OS instead 49 // whenever possible 50 #ifdef Q_OS_UNIX 51 #define BALL_OS_LINUX 52 #endif 53 /* #undef BALL_OS_SOLARIS */ 54 /* #undef BALL_OS_SUNOS */ 55 /* #undef BALL_OS_IRIX */ 56 /* #undef BALL_OS_FREEBSD */ 57 /* #undef BALL_OS_NETBSD */ 58 /* #undef BALL_OS_OPENBSD */ 59 #ifdef Q_OS_DARWIN 60 #define BALL_OS_DARWIN 61 #endif 62 #ifdef Q_OS_WIN 63 #define BALL_OS_WINDOWS 64 #define BALL_PLATFORM_WINDOWS 65 #endif 66 67 // Deprecated, only for compatibility 68 /* #undef BALL_PLATFORM_WINDOWS */ 69 70 // Define compiler specifics 71 72 // Microsoft Visual Studio .NET 73 /* #undef BALL_COMPILER_MSVC */ 74 // GNU g++ 75 //#define BALL_COMPILER_GXX 76 // Intel C++ 77 /* #undef BALL_COMPILER_INTEL */ 78 79 // The compiler name. 80 //#define BALL_COMPILER "GXX" 81 82 // Defines for the compiler version (major.minor.minor_minor) 83 //#define BALL_COMPILER_VERSION 4.8.0 84 //#define BALL_COMPILER_VERSION_MAJOR 4 85 //#define BALL_COMPILER_VERSION_MINOR 8 86 /* #undef BALL_COMPILER_VERSION_MINOR_MINOR */ 87 88 // define symbols for the endianness of the system 89 //#define BALL_LITTLE_ENDIAN 90 /* #undef BALL_BIG_ENDIAN */ 91 92 // Type sizes 93 94 // This flag is defined on 64bit architectures 95 //#define BALL_64BIT_ARCHITECTURE 96 97 // define some symbols for the (bit)size of some builtin types 98 #define BALL_CHAR_SIZE 1 99 #define BALL_SHORT_SIZE 2 100 #define BALL_INT_SIZE 4 101 #define BALL_LONG_SIZE 8 102 #define BALL_USHORT_SIZE 2 103 #define BALL_UINT_SIZE 4 104 #define BALL_ULONG_SIZE 8 105 #define BALL_SIZE_T_SIZE 8 106 #define BALL_POINTER_SIZE 8 107 #define BALL_FLOAT_SIZE 4 108 #define BALL_DOUBLE_SIZE 8 109 110 // define platform independant types for unsigned 16|32|64 bit numbers 111 #define BALL_UINT16 uint16_t 112 #define BALL_UINT32 uint32_t 113 #define BALL_UINT64 uint64_t 114 #define BALL_INT16 int16_t 115 #define BALL_INT32 int32_t 116 #define BALL_INT64 int64_t 117 118 // Define a signed/unsigned numeric type of 64 bit length (used for 119 // platform independent persistence: stores pointers) 120 // this usually defaults to unsigned long on 64 bit architectures 121 // and unsigned long long on 32 bit machines 122 #define BALL_ULONG64_TYPE uint64_t 123 #define BALL_LONG64_TYPE int64_t 124 125 // Defines an unsigned integer type of the same size as void* 126 #define BALL_POINTERSIZEUINT_TYPE unsigned long 127 128 // Defines an unsigned type that has the same length as size_t 129 #define BALL_SIZE_TYPE unsigned long//uint32_t 130 131 // Defines a signed type that has the same length as size_t 132 #define BALL_INDEX_TYPE int32_t 133 134 // Define the precision for the BALL Complex type. 135 #define BALL_COMPLEX_PRECISION float 136 137 // System header information 138 //#define BALL_HAS_UNISTD_H 139 /* #undef BALL_HAS_PROCESS_H */ 140 #define BALL_HAS_TIME_H 141 #define BALL_HAS_LIMITS_H 142 //#define BALL_HAS_DIRENT_H 143 /* #undef BALL_HAS_DIRECT_H */ 144 //#define BALL_HAS_PWD_H 145 //#define BALL_HAS_STDINT_H 146 147 #define BALL_HAS_SYS_IOCTL_H 148 //#define BALL_HAS_SYS_TIME_H 149 #define BALL_HAS_SYS_STAT_H 150 //#define BALL_HAS_SYS_TIMES_H 151 #define BALL_HAS_SYS_TYPES_H 152 //#define BALL_HAS_SYS_PARAM_H 153 //#define BALL_HAS_SYS_SOCKET_H 154 #define BALL_HAS_SYS_SYSINFO_H 155 156 // Define whether float.h has to be included along with limits.h 157 #define BALL_HAS_FLOAT_H 158 159 // Define if numeric_limits is defined in <limits> 160 //#define BALL_HAS_NUMERIC_LIMITS 161 162 #define BALL_HAS_REGEX_H 163 164 //#define BALL_HAS_NETINET_IN_H 165 //#define BALL_HAS_NETDB_H 166 167 // Some systems don't provide mode_t for us... 168 /* #undef mode_t */ 169 170 // Define whether we can use <sstream> or whether we have to use the 171 // older <strstream> 172 #define BALL_HAS_SSTREAM 173 174 // on some systems (e.g. Solaris) we need to include /usr/include/ieeefp.h 175 // for some floating point functions 176 /* #undef BALL_HAS_IEEEFP_H */ 177 178 // on some systems (e.g. Solaris) we need to include /usr/include/values.h 179 // for some floating point functions 180 #define BALL_HAS_VALUES_H 181 182 //#define BALL_HAS_KILL 183 #define BALL_HAS_SYSCONF 184 185 // Specific to the Windows port 186 #ifdef BALL_OS_WINDOWS 187 //#define BALL_HAS_WINDOWS_PERFORMANCE_COUNTER 188 //#define BALL_USE_WINSOCK 189 190 // MS VC++ doesn't define all required symbols in 191 // math.h if this symbol isn't defined *before* including 192 // math.h for the first time! 193 #define _USE_MATH_DEFINES 194 195 // Keep Windows from defining min/max, ERROR,... as preprocesor symbols! 196 // May he how thought of defining these by default rot in hell! 197 #ifndef NOMINMAX 198 # define NOMINMAX 1 199 #endif 200 201 #define NOGDI 202 #define NOWINRES 203 204 #define WINDOWS_LEAN_AND_MEAN 205 #define WIN32_LEAN_AND_MEAN 206 207 #endif // BALL_OS_WINDOWS 208 209 // Define whether the compiler provides an ANSI-compliant implementation 210 // of <iostream>. This is required in COMMON/socket.h/C since we need 211 // the correct initialisation of the base classes. These base classes are 212 // either something like std::basic_ios<char> etc., or ios, istream etc. 213 #define BALL_HAS_ANSI_IOSTREAM 214 215 // Define whether inline functions may be used as template parameters. 216 #define BALL_HAS_INLINE_TPL_ARGS 217 218 // tr1 related variables 219 220 // Do we have an unordered_map, and if so, where? 221 //#define BALL_HAS_UNORDERED_MAP 222 //#define BALL_HAS_HASH_MAP 223 224 //#ifdef BALL_OS_WINDOWS 225 //#define BALL_HAS_STD_UNORDERED_MAP 226 227 //#else 228 /* #undef BALL_HAS_STD_UNORDERED_MAP */ 229 //#define BALL_HAS_TR1_UNORDERED_MAP 230 //#endif 231 /* #undef BALL_HAS_BOOST_UNORDERED_MAP */ 232 233 #define BALL_MAP_NAMESPACE std 234 #define BALL_MAP_NAME std::map<Key,T> 235 236 // Defines the prefix needed when including extensions to the stl 237 #define BALL_EXT_INCLUDE_PREFIX 238 /* #undef BALL_EXT_INCLUDE_PREFIX */ 239 240 // Defines if extensions to hash must be defined in namespace std 241 #define BALL_EXTEND_HASH_IN_STD_NS 242 243 // Defines whether the HashMap already provides LongSize hashing 244 /* #undef BALL_NEEDS_LONGSIZE_HASH */ 245 246 // Defines whether the GNU slist implementation could be found 247 // This is useful for e.g. an efficient HashGrid implementation 248 //#define BALL_HAS_GNU_SLIST 249 250 // Defines whether the extern keyword for templates is supported by the compiler. 251 // We can use this to speed up compilation and to reduce some warnings in under 252 // MSVC. 253 //#define BALL_HAS_EXTERN_TEMPLATES 254 255 // Defines whether the compiler supports c++0x-style rvalue references 256 // (int&&, ...) 257 ///! #define BALL_HAS_RVALUE_REFERENCES 258 259 // Defines whether the c++ std lib implementation supports rvalue references in the std::string class 260 ///! #define BALL_STD_STRING_HAS_RVALUE_REFERENCES 261 262 // Defines whether we can overload functions with LongIndex and LongSize safely 263 /* #undef BALL_ALLOW_LONG64_TYPE_OVERLOADS */ 264 265 // This define is used in string.C and enables a workaround 266 // on those poor systems that do not define vsnprintf. 267 #define BALL_HAVE_VSNPRINTF 268 269 // This flag is used by GenericPDBFile 270 // if it is not set, the length of each line has 271 // to meet the PDB spcifications exactly. 272 // As virtually no existing PDB file fulfills 273 // this requirement, we disencourage its usage. 274 // Nevertheless, it can be quite useful for debugging. 275 /* #undef BALL_STRICT_PDB_LINE_IMPORT */ 276 277 // the signature of the function arguments used in xdrrec_create differs 278 // from platform to platform, so we define some symbols describing the 279 // correct arguments: (void*, char*, int), (char*, char*, int), or (void) 280 // take arguments of type (void*, char*, int) 281 #define BALL_XDRREC_CREATE_CHAR_CHAR_INT 1 282 /* #undef BALL_XDRREC_CREATE_VOID_VOID_INT */ 283 /* #undef BALL_XDRREC_CREATE_VOID_CHAR_INT */ 284 /* #undef BALL_XDRREC_CREATE_VOID_VOID_UINT */ 285 /* #undef BALL_XDRREC_CREATE_VOID */ 286 287 // some platforms do not provide xdr_u_hyper, so we need a workaround for this 288 #define BALL_HAS_XDR_U_HYPER 289 290 // Define the argument type for xdr_u_hyper (64 bit) 291 #define BALL_XDR_UINT64_TYPE u_quad_t 292 293 // boost 294 295 // defined if we have boost::system support 296 //#define BALL_HAS_BOOST_SYSTEM 297 298 // defined if we have boost::iostreams support 299 //#define BALL_HAS_BOOST_IOSTREAMS 300 301 // defined if we have boost::thread support 302 //#define BALL_HAS_BOOST_THREAD 303 304 // defined if we have boost::regex support 305 //#define BALL_HAS_BOOST_REGEX 306 307 // defined if asio is taken from boost 308 //#define BALL_HAS_BOOST_ASIO 309 310 // defined if BALL was configured with asio support 311 //#define BALL_HAS_ASIO 312 313 // the namespace to use for asio 314 //#define BALL_ASIO_NAMESPACE boost::asio 315 316 // Define whether the BLAS library is available 317 #define BALL_HAS_BLAS 318 319 // Define whether LAPACK is available 320 #define BALL_HAS_LAPACK 321 322 // Define whether the FFTW library/header is available. 323 //#define BALL_HAS_FFTW 324 //#define BALL_HAS_FFTW_H 325 326 // Define which versions of fftw can be used: double, float, long double 327 //#define BALL_HAS_FFTW_DOUBLE 328 //#define BALL_HAS_FFTW_FLOAT 329 /* #undef BALL_HAS_FFTW_LONG_DOUBLE */ 330 331 // The default traits for the FFTW classes 332 //#define BALL_FFTW_DEFAULT_TRAITS FloatTraits 333 334 // Define whether BALL was built with lpsolve support 335 #define BALL_HAS_LPSOLVE 336 337 // Define whether BALL was built with libsvm support 338 /* #undef BALL_HAS_LIBSVM */ 339 340 // VIEW related options 341 #define BALL_HAS_VIEW 342 343 // QT options 344 #define BALL_QT_HAS_THREADS // Qt now always has thread support 345 #define QT_THREAD_SUPPORT 346 347 // Glew 348 //#define BALL_HAS_GLEW 349 350 // MPI 351 /* #undef BALL_HAS_MPI */ 352 353 // Define for activated PYTHON support 354 //#define BALL_PYTHON_SUPPORT 355 356 // Maximum line length for reading from files (see source/FORMAT) 357 #define BALL_MAX_LINE_LENGTH 65535 358 359 #endif // BALL_CONFIG_CONFIG_H 360