diff configure.in @ 4343:db5e0814277a

[project @ 2003-02-20 16:44:16 by jwe]
author jwe
date Thu, 20 Feb 2003 16:46:37 +0000
parents d53c33d93440
children a6c22c2c9b09
line wrap: on
line diff
--- a/configure.in	Thu Feb 20 08:35:55 2003 +0000
+++ b/configure.in	Thu Feb 20 16:46:37 2003 +0000
@@ -22,7 +22,7 @@
 ### 02111-1307, USA. 
 
 AC_INIT
-AC_REVISION($Revision: 1.412 $)
+AC_REVISION($Revision: 1.413 $)
 AC_PREREQ(2.52)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -419,6 +419,29 @@
   AC_DEFINE(HAVE_FFTW, 1, [Define if the FFTW library is available.])
 fi
 
+WITH_MPI=true
+AC_ARG_WITH(mpi,
+  [  --without-mpi           don't use MPI],
+  with_mpi=$withval, with_mpi=yes)
+
+mpi_lib=
+if test "$with_mpi" = yes; then
+  mpi_lib="mpi"
+elif test "$with_mpi" != no; then
+  mpi_lib="$with_mpi"
+fi
+
+MPI_LIBS=
+WITH_MPI=false
+if test -n "$mpi_lib"; then
+  AC_CHECK_LIB($mpi_lib, MPI_Init, [
+    AC_CHECK_HEADERS(mpi.h, [
+      WITH_MPI=true
+      MPI_LIBS="-l$mpi_lib"
+      LIBS="$MPI_LIBS $LIBS"
+      AC_DEFINE(HAVE_MPI, 1, [Define if MPI is available.])])])
+fi
+
 # ----------------------------------------------------------------------
 
 ### We need these before trying to find libf2c.
@@ -1409,6 +1432,7 @@
   BLAS libraries:       $BLAS_LIBS
   FFTW libraries:       $FFTW_LIBS
   HDF5 libraries:       $HDF5_LIBS
+  MPI libraries:        $MPI_LIBS
   LIBS:                 $LIBS
   Default pager:        $DEFAULT_PAGER
   gnuplot:              $GNUPLOT_BINARY