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