From: young Date: Wed, 22 Aug 2012 15:27:46 +0000 (+0000) Subject: Find metis if it is not make installed, or is implemented in PETSc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87b2ebd5f138eb0d964c564fc46f03d85e67dffc;p=dealii-svn.git Find metis if it is not make installed, or is implemented in PETSc git-svn-id: https://svn.dealii.org/trunk@26078 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 4c5dac1601..ebc256fc5c 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -7170,12 +7170,22 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl DEAL_II_METIS_DIR="$withval" AC_MSG_RESULT($DEAL_II_METIS_DIR) - dnl Make sure that what was specified is actually correct - if test ! -d $DEAL_II_METIS_DIR/lib ; then + 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 - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + 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]) @@ -7191,12 +7201,20 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl DEAL_II_METIS_DIR="$METIS_DIR" AC_MSG_RESULT($DEAL_II_METIS_DIR) - dnl Make sure that what this is actually correct - if test ! -d $DEAL_II_METIS_DIR/lib ; then + 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 - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + + 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="" diff --git a/deal.II/configure b/deal.II/configure index 5193d72e21..6932459f54 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -12648,11 +12648,16 @@ $as_echo_n "checking for METIS library directory... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEAL_II_METIS_DIR" >&5 $as_echo "$DEAL_II_METIS_DIR" >&6; } - if test ! -d $DEAL_II_METIS_DIR/lib ; then + if test ! -d $DEAL_II_METIS_DIR/lib \ + && test ! -d $DEAL_II_METIS_DIR/libmetis ; then as_fn_error $? "Path to Metis specified with --with-metis does not point to a complete Metis installation" "$LINENO" 5 fi - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + 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 as_fn_error $? "Path to Metis specified with --with-metis does not point to a complete Metis installation" "$LINENO" 5 @@ -12670,11 +12675,19 @@ $as_echo_n "checking for METIS from the environment... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEAL_II_METIS_DIR" >&5 $as_echo "$DEAL_II_METIS_DIR" >&6; } - if test ! -d $DEAL_II_METIS_DIR/lib ; then + if test ! -d $DEAL_II_METIS_DIR/lib \ + && test ! -d $DEAL_II_METIS_DIR/libmetis ; then as_fn_error $? "The path to Metis specified in the METIS_DIR environment variable does not point to a complete Metis installation" "$LINENO" 5 fi - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + + 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=""