Fixed indexing typo, and definition of Suzuki-Yashida constants array
[alexxy/gromacs.git] / configure.ac
1 #######################################################################
2 # Process this file wth autoconf to produce a configure script.
3 #######################################################################
4  
5 AC_PREREQ(2.50)
6 AC_INIT(gromacs, 4.0.99_development_20090927, [gmx-users@gromacs.org])
7 AC_CONFIG_SRCDIR(src/gmxlib/3dview.c)
8 AC_CONFIG_AUX_DIR(config)
9 AC_CANONICAL_HOST
10
11 AM_INIT_AUTOMAKE(tar-ustar)
12 AC_PREFIX_DEFAULT(/usr/local/gromacs)
13
14 AM_CONFIG_HEADER(src/config.h)
15 dnl This is the version info according to the libtool versioning system.
16 dnl It does *not* correspond to the release number.
17 SHARED_VERSION_INFO="5:0:0"
18 AC_SUBST(SHARED_VERSION_INFO)
19
20 AC_DISABLE_SHARED
21
22
23 #######################################################################
24 # Simple options and makefile variables
25 #######################################################################
26
27
28 ### Single/Double
29 AC_ARG_ENABLE(float,
30              [AC_HELP_STRING([--disable-float],
31                              [Use double instead of single precision])],, enable_float=yes)
32
33 AC_ARG_ENABLE(double,
34              [AC_HELP_STRING([--enable-double],
35                              [Same effect as --disable-float])],, enable_double=no)
36 if test "$enable_double" = "yes"; then
37    enable_float=no;
38 fi
39 if test "$enable_float" = "no"; then
40   AC_DEFINE(GMX_DOUBLE,,[Compile in double precision])
41 fi
42 AM_CONDITIONAL([GMX_DOUBLE],[test "$enable_float" = "no"])
43
44
45
46 ### Fortran or not
47 AC_ARG_ENABLE(fortran,
48              [AC_HELP_STRING([--enable-fortran],
49                              [Use Fortran kernels])],, 
50 [case "${host_cpu}-${host_os}" in
51   sparc*-solaris* | alpha*-* | rs6000*-aix* | powerpc*-aix* | mips*-irix*) enable_fortran=yes ;;
52   *) enable_fortran=no ;;
53  esac])
54 if test "$enable_fortran" = "yes"; then
55   AC_DEFINE(GMX_FORTRAN,,[Enable Fortran support])
56 fi
57 # Generic fortran kernels will be turned off below if you enable power6-specific optimization!
58 # always use CC for linking:
59 AC_SUBST(F77LINK,"\$(LINK)")
60
61
62
63
64
65 ### MPI or not
66 AC_ARG_ENABLE(mpi,
67               [AC_HELP_STRING([--enable-mpi],
68                               [Compile for parallel runs using MPI])],,enable_mpi=no)
69
70
71 ### MPI environment
72 AC_ARG_ENABLE(mpi-environment,
73               [AC_HELP_STRING([--enable-mpi-environment=VAR],
74                               [Only start parallel runs when VAR is set])],,
75 [case "${host_cpu}" in
76   mips*-irix*) enable_mpi_environment="MPI_ENVIRONMENT" ;;
77   *) enable_mpi_environment=no ;;
78 esac])
79 if test "$enable_mpi_environment" != "no"; then
80   AC_DEFINE_UNQUOTED(GMX_CHECK_MPI_ENV,"$enable_mpi_environment",[If defined, only start MPI runs when this variable is set])
81 fi
82
83 ### MPI_IN_PLACE
84 AC_ARG_ENABLE(mpi-in-place,
85               [AC_HELP_STRING([--disable-mpi-in-place],
86                               [Disable MPI_IN_PLACE. For MPI implementations that have broken support for it (some versions of MPICH, for example).])],, enable_mpi_in_place=yes)
87
88
89
90 AC_ARG_ENABLE(debug,
91               [AC_HELP_STRING([--enable-debug],
92                               [Add -g to other command line arguments])],,enable_debug=no)
93
94 ### IA32 assembly code
95 AC_ARG_ENABLE(ia32_sse,
96               [AC_HELP_STRING([--disable-ia32-sse],
97                               [Don't build SSE/SSE2 assembly loops on ia32])],,enable_ia32_sse=yes)
98
99 case "${host_cpu}-${host_vendor}" in
100    i?86-*) ;;
101    *) enable_ia32_sse=no ;;
102 esac
103
104 ### AMD64 assembly code
105 AC_ARG_ENABLE(x86_64_sse,
106               [AC_HELP_STRING([--disable-x86-64-sse],
107                               [Don't build SSE assembly loops on X86_64])],,enable_x86_64_sse=yes)
108 case "${host_cpu}-${host_vendor}" in
109    x86_64-* | amd64-*) ;;
110    i?86-apple) ;;
111    *) enable_x86_64_sse=no ;;
112 esac
113
114
115 ### Altivec on powerpc (motorola)
116 AC_ARG_ENABLE(ppc_altivec,
117               [AC_HELP_STRING([--disable-ppc-altivec],
118                               [Don't build Altivec loops on PowerPC])],,enable_ppc_altivec=undef)
119 # Power3/4/5 running AIX does not support altivec. We identify this with vendor=IBM.
120 # IBM powerpc 970 boxes run linux, and have vendor=unknown.
121 if test "$enable_ppc_altivec" = "undef"; then
122   case "${host_cpu}-${host_vendor}" in
123     ppc*-ibm* | powerpc*-ibm*) enable_ppc_altivec=no ;;
124     ppc*-* | powerpc*-*) enable_ppc_altivec=yes ;; 
125     *) enable_ppc_altivec=no ;;
126   esac
127 fi
128
129
130
131 ### ia64 assembly code
132 AC_ARG_ENABLE(ia64_asm,
133               [AC_HELP_STRING([--disable-ia64-asm],
134                               [Don't build assembly loops on ia64])],,enable_ia64_asm=yes)
135 case "${host_cpu}" in
136    ia64) ;;
137    *) enable_ia64_asm=no ;;
138 esac
139
140
141 # IBM Power6-specific optimization
142 AC_ARG_ENABLE(power6,
143              [AC_HELP_STRING([--enable-power6],
144                              [Use IBM Pwr6/PPC440/PPC450-specific F77 kernels])],,enable_power6=no)
145 # Turn off generic fortran loops if we are using power6-specific optimization
146 if test "$enable_power6" = "yes"; then
147   enable_fortran=no;
148 fi
149
150 AC_ARG_ENABLE(bluegene,
151               [AC_HELP_STRING([--enable-bluegene],
152                               [Build assembly intrinsics kernels on bluegene])],,enable_bluegene=no)
153
154
155 ### Optimize for host cpu version
156 AC_ARG_ENABLE(cpu-optimization,     
157               [AC_HELP_STRING([--disable-cpu-optimization],
158                               [No detection or tuning flags for cpu version])],, enable_cpu_optimization=yes)
159
160
161 ### Do software 1/sqrt(x)                                                                                                            
162 AC_ARG_ENABLE(software-invsqrt,
163               [AC_HELP_STRING([--disable-software-invsqrt],
164                               [No software 1/sqrt (disabled on sgi,ibm,ia64)])],,
165 [case "${host_cpu}-${host_os}" in
166   mips*-irix* | rs6000*-aix* | powerpc*-aix | ia64*-*) enable_software_invsqrt=no ;;
167   *) enable_software_invsqrt=yes ;;
168 esac])
169 if test "$enable_software_invsqrt" = "yes"; then
170   AC_DEFINE(GMX_SOFTWARE_INVSQRT,,[Use the GROMACS software 1/sqrt(x)])
171 fi
172 AM_CONDITIONAL([GMX_SOFTWARE_INVSQRT],[test "$enable_software_invsqrt" = "yes"])
173
174 AC_ARG_ENABLE(fahcore,
175               [AC_HELP_STRING([--enable-fahcore],
176                               [Create a library with mdrun functionality])],, enable_fahcore=no)
177
178
179
180 # The four options below used to improve code scheduling, but the newest CPUs can usually rearrange
181 # instructions dynamically at runtime, so they might not make much difference now:
182
183
184 AC_ARG_ENABLE(all-static,
185               [AC_HELP_STRING([--enable-all-static],
186                               [Make completely static binaries])],, enable_all_static=no)
187 # Dont add the -all-static flag until after the compiler test.
188
189
190 # FFT libraries - only use one...
191 AC_ARG_WITH(fft,
192             [AC_HELP_STRING([--with-fft=@<:@fftw3/fftw2/mkl(>=6.0)/fftpack@:>@],
193                             [FFT library to use. fftw3 is default, fftpack built in.])],,
194                              with_fft=fftw3)
195
196 AC_ARG_ENABLE(fftw-measure,
197             [AC_HELP_STRING([--disable-fftw-measure],
198                             [Dont optimize FFTs. This produces binary exactly]
199                             [reproducible runs (as the -reprod flag to mdrun),]
200                             [and if you are using FFTW on x86 and specified its]
201                             [--enable-sse/sse2 flag (NOT default in FFTW!) the]
202                             [kernels used are close-to-optimal anyway.])],,
203                              enable_fftw_measure=yes)
204
205
206 AC_ARG_ENABLE(threads,
207               [AC_HELP_STRING([--enable-threads],    
208                               [Compile for parallel runs using threads])],,enable_threads=no)
209
210 # if test "$enable_threads" = "yes"; then
211 #   with_threads=pthreads;
212 #fi
213
214
215 ### Use external BLAS/LAPACK libraries if the user wants to.
216 ###
217 AC_ARG_WITH(external_blas,
218             [AC_HELP_STRING([--with-external-blas],
219                             [Use system BLAS library (add to LIBS). Automatic on OS X.])],,
220 [
221 # default action - check if we are on OS X
222 case "${host_vendor}-${host_os}" in
223   apple-darwin*) with_external_blas="yes" ; extra_LDFLAGS="-framework Accelerate" ;;
224   *)             with_external_blas="no"  ;;
225 esac
226 ])
227 AM_CONDITIONAL([GMX_EXTERNAL_BLAS], [test "$with_external_blas" = "yes"])
228
229
230 AC_ARG_WITH(external_lapack,
231             [AC_HELP_STRING([--with-external-lapack],
232                             [Use system LAPACK library (add to LIBS). Automatic on OS X.])],,
233 [
234 # default action - check if we are on OS X
235 case "${host_vendor}-${host_os}" in
236   apple-darwin*) with_external_lapack="yes" ; extra_LDFLAGS="-framework Accelerate" ;;
237   *)             with_external_lapack="no"  ;;
238 esac
239 ])
240 AM_CONDITIONAL([GMX_EXTERNAL_LAPACK], [test "$with_external_lapack" = "yes"])
241
242
243
244
245 AC_ARG_WITH(qmmm_gaussian,
246               [AC_HELP_STRING([--without-qmmm-gaussian],
247                               [Use modified Gaussian0x for QM-MM (see website)])],,with_qmmm_gaussian=yes)
248 if test "$with_qmmm_gaussian" = "yes"; then
249   AC_DEFINE(GMX_QMMM_GAUSSIAN,,[Use (modified) Gaussian0x for QM-MM calculations])
250 fi
251
252
253 AC_ARG_WITH(qmmm_gamess,
254               [AC_HELP_STRING([--without-qmmm-gamess],
255                               [Use modified Gamess-UK for QM-MM (see website)])],,with_qmmm_gamess=no)
256 if test "$with_qmmm_gamess" = "yes"; then
257   AC_DEFINE(GMX_QMMM_GAMESS,,[Use (modified) Gamess-UK for QM-MM calculations])
258 fi
259
260
261 AC_ARG_WITH(qmmm_mopac,
262               [AC_HELP_STRING([--without-qmmm-mopac],
263                               [Use modified Mopac 7 for QM-MM (see website)])],,with_qmmm_mopac=no)
264 if test "$with_qmmm_mopac" = "yes"; then
265   AC_DEFINE(GMX_QMMM_MOPAC,,[Use (modified) Mopac 7 for QM-MM calculations])
266 fi
267
268 AC_ARG_WITH(dlopen,
269  [  --without-dlopen        do not compile with dlopen, needed to read VMD supported file formats],,with_dlopen=yes)
270
271
272
273    
274
275 ############################################################
276 # Add some debug info: Who is building, and on what machine?
277 ############################################################
278 AC_DEFINE_UNQUOTED([BUILD_TIME],["`date`"],[Date and time for build])
279 AC_DEFINE_UNQUOTED([BUILD_USER],["`whoami`@`hostname`"],[User doing build])
280 AC_DEFINE_UNQUOTED([BUILD_MACHINE],["`uname -srm`"],[Hardware and OS version for build host])
281
282
283
284 ############################################################
285 # Checks for programs
286 ############################################################
287
288 # normally we use the default compiler, but on alpha/linux we try the compaq ones first
289 case "${host_cpu}-${host_os}" in
290   alpha*-linux*)
291     cc_names="ccc cc gcc"
292     f77_names="fort f77 g77"
293     ;;
294   *) 
295     cc_names="cc icc xlc gcc"
296     f77_names="f77 ifort xlf xlf77 cf77 fl32 g77 fort77 f90 xlf90 pgf77 cf77 fort fort77 pgf90"
297     ;;
298 esac
299 # the (non-mpi) c compiler, which is also used for programs executed during build stage
300 AC_PROG_CC( $cc_names )
301 # Check for environment variable CC_FOR_BUILD before overwriting it
302 if test -z "$CC_FOR_BUILD"; then
303   CC_FOR_BUILD=$CC
304 fi
305 AC_SUBST(CC_FOR_BUILD) 
306
307 if test "$enable_fortran" = "yes"; then 
308   AC_PROG_F77( $f77_names )
309   if test -z "$F77"; then
310     AC_MSG_ERROR([No fortran compiler found])
311   fi
312 fi
313
314 AM_PROG_AS( $CC )
315
316 # if we are using mpi, also get an MPICC. We cannot set that in the PROG_CC macro
317 # above, since autoconf checks that the created file can be executed. This would
318 # fail on platforms where MPI executables can only be run through a batchqueue.
319
320 if test "$enable_mpi" = "yes"; then
321   AC_CHECK_PROGS(MPICC, mpxlc mpicc mpcc hcc, $CC)
322 # now change the normal cc to the MPI one - see the comment above.
323   CC=$MPICC
324   CXX=$MPICC
325   AC_MSG_CHECKING([whether the MPI cc command works]) # be paranoid
326   AC_TRY_LINK([#include <mpi.h>],[int argc; char **argv; MPI_Init(&argc,&argv);],
327 AC_MSG_RESULT([yes]),AC_MSG_ERROR([Cannot compile and link MPI code with $CC]))
328   AC_DEFINE(GMX_MPI,,[Make a parallel version of GROMACS using MPI])
329   AC_DEFINE(GMX_LIB_MPI,,[Use a real MPI library])
330
331   if test "$enable_mpi_in_place" = "yes"; then
332     # not all MPIs support MPI_IN_PLACE:
333     AC_MSG_CHECKING([for MPI_IN_PLACE in collective operations])
334     AC_TRY_COMPILE([
335 #include <mpi.h>
336 void test(void)
337 {
338     void *buf;
339     MPI_Allreduce(MPI_IN_PLACE, buf, 10, MPI_FLOAT, MPI_SUM, MPI_COMM_WORLD);
340 }
341     ],,[
342         AC_MSG_RESULT([yes])
343         AC_DEFINE(MPI_IN_PLACE_EXISTS,[],[MPI_IN_PLACE available for collective operations])
344     ],[
345         AC_MSG_RESULT([no])
346     ]) 
347   fi
348
349 # on the cray xt3 we have to tell autoconf that we 
350 # are actually cross-compiling even if the architecture
351 # of host and target are the same. so we enforce 
352 # cross-compilation if __QK_USER__ is defined
353   AC_MSG_CHECKING([for catamount])
354   AC_TRY_COMPILE([
355 #if defined __QK_USER__
356 #else
357 #error not catamount
358 #endif
359 ],,[
360   AC_MSG_RESULT([yes])
361   cross_compiling=yes 
362   AC_DEFINE(GMX_CRAY_XT3,[],[Enable special hacks for Cray XT3])
363   AC_DEFINE(GMX_NO_SYSTEM,[],[Ignore calls to system(3)])
364   AC_DEFINE(GMX_NO_NICE,[],[Ignore calls to nice(3)])
365   AC_DEFINE(GMX_BROKEN_CALLOC,[],[Don't use calloc(3)])
366   extra_LDFLAGS="$extra_LDFLAGS -lgmalloc -lacml"
367 ],[
368   AC_MSG_RESULT([no])
369 ])
370 # end of "$enable_mpi" = "yes"
371 fi
372
373
374 AH_TEMPLATE([F77_OR_C_FUNC],
375             [Set to F77_FUNC(name,NAME) if Fortran used, otherwise 'name' for C.])
376 AH_TEMPLATE([F77_OR_C_FUNC_],
377             [Set to F77_FUNC_(name,NAME) if Fortran used, otherwise 'name' for C.])
378
379
380
381 if test "$enable_fortran" = "yes"; then
382   AC_F77_LIBRARY_LDFLAGS
383   AC_F77_WRAPPERS
384   AC_DEFINE([F77_OR_C_FUNC(name,NAME)],[F77_FUNC(name,NAME)])
385   AC_DEFINE([F77_OR_C_FUNC_(name,NAME)],[F77_FUNC_(name,NAME)])
386 else
387   AC_DEFINE([F77_OR_C_FUNC(name,NAME)],[name])
388   AC_DEFINE([F77_OR_C_FUNC_(name,NAME)],[name])
389 fi
390
391
392
393 AC_PROG_CPP
394 # Needed by libtool scripts?
395 AC_PROG_EGREP
396
397 if test "$enable_cpu_optimization" = "yes"; then
398   ACX_DETECT_GMXCPU
399 else
400   gmxcpu=""
401 fi
402 ACX_COMPILER_MAXOPT
403
404
405 # We've postponed the threads check because we need to check with the right
406 # compilers/flags 
407 if test "$enable_threads" = "yes"; then 
408   if test "$enable_mpi" = "yes"; then
409     AC_MSG_ERROR([Cannot use both threads and MPI - yet.])
410   fi
411   if test "$with_fft" = "fftw2"; then
412     AC_MSG_ERROR([fftw2 can't be used with threads. Use fftw3 or mkl.])
413   fi 
414   # for now we just assume pthreads
415   ACX_PTHREAD(,AC_MSG_ERROR([Cannot find POSIX threads - required for thread    support using configure!]))
416   LIBS="$PTHREAD_LIBS $LIBS"
417   CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
418   CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
419   CC="$PTHREAD_CC "
420   AC_DEFINE(THREAD_PTHREADS,,[Use pthreads for thread_mpi multithreading])
421   AC_DEFINE(GMX_THREADS,,[Use threads for parallelization])
422   AC_DEFINE(GMX_MPI,,[Make a parallel version of GROMACS using MPI])
423   AM_CONDITIONAL(THREAD_PARALLEL,true)
424 else
425   AM_CONDITIONAL(THREAD_PARALLEL,false)
426 fi
427
428
429
430 #############
431 # Check integer endian
432 #############
433 AC_C_BIGENDIAN([AC_DEFINE([GMX_INTEGER_BIG_ENDIAN],,[Integer byte order is big endian.])],[],[
434 AC_MSG_ERROR([Cannot determine endian in compiled output])])
435 # Little endian implied if GMX_INTEGER_BIG_ENDIAN not defined in source.
436
437 #############
438 # Make sure size_t can hold pointers.
439 # On some Nec machines, you reportedly need to specify a flag for size_t to be 64 bits wide.
440 #############
441 AC_MSG_CHECKING([that size_t can hold pointers])
442 AC_TRY_COMPILE([
443 #include <stdlib.h>
444 #include <stddef.h>
445 ],[int chk[sizeof(size_t)-sizeof(int *)+1];],AC_MSG_RESULT([yes]),[
446    AC_MSG_ERROR([size_t is smaller than int*. Check if your compiler needs a flag to make it 64 bit.])])
447
448
449 #############
450 # Check that SIGUSR1 is defined
451 #############
452 AC_MSG_CHECKING([for SIGUSR1])
453 AC_TRY_COMPILE([#include <signal.h>],[int i=SIGUSR1;],[
454 AC_MSG_RESULT([yes])
455 AC_DEFINE(HAVE_SIGUSR1,,[SIGUSR1 supported and defined])
456 ],AC_MSG_RESULT([no]))
457
458 #############
459 # Check if pipes are supported
460 #############
461 AC_MSG_CHECKING([for pipes])
462 AC_TRY_COMPILE([#include <stdio.h>],[
463 FILE *pipe=popen("/tmp/pipe","r");
464 ],[
465 AC_MSG_RESULT([yes])
466 AC_DEFINE(HAVE_PIPES,,[Pipes (popen/pclose) supported])
467 ],AC_MSG_RESULT([no]))
468
469
470
471 #############
472 # Check floating-point format and endian
473 #############
474 ACX_FLOAT_FORMAT
475
476
477 AC_PROG_INSTALL
478 AC_PROG_LN_S
479 AC_PROG_MAKE_SET
480 AC_LIBTOOL_WIN32_DLL
481 AC_PROG_LIBTOOL
482 AC_SYS_LARGEFILE
483 #
484 # Use our own version of AC_FUNC_FSEEKO from autoconf 2.63 instead
485 # of the broken one we might get from autoconf 2.61.
486 ACX_FUNC_FSEEKO_FIXED
487
488
489
490
491 ############################################################################
492 # Checks for libraries.
493 ############################################################################
494 #
495 # Don't add math library for intel compilers
496 if $CC -V 2>&1 | grep 'Intel Corporation' > /dev/null 2>&1; then
497   AC_MSG_NOTICE([Using built-in math library with intel compiler])
498 else
499   AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR([No math library found]))
500 fi
501
502 #####
503 # Disable MASS support for now.
504 #####
505
506
507 case "$with_fft" in
508 fftw2)
509   if test "$enable_float" = "yes"; then
510     sizeof_real=4
511   else
512     sizeof_real=8
513   fi
514   ACX_CHECK_FFTW2(fftw,$sizeof_real)
515   ACX_CHECK_FFTW2(rfftw,$sizeof_real)
516
517   case ${ac_fftw_savedprefix} in
518    d) AC_DEFINE(FFTW2_NAME_DFFTW,,[Use the d prefix on fftw2 includes]) ;;
519    s) AC_DEFINE(FFTW2_NAME_SFFTW,,[Use the s prefix on fftw2 includes]) ;;
520    *) AC_DEFINE(FFTW2_NAME_FFTW,,[Dont use any prefix on fftw2 includes]) ;;
521   esac
522
523   AC_DEFINE(GMX_FFT_FFTW2,,[Use FFTW2 FFT library])
524
525   ;; #  end of fftw2 check
526
527 fftw3) # Much simpler check than fftw2
528 # Check for header <fftw3.h> AC_CHECK_HEADERS doesnt work, since we must
529 # use mpicc to get includes - cpp isnt always the same compiler.
530 AC_MSG_CHECKING([for fftw3.h])
531 AC_TRY_COMPILE([#include<fftw3.h>],,[
532 # ok, look for library file too
533 AC_MSG_RESULT(yes)
534 if test "$enable_float" = "yes"; then
535   AC_CHECK_LIB([fftw3f],main,,AC_MSG_ERROR([Cannot find fftw3f library]))
536 else
537   AC_CHECK_LIB([fftw3],main,,AC_MSG_ERROR([Cannot find fftw3 library]))
538 fi
539   AC_DEFINE(GMX_FFT_FFTW3,,[Use FFTW3 FFT library])
540 ],[
541 # not ok, echo a warning
542 AC_MSG_ERROR(
543 [Cannot find the default external FFT library (fftw3).
544 Other alternatives are 'fftw2', or 'mkl' for Intel MKL.
545 You are STRONGLY recommended to use one of these - fftw is free.
546
547 Use CPPFLAGS and LDFLAGS if the library is installed in a 
548 non-standard location. (see FAQ at http://www.gromacs.org)
549                                                           
550 If you dont care about performance you can also specify 'fftpack'
551 to use a slower set of FFTs built into Gromacs. 
552 (Just install FFTW3 unless you really know what you are doing).
553 ])
554 ])
555   ;;
556
557 mkl*)
558 ###########
559 # Intel Math Kernel Library version 6 and later.
560 ##########
561 AC_MSG_CHECKING([for mkl_dfti.h])
562 AC_TRY_COMPILE([#include<mkl_dfti.h>],,AC_MSG_RESULT(yes),AC_MSG_ERROR([Cannot find mkl_dfti.h header from Intel Math Kernel Library>=6.0.]\
563 ))
564 ## Check for library
565 #  AC_CHECK_LIB([guide],main,,AC_MSG_ERROR([Cannot find libguide (Intel MKL)]))
566 #  AC_CHECK_LIB([mkl],DftiComputeForward,,
567 #    AC_MSG_ERROR([Cannot find Intel Math Kernel Library >= 6.0]))
568   # first check for older MKLs
569   AC_CHECK_LIB([mkl],DftiComputeForward,,[have_mkl="no"])
570   if test "$have_mkl" == "no"; then
571     # we assume it's a new MKL
572     LIBS="$LIBS -liomp5 -lmkl_sequential -lmkl_core"
573     AC_CHECK_LIB([mkl_intel_lp64],DftiComputeForward,,[have_mkl10_64="no"])
574     if test "$have_mkl10_64" == "no"; then
575       AC_CHECK_LIB([mkl_intel],DftiComputeForward,,[have_mkl10_32="no"])
576       if test "$have_mkl10_32" == "no"; then
577         AC_MSG_ERROR([Cannot find Intel Math Kernel Library >= 6.0])
578       fi
579     fi
580   fi
581   AC_DEFINE(GMX_FFT_MKL,,[Use Intel MKL FFT library])
582   ;;
583
584 fftpack | no)
585   AC_MSG_WARN([The built-in FFTPACK routines are slow.
586 Are you sure you don't want to use FFTW? It is free and much faster...])
587   AC_DEFINE(GMX_FFT_FFTPACK,,[Use Built-in FFTPACK FFT library])
588   ;;
589 *)
590   AC_MSG_ERROR([Unknown FFT library])
591   ;;
592 esac
593
594
595 if test "$enable_fftw_measure" != "yes"; then
596    AC_DEFINE(GMX_DISABLE_FFTW_MEASURE,,[Do not optimize FFTW setups (not needed with SSE FFT kernels)])
597 fi
598
599 ######
600 # check for xtc headers
601 case "${host_os}" in
602 cygwin* | mingw*)   # use our own xdr stuff for cygwin/mingw
603   ;;
604 *)
605   AC_CHECK_HEADERS([rpc/rpc.h])
606   AC_CHECK_HEADERS([rpc/xdr.h],,,
607 [#if HAVE_RPC_RPC_H
608 # include <rpc/rpc.h>
609 #endif
610 ])
611   AC_CHECK_LIB(nsl,xdr_float)
612   AC_TRY_LINK([
613 #if HAVE_RPC_RPC_H
614 #include<rpc/rpc.h> 
615 #else
616 #error NO rpc.h header
617 #endif
618 #if HAVE_RPC_XDR_H
619 #include<rpc/xdr.h>
620 #else
621 #error No xdr.h header
622 #endif
623 ],[ XDR *xd; float f; xdr_float(xd,&f);],[have_xdr="yes"])
624
625   if test "$have_xdr" != "yes"; then
626     AC_DEFINE(GMX_INTERNAL_XDR,,[Use our own instead of system XDR libraries])  
627     AC_MSG_WARN([Couldn't find XDR headers and/or libraries - using our own])
628   fi
629   ;;
630 esac
631
632
633 ########################################################################
634 # Checks for header files and types
635 ########################################################################
636
637 AC_CHECK_HEADERS([limits.h unistd.h],,AC_MSG_ERROR([Include headers not found]))
638 AC_CHECK_HEADERS(unistd.h)
639 AC_CHECK_HEADERS(sys/types.h)
640 AC_CHECK_HEADERS(sys/time.h)
641 AC_CHECK_HEADERS(regex.h,,[AC_MSG_WARN(
642 [No regex.h found.
643 Regular expression matching in selections will be disabled.
644 Selections still work, but the default groups can differ from
645 those obtained with regular expressions enabled.
646 Consider installing the regular expression library from GNU libc.])])
647
648 #####
649 # Checks for additional and/or optional functions or libraries.
650 #AC_FUNC_MALLOC
651 AC_FUNC_MEMCMP
652 AC_TYPE_SIGNAL
653 AC_TYPE_OFF_T
654 AC_FUNC_VPRINTF
655 AM_WITH_DMALLOC
656 AC_CHECK_FUNCS(strcasecmp)
657 AC_CHECK_FUNCS(strdup)
658 AC_CHECK_FUNCS(gettimeofday)
659 AC_CHECK_FUNCS(isnan)
660 AC_CHECK_FUNCS(_isnan)
661
662 # check for bool (must come late, since CFLAGS/includes might affect it)
663 AC_CHECK_TYPES([bool])
664
665
666
667
668
669 #############
670 # Check integer sizes, set to zero if e.g. long long is not supported.
671 # (Note: this must come *after* type checks for the corresponding types!)
672 #############
673 AC_CHECK_SIZEOF(int)
674 AC_CHECK_SIZEOF(long int)
675 AC_CHECK_SIZEOF(long long int)
676 AC_CHECK_SIZEOF(off_t)
677 AC_CHECK_SIZEOF(void*)
678
679
680
681 # Apple OS X is a bit strange/braindead in that it always reports itself as i386, both for
682 # 32 and 64 bit builds (even with the 64 bit kernel!).
683 #
684 # To get the SSE support right we check for the size of void * that we detected above...
685 case "${host_vendor}-${host_os}" in
686   apple-darwin*)
687   if test $ac_cv_sizeof_voidp = 8; then
688      enable_ia32_sse=no;
689   else
690      enable_x86_64_sse=no;
691   fi
692   ;;
693   *) ;;
694 esac
695
696
697
698
699 #####
700 # Look for X
701 AC_PATH_XTRA
702 if test "$no_x" != "yes"; then
703   LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
704   INCLUDES="$INCLUDES $X_CFLAGS"
705   AM_CONDITIONAL(USE_X11,true)
706 else
707   AM_CONDITIONAL(USE_X11,false)
708 fi
709
710 # GNU Scientific Library or not
711 AC_ARG_WITH(gsl,
712  [  --with-gsl                    Link to the GNU scientific library, enables extra functions in analysis],,with_gsl=no)
713
714 ######
715 if test "$with_gsl" = "yes"; then
716   ac_save_LDFLAGS="$LDFLAGS"
717   AC_CHECK_HEADERS([gsl/gsl_version.h],[
718 # header found, check for libraries 
719   AC_CHECK_LIB(gslcblas,main,[
720   LDFLAGS="$ac_save_LDFLAGS -lgslcblas"
721 # gslcblas library found, check main lib
722   AC_CHECK_LIB(gsl,main)])])
723 #
724 fi
725
726
727 AC_ARG_WITH(xml,
728  [  --without-xml                 do not link to the xml2 library, disallows the use of certain file formats],,with_xml=yes)
729  
730 #########
731 # Check for libxml2, but it is optional, so dont stop
732 # if it isnt there.
733 if test "$with_xml" = "yes"; then
734    ac_save_CPPFLAGS="$CPPFLAGS"
735    CPPFLAGS="$ac_save_CPPFLAGS -I/usr/include/libxml2"
736    AC_CHECK_HEADERS([libxml/parser.h],AC_CHECK_LIB(xml2,main))
737    if test "$ac_cv_lib_xml2_main" = "yes"; then
738      INCLUDES="$INCLUDES -I/usr/include/libxml2"
739    fi
740 # restore CPPFLAGS
741    CPPFLAGS="$ac_save_CPPFLAGS"
742 fi
743
744 #### 
745 # And collect the f77 libs to the linker - on Solaris, f77 stuff must go first,
746 # and we need -L/usr/ucblib to find libucb... (stupid OS)
747 # On e.g. ibm the mass libraries must come before -lm... 
748 case "${host_cpu}-${host_os}" in
749   *-solaris*) 
750     LIBS="$FLIBS $LIBS" 
751     LDFLAGS="$LDFLAGS -L/usr/ucblib"
752     ;;
753   *) LIBS="$LIBS $FLIBS" ;;
754 esac
755
756
757 # add the Accelerate framework if enabled above.
758 # LDFLAGS might have been set in the CPU optimization, so we cant assign it directly before that.
759 LDFLAGS="$LDFLAGS $extra_LDFLAGS"
760
761
762
763
764
765
766 #####
767 # Checks for typedefs, structures, and compiler characteristics.
768 AC_C_CONST
769 AC_TYPE_SIZE_T
770 AC_STRUCT_TM
771 AC_C_INLINE
772
773 # AC_TYPE_UID_T is broken on Mac OS X, so use generic tests instead
774 AC_CHECK_TYPES([uid_t],[],[AC_DEFINE(uid_t, int, [Define to `int' if <sys/types.h> doesn't define.])],[[#include <sys/types.h>]])
775 AC_CHECK_TYPES([gid_t],[],[AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.])],[[#include <sys/types.h>]])
776     
777
778
779 # Test stuff for ia32 and x86_64 assembly, and add objects/libraries.
780 if test "$enable_ia32_sse" = "yes" -o "$enable_x86_64_sse" = "yes"; then
781   AC_MSG_CHECKING([whether your compiler can handle assembly files (*.s)])
782 #
783 # Use 64-bit registers (rsp/rbp) on x86_64
784 #
785 if test "$enable_x86_64_sse" = "yes"; then
786 cat > conftestasm.s << EOF
787 checkasm:
788         mov     %rsp, %rbp
789         ret
790 EOF
791 else
792 cat > conftestasm.s << EOF
793 checkasm:
794         movl    %esp, %ebp
795         ret
796 EOF
797 fi
798   if AC_TRY_COMMAND($CC $CFLAGS -c conftestasm.s); then
799     if test -f conftestasm.o; then
800       AC_MSG_RESULT([yes])
801     else
802       AC_MSG_RESULT([no])
803       AC_MSG_ERROR([Upgrade your compiler (or disable assembly loops).])
804     fi
805   else
806     AC_MSG_RESULT([no])
807     AC_MSG_ERROR([Upgrade your compiler (or disable assembly loops).])
808   fi
809
810 # ok, cc understands assembly.
811 #
812 # If we are using double precision we need SSE2
813   if test "$enable_float" = "no"; then
814 #   test SSE2 on ia32:
815     if test "$enable_ia32_sse" = "yes"; then
816       AC_MSG_CHECKING([whether as fully supports ia32 SSE2])
817 cat > conftest.s << EOF
818 checkasm:
819         emms
820         movapd 32(%esi,%edx,8),%xmm4
821         emms
822         ret
823 EOF
824       if AC_TRY_COMMAND($CC $CFLAGS -c conftest.s); then
825         AC_MSG_RESULT([yes])
826       else
827         AC_MSG_RESULT([no])
828         AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
829       fi
830       AC_DEFINE([GMX_IA32_SSE2],,[Double-precision SSE2 instructions on ia32])
831     fi
832 #   test SSE2 on X86_64:
833     if test "$enable_x86_64_sse" = "yes"; then
834       AC_MSG_CHECKING([whether as fully supports X86_64 SSE2])
835 cat > conftest.s << EOF
836 checkasm:
837         emms
838         movapd 32(%rsi,%rdx,8),%xmm4
839         emms
840         ret
841 EOF
842       if AC_TRY_COMMAND($CC $CFLAGS -c conftest.s); then
843         AC_MSG_RESULT([yes])
844       else
845         AC_MSG_RESULT([no])
846         AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
847       fi
848       AC_DEFINE([GMX_X86_64_SSE2],,[Double-precision SSE2 instructions on X86_64])
849     fi
850   else
851 # end of double precision testing, now do single.
852     if test "$enable_ia32_sse" = "yes"; then
853       AC_MSG_CHECKING([whether as fully supports ia32 SSE])
854 cat > conftest.s << EOF
855 checkasm:
856         emms
857         movaps 32(%esi,%edx,8),%xmm4
858         emms
859         ret
860 EOF
861       if AC_TRY_COMMAND($CC $CFLAGS -c conftest.s); then
862         AC_MSG_RESULT([yes])
863       else
864         AC_MSG_RESULT([no])
865         AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
866       fi
867       AC_DEFINE([GMX_IA32_SSE],,[Single-precision SSE instructions on ia32])
868     fi
869 #   test SSE2 on X86_64:
870     if test "$enable_x86_64_sse" = "yes"; then
871       AC_MSG_CHECKING([whether as fully supports X86_64 SSE instructions])
872 cat > conftest.s << EOF
873 checkasm:
874         emms
875         movaps 32(%rsi,%rdx,8),%xmm4
876         emms
877         ret
878 EOF
879       if AC_TRY_COMMAND($CC $CFLAGS -c conftest.s); then
880         AC_MSG_RESULT([yes])
881       else
882         AC_MSG_RESULT([no])
883         AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
884       fi
885       AC_DEFINE([GMX_X86_64_SSE],,[Single-precision SSE instructions on X86_64])
886     fi
887   fi
888 fi
889
890
891 # Test stuff for ia64 assembly
892 #
893 # Nothing to test right now.
894
895
896   
897
898 #
899 # Test altivec support.
900 #
901 if test "$enable_ppc_altivec" = "yes"; then
902   if test "$enable_float" = "no"; then
903     AC_MSG_WARN([PowerPC Altivec loops can only be used in single precision - disabling])
904     enable_ppc_altivec=no
905   else 
906     # On FSF (vanilla) GCC we must include altivec.h, and on apple we 
907     # should NOT do it after using -faltivec. Go figure...
908     case "${host_os}" in
909     darwin*)                            
910         # do nothing on Apple systems
911        ;;
912     *)
913         AC_CHECK_HEADERS([altivec.h])
914        ;;
915     esac
916
917     AC_MSG_CHECKING([whether the compiler supports altivec extensions])
918     AC_TRY_COMPILE([],[
919 #ifndef __VEC__
920 choke_me
921 #endif
922 ],[
923     AC_MSG_RESULT([yes])
924     AC_DEFINE([GMX_PPC_ALTIVEC],,[Use PowerPC Altivec inner loops])],[
925       AC_MSG_RESULT([no])
926       AC_MSG_WARN([no altivec support found - On recent PowerPC CPUs]
927 [you can get a huge performance gain by using an altivec-enabled compiler.]
928 [On OS X, you need GCC>=3.3, or the IBM compilers. If you are using standard]
929 [GCC, you need at least version 4.0])
930       enable_ppc_altivec=no])
931   fi  
932 fi
933
934 if test "$enable_ia64_asm" = "yes"; then
935   AC_DEFINE(GMX_IA64_ASM,,[Use ia64 assembly tuned for Itanium2])
936   AC_DEFINE(DISABLE_WATER_NLIST,,[Turn off all water neighborlist optimization])
937   AC_DEFINE(DISABLE_WATERWATER_NLIST,,[Turn off water-water neighborlist optimization only])
938 fi
939
940 if test "$enable_bluegene" = "yes"; then
941   AC_DEFINE(GMX_BLUEGENE,,[Use assembly intrinsics kernels for BlueGene])
942 fi
943
944 ##
945 # Add the appropriate assembly loops 
946 #
947 AM_CONDITIONAL([GMX_IA32_SSE],[test "$enable_ia32_sse" = "yes" -a "$enable_float" = "yes"])
948 AM_CONDITIONAL([GMX_IA32_SSE2],[test "$enable_ia32_sse" = "yes" -a "$enable_float" = "no"])
949 AM_CONDITIONAL([GMX_X86_64_SSE],[test "$enable_x86_64_sse" = "yes" -a "$enable_float" = "yes"])
950 AM_CONDITIONAL([GMX_X86_64_SSE2],[test "$enable_x86_64_sse" = "yes" -a "$enable_float" = "no"])
951 AM_CONDITIONAL([GMX_FORTRAN],[test "$enable_fortran" = "yes"])
952 AM_CONDITIONAL([GMX_PPC_ALTIVEC],[test "$enable_ppc_altivec" = "yes" -a "$enable_float" = "yes"])
953 AM_CONDITIONAL([GMX_IA64_ASM],[test "$enable_ia64_asm" = "yes"])
954 AM_CONDITIONAL([GMX_BLUEGENE],[test "$enable_bluegene" = "yes"])
955 AM_CONDITIONAL([GMX_POWER6],[test "$enable_power6" = "yes"])
956
957
958 #############
959 # Check integer endian
960 #############
961 AC_C_BIGENDIAN([AC_DEFINE([GMX_INTEGER_BIG_ENDIAN],,[Integer byte order is big endian.])],[],[
962 AC_MSG_ERROR([Cannot determine endian in compiled output])])
963 # Little endian implied if GMX_INTEGER_BIG_ENDIAN not defined in source.
964
965
966
967 case "${host_cpu}" in
968    i?86) 
969          # Check if inline assembly works
970          AC_MSG_CHECKING(if the compiler supports gcc inline assembly)
971       AC_TRY_LINK([],[float f;int i; asm("fld %1\nfistpl %0\n" : "=m" (*&i) : "f" (f));],[AC_MSG_RESULT(yes)
972 AC_DEFINE(GMX_X86_GCC_INLINE_ASM,,[Enable x86 gcc inline assembly])],[AC_MSG_RESULT(no)])
973          # Check for MSVC inline assembly
974      AC_MSG_CHECKING(if the compiler supports MSVC inline assembly)
975       AC_TRY_LINK([],[float f;int i; _asm { fld f } ; _asm { fistpl i };],[AC_MSG_RESULT(yes)
976 AC_DEFINE(GMX_X86_MSVC_INLINE_ASM,,[Enable x86 MSVC inline assembly])],[AC_MSG_RESULT(no)])
977         ;;              
978    *) ;;
979 esac
980
981
982 ############
983 # Check dlopen
984 ###########
985 if test "$with_dlopen" = "yes"; then
986       AC_MSG_CHECKING(if dlopen supported)
987       CFLAGS_RET=$CFLAGS
988       CFLAGS="-I$srcdir/include -DGMX_DLOPEN $CFLAGS"
989       AC_TRY_LINK([#include "$srcdir/src/gmxlib/vmddlopen.c"],,[AC_MSG_RESULT([yes])\
990         AC_DEFINE(GMX_DLOPEN,,[Compile with dlopen])],AC_MSG_RESULT([no]))
991       CFLAGS=$CFLAGS_RET
992 fi
993
994
995
996
997 ########################################################################
998 # Final output stage
999 ########################################################################
1000 AS="$CC"
1001 AC_SUBST(ASFLAGS)
1002 AC_SUBST(AS)
1003 AC_SUBST(INCLUDES)          # should be automatic, but doesnt seem to be?
1004
1005 # To tell libraries apart, we use four versions of the name. For instance, libgmx:
1006 # libgmx                single prec, no mpi.
1007 # libgmx_d              double prec, no mpi.
1008 # libgmx_mpi            single prec, mpi.
1009 # libgmx_mpi_d          double prec, mpi.
1010 # However, the non-suffixed names are linked to the _mpi and/or _d suffixed
1011 # ones upon installation if that is the only version available.
1012
1013 if test "$enable_mpi" = "yes"; then
1014   LIBSUFFIX="_mpi"
1015 fi
1016 if test "$enable_float" = "no"; then
1017   LIBSUFFIX="${LIBSUFFIX}_d"
1018 fi
1019 AC_SUBST(LIBSUFFIX) 
1020
1021 # Unless the user has explicitly requested a prefix/suffix/transform, we
1022 # use _d on double precision files. Don't add anything for mpi, but at the
1023 # end we tell the user it is possible and smart to do in some cases!
1024 if test "$program_transform_name" = "s,x,x,"; then
1025   name_transform_provided=no;
1026   if test "$enable_float" = "no"; then
1027     program_transform_name="s,\$\$,_d,"
1028   fi
1029 else
1030   name_transform_provided=yes;
1031 fi
1032
1033
1034 # Use a variable for RPM - this way it can be 
1035 # overridden with make RPM=rpm3 rpm
1036 RPM=rpm
1037 AC_SUBST(RPM)
1038
1039 if test "$enable_fahcore" = "yes"; then  
1040   CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/../corewrap -include swindirect.h -DFULLINDIRECT -DUSE_FAH_XDR"  
1041   if test "$enable_mpi" = "yes"; then 
1042     CFLAGS="$CFLAGS -DMPI"  
1043   fi
1044 fi
1045 AM_CONDITIONAL([GMX_FAHCORE],[test "$enable_fahcore" = "yes"])
1046
1047
1048 if test "$enable_all_static" = "yes"; then
1049   LDFLAGS="$LDFLAGS -all-static"
1050 fi
1051
1052 # we have asm source, so this is necessary for automake 1.6
1053 CCAS=$CC
1054 CCASFLAGS=$CFLAGS
1055  
1056 AC_SUBST(CCAS)
1057 AC_SUBST(CCASFLAGS)
1058
1059 AC_CONFIG_FILES([ Makefile ])
1060 AC_CONFIG_FILES([ src/Makefile ])
1061 AC_CONFIG_FILES([ src/gmxlib/Makefile ])
1062 AC_CONFIG_FILES([ src/gmxlib/gmx_blas/Makefile ])
1063 AC_CONFIG_FILES([ src/gmxlib/gmx_lapack/Makefile ])
1064 AC_CONFIG_FILES([ src/gmxlib/selection/Makefile ])
1065 AC_CONFIG_FILES([ src/gmxlib/statistics/Makefile ])
1066 AC_CONFIG_FILES([ src/gmxlib/trajana/Makefile ])
1067 AC_CONFIG_FILES([ src/gmxlib/thread_mpi/Makefile ])
1068 AC_CONFIG_FILES([ src/gmxlib/nonbonded/Makefile ])
1069 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_c/Makefile ])
1070 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_ia32_sse/Makefile ])
1071 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_ia32_sse2/Makefile ])
1072 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_x86_64_sse/Makefile ])
1073 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_x86_64_sse2/Makefile ])
1074 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_ppc_altivec/Makefile ])
1075 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_ia64_single/Makefile ])
1076 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_ia64_double/Makefile ])
1077 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_bluegene/Makefile ])
1078 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_power6/Makefile ])
1079 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_f77_single/Makefile ])
1080 AC_CONFIG_FILES([ src/gmxlib/nonbonded/nb_kernel_f77_double/Makefile ])
1081 AC_CONFIG_FILES([ include/Makefile ])
1082 AC_CONFIG_FILES([ include/types/Makefile ])
1083 AC_CONFIG_FILES([ include/thread_mpi/Makefile ])
1084 AC_CONFIG_FILES([ include/thread_mpi/atomic/Makefile ])
1085 AC_CONFIG_FILES([ src/mdlib/Makefile ])
1086 AC_CONFIG_FILES([ src/kernel/Makefile ])
1087 AC_CONFIG_FILES([ src/tools/Makefile ])
1088 AC_CONFIG_FILES([ src/ngmx/Makefile ])
1089 AC_CONFIG_FILES([ src/contrib/Makefile ])
1090 AC_CONFIG_FILES([ scripts/Makefile ])
1091 AC_CONFIG_FILES([ admin/Makefile ])
1092 AC_CONFIG_FILES([ share/Makefile ])
1093 AC_CONFIG_FILES([ share/tutor/Makefile ])
1094 AC_CONFIG_FILES([ share/tutor/gmxdemo/Makefile ])
1095 AC_CONFIG_FILES([ share/tutor/nmr1/Makefile ])
1096 AC_CONFIG_FILES([ share/tutor/nmr2/Makefile ])
1097 AC_CONFIG_FILES([ share/tutor/water/Makefile ])
1098 AC_CONFIG_FILES([ share/tutor/mixed/Makefile ])
1099 AC_CONFIG_FILES([ share/tutor/methanol/Makefile ])
1100 AC_CONFIG_FILES([ share/tutor/speptide/Makefile ])
1101 AC_CONFIG_FILES([ share/template/Makefile ])
1102 AC_CONFIG_FILES([ share/top/Makefile ])
1103 AC_CONFIG_FILES([ share/html/Makefile ])
1104 AC_CONFIG_FILES([ share/html/images/Makefile ])
1105 AC_CONFIG_FILES([ share/html/online/Makefile ])
1106 AC_CONFIG_FILES([ man/Makefile man/man1/Makefile man/man7/Makefile ])
1107 AC_CONFIG_FILES([ Doxyfile ])
1108 AC_OUTPUT
1109
1110
1111
1112
1113
1114
1115
1116 #########################################################
1117 # Echo some important info, to avoid stupid mistakes
1118 #
1119
1120 if test "$enable_float" = "no" -a "$name_transform_provided" = "no"; then
1121   echo ""
1122   echo "* You are compiling a double precision version of Gromacs -"
1123   echo "  program names will be suffixed with _d to avoid overwriting single"
1124   echo "  precision files. You can override it with --program-suffix"
1125 fi
1126
1127 if test "$name_transform_provided" = "no" -a "$enable_mpi" = "yes"; then
1128   echo ""
1129   echo "* Seems you are compiling with MPI support. You can install the MPI-"
1130   echo "  enabled programs with suffixed names to have both MPI and non-MPI"
1131   echo "  versions. This is useful e.g. on supercomputers where you usually"
1132   echo "  cannot run MPI-linked programs on the login node."
1133   echo "  Set a suffix with e.g. --program-suffix=_mpi (or _mpi_d for double)."
1134   echo "  You only need MPI for mdrun, so if you already have non-MPI stuff"
1135   echo "  installed you can issue make mdrun; make install-mdrun."
1136 fi
1137
1138 if test "$enable_shared" = "no"; then
1139   echo ""
1140   echo "* On most platforms you can save 10X space with dynamic libraries, although"
1141   echo "  the binaries might be less portable. Why not try --enable-shared ?"
1142 fi  
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171