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

Comparing trunk/OOPSE/ac-tools/configure.in (file contents):
Revision 942 by gezelter, Wed Jan 14 15:49:26 2004 UTC vs.
Revision 944 by gezelter, Wed Jan 14 22:41:34 2004 UTC

# Line 6 | Line 6 | builtin(include, ac-tools/aclocal.m4)
6   builtin(include, ac-tools/fortran90.m4)
7   builtin(include, ac-tools/aclocal.m4)
8  
9
9   AC_CONFIG_SRCDIR([src/oopse.cpp])
10  
11   AC_PREFIX_DEFAULT("/usr/local")
# Line 139 | Line 138 | AC_ARG_WITH(mpi_inc,
138   AC_SUBST([MPI_LIBDIR])
139  
140   AC_MSG_CHECKING([for mpi-inc-directory])
141 < AC_ARG_WITH(mpi_inc,
142 <              [  --with-mpi_inc=dir  give the path for MPI-include-files [MPI_DIR/include]],
141 > AC_ARG_WITH(mpi-inc,
142 >              [  --with-mpi-inc=dir  give the path for MPI-include-files [MPI_DIR/include]],
143                  MPI_INC="$withval", MPI_INC="$MPI_DIR/include")
144   AC_MSG_RESULT([$MPI_INC])
145   AC_SUBST([MPI_INC])
146  
147 + AC_MSG_CHECKING([for mpi.h])
148 + HAVE_MPIDOTH_C="no"
149 + echo '#include <mpi.h>' > conftest.cc
150 + if test -z "`${CXX} -I${MPI_INC} -c conftest.cc 2>&1`"; then
151 +  AC_MSG_RESULT(yes)
152 +  HAVE_MPIDOTH_C="yes"
153 + else
154 +  AC_MSG_RESULT(no! Check MPI include paths)
155 + fi
156 + rm -f conftest*
157  
158 < AC_MSG_CHECKING([for MPI library])
159 < MPI_LIB=""
160 < case "$host" in
161 <  *-ibm-aix*)                dnl IBM/SP2 machines
162 <    dnl checking whether to use signal-based MPI
163 <
164 <    AC_MSG_CHECKING([whether to use signal-based MPI library])
165 <    AC_MSG_RESULT([$PACX_SIGNAL])
166 <    if test "x$PACX_SIGNAL" = "xyes" ; then
167 <      if test -f "$MPI_LIBDIR/libmpi.a" ; then
168 <        MPI_LIB="-lmpi"
169 <      elif test -f "$MPI_LIBDIR/libmpi.so" ; then
170 <        MPI_LIB="-lmpi"
171 <      elif test -f "$MPI_LIBDIR/libmpich.a" ; then
172 <        MPI_LIB="-lmpich"
173 <      else
174 <        AC_MSG_ERROR([neither libmpi nor libmpich found; check path for MPI package first...])
175 <      fi
176 <    else
177 <      if test -f "$MPI_LIBDIR/libmpi_r.a" ; then
178 <         MPI_LIB="-lmpi_r"
179 <      else
180 <         AC_MSG_ERROR([libmpi_r not found; check path for MPI package...])
181 <      fi
182 <    fi
183 <    AC_MSG_RESULT(found $MPI_LIB)
184 <  ;;
185 <  *)                         dnl All other machines
186 <    if test -f "$MPI_LIBDIR/libmpich.a" ; then
187 <      MPI_LIB="-lmpich"
188 <    elif test -f "$MPI_LIBDIR/libmpi.so" ; then
189 <      MPI_LIB="-lmpi"
190 <    elif test -f "$MPI_LIBDIR/libmpi.a" ; then
191 <      MPI_LIB="-lmpi"
192 <    else
193 <      AC_MSG_ERROR([neither libmpi nor libmpich found; check path for MPI package first...])
194 <    fi
195 <    AC_MSG_RESULT(found $MPI_LIB)
196 <  ;;
197 < esac
158 > AC_MSG_CHECKING([whether mpif.h is usable])
159 > HAVE_MPIFDOTH_F90="no"
160 > rm -f conftest*
161 > cat >conftest.f90 <<EOF
162 > program main
163 >  include 'mpif.h'
164 > end
165 > EOF
166 > if $F90 -I$MPI_INC -c conftest.f90 > conftest.out 2>&1 ; then
167 >   AC_MSG_RESULT(yes)
168 >   MPI_F90INC="$MPI_INC"
169 >   HAVE_MPIFDOTH_F90="yes"
170 > else
171 >   if test -s conftest.out ; then cat conftest.out >> config.log ; fi
172 >   AC_MSG_RESULT([no! Check MPI include paths])
173 > fi
174 > rm -f conftest*
175 > AC_SUBST([MPI_F90INC])
176 >
177 > AC_LANG_PUSH(C)
178 > ac_save_LDFLAGS=$LDFLAGS
179 > LDFLAGS="${LDFLAGS} -L${MPI_LIBDIR} "
180 >
181 > if test x = x"$MPI_LIB"; then
182 >   AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi"])
183 > fi
184 > if test x = x"$MPI_LIB"; then
185 >   AC_CHECK_LIB(mpich, MPI_Init, [MPI_LIB="-lmpich"])
186 > fi
187 > $as_unset ac_cv_lib_mpi_MPI_Init
188 > if test x = x"$MPI_LIB"; then
189 >   AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi -llam"], [],
190 >                "-llam")
191 > fi
192 >
193 > $as_unset ac_cv_lib_mpi_MPI_Init
194 > if test x = x"$MPI_LIB"; then
195 >   AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi -llam -lpthread"],
196 >                [AC_MSG_ERROR([Didn't find liblam, libmpi, or libmpich; check path for MPI package first...])],
197 >                [-llam -lpthread])
198 > fi
199 >
200 > AC_MSG_RESULT(found $MPI_LIB)
201   AC_SUBST(MPI_LIB)
202  
203 + AC_MSG_CHECKING([for MPI Fortran library])
204 + MPI_F90LIB=""
205 + if test -f "$MPI_LIBDIR/libfmpich.a" ; then
206 +  MPI_F90LIB="-lfmpich"
207 + elif test -f "$MPI_LIBDIR/liblamf77mpi.a" ; then
208 +  MPI_F90LIB="-llamf77mpi"
209 + else
210 +  # nothing special found, we'll assume that the C library is all we need
211 +  MPI_F90LIB="  "
212 + fi
213 + AC_MSG_RESULT([found $MPI_F90LIB])
214 + AC_SUBST(MPI_F90LIB)
215 +
216 + dnl CHECK_MPI
217 +
218   dnl I don't think this works right now:
219   dnl ACX_MPI
220  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines