diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-04-01 18:24:25 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-04-01 18:24:25 +0000 |
commit | 4f9fe66c07bbd7ea36ed9c30298a77c1349912a0 (patch) | |
tree | b6f9f2c0bc77a95c4b2d9ee4805f8a36d9916817 | |
parent | dcd70a172ded83f015095d51b745c1415a655878 (diff) |
Add some tests to make it work with PETSc 2.3.x as well.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4278 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rwxr-xr-x | lib/make/extras/PETSC/setup.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/make/extras/PETSC/setup.sh b/lib/make/extras/PETSC/setup.sh index b749783f..005e8857 100755 --- a/lib/make/extras/PETSC/setup.sh +++ b/lib/make/extras/PETSC/setup.sh @@ -67,9 +67,18 @@ else fi +# Set version-specific library directory +# (version 2.3.0 and newer use different library directories) +if [ -e "$PETSC_DIR/lib/$PETSC_ARCH" ]; then + PETSC_LIB_INFIX='' +else + PETSC_LIB_INFIX='/libO' +fi + + # Set version-specific libraries # (version 2.2.0 and newer do not have libpetscsles.a any more) -if [ -e $PETSC_DIR/lib/libO/$PETSC_ARCH/libpetscksp.a ]; then +if [ -e "$PETSC_DIR/lib$PETSC_LIB_INFIX/$PETSC_ARCH/libpetscksp.a" ]; then PETSC_SLES_LIBS="petscksp" else PETSC_SLES_LIBS="petscsles" @@ -77,9 +86,9 @@ fi # Set the PETSc libs, libdirs and includedirs -PETSC_LIB_DIRS='$(PETSC_DIR)/lib/libO/$(PETSC_ARCH)' +PETSC_LIB_DIRS='$(PETSC_DIR)/lib'$PETSC_LIB_INFIX'/$(PETSC_ARCH)' PETSC_INC_DIRS='$(PETSC_DIR)/include $(PETSC_DIR)/bmake/$(PETSC_ARCH)' -PETSC_LIBS="petscfortran petscts petscsnes $PETSC_SLES_LIBS petscdm petscmat petscvec petsc $PETSC_ARCH_LIBS" +PETSC_LIBS="petscts petscsnes $PETSC_SLES_LIBS petscdm petscmat petscvec petsc $PETSC_ARCH_LIBS" # Get the main configure script to search for the X libraries CCTK_NEED_X=yes |