]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Find metis if it is not make installed, or is implemented in PETSc
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 22 Aug 2012 15:27:46 +0000 (15:27 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 22 Aug 2012 15:27:46 +0000 (15:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@26078 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index 4c5dac1601439d8cdf23ee85ab8820a3eadeb3b8..ebc256fc5c8bed635f3883ce474f2c0126bc70f7 100644 (file)
@@ -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=""
index 5193d72e211a5853db84116a1352a748b03f0679..6932459f54beedac28fe6138acd893b3a689760c 100755 (executable)
@@ -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=""

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.