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