Update copyright statements and change license to LGPL
[alexxy/gromacs.git] / src / config.h.cmakein
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2012, by the GROMACS development team, led by
5  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6  * others, as listed in the AUTHORS file in the top-level source
7  * directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /* Manually created from config.h.in to work with cmake */
36
37 /* Disable warnings about double-to-float conversion accuracy loss on MSVC */
38 #ifdef _MSC_VER
39 #pragma warning (disable : 4305)
40 #pragma warning (disable : 4244)
41 #pragma warning (disable : 4101)
42 #pragma warning (disable : 4996)
43 #pragma warning (disable : 4267)
44 #pragma warning (disable : 4090)
45 #endif
46
47 /* Name of package (translate from cmake to autoconf macro name) */
48 #define PACKAGE  "@PROJECT_NAME@"
49
50 /* Version number of package (translate from cmake to autoconf macro name) */
51 #define VERSION  "@PROJECT_VERSION@"
52
53 /* Use the version string from generated version.h */
54 #cmakedefine USE_VERSION_H
55
56 /* Default location of data files */
57 #define GMXLIBDIR "@GMXLIBDIR@"
58
59 /* Turn off water-water neighborlist optimization only - not used right now */
60 #cmakedefine DISABLE_WATERWATER_NLIST
61
62 /* Turn off all water neighborlist optimization - not used right now */
63 #cmakedefine DISABLE_WATER_NLIST
64
65 /* Fortran support */
66 #cmakedefine GMX_FORTRAN
67
68 /* Define to a macro mangling the given C identifier (in lower and upper
69    case), which must not contain underscores, for linking with Fortran. */
70 #define F77_FUNC(name,NAME)     @F77_FUNCDEF@
71
72 /* As F77_FUNC, but for C identifiers containing underscores. */
73 #define F77_FUNC_(name,NAME)    @F77_FUNCDEF_@
74
75 /* IEEE754 floating-point format. Memory layout is defined by macros
76  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
77  */
78 #cmakedefine GMX_FLOAT_FORMAT_IEEE754
79
80 /* Use assembly intrinsics kernels for BlueGene */
81 #cmakedefine GMX_BLUEGENE
82
83 /* Power6 acceleration */
84 #cmakedefine GMX_POWER6
85
86 /* Work around broken calloc() */
87 #cmakedefine GMX_BROKEN_CALLOC
88
89 /* Enable special hacks for Cray XT3 */
90 #cmakedefine GMX_CRAY_XT3
91
92 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
93 #cmakedefine GMX_DISABLE_FFTW_MEASURE
94
95 /* Compile in double precision */
96 #cmakedefine GMX_DOUBLE
97
98 /* Use Built-in FFTPACK FFT library */
99 #cmakedefine GMX_FFT_FFTPACK
100
101 /* Use FFTW3 FFT library */
102 #cmakedefine GMX_FFT_FFTW3
103
104 /* Use Intel MKL FFT library */
105 #cmakedefine GMX_FFT_MKL
106
107 /* Use AMD core math library */
108 #cmakedefine GMX_FFT_ACML
109
110 /* SSE2 instructions available */
111 #cmakedefine GMX_X86_SSE2
112
113 /* SSE4.1 instructions available */
114 #cmakedefine GMX_X86_SSE4_1
115
116 /* AVX 128-bit FMA instructions available */
117 #cmakedefine GMX_X86_AVX_128_FMA
118
119 /* AVX 256-bit instructions available */
120 #cmakedefine GMX_X86_AVX_256
121
122 /* SSE2 was selected as CPU acceleration level */
123 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE2
124
125 /* SSE4.1 was selected as CPU acceleration level */
126 #cmakedefine GMX_CPU_ACCELERATION_X86_SSE4_1
127
128 /* AVX 128-bit FMA was selected as CPU acceleration level */
129 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_128_FMA
130
131 /* AVX 256-bit was selected as CPU acceleration level */
132 #cmakedefine GMX_CPU_ACCELERATION_X86_AVX_256
133
134 /* String for CPU acceleration choice (for writing to log files and stdout) */
135 #define GMX_CPU_ACCELERATION_STRING "@GMX_CPU_ACCELERATION@"
136
137 /* Integer byte order is big endian. */
138 #cmakedefine GMX_INTEGER_BIG_ENDIAN 
139
140 /* Use our own instead of system XDR libraries */
141 #cmakedefine GMX_INTERNAL_XDR
142
143 /* Use MPI (with mpicc) for parallelization */
144 #cmakedefine GMX_LIB_MPI
145
146 /* MPI_IN_PLACE exists for collective operations */
147 #cmakedefine MPI_IN_PLACE_EXISTS
148
149 /* Make a parallel version of GROMACS using message passing 
150    (MPI or thread_mpi) */
151 #cmakedefine GMX_MPI
152
153 /* Use threads_mpi for parallelization */
154 #cmakedefine GMX_THREAD_MPI
155
156 /* Use OpenMP multithreading */
157 #cmakedefine GMX_OPENMP
158
159 /* Ignore calls to nice(3) */
160 #cmakedefine GMX_NO_NICE
161
162 /* Ignore calls to system(3) */
163 #cmakedefine GMX_NO_SYSTEM
164
165 /* Use (modified) Gamess-UK for QM-MM calculations */
166 #cmakedefine GMX_QMMM_GAMESS
167
168 /* Use (modified) Gaussian0x for QM-MM calculations */
169 #cmakedefine GMX_QMMM_GAUSSIAN
170
171 /* Use (modified) Mopac 7 for QM-MM calculations */
172 #cmakedefine GMX_QMMM_MOPAC
173
174 /* Use the GROMACS software 1/sqrt(x) */
175 #cmakedefine GMX_SOFTWARE_INVSQRT
176
177 /* Use the PowerPC hardware 1/sqrt(x) */
178 #cmakedefine GMX_POWERPC_INVSQRT
179
180 /* Use sub-counters */
181 #cmakedefine GMX_CYCLE_SUBCOUNTERS
182
183 /* Compile with plugin support */
184 #cmakedefine GMX_USE_PLUGINS
185
186 /* Fallback path for VMD plug-ins */
187 #define GMX_VMD_PLUGIN_PATH "@GMX_VMD_PLUGIN_PATH@"
188
189 /* Define when pthreads are used */
190 #cmakedefine THREAD_PTHREADS
191
192 /* Define when Windows threads are used */
193 #cmakedefine THREAD_WINDOWS
194
195 /* Define when thread-MPI atomic operations are available */
196 #cmakedefine TMPI_ATOMICS
197
198 /* Define for busy wait option  */
199 #cmakedefine TMPI_WAIT_FOR_NO_ONE
200
201 /* Define for copy buffer option */
202 #cmakedefine TMPI_COPY_BUFFER
203
204 /* Define for profiling option */
205 #cmakedefine TMPI_PROFILE
206
207 /* Define for Linux pthread_setaffinity */
208 #cmakedefine HAVE_PTHREAD_SETAFFINITY
209
210 /* Define for Windows NUMA-aware allocator functions*/
211 #cmakedefine TMPI_WINDOWS_NUMA_API
212
213 /* Define for sysconf() */
214 #cmakedefine HAVE_SYSCONF
215
216 /* Define for GetSystemInfo() */
217 #cmakedefine HAVE_SYSTEM_INFO
218
219 /* Enable x86 gcc inline assembly */
220 #cmakedefine GMX_X86_GCC_INLINE_ASM
221
222 /* Use GPU native acceleration */
223 #cmakedefine GMX_GPU
224
225 /* Define to 1 if the system has the type gmx_bool. */
226 #cmakedefine HAVE_BOOL
227
228 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
229 #cmakedefine HAVE_FSEEKO
230
231 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
232 #cmakedefine HAVE__FSEEKI64
233
234 /* Define to 1 if you have the m library (-lm). */
235 #cmakedefine HAVE_LIBM
236
237 /* Define to 1 if you have the mkl library (-lmkl). */
238 #cmakedefine HAVE_LIBMKL
239
240 /* Define to 1 if you have the gsl library (-lgsl). */
241 #cmakedefine HAVE_LIBGSL
242
243 /* Define to 1 if you have the dl library (-ldl). */
244 #cmakedefine HAVE_LIBDL
245
246 /* Have io.h (windows)*/
247 #cmakedefine HAVE_IO_H
248
249 /* Define to 1 if you have the strcasecmp() function. */
250 #cmakedefine HAVE_STRCASECMP
251
252 /* Define to 1 if you have the strdup() function. */
253 #cmakedefine HAVE_STRDUP
254
255 /* Define to 1 if you have the vfprintf() function. */
256 #cmakedefine HAVE_VFPRINTF
257
258 /* Define to 1 if you have the memcmp() function. */
259 #cmakedefine HAVE_MEMCMP
260
261 /* Define to 1 if you have the posix_memalign() function. */
262 #cmakedefine HAVE_POSIX_MEMALIGN
263
264 /* Define to 1 if you have the memalign() function. */
265 #cmakedefine HAVE_MEMALIGN
266
267 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
268 #cmakedefine HAVE__ALIGNED_MALLOC
269
270 /* Define to 1 if you have the gettimeofday() function. */
271 #cmakedefine HAVE_GETTIMEOFDAY
272
273 /* Define to 1 if you have the cbrt() function. */
274 #cmakedefine HAVE_CBRT
275
276 /* Define to 1 if you have the isnan() function. */
277 #cmakedefine HAVE_ISNAN
278
279 /* Define to 1 if you have the _isnan() function. */
280 #cmakedefine HAVE__ISNAN
281
282 /* Define to 1 if you have the isfinite() function. */
283 #cmakedefine HAVE_ISFINITE
284
285 /* Define to 1 if you have the _isfinite() function. */
286 #cmakedefine HAVE__ISFINITE
287
288 /* Define to 1 if you have the _finite() function. */
289 #cmakedefine HAVE__FINITE
290
291 /* Define to 1 if you have the fsync() function. */
292 #cmakedefine HAVE_FSYNC
293
294 /* Define to 1 if you have the Windows _commit() function. */
295 #cmakedefine HAVE__COMMIT
296
297 /* Define to 1 if you have the fileno() function. */
298 #cmakedefine HAVE_FILENO
299
300 /* Define to 1 if you have the _fileno() function. */
301 #cmakedefine HAVE__FILENO
302
303 /* Define to 1 if you have the sigaction() function. */
304 #cmakedefine HAVE_SIGACTION
305
306 /* Define to 1 if you have the rsqrt() function. */
307 #cmakedefine HAVE_RSQRT
308
309 /* Define to 1 if you have the rsqrtf() function. */
310 #cmakedefine HAVE_RSQRTF
311
312 /* Define to 1 if you have the sqrtf() function. */
313 #cmakedefine HAVE_SQRTF
314
315 /* Define to 1 if you have the <string.h> header file. */
316 #cmakedefine HAVE_STRING_H
317
318 /* Define to 1 if yo have the <math.h> header file. */
319 #cmakedefine HAVE_MATH_H
320
321 /* Define to 1 if yo have the <limits.h> header file. */
322 #cmakedefine HAVE_LIMITS_H
323
324 /* Define to 1 if yo have the <memory.h> header file. */
325 #cmakedefine HAVE_MEMORY_H
326
327 /* Define to 1 if yo have the <unistd.h> header file. */
328 #cmakedefine HAVE_UNISTD_H
329
330 /* Define to 1 if yo have the <direct.h> header file. */
331 #cmakedefine HAVE_DIRECT_H
332
333 /* Define to 1 if yo have the <pwd.h> header file. */
334 #cmakedefine HAVE_PWD_H
335
336 /* Define to 1 if yo have the <stdint.h> header file. */
337 #cmakedefine HAVE_STDINT_H
338
339 /* Define to 1 if yo have the <stdlib.h> header file. */
340 #cmakedefine HAVE_STDLIB_H
341
342 /* Define to 1 if yo have the <pthread.h> header file. */
343 #cmakedefine HAVE_PTHREAD_H
344
345 /* Define to 1 if yo have the <dirent.h> header file. */
346 #cmakedefine HAVE_DIRENT_H
347
348 /* Define to 1 if yo have the <inttypes.h> header file. */
349 #cmakedefine HAVE_INTTYPES_H
350
351 /* Define to 1 if yo have the <regex.h> header file. */
352 #cmakedefine HAVE_REGEX_H
353
354 /* Define to 1 if you have the <sys/types.h> header file. */
355 #cmakedefine HAVE_SYS_TYPES_H
356
357 /* Define to 1 if you have the <sys/stat.h> header file. */
358 #cmakedefine HAVE_SYS_STAT_H
359
360 /* Define to 1 if you have the <sys/time.h> header file. */
361 #cmakedefine HAVE_SYS_TIME_H
362
363 /* Define to 1 if you have the <rpc/rpc.h> header file. */
364 #cmakedefine HAVE_RPC_RPC_H
365
366 /* Define to 1 if you have the <rpc/xdr.h> header file. */
367 #cmakedefine HAVE_RPC_XDR_H
368
369 /* Define to 1 if you have the <x86intrin.h> header file */
370 #cmakedefine HAVE_X86INTRIN_H
371
372 /* Define to 1 if you have the <intrin.h> header file */
373 #cmakedefine HAVE_INTRIN_H
374
375 /* Define to 1 if you have the <sched.h> header */
376 #cmakedefine HAVE_SCHED_H
377
378 /* Define to 1 if you have the vprintf() function. */
379 #cmakedefine HAVE_VPRINTF
380
381 /* Define to 1 if you have the sysconf() function */
382 #cmakedefine HAVE_SYSCONF
383
384 /* Define to 1 if you have the sched_getaffinity() function */
385 #cmakedefine HAVE_SCHED_GETAFFINITY
386
387 /* Define to 1 if you have the sched_setaffinity() function */
388 #cmakedefine HAVE_SCHED_SETAFFINITY
389
390 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
391    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
392 #cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
393
394 /* The two words in a double precision variable are in b ig-endian order if
395    set, little-endian if not. Do NOT assume this is the same as the byte
396    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
397 #cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
398
399 /* Define if SIGUSR1 is present */
400 #cmakedefine HAVE_SIGUSR1
401
402 /* The size of int, as computed by sizeof. */
403 #cmakedefine SIZEOF_INT @SIZEOF_INT@
404
405 /* The size of long int, as computed by sizeof. */
406 #cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
407
408 /* The size of long long int, as computed by sizeof. */
409 #cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
410
411 /* The size of off_t, as computed by sizeof. */
412 #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
413
414 /* The size of void*, as computed by sizeof. */
415 #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
416
417 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
418 #cmakedefine _LARGEFILE_SOURCE
419
420 /* Define for large files, on AIX-style hosts. */
421 #cmakedefine _LARGE_FILES
422
423 /* Some systems requires this to be set to 64 for large file support */
424 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
425
426 /* Gromacs shortcut define for fseeko & ftello being present with 64-bit support */
427 #cmakedefine GMX_LARGEFILES
428
429 /* Define to int if <sys/types.h> does not define. */
430 #cmakedefine gid_t int
431
432 /* Define to __inline__ or __inline if that is what the C compiler
433    calls it, or to nothing if inline is not supported under any name.
434    Please do NOT remove the gmx_inline keyword from here. The classical
435    C++ inline keyword is merely a recommendation to the compiler, and
436    many compilers support stronger alternatives (e.g. __forceinline)
437    that we might want to use. */
438 #define gmx_inline ${INLINE_KEYWORD}
439 #ifndef __cplusplus
440 #define inline ${INLINE_KEYWORD}
441 #endif
442
443 /* Define to __restrict__ or __restrict if that is what the C compiler
444    calls it, unless we are on C99 when it is simply called restrict.
445    Since restrict is a reserved key word in C99 we are not allowed to
446    redefine the word itself, so call this gmx_restrict to avoid having
447    to identify the language standard level. If it is not supported, it
448    is still defined to an empty string here. */
449 #define gmx_restrict ${RESTRICT_KEYWORD}
450
451 #ifndef CPLUSPLUS
452 #ifdef __cplusplus
453 #define CPLUSPLUS
454 #endif
455 #endif  
456
457 /* Define to long int if <sys/types.h> does not define. */                    
458 #cmakedefine off_t int
459
460 /* Define to unsigned int if <sys/types.h> does not define. */
461 #cmakedefine size_t int
462
463 /* Define to int if <sys/types.h> does not define. */
464 #cmakedefine uid_t int
465
466 /* Build special-purpose mdrun library */
467 #cmakedefine GMX_FAHCORE   
468
469 #ifdef GMX_FAHCORE
470 #define FULLINDIRECT 1
471 #define USE_FAH_XDR  1
472 #include "swindirect.h"
473 #endif
474
475 /* Define if we have pipes */
476 #cmakedefine HAVE_PIPES
477
478
479 /* Catch stupid CMake problems on OS X */
480 #ifdef __APPLE__
481 #  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
482 #    error "Inconsistency between current OS X architecture and the one used to generate original" 
483 #    error "CMake configuration. This is probably caused by starting CMake with the default value"
484 #    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
485 #    error "will have been performed with the original (now incorrect) architecture."
486 #    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
487 #    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
488 #  endif
489 #endif