From 125fb577f352b6bd3349bbc3d4c289def19abacd Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 25 Jul 2012 15:55:07 +0000 Subject: [PATCH] Make deal.II deal with the situation that p4est might install into lib64/ instead of lib/. git-svn-id: https://svn.dealii.org/trunk@25731 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 15 +++++++++++++++ deal.II/common/Make.global_options.in | 3 ++- deal.II/configure | 25 ++++++++++++++++++++++--- deal.II/doc/news/changes.h | 8 ++++++++ deal.II/source/Makefile | 12 ++++++------ 5 files changed, 53 insertions(+), 10 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 3cd08cbcd1..214dbb2539 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -7732,6 +7732,21 @@ AC_DEFUN(DEAL_II_CONFIGURE_P4EST, dnl CXXFLAGSG="$CXXFLAGSG -I$use_p4est/DEBUG/include" CXXFLAGSO="$CXXFLAGSO -I$use_p4est/FAST/include" + + AC_MSG_CHECKING(for p4est library directory) + if test -d "$use_p4est/DEBUG/lib64" -a -d "$use_p4est/FAST/lib64" ; then + AC_MSG_RESULT(lib64) + DEAL_II_P4EST_LIBDIR_NAME=lib64 + else + if test -d "$use_p4est/DEBUG/lib" -a -d "$use_p4est/FAST/lib" ; then + AC_MSG_RESULT(lib) + DEAL_II_P4EST_LIBDIR_NAME=lib + else + AC_MSG_ERROR(could not determine whether p4est stores its library in lib/ or lib64/ directories) + fi + fi + AC_SUBST(DEAL_II_P4EST_LIBDIR_NAME) + else AC_MSG_RESULT(no) fi diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index cd3121065b..3a0db5f6b1 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -97,6 +97,7 @@ USE_CONTRIB_UMFPACK = @USE_CONTRIB_UMFPACK@ USE_CONTRIB_P4EST = @USE_CONTRIB_P4EST@ DEAL_II_P4EST_DIR = @DEAL_II_P4EST_DIR@ +DEAL_II_P4EST_LIBDIR_NAME = @DEAL_II_P4EST_LIBDIR_NAME@ DEAL_II_USE_MPI = @DEAL_II_USE_MPI@ @@ -280,7 +281,7 @@ ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2) 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 = $(DEAL_II_SLEPC_DIR)/include include-path-slepc-bmake = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/include include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/conf include-path-trilinos = $(DEAL_II_TRILINOS_INCDIR) diff --git a/deal.II/configure b/deal.II/configure index 7683f13d51..1ab1c0b23b 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -629,9 +629,10 @@ USE_CONTRIB_LAPACK USE_CONTRIB_BLAS NEEDS_F77LIBS DEAL_II_USE_BLAS +DEAL_II_USE_P4EST +DEAL_II_P4EST_LIBDIR_NAME DEAL_II_P4EST_DIR USE_CONTRIB_P4EST -DEAL_II_USE_P4EST DEAL_II_DEFINE_DEAL_II_USE_MUMPS DEAL_II_BLACS_ARCH DEAL_II_BLACS_DIR @@ -11833,13 +11834,31 @@ $as_echo "yes" >&6; } $as_echo "#define DEAL_II_USE_P4EST 1" >>confdefs.h USE_CONTRIB_P4EST=yes - export USE_CONTRIB_P4EST + DEAL_II_P4EST_DIR=${use_p4est} - export DEAL_II_P4EST_DIR + CXXFLAGSG="$CXXFLAGSG -I$use_p4est/DEBUG/include" CXXFLAGSO="$CXXFLAGSO -I$use_p4est/FAST/include" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for p4est library directory" >&5 +$as_echo_n "checking for p4est library directory... " >&6; } + if test -d "$use_p4est/DEBUG/lib64" -a -d "$use_p4est/FAST/lib64" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: lib64" >&5 +$as_echo "lib64" >&6; } + DEAL_II_P4EST_LIBDIR_NAME=lib64 + else + if test -d "$use_p4est/DEBUG/lib" -a -d "$use_p4est/FAST/lib" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: lib" >&5 +$as_echo "lib" >&6; } + DEAL_II_P4EST_LIBDIR_NAME=lib + else + as_fn_error $? "could not determine whether p4est stores its library in lib/ or lib64/ directories" "$LINENO" 5 + fi + fi + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index f98af3824b..d99a8edf99 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -50,6 +50,14 @@ used to store boundary indicators internally.
    +
  1. +Fixed: On some systems, the p4est library we use for distributed +parallel computations installs its libraries into a lib64/ +directory instead of the usual lib/. deal.II can now deal +with this. +
    +(Wolfgang Bangerth, 2012/07/25) +
  2. New: step-43 is an extension of step-21 that shows efficient methods to solve multi-phase flow. diff --git a/deal.II/source/Makefile b/deal.II/source/Makefile index f9a5068ee1..2e997901b7 100644 --- a/deal.II/source/Makefile +++ b/deal.II/source/Makefile @@ -130,12 +130,12 @@ ifneq ($(GXX-VERSION),compaq_cxx) # and p4est ifeq ($(USE_CONTRIB_P4EST),yes) - deplibs.g += $(DEAL_II_P4EST_DIR)/DEBUG/lib/libp4est$(shared-lib-suffix) \ - $(DEAL_II_P4EST_DIR)/DEBUG/lib/libsc$(shared-lib-suffix) \ - $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/DEBUG/lib) - deplibs.o += $(DEAL_II_P4EST_DIR)/FAST/lib/libp4est$(shared-lib-suffix) \ - $(DEAL_II_P4EST_DIR)/FAST/lib/libsc$(shared-lib-suffix) \ - $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/FAST/lib) + deplibs.g += $(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)/libp4est$(shared-lib-suffix) \ + $(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)/libsc$(shared-lib-suffix) \ + $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/DEBUG/$(DEAL_II_P4EST_LIBDIR_NAME)) + deplibs.o += $(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)/libp4est$(shared-lib-suffix) \ + $(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)/libsc$(shared-lib-suffix) \ + $(call DEAL_II_RPATH,$(DEAL_II_P4EST_DIR)/FAST/$(DEAL_II_P4EST_LIBDIR_NAME)) endif # for cygwin and darwin, also llapack and such are necessary -- 2.39.5