]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Support PETSc 2.3.0
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Jun 2005 20:21:18 +0000 (20:21 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Jun 2005 20:21:18 +0000 (20:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@10849 0785d39b-7218-0410-832d-ea1e28bc413d

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

index f98bf9ce4a6fdce52417bae9f02809e35f86a4ca..439eadf38e1b8925cf092d5c6ce57fb474ca1635 100644 (file)
@@ -4446,8 +4446,8 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl
 
   dnl If we have found PETSc, determine additional pieces of data
   if test "$USE_CONTRIB_PETSC" = "yes" ; then
-    DEAL_II_CONFIGURE_PETSC_ARCH
     DEAL_II_CONFIGURE_PETSC_VERSION
+    DEAL_II_CONFIGURE_PETSC_ARCH
 
     dnl Finally set with_petsc if this hasn't happened yet
     if test "x$with_petsc" = "x" ; then
@@ -4492,20 +4492,38 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_ARCH, dnl
 
 
   if test "x$PETSC_ARCH" != "x" ; then
-    dnl Make sure that what was specified is actually correct
-    if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \
-         ; then
-      dnl Check whether PETSc is installed but someone has simply
-      dnl forgotten to also compile for C++
-      if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \
-         ; then
-        AC_MSG_ERROR([PETSc has not been compiled for C++, but
-                      deal.II needs this])
-      else
-        AC_MSG_ERROR([PETSc has not been compiled for the architecture
-                      specified with --with-petsc-arch])
-      fi
-    fi
+    dnl Make sure that what was specified is actually correct. to be sure,
+    dnl petsc changed the locations where they store their libraries
+    dnl sometime in the middle...
+    case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in
+      2.2*)
+        if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \
+             ; then
+          dnl Check whether PETSc is installed but someone has simply
+          dnl forgotten to also compile for C++
+          if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \
+             ; then
+            AC_MSG_ERROR([PETSc has not been compiled for C++, but
+                          deal.II needs this])
+          else
+            AC_MSG_ERROR([PETSc has not been compiled for the architecture
+                          specified with --with-petsc-arch])
+          fi
+        fi
+        ;;
+  
+      2.3*)
+        if test ! -d $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH \
+             ; then
+          AC_MSG_ERROR([PETSc has not been compiled for the architecture
+                        specified with --with-petsc-arch])
+        fi
+        ;;
+
+      *)
+        AC_MSG_ERROR([Unknown PETSc version])
+       ;;
+    esac
   fi
 ])
 
index 4b8b5e365be5504c72c5472a232262054a0b2578..b0931bbc6b9a0b99254ce07c9bf7811e01e16bca 100755 (executable)
@@ -9083,6 +9083,23 @@ _ACEOF
 
     if test "$USE_CONTRIB_PETSC" = "yes" ; then
 
+  echo "$as_me:$LINENO: checking for PETSc version" >&5
+echo $ECHO_N "checking for PETSc version... $ECHO_C" >&6
+
+  DEAL_II_PETSC_VERSION_MAJOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
+                               | grep "#define PETSC_VERSION_MAJOR" \
+                               | perl -pi -e 's/.*MAJOR\s+//g;'`
+  DEAL_II_PETSC_VERSION_MINOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
+                               | grep "#define PETSC_VERSION_MINOR" \
+                               | perl -pi -e 's/.*MINOR\s+//g;'`
+  DEAL_II_PETSC_VERSION_SUBMINOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
+                               | grep "#define PETSC_VERSION_SUBMINOR" \
+                               | perl -pi -e 's/.*MINOR\s+//g;'`
+  PETSC_VERSION="$DEAL_II_PETSC_VERSION_MAJOR.$DEAL_II_PETSC_VERSION_MINOR.$DEAL_II_PETSC_VERSION_SUBMINOR"
+  echo "$as_me:$LINENO: result: $PETSC_VERSION" >&5
+echo "${ECHO_T}$PETSC_VERSION" >&6
+
+
   echo "$as_me:$LINENO: checking for PETSc library architecture" >&5
 echo $ECHO_N "checking for PETSc library architecture... $ECHO_C" >&6
 
@@ -9095,48 +9112,12 @@ if test "${with_petsc_arch+set}" = set; then
        echo "$as_me:$LINENO: result: $DEAL_II_PETSC_ARCH" >&5
 echo "${ECHO_T}$DEAL_II_PETSC_ARCH" >&6
 
-                if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \
-             ; then
-                           if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \
-             ; then
-            { { echo "$as_me:$LINENO: error: PETSc has not been compiled for C++, but
-                          deal.II needs this" >&5
-echo "$as_me: error: PETSc has not been compiled for C++, but
-                          deal.II needs this" >&2;}
-   { (exit 1); exit 1; }; }
-          else
-            { { echo "$as_me:$LINENO: error: PETSc has not been compiled for the architecture
-                          specified with --with-petsc-arch" >&5
-echo "$as_me: error: PETSc has not been compiled for the architecture
-                          specified with --with-petsc-arch" >&2;}
-   { (exit 1); exit 1; }; }
-          fi
-       fi
-
 else
 
                 if test "x$PETSC_ARCH" != "x" ; then
           DEAL_II_PETSC_ARCH="$PETSC_ARCH"
          echo "$as_me:$LINENO: result: $DEAL_II_PETSC_ARCH" >&5
 echo "${ECHO_T}$DEAL_II_PETSC_ARCH" >&6
-
-                    if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \
-             ; then
-                               if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \
-               ; then
-              { { echo "$as_me:$LINENO: error: PETSc has not been compiled for C++, but
-                            deal.II needs this" >&5
-echo "$as_me: error: PETSc has not been compiled for C++, but
-                            deal.II needs this" >&2;}
-   { (exit 1); exit 1; }; }
-            else
-              { { echo "$as_me:$LINENO: error: PETSc has not been compiled for the architecture
-                            specified with --with-petsc-arch" >&5
-echo "$as_me: error: PETSc has not been compiled for the architecture
-                            specified with --with-petsc-arch" >&2;}
-   { (exit 1); exit 1; }; }
-            fi
-          fi
         else
          { { echo "$as_me:$LINENO: error: If PETSc is used, you must specify the architecture
                         either through the PETSC_ARCH environment variable,
@@ -9150,21 +9131,46 @@ echo "$as_me: error: If PETSc is used, you must specify the architecture
 fi;
 
 
-  echo "$as_me:$LINENO: checking for PETSc version" >&5
-echo $ECHO_N "checking for PETSc version... $ECHO_C" >&6
+  if test "x$PETSC_ARCH" != "x" ; then
+                case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in
+      2.2*)
+        if test ! -d $DEAL_II_PETSC_DIR/lib/libg_c++/$DEAL_II_PETSC_ARCH \
+             ; then
+                              if test -d $DEAL_II_PETSC_DIR/lib/libg/$DEAL_II_PETSC_ARCH \
+             ; then
+            { { echo "$as_me:$LINENO: error: PETSc has not been compiled for C++, but
+                          deal.II needs this" >&5
+echo "$as_me: error: PETSc has not been compiled for C++, but
+                          deal.II needs this" >&2;}
+   { (exit 1); exit 1; }; }
+          else
+            { { echo "$as_me:$LINENO: error: PETSc has not been compiled for the architecture
+                          specified with --with-petsc-arch" >&5
+echo "$as_me: error: PETSc has not been compiled for the architecture
+                          specified with --with-petsc-arch" >&2;}
+   { (exit 1); exit 1; }; }
+          fi
+        fi
+        ;;
 
-  DEAL_II_PETSC_VERSION_MAJOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
-                               | grep "#define PETSC_VERSION_MAJOR" \
-                               | perl -pi -e 's/.*MAJOR\s+//g;'`
-  DEAL_II_PETSC_VERSION_MINOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
-                               | grep "#define PETSC_VERSION_MINOR" \
-                               | perl -pi -e 's/.*MINOR\s+//g;'`
-  DEAL_II_PETSC_VERSION_SUBMINOR=`cat $DEAL_II_PETSC_DIR/include/petscversion.h \
-                               | grep "#define PETSC_VERSION_SUBMINOR" \
-                               | perl -pi -e 's/.*MINOR\s+//g;'`
-  PETSC_VERSION="$DEAL_II_PETSC_VERSION_MAJOR.$DEAL_II_PETSC_VERSION_MINOR.$DEAL_II_PETSC_VERSION_SUBMINOR"
-  echo "$as_me:$LINENO: result: $PETSC_VERSION" >&5
-echo "${ECHO_T}$PETSC_VERSION" >&6
+      2.3*)
+        if test ! -d $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH \
+             ; then
+          { { echo "$as_me:$LINENO: error: PETSc has not been compiled for the architecture
+                        specified with --with-petsc-arch" >&5
+echo "$as_me: error: PETSc has not been compiled for the architecture
+                        specified with --with-petsc-arch" >&2;}
+   { (exit 1); exit 1; }; }
+        fi
+        ;;
+
+      *)
+        { { echo "$as_me:$LINENO: error: Unknown PETSc version" >&5
+echo "$as_me: error: Unknown PETSc version" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+    esac
+  fi
 
 
         if test "x$with_petsc" = "x" ; then
@@ -9196,9 +9202,6 @@ if test "x$with_lapack" != "x" ; then
 fi
 
 
-echo $with_petsc
-echo $enableshared
-
 if test "x$with_petsc" != "x" ; then
   if test "x$enableshared" = "xno" ; then
     with_blas="yes"

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.