1 #######################################################################
2 # Process this file wth autoconf to produce a configure script.
3 #######################################################################
6 AC_INIT(GROMACS, 3.2.0, gmx-users@gromacs.org)
7 AC_CONFIG_SRCDIR(src/gmxlib/3dview.c)
8 AC_CONFIG_AUX_DIR(config)
11 AM_INIT_AUTOMAKE(gromacs, 3.2.0)
12 AC_PREFIX_DEFAULT(/usr/local/gromacs)
13 AM_CONFIG_HEADER(src/config.h)
14 dnl This is the version info according to the libtool versioning system.
15 dnl It does *not* correspond to the release number.
16 SHARED_VERSION_INFO="3:0:0"
17 AC_SUBST(SHARED_VERSION_INFO)
20 #######################################################################
21 # Simple options and makefile variables
22 #######################################################################
27 [ --disable-float use double instead of single precision],, enable_float=yes)
28 if test "$enable_float" = "no"; then
29 AC_DEFINE(DOUBLE,,[Compile in double precision])
30 AM_CONDITIONAL(DOUBLE,true)
32 AM_CONDITIONAL(DOUBLE,false)
36 AC_ARG_ENABLE(fortran,
37 [ --enable-fortran use fortran (default on sgi,ibm,sun,axp)],,
38 [case "${host_cpu}-${host_os}" in
39 sparc*-solaris* | alpha*-* | rs6000*-aix* | powerpc*-aix* | mips*-irix*) enable_fortran=yes ;;
40 *) enable_fortran=no ;;
42 if test "$enable_fortran" = "yes"; then
43 AC_DEFINE(USE_FORTRAN,,[Use Fortran for innerloops and some other core stuff])
44 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} innerf.lo f77_wrappers.lo"
45 if test "$enable_float" = "yes"; then
46 MDLIB_LIBOBJS="${MDLIB_LIBOBJS} flincs.lo fsettle.lo fshake.lo"
48 MDLIB_LIBOBJS="${MDLIB_LIBOBJS} flincsd.lo fsettled.lo fshaked.lo"
52 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} innerc.lo"
53 MDLIB_LIBOBJS="${MDLIB_LIBOBJS} clincs.lo csettle.lo"
56 # always use CC for linking:
57 AC_SUBST(F77LINK,"\$(LINK)")
62 [ --enable-mpi compile for parallel runs using MPI],,enable_mpi=no)
65 AC_ARG_ENABLE(threads,
66 [ --disable-threads don't try to use multithreading],,enable_threads=yes)
70 AC_ARG_ENABLE(mpi-environment,
71 [ --enable-mpi-environment=VAR only start parallel runs when VAR is set],,
72 [case "${host_cpu}" in
73 mips*-irix*) enable_mpi_environment="MPI_ENVIRONMENT" ;;
74 *) enable_mpi_environment=no ;;
76 if test "$enable_mpi_environment" != "no"; then
77 AC_DEFINE_UNQUOTED(CHECK_MPI_ENV,"$enable_mpi_environment",[If defined, only start MPI runs when this variable is set])
82 AC_ARG_ENABLE(x86_asm,
83 [ --disable-x86-asm don't build assembly loops on x86],,enable_x86_asm=yes)
86 *) enable_x86_asm=no ;;
89 ### Altivec on powerpc (motorola)
90 AC_ARG_ENABLE(ppc_altivec,
91 [ --disable-ppc-altivec don't build Altivec loops on PowerPC],,enable_ppc_altivec=yes)
92 case "${host_cpu}-${host_vendor}" in
93 ppc*-ibm* | powerpc*-ibm*) enable_ppc_altivec=no ;;
94 ppc*-* | powerpc*-*) ;;
95 *) enable_ppc_altivec=no ;;
98 AC_ARG_ENABLE(axp_asm,
99 [ --enable-axp-asm include vectorized sqrt routines for alpha],,enable_axp_asm=no)
102 ### Optimize for host cpu version
103 AC_ARG_ENABLE(cpu-optimization,
104 [ --disable-cpu-optimization no detection or tuning flags for cpu version],, enable_cpu_optimization=yes)
107 ### Vector machine inner loops
108 AC_ARG_ENABLE(vector,
109 [ --enable-vector create inner loops for a vector machine],, enable_vector=no)
110 if test "$enable_vector" = "yes"; then
111 AC_DEFINE(USE_VECTOR,,[Optimize for a vector architecture])
115 ### Simplewater hack for SGI - disabled unrolling is the same as simplewater=yes
116 AC_ARG_ENABLE(waterloop-unrolling,
117 [ --disable-waterloop-unrolling expand the loops instead (hack for sgi)],,
118 [case "${host_cpu}-${host_os}" in
119 mips*-irix*) enable_waterloop_unrolling=yes ;;
120 *) enable_waterloop_unrolling=no ;;
122 if test "$enable_waterloops_unrolling" = "no"; then
123 AC_DEFINE(SIMPLEWATER,,[Expand the water loops to three inner loops])
127 ### Turn off the special water-water loops on SGI...
128 AC_ARG_ENABLE(waterwater-loops,
129 [ --disable-waterwater-loops turn off double unrolled loops (hack for sgi)],,
130 [case "${host_cpu}-${host_os}" in
131 mips*-irix*) enable_waterwater_loops=no ;;
132 *) enable_waterwater_loops=yes ;;
134 if test "$enable_waterwater_loops" = "no"; then
135 AC_DEFINE(DISABLE_WATERWATER_LOOPS,,[Don't use special loops for water-water interactions])
139 ### Do software 1/sqrt(x)
140 AC_ARG_ENABLE(software-sqrt,
141 [ --disable-software-sqrt no software 1/sqrt (disabled on sgi,ibm,ia64)],,
142 [case "${host_cpu}-${host_os}" in
143 mips*-irix* | rs6000*-aix* | powerpc*-aix | ia64*-*) enable_software_sqrt=no ;;
144 *) enable_software_sqrt=yes ;;
146 if test "$enable_software_sqrt" = "yes"; then
147 AC_DEFINE(SOFTWARE_INVSQRT,,[Use the GROMACS software 1/sqrt(x)])
152 AC_ARG_ENABLE(vectorized-recip,
153 [ --enable-vectorized-recip vectorize LJ-only inner loops],, enable_vectorized_recip=no)
154 if test "$enable_vectorized_recip" = "yes"; then
155 AC_DEFINE(VECTORIZE_RECIP,,[Vectorize the reciprocal calculation])
157 if test "$enable_vectorized_recip" != "no"; then
158 AC_MSG_ERROR([Vectorized reciprocal is only meaningful for normal LJ-only loops])
162 ### Vectorize 1/sqrt(x)
163 AC_ARG_ENABLE(vectorized-sqrt,
164 [ --enable-vectorized-sqrt=A,B vectorize selected inner loops (default none)
165 choices: normal,solvent,water,water-water],, enable_vectorized_sqrt=not_selected)
166 # processing of vectorized_sqrt choices is done just before the final output stage!
169 # The four options below used to improve code scheduling, but the newest CPUs can usually rearrange
170 # instructions dynamically at runtime, so they might not make much difference now:
172 ### Force prefetching
173 AC_ARG_ENABLE(prefetch,
174 [ --enable-prefetch=A,B prefetch forces in selected innerloops],, enable_prefetch=no)
175 # processing of prefetch choices is done just before the final output stage!
180 AC_ARG_ENABLE(all-static,
181 [ --enable-all-static make completely static binaries],enable_all_static=yes, enable_all_static=no)
182 # Dont add the -all-static flag until after the compiler test.
184 ### Compile without FFTW - disabling it means you can't use PME or PPPM!
185 ### N.B.: This is only intended as a last resort, or for tests - don't use it!
187 [ --without-fftw if you turn this off you cannot use PME/PPPM],, with_fftw=yes)
188 if test "$with_fftw" = "no"; then
189 AC_DEFINE(WITHOUT_FFTW,,[Disable all FFTW (and thus PME/PPPM) support])
195 ############################################################
196 # Checks for programs
197 ############################################################
199 # normally we use the default compiler, but on alpha/linux we try the compaq ones first
200 case "${host_cpu}-${host_os}" in
202 cc_names="ccc cc gcc"
203 f77_names="fort f77 g77"
206 cc_names="cc xlc gcc"
207 f77_names="f77 xlf xlf77 cf77 fl32 g77 fort77 f90 xlf90 pgf77 cf77 fort fort77 pgf90"
210 # the (non-mpi) c compiler, which is also used for programs executed during build stage
211 AC_PROG_CC( $cc_names )
212 # Check for environment variable CC_FOR_BUILD before overwriting it
213 if test -z "$CC_FOR_BUILD"; then
216 AC_SUBST(CC_FOR_BUILD)
218 if test "$enable_fortran" = "yes"; then
219 AC_PROG_F77( $f77_names )
220 if test -z "$F77"; then
221 AC_MSG_ERROR([No fortran compiler found])
225 # if we are using mpi, also get an MPICC. We cannot set that in the PROG_CC macro
226 # above, since autoconf checks that the created file can be executed. This would
227 # fail on platforms where MPI executables can only be run through a batchqueue.
229 if test "$enable_mpi" = "yes"; then
230 AC_CHECK_PROGS(MPICC, mpxlc mpicc mpcc hcc, $CC)
231 # now change the normal cc to the MPI one - see the comment above.
233 AC_MSG_CHECKING([whether the MPI cc command works]) # be paranoid
234 AC_TRY_LINK([#include <mpi.h>],[int argc; char **argv; MPI_Init(&argc,&argv);],
235 AC_MSG_RESULT([yes]),AC_MSG_ERROR([Cannot compile and link MPI code with $CC]))
236 AC_DEFINE(USE_MPI,,[Make a parallel version of GROMACS using MPI])
239 if test "$enable_threads" = "yes"; then
240 AC_MSG_CHECKING([for pthreads])
242 # ACX_PTHREAD([],AC_MSG_ERROR([Cannot compile with pthreads; use --disable-threads])
245 if test "$enable_fortran" = "yes"; then
246 AC_F77_LIBRARY_LDFLAGS
252 if test "$enable_cpu_optimization" = "yes"; then
259 # Check x86 asm prerequisites and the capabilities of as
260 if test "$enable_x86_asm" = "yes"; then
261 AC_MSG_CHECKING([whether your compiler can handle assembly files (*.s)])
262 cat > conftestasm.s << EOF
267 if AC_TRY_COMMAND($CC -c conftestasm.s); then
268 if test -f conftestasm.o; then
272 AC_MSG_ERROR([Upgrade your compiler (or disable assembly loops).])
276 AC_MSG_ERROR([Upgrade your compiler (or disable assembly loops).])
279 # ok, gcc understands assembly, but can it handle SSE/3DNow/SSE2 instructions?
281 if test "$enable_float" = "no"; then
282 AC_MSG_CHECKING([whether as fully supports intel syntax SSE2])
283 cat > conftest.s << EOF
284 .intel_syntax noprefix
287 movupd xmm0,[[checkasm]]
291 if AC_TRY_COMMAND($CC -c conftest.s); then
295 AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
297 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} x86_cpuid.lo x86_sse2.lo"
298 AC_DEFINE([USE_X86_SSE2],,[Use X86 SSE2 multimedia assembly code])
300 AC_MSG_CHECKING([whether as fully supports intel syntax SSE & 3DNow])
301 cat > conftest.s << EOF
302 .intel_syntax noprefix
306 movups xmm0,[[checkasm]]
310 if AC_TRY_COMMAND($CC -c conftest.s); then
314 AC_MSG_ERROR([Upgrade to a more recent binutils (or disable assembly loops).])
316 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} x86_cpuid.lo x86_sse.lo x86_3dnow.lo"
317 AC_DEFINE([USE_X86_SSE_AND_3DNOW],,[Use X86 SSE/3DNow multimedia assembly code])
321 if test "$enable_ppc_altivec" = "yes"; then
322 if test "$enable_float" = "no"; then
323 AC_MSG_WARN([PowerPC Altivec loops can only be used in single precision - disabling])
324 enable_ppc_altivec=no
326 AC_MSG_CHECKING([whether the compiler supports altivec extensions])
333 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} inner_altivec.lo"
334 AC_DEFINE([USE_PPC_ALTIVEC],,[Use PowerPC Altivec inner loops])],[
336 AC_MSG_WARN([no altivec support found - On G4 and later Motorola PowerPC]
337 [CPUs you can get a HUGE performance gain by using an altivec-enabled compiler.]
338 [Download the latest devtools from Apple, or gcc-3.1 from ftp.gnu.org])
339 enable_ppc_altivec=no])
343 if test "$enable_axp_asm" = "yes"; then
344 case "${host_cpu}" in
346 AC_DEFINE([USE_AXP_ASM],,[Use Alpha assembly for vectorized 1/sqrt])
347 cat > conftest.s << EOF
354 if AC_TRY_COMMAND($CC -c conftest.s); then
355 AM_CONDITIONAL(AXP_ASM_CAPITAL_S,false)
357 AM_CONDITIONAL(AXP_ASM_CAPITAL_S,true)
359 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} axp_asm.lo"
364 AM_CONDITIONAL(AXP_ASM_CAPITAL_S,false)
367 AC_PATH_PROG(IDENT,ident,no)
368 if test "$IDENT" != "no"; then
369 # seems as if we have the ident program, but does the
370 # compiler support it?
371 AC_MSG_CHECKING([whether the compiler supports ident])
372 AC_TRY_CPP([#ident "@(#) file.h 1.1 12/16/92"],[
374 AC_DEFINE(HAVE_IDENT,,[Does this machine have the ident command])],
378 # MPI builds on aix break with shared libs.
388 ############################################################################
389 # Checks for libraries.
390 ############################################################################
392 # Don't add math library for intel compilers
393 if $CC -V 2>&1 | grep 'Intel Corporation' > /dev/null 2>&1; then
394 AC_MSG_NOTICE([Using built-in math library with intel compiler])
396 AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR([No math library found]))
400 # IBM provides a MASS library with vectorized and optimized math stuff,
401 # and an xlopt library which partly overlaps this. They must come before
402 # libm in the link list, thus the test goes after that for libm!
403 if test "${host_vendor}" = "ibm"; then
404 AC_CHECK_LIB(xlopt,main)
405 AC_CHECK_LIB(mass,main)
409 # first check for a power4 lib, then power3, power2.
410 AC_SEARCH_LIBS(vsrsqrt,massvp4 massvp3 massvp2 massv,[vectmass=yes]) ;;
412 AC_SEARCH_LIBS(vsrsqrt,massvp3 massvp2 massv,[vectmass=yes]) ;;
414 AC_SEARCH_LIBS(vsrsqrt,massvp2 massv,[vectmass=yes]) ;;
416 AC_CHECK_LIB(massv,vsrsqrt,[vectmass=yes LIBS="$LIBS -lmassv"]) ;;
418 if test "$vectmass" = "yes"; then
419 AC_DEFINE(HAVE_LIBMASSV_ANY,,[Use vectorized routines in the IBM MASS library])
420 if test "$enable_vectorized_recip" = "not_selected"; then
421 AC_MSG_NOTICE([vector MASS lib present - vectorizing 1/x inner loops])
422 enable_vectorized_recip="yes"
424 if test "$enable_vectorized_sqrt" = "not_selected"; then
425 AC_MSG_NOTICE([vector MASS lib present - vectorizing 1/sqrt inner loops])
426 enable_vectorized_sqrt="yes"
429 echo "******************************************************************************"
430 echo "*Didn't find the IBM MASS library. It's not necessary, but can provide 20% *"
431 echo "*performance improvement by loop vectorization. Add the library search path *"
432 echo "*with -L in the LDFLAGS variable. If you cannot find MASS, download it from *"
433 echo "*http://www.research.ibm.com/mass *"
434 echo "******************************************************************************"
438 if test "$with_fftw" = "yes"; then
439 if test "$enable_float" = "yes"; then
445 ACX_CHECK_FFTW(fftw,$sizeof_real)
446 ACX_CHECK_FFTW(rfftw,$sizeof_real)
448 if test "$enable_mpi" = "yes"; then
449 ACX_CHECK_FFTW(fftw_mpi,$sizeof_real)
450 ACX_CHECK_FFTW(rfftw_mpi,$sizeof_real)
453 case ${ac_fftw_savedprefix} in
454 d) AC_DEFINE(FFTW_NAME_DFFTW,,[Use the d prefix on fftw includes]) ;;
455 s) AC_DEFINE(FFTW_NAME_SFFTW,,[Use the s prefix on fftw includes]) ;;
456 *) AC_DEFINE(FFTW_NAME_FFTW,,[Dont use any prefix on fftw includes]) ;;
459 echo "*******************************************************************"
460 echo "* WARNING! You have disabled FFTW support! *"
461 echo "* You will not be able to use PME (Particle Mesh Ewald) summation *"
462 echo "* in your simulations. Unless you are absolutely sure you won't *"
463 echo "* ever need this we suggest you install FFTW instead of compiling *"
464 echo "* a version of GROMACS that will be crippled! *"
465 echo "*******************************************************************"
466 fi # end of fftw check
469 # check for xtc headers
471 cygwin* | mingw*) # use our own xdr stuff for cygwin/mingw
472 GMXLIB_LIBOBJS="$GMXLIB_LIBOBJS gmx_system_xdr.lo"
475 AC_CHECK_HEADERS([rpc/rpc.h])
476 AC_CHECK_HEADERS([rpc/xdr.h],,,
478 # include <rpc/rpc.h>
481 AC_CHECK_LIB(nsl,xdr_float)
486 #error NO rpc.h header
491 #error No xdr.h header
493 ],[ XDR *xd; float f; xdr_float(xd,&f);],[have_xdr="yes"])
495 if test "$have_xdr" != "yes"; then
496 AC_DEFINE(USE_GMX_XDR,,[Use our own instead of system XDR libraries])
497 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} gmx_system_xdr.lo"
498 AC_MSG_WARN([Couldn't find XDR headers and/or libraries - using our own])
504 # Checks for additional and/or optional functions or libraries.
510 AC_CHECK_FUNCS(strcasecmp)
511 AC_CHECK_FUNCS(strdup)
516 # try to find motif headers and libraries
519 if test "$motif_libraries" != "no"; then
520 if test "$motif_includes" != "no"; then
521 GMXLIB_LIBOBJS="${GMXLIB_LIBOBJS} mgmx.lo widget.lo"
524 AC_MSG_NOTICE([Both libraries and includes are needed for Motif - disabling.])
528 if test "$no_x" != "yes"; then
529 LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
530 INCLUDES="$INCLUDES $X_CFLAGS $MOTIF_CFLAGS"
531 AM_CONDITIONAL(USE_X11,true)
533 AM_CONDITIONAL(USE_X11,false)
537 # Check for libxml2, but it is optional, so dont stop
539 AC_CHECK_LIB(xml2,main)
540 # This should really only be done when the library is found. Doesn't hurt though.
541 INCLUDES="$INCLUDES -I/usr/include/libxml2"
545 # And collect the f77 libs to the linker - on Solaris, f77 stuff must go first,
546 # and we need -L/usr/ucblib to find libucb... (stupid OS)
547 # On e.g. ibm the mass libraries must come before -lm...
548 case "${host_cpu}-${host_os}" in
551 LDFLAGS="$LDFLAGS -L/usr/ucblib"
553 *) LIBS="$LIBS $FLIBS" ;;
563 ########################################################################
564 # Checks for header files and types
565 ########################################################################
567 AC_CHECK_HEADERS([limits.h strings.h unistd.h],,AC_MSG_ERROR([Include headers not found]))
568 AC_CHECK_HEADERS(unistd.h)
571 # Checks for typedefs, structures, and compiler characteristics.
583 case "${host_cpu}" in
585 # disable x86trunc if inlined assembly doesnt work
586 AC_MSG_CHECKING(if the C compiler supports inline assembly)
587 AC_TRY_LINK([],[float f;int i; asm("fld %1\nfistpl %0\n" : "=m" (*&i) : "f" (f));],[AC_MSG_RESULT(yes)
588 AC_DEFINE(USE_X86TRUNC,,[Use inline assembly truncation for x86 cpu])],[AC_MSG_RESULT(no)])
590 *) enable_x86_asm=no ;;
598 ########################################################################
599 # Process vectorization and prefetch options for inner loops
600 ########################################################################
601 # check which loops to vectorize
602 list_of_vectorized_sqrt=""
603 if test "$enable_vectorized_sqrt" != "no"; then
604 if test "$enable_vectorized_sqrt" = "yes" -o "$enable_vectorized_sqrt" = "all" ; then
605 enable_vectorized_sqrt="normal,solvent,water,water-water"
607 if echo $enable_vectorized_sqrt | grep "normal" >/dev/null; then
608 list_of_vectorized_sqrt="normal "
609 AC_DEFINE(VECTORIZE_INVSQRT,,[Vectorize 1/sqrt(x) in normal loops])
611 if echo $enable_vectorized_sqrt | grep "solvent" >/dev/null; then
612 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}solvent "
613 AC_DEFINE(VECTORIZE_INVSQRT_S,,[Vectorize 1/sqrt(x) in solvent loops])
615 if echo $enable_vectorized_sqrt | sed 's/water-water//' | grep "water" >/dev/null; then
616 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water "
617 AC_DEFINE(VECTORIZE_INVSQRT_W,,[Vectorize 1/sqrt(x) in water loops])
619 if echo $enable_vectorized_sqrt | grep "water-water" >/dev/null; then
620 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water-water "
621 AC_DEFINE(VECTORIZE_INVSQRT_WW,,[Vectorize 1/sqrt(x) in water-water loops])
624 if test -z "$list_of_vectorized_sqrt"; then
625 list_of_vectorized_sqrt="no"
630 # check loops to prefetch forces in
632 if test "$enable_prefetch" != "no"; then
633 if test "$enable_prefetch" = "yes" -o "$enable_prefetch" = "all"; then
634 enable_prefetch="normal,solvent,water,water-water"
636 if echo $enable_prefetch | grep "normal" >/dev/null; then
637 list_of_prefetch="normal "
638 AC_DEFINE(PREFETCH,,[Prefetch coordinates in normal loops])
640 if echo $enable_prefetch | grep "solvent" >/dev/null; then
641 list_of_prefetch="${list_of_prefetch}solvent "
642 AC_DEFINE(PREFETCH_S,,[Prefetch coordinates in solvent loops])
644 if echo $enable_prefetch | sed 's/water-water//' | grep "water"; then
645 list_of_prefetch="${list_of_prefetch}water "
646 AC_DEFINE(PREFETCH_W,,[Prefetch coordinates in water loops])
648 if echo $enable_prefetch | grep "water-water" >/dev/null; then
649 list_of_prefetch="${list_of_prefetch}water-water "
650 AC_DEFINE(PREFETCH_WW,,[Prefetch coordinates in water-water loops])
653 if test -z "$list_of_prefetch"; then
654 list_of_prefetch="no"
664 ########################################################################
666 ########################################################################
670 AC_SUBST(INCLUDES) # should be automatic, but doesnt seem to be?
671 AC_SUBST(GMXLIB_LIBOBJS)
672 AC_SUBST(MDLIB_LIBOBJS)
673 AC_SUBST(GMXANA_LIBOBJS)
675 # To tell libraries apart, we use four versions of the name. For instance, libgmx:
676 # libgmx single prec, no mpi.
677 # libgmx_d double prec, no mpi.
678 # libgmx_mpi single prec, mpi.
679 # libgmx_mpi_d double prec, mpi.
680 # However, the non-suffixed names are linked to the _mpi and/or _d suffixed
681 # ones upon installation if that is the only version available.
683 if test "$enable_mpi" = "yes"; then
686 if test "$enable_float" = "no"; then
687 LIBSUFFIX="${LIBSUFFIX}_d"
691 # Unless the user has explicitly requested a prefix/suffix/transform, we
692 # use _d on double precision files. Don't add anything for mpi, but at the
693 # end we tell the user it is possible and smart to do in some cases!
694 if test "$program_transform_name" = "s,x,x,"; then
695 name_transform_provided=no;
696 if test "$enable_float" = "no"; then
697 program_transform_name="s,\$\$,_d,"
700 name_transform_provided=yes;
703 # Set exec-prefix from the architecture and cpu, unless it was
704 # explicitly given by the user.
705 if test "$exec_prefix" = "NONE"; then
706 arch_exec_prefix=yes;
707 if test -n "$gmxcpu"; then
708 exec_prefix="\${prefix}/${host}/${gmxcpu}"
710 exec_prefix="\${prefix}/${host}"
713 AC_SUBST(exec_prefix)
717 #If the prefix doesn't contain "gromacs" or "gmx" and the datadir
718 #wasn't explicitly specified we add gromacs to the end of datadir:
719 if test "$datadir" = "\${prefix}/share" -a -z "`echo ${prefix} | grep gromacs`"; then
720 if test "${prefix}" != "NONE" -a -z "`echo ${prefix} | grep gromacs`" -a -z "`echo ${prefix} | grep gmx`"; then
721 datadir="\${prefix}/share/gromacs"
726 #If the prefix doesn't contain "gromacs" or "gmx" and the includedir
727 #wasn't explicitly specified we add gromacs to the end of includedir:
728 if test "$includedir" = "\${prefix}/include" -a -z "`echo ${prefix} | grep gromacs`"; then
729 if test "${prefix}" != "NONE" -a -z "`echo ${prefix} | grep gromacs`" -a -z "`echo ${prefix} | grep gmx`"; then
730 includedir="\${prefix}/include/gromacs"
735 # automake has started to put the man pages under share, and says it
736 # should be so according to FHS, but this is still debated so we keep
737 # the old setup unless the user says different.
738 if test "$mandir" = "\${prefix}/share/man"; then
739 mandir="\${prefix}/man"
743 # Use a variable for RPM - this way it can be
744 # overridden with make RPM=rpm3 rpm
749 if test "$enable_all_static" = "yes"; then
750 LDFLAGS="$LDFLAGS -all-static"
753 # we have asm source, so this is necessary for automake 1.6
760 AC_CONFIG_FILES([ Makefile src/Makefile src/gmxlib/Makefile include/Makefile include/types/Makefile src/mdlib/Makefile src/kernel/Makefile src/tools/Makefile src/ngmx/Makefile src/contrib/Makefile scripts/Makefile admin/Makefile share/Makefile share/tutor/Makefile share/tutor/gmxdemo/Makefile share/tutor/nmr1/Makefile share/tutor/nmr2/Makefile share/tutor/water/Makefile share/tutor/mixed/Makefile share/tutor/methanol/Makefile share/tutor/speptide/Makefile share/template/Makefile share/top/Makefile share/html/Makefile share/html/images/Makefile share/html/online/Makefile man/Makefile man/man1/Makefile ])
770 #########################################################
771 # Echo some important info, to avoid stupid mistakes
775 echo "GROMACS is ready to compile."
777 eval "show_path=`echo ${exec_prefix} | sed -e s,NONE,${ac_default_prefix},`"
778 eval "show_datadir=`echo ${datadir} | sed -e s,NONE,${ac_default_prefix},`"
780 echo "* Binaries and libraries for this host will be installed in"
781 echo " ${show_path}/bin"
782 echo " ${show_path}/lib"
783 echo " and shared data will placed in"
784 echo " ${show_datadir}"
785 echo " (You can set this with --prefix, --exec-prefix and --datadir)"
788 if test "$enable_float" = "no" -a "$name_transform_provided" = "no"; then
790 echo "* You are compiling a double precision version of the package -"
791 echo " program names will be suffixed with _d to avoid overwriting single"
792 echo " precision files. You can override it with --program-suffix"
795 if test "$name_transform_provided" = "no" -a "$enable_mpi" = "yes"; then
797 echo "* Seems you are compiling with MPI support. You can install the MPI-"
798 echo " enabled programs with suffixed names to have both MPI and non-MPI"
799 echo " versions. This is useful e.g. on supercomputers where you usually"
800 echo " cannot run MPI-linked programs on the login node."
801 echo " Set a suffix with e.g. --program-suffix=_mpi (or _mpi_d for double)."
802 echo " You only need MPI for mdrun, so if you already have non-MPI stuff"
803 echo " installed you can issue make mdrun; make install-mdrun."
806 if test "$enable_shared" = "yes"; then
808 echo "* To save space, you might want to use shared libraries."
809 echo " This should work on almost any platform, but since there are"
810 echo " a few exceptions (MPI builds on aix) it is not used by default."
811 echo " Turn it on with --enable-shared."