])
-dnl ------------------------------------------------------------
-dnl Check whether Metis is installed, and if so store the
-dnl respective links
-dnl
-dnl Usage: DEAL_II_CONFIGURE_METIS
-dnl
-dnl ------------------------------------------------------------
-AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl
-[
- dnl First check for the Metis directory
-
- AC_ARG_WITH(metis,
- [AS_HELP_STRING([--with-metis=/path/to/metis],
- [Specify the path to the Metis installation, of which the include and library directories are subdirs; use this if you want to override the METIS_DIR environment variable.])],
- [
- AC_MSG_CHECKING([for METIS library directory])
- USE_CONTRIB_METIS=yes
- DEAL_II_METIS_DIR="$withval"
- AC_MSG_RESULT($DEAL_II_METIS_DIR)
-
- dnl Make sure that what was specified is actually correct. The
- dnl libraries could be in either $DEAL_II_METIS_DIR/lib (metis was
- dnl make installed) or $DEAL_II_METIS_DIR/libmetis (metis was make
- dnl only and PETSc).
- if test ! -d $DEAL_II_METIS_DIR/lib \
- && test ! -d $DEAL_II_METIS_DIR/libmetis ; then
- AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation])
- fi
-
- dnl If lib is not found, we must have libraries in libmetis
- dnl (which was found above).
- if test -d $DEAL_II_METIS_DIR/lib ; then
- DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib"
- else
- DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/libmetis"
- fi
-
- if test ! -d $DEAL_II_METIS_DIR/include ; then
- AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation])
- fi
-
- DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/include"
- ],
- [
- dnl Take something from the environment variables, if it is there
- if test "x$METIS_DIR" != "x" ; then
- AC_MSG_CHECKING([for METIS from the environment])
- USE_CONTRIB_METIS=yes
- DEAL_II_METIS_DIR="$METIS_DIR"
- AC_MSG_RESULT($DEAL_II_METIS_DIR)
-
- dnl Make sure that what this is actually correct (see notes above).
- if test ! -d $DEAL_II_METIS_DIR/lib \
- && test ! -d $DEAL_II_METIS_DIR/libmetis ; then
- AC_MSG_ERROR([The path to Metis specified in the METIS_DIR environment variable does not point to a complete Metis installation])
- fi
-
- if test -d $DEAL_II_METIS_DIR/lib ; then
- DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib"
- else
- DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/libmetis"
- fi
-
- DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/include"
-
- else
- USE_CONTRIB_METIS=no
- DEAL_II_METIS_DIR=""
- fi
- ])
-
- if test "x$USE_CONTRIB_METIS" = "xyes" ; then
- AC_DEFINE(DEAL_II_USE_METIS, 1,
- [Defined if a Metis installation was found and is going
- to be used])
- LDFLAGS="$LDFLAGS -L$DEAL_II_METIS_LIBDIR -lmetis"
-
- if test "x$DEAL_II_LD_UNDERSTANDS_RPATH" = "xyes" ; then
- LDFLAGS="$LDFLAGS $LD_PATH_OPTION$DEAL_II_METIS_LIBDIR"
- fi
-
- dnl AC_MSG_CHECKING(for Metis version)
- dnl DEAL_II_METIS_VERSION=`cat $DEAL_II_METIS_DIR/VERSION`
- dnl AC_MSG_RESULT($DEAL_II_METIS_VERSION)
- fi
-])
-
-
dnl ------------------------------------------------------------
dnl Check whether P4EST is to be used to parallelize meshes
dnl