dnl Make sure that what was specified is actually correct
if test ! -d $DEAL_II_PETSC_DIR/include \
- -o ! -d $DEAL_II_PETSC_DIR/lib ; then
+ ; then
AC_MSG_ERROR([Path to PETSc specified with --with-petsc does not
point to a complete PETSc installation])
fi
dnl Make sure that what this is actually correct
if test ! -d $DEAL_II_PETSC_DIR/include \
- -o ! -d $DEAL_II_PETSC_DIR/lib ; then
+ ; then
AC_MSG_ERROR([The path to PETSc specified in the PETSC_DIR
environment variable does not
point to a complete PETSc installation])
fi
;;
+ 3.*)
+ if test ! -d $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib \
+ ; then
+ AC_MSG_ERROR([PETSc has not been compiled for the architecture
+ specified with --with-petsc-arch])
+ fi
+ ;;
+
*)
AC_MSG_ERROR([Unknown PETSc version])
;;
])
-
dnl ------------------------------------------------------------
dnl Check whether SLEPc is installed, and if so store the
-dnl respective links
+dnl respective links.
dnl
dnl Usage: DEAL_II_CONFIGURE_SLEPC
dnl
AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl
[
dnl First check for the SLEPc directory
- AC_MSG_CHECKING(for SLEPc library directory)
+ AC_MSG_CHECKING(for SLEPc include directory)
AC_ARG_WITH(slepc,
[ --with-slepc=/path/to/slepc Specify the path to the SLEPc installation,
- of which the include and library directories
- are subdirs; use this if you want to override
- the SLEPC_DIR environment variable.],
+ for which the include directory is a subdir;
+ use this if you want to override the SLEPC_DIR
+ environment variable.],
[
dnl Special case when someone does --with-slepc=no
if test "x$withval" = "xno" ; then
AC_MSG_RESULT($DEAL_II_SLEPC_DIR)
dnl Make sure that what was specified is actually correct
- if test ! -d $DEAL_II_SLEPC_DIR/include \
- -o ! -d $DEAL_II_SLEPC_DIR/lib ; then
+ if test ! -d $DEAL_II_SLEPC_DIR \
+ -o ! -d $DEAL_II_SLEPC_DIR/include \
+ ; then
AC_MSG_ERROR([Path to SLEPc specified with --with-slepc does not
point to a complete SLEPc installation])
fi
AC_MSG_RESULT($DEAL_II_SLEPC_DIR)
dnl Make sure that what this is actually correct
- if test ! -d $DEAL_II_SLEPC_DIR/include \
- -o ! -d $DEAL_II_SLEPC_DIR/lib ; then
+ if test ! -d $DEAL_II_SLEPC_DIR \
+ -o ! -d $DEAL_II_SLEPC_DIR/include \
+ ; then
AC_MSG_ERROR([The path to SLEPc specified in the SLEPC_DIR
- environment variable does not
- point to a complete SLEPc installation])
+ environment variable does not point to a
+ complete SLEPc installation])
fi
else
USE_CONTRIB_SLEPC=no
dnl defining the string "DEAL_II_USE_SLEPC" for the preprocessor. If
dnl we don't have no SLEPc, then it does not define this string.
DEAL_II_DEFINE_DEAL_II_USE_SLEPC=DEAL_II_USE_SLEPC
-
fi
-
dnl If we have found SLEPc, determine additional pieces of data
- if test "$USE_CONTRIB_SLEPC" = "yes" ; then
- DEAL_II_CONFIGURE_SLEPC_VERSION
+ if test "$USE_CONTRIB_SLEPC" = "yes" \
+ ; then
DEAL_II_CONFIGURE_SLEPC_ARCH
+ DEAL_II_CONFIGURE_SLEPC_VERSION
dnl Finally set with_slepc if this hasn't happened yet
if test "x$with_slepc" = "x" ; then
dnl ------------------------------------------------------------
-dnl Figure out the architecture used for SLEPc, since that determines
-dnl where object and configuration files will be found.
+dnl Figure out the architecture used for SLEPc and if the
+dnl library directory exists, since that determines where object
+dnl and configuration files will be found.
dnl
dnl Usage: DEAL_II_CONFIGURE_SLEPC_ARCH
dnl
AC_ARG_WITH(slepc-arch,
[ --with-slepc-arch=architecture Specify the architecture for your SLEPc
- installation; use this if you want to override
- the SLEPC_ARCH environment variable.],
+ installation; use this if you want to
+ override the SLEPC_ARCH environment variable.],
[
DEAL_II_SLEPC_ARCH="$withval"
AC_MSG_RESULT($DEAL_II_SLEPC_ARCH)
fi
])
-
if test "x$SLEPC_ARCH" != "x" ; then
dnl Make sure that what was specified is actually correct.
- if test ! -d $DEAL_II_SLEPC_DIR/lib/$DEAL_II_SLEPC_ARCH \
+ if test ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH \
+ -o ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH/lib \
; then
AC_MSG_ERROR([SLEPc has not been compiled for the architecture
specified with --with-slepc-arch])
dnl Then check that PETSc and SLEPc architectures are compatible
dnl ie. that they are the same.
- if test "$DEAL_II_SLEPC_ARCH" != "$DEAL_II_PETSC_ARCH" ; then
+ if test "$DEAL_II_SLEPC_ARCH" != "$DEAL_II_PETSC_ARCH" \
+ ; then
AC_MSG_ERROR([If SLEPc is used, you must specify the same
architecture as your PETSc Installation either
through the SLEPC_ARCH environment variable,
dnl Then check that PETSc and SLEPc versions are compatible
dnl ie. that they are equivalent.
- if test "${DEAL_II_PETSC_VERSION_MAJOR}" != "${DEAL_II_SLEPC_VERSION_MAJOR}" \
- -o "${DEAL_II_PETSC_VERSION_MINOR}" != "${DEAL_II_SLEPC_VERSION_MINOR}" \
- -o "${DEAL_II_PETSC_VERSION_SUBMINOR}" != "${DEAL_II_SLEPC_VERSION_SUBMINOR}" ; then
+ if test "${PETSC_VERSION}" != "${SLEPC_VERSION}" \
+ ; then
AC_MSG_ERROR([If SLEPc is used, you must use the same version
number as your PETSc Installation])
fi
# for all PETSc libraries in our own lib directory, and have this one
# twiddle with whatever is necessary to link in PETSc.
#
-# to make things more fun, the whole scheme was changed in petsc 2.3.0
+# to make things more fun, the whole scheme was changed in petsc 2.3.0
+# and then again in petsc 3.0.0
#
# also sort of annoying is the fact that on Mac OS X, the trick with the
# one library doesn't appear to work. Instead of a single library, we therefore
# have to list all of them, at least if we are using shared libs.
ifeq ($(USE_CONTRIB_PETSC),yes)
- ifeq ($(DEAL_II_PETSC_VERSION_MINOR),2)
- lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/lib/libg_c++/$(DEAL_II_PETSC_ARCH)
- lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/lib/libO_c++/$(DEAL_II_PETSC_ARCH)
- else
- lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)
- lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)
- endif
- ifeq ($(findstring darwin,$(TARGET)),)
- lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
- lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
- else
- ifeq ($(enable-shared),yes)
- lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix))
- lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix))
+ ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2)
+ ifeq ($(DEAL_II_PETSC_VERSION_MINOR),2)
+ lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/lib/libg_c++/$(DEAL_II_PETSC_ARCH)
+ lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/lib/libO_c++/$(DEAL_II_PETSC_ARCH)
+ else
+ lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)
+ lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)
+ endif
+ ifeq ($(findstring darwin,$(TARGET)),)
+ lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
+ lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
else
+ ifeq ($(enable-shared),yes)
+ lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix))
+ lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix))
+ else
+ lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
+ lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
+ endif
+ endif
+ else
+ lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib
+ lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib
+ ifeq ($(findstring darwin,$(TARGET)),)
lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
+ else
+ ifeq ($(enable-shared),yes)
+ lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix))
+ lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix))
+ else
+ lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
+ lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
+ endif
endif
- endif
+ endif
endif
-# similar (and simpler) for slepc
ifeq ($(USE_CONTRIB_SLEPC),yes)
- lib-contrib-slepc = $(DEAL_II_SLEPC_DIR)/lib/$(DEAL_II_SLEPC_ARCH)/libslepc$(lib-suffix)
+ lib-contrib-slepc = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_SLEPC_ARCH)/lib/libslepc$(lib-suffix)
endif
# same for metis, except that there is only one library in that case
# environment variable, since the compiler will evaluate the value of
# that anyway at compile time
include-path-petsc = $(DEAL_II_PETSC_DIR)/include
-include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)
+ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2)
+ include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)
+else
+ include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/include
+endif
include-path-slepc = $(DEAL_II_SLEPC_DIR)/include
-include-path-slepc-bmake = $(DEAL_II_SLEPC_DIR)/bmake/$(DEAL_II_SLEPC_ARCH)
+include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_SLEPC_ARCH)/conf
include-path-trilinos = $(DEAL_II_TRILINOS_INCDIR)
include-path-metis = $(DEAL_II_METIS_INCDIR)
endif
ifeq ($(USE_CONTRIB_SLEPC),yes)
- INCLUDE += -I$(include-path-slepc) -I$(include-path-slepc-bmake)
+ INCLUDE += -I$(include-path-slepc) -I$(include-path-slepc-conf)
endif
ifeq ($(USE_CONTRIB_TRILINOS),yes)
# set PETSC_DIR and PETSC_ARCH to be used in variables file
PETSC_DIR = $(DEAL_II_PETSC_DIR)
PETSC_ARCH = $(DEAL_II_PETSC_ARCH)
- ifeq ($(DEAL_II_PETSC_VERSION_MINOR),2)
- include $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)/variables
+ ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2)
+ ifeq ($(DEAL_II_PETSC_VERSION_MINOR),2)
+ include $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)/variables
+ else
+ include $(DEAL_II_PETSC_DIR)/bmake/common/variables
+ endif
else
- include $(DEAL_II_PETSC_DIR)/bmake/common/variables
+ include $(DEAL_II_PETSC_DIR)/conf/variables
endif
CXXFLAGS.g += $(GCXX_PETSCFLAGS)
CXXFLAGS.o += $(OCXX_PETSCFLAGS)