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
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
])
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
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,
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
fi
-echo $with_petsc
-echo $enableshared
-
if test "x$with_petsc" != "x" ; then
if test "x$enableshared" = "xno" ; then
with_blas="yes"