ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/ac-tools/OOPSE.m4
(Generate patch)

Comparing trunk/ac-tools/OOPSE.m4 (file contents):
Revision 957 by gezelter, Tue May 16 20:38:23 2006 UTC vs.
Revision 973 by gezelter, Thu May 25 14:54:41 2006 UTC

# Line 816 | Line 816 | AC_MSG_CHECKING([whether mpif.h is usable])
816   fi
817  
818   AC_MSG_CHECKING([whether mpif.h is usable])
819 + AC_LANG_SAVE()
820 + AC_LANG(Fortran)
821 + ac_save_ext=$ac_ext
822 + ac_ext=F90
823 + ac_save_FCFLAGS=$FCFLAGS
824   have_mpif_h=0
825   rm -f conftest*
826   cat >conftest.$ac_ext <<EOF
# Line 839 | Line 844 | fi
844   if test "$have_mpif_h" = 1; then
845      AC_DEFINE(HAVE_MPIF_H, 1, [have mpif.h])
846   fi
847 + FCFLAGS=$ac_save_FCFLAGS
848 + ac_ext=$ac_save_ext
849 + AC_LANG_RESTORE()
850  
851   AC_LANG_PUSH(C)
852   ac_save_LDFLAGS=$LDFLAGS
853 < LDFLAGS="${LDFLAGS} -L${MPI_LIB_DIR} "
853 > LDFLAGS="-L${MPI_LIB_DIR} ${LDFLAGS} "
854  
855   if test x = x"$MPI_LIB"; then
856          AC_CHECK_LIB(mpich, MPI_Init, [MPI_LIB="-lmpich"])
857   fi
858 + $as_unset ac_cv_lib_mpich_MPI_Init
859   if test x = x"$MPI_LIB"; then
860 +        AC_CHECK_LIB(mpich, MPI_Init, [MPI_LIB="-lpmpich -lmpich"], [],
861 +                     "-lpmpich")
862 + fi
863 + if test x = x"$MPI_LIB"; then
864          AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi"])
865   fi
866   $as_unset ac_cv_lib_mpi_MPI_Init
# Line 855 | Line 868 | fi
868          AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi -llam"], [],
869                       "-llam")
870   fi
858 $as_unset ac_cv_lib_mpich_MPI_Init
859 if test x = x"$MPI_LIB"; then
860        AC_CHECK_LIB(mpich, MPI_Init, [MPI_LIB="-lpmpich -lmpich"], [],
861                     "-lpmpich")
862 fi
863
871   $as_unset ac_cv_lib_mpi_MPI_Init
872   if test x = x"$MPI_LIB"; then
873   AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi -llam -lpthread"],[
# Line 1050 | Line 1057 | AC_DEFUN([ACX_CHECK_ZLIB],
1057   #
1058   # Handle user hints
1059   #
1060 < [AC_MSG_CHECKING(if zlib is wanted)
1061 < AC_ARG_WITH(zlib,
1062 < [  --with-zlib=DIR root directory path of zlib installation [defaults to
1063 <                    /usr/local or /usr if not found in /usr/local]
1064 <  --without-zlib to disable zlib usage completely],
1065 < [if test "$withval" != no ; then
1066 <  AC_MSG_RESULT(yes)
1067 <  if test -d "$withval"
1060 > [AC_ARG_WITH(zlib,
1061 >                AC_HELP_STRING([--with-zlib=DIR],
1062 >           [root directory path of zlib installation (defaults to /usr/local or /usr if not found in /usr/local)]dnl
1063 >                           ),
1064 >                [zlib_dir="$withval"]dnl
1065 >                            ,dnl
1066 >                [zlib_dir="not_set"]dnl
1067 >    )dnl
1068 >
1069 > if test "$zlib_dir" != "no"; then
1070 >
1071 > if test "$zlib_dir" != "not_set" ; then
1072 >  if test -d "$zlib_dir"
1073    then
1074 <    ZLIB_HOME="$withval"
1074 >    ZLIB_HOME="$zlib_dir"
1075    else
1076 <    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
1076 >    AC_MSG_WARN([Sorry, $zlib_dir does not exist, checking usual places])
1077    fi
1078 < else
1067 <  AC_MSG_RESULT(no)
1068 < fi])
1078 > fi
1079  
1080   ZLIB_HOME=/usr/local
1081   if test ! -f "${ZLIB_HOME}/include/zlib.h"
# Line 1087 | Line 1097 | then
1097          AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
1098          AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
1099          AC_LANG_RESTORE
1100 <        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
1101 <        then
1102 <                #
1103 <                # If both library and header were found, use them
1104 <                #
1105 <                AC_CHECK_LIB(z, inflateEnd)
1106 <                AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
1107 <                AC_MSG_RESULT(ok)
1098 <        else
1099 <                #
1100 <                # If either header or library was not found, revert and bomb
1101 <                #
1100 >
1101 >        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"; then
1102 >                AC_DEFINE(HAVE_ZLIB_H, 1, [have zlib.h])
1103 >                AC_DEFINE(HAVE_LIBZ, 1, [have libz.a])
1104 >                ZLIB_INC_DIR="${ZLIB_HOME}/include"
1105 >                ZLIB_LIB_DIR="${ZLIB_HOME}/lib"
1106 >                ZLIB="-lz"
1107 >        else
1108                  AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
1109 +                ZLIB_INC_DIR=
1110 +                ZLIB_LIB_DIR=
1111 +                ZLIB=
1112                  LDFLAGS="$ZLIB_OLD_LDFLAGS"
1113                  CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
1114                  AC_MSG_RESULT(failed)
1115 <                AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib)
1115 >                echo ""
1116 >                echo "*********************************************************"
1117 >                echo "* WARNING: Could not find a working zlib installation   *"
1118 >                echo "* If you need OOPSE to be able to deal with compressed  *"
1119 >                echo "* trajectory dump files be sure to specify a valid zlib *"
1120 >                echo "* installation with --with-zlib=DIR                     *"
1121 >                echo "*                                                       *"
1122 >                echo "* OOPSE will still work without zlib installed.         *"
1123 >                echo "*********************************************************"
1124 >                echo ""
1125          fi
1126 +        AC_SUBST(ZLIB_INC_DIR)
1127 +        AC_SUBST(ZLIB_LIB_DIR)
1128 +        AC_SUBST(ZLIB)
1129   fi
1130 <
1130 > fi
1131   ])
1132  
1133 +
1134   AC_DEFUN([ACX_CHECK_FFTW],
1135   #
1136   # Handle user hints

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines