From 8bfb9dfe84d71510e2b9b8b780fb4d014a656a99 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 22 Feb 2011 13:46:35 +0000 Subject: [PATCH] Make ./configure and friends deal with Trilinos headers and libraries that come from Debian's packages. git-svn-id: https://svn.dealii.org/trunk@23413 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 17 +++++++++--- deal.II/common/Make.global_options.in | 39 ++++++++++++++------------- deal.II/configure | 27 ++++++++++++++----- deal.II/doc/news/changes.h | 6 +++++ 4 files changed, 59 insertions(+), 30 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index fdf51b7784..474c632966 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -6189,14 +6189,14 @@ dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS_VERSION, dnl [ AC_MSG_CHECKING([for Trilinos version]) - DEAL_II_TRILINOS_VERSION_MAJOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_MAJOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+//g;'` - DEAL_II_TRILINOS_VERSION_MINOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_MINOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_MINOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+\d?\d(\d\d)\d\d/\1/g;' \ | perl -pi -e 's/0(\d)/\1/g;'` - DEAL_II_TRILINOS_VERSION_SUBMINOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_SUBMINOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_MINOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+\d?\d\d\d(\d\d)/\1/g;' \ | perl -pi -e 's/0(\d)/\1/g;'` @@ -6204,6 +6204,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS_VERSION, dnl AC_SUBST(DEAL_II_TRILINOS_VERSION_MAJOR) AC_SUBST(DEAL_II_TRILINOS_VERSION_MINOR) AC_SUBST(DEAL_II_TRILINOS_VERSION_SUBMINOR) + AC_SUBST(DEAL_II_TRILINOS_LIBPREFIX) ]) @@ -6312,6 +6313,10 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_SHARED_STATIC, dnl if test -f $DEAL_II_TRILINOS_LIBDIR/libepetra${shared_lib_suffix} ; then AC_MSG_RESULT(yes) DEAL_II_TRILINOS_SHARED=yes + elif test -f $DEAL_II_TRILINOS_LIBDIR/libtrilinos_epetra${shared_lib_suffix} ; then + AC_MSG_RESULT(yes) + DEAL_II_TRILINOS_SHARED=yes + DEAL_II_TRILINOS_LIBPREFIX="trilinos_" else AC_MSG_RESULT(no) fi @@ -6320,6 +6325,10 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_SHARED_STATIC, dnl if test -f $DEAL_II_TRILINOS_LIBDIR/libepetra${static_lib_suffix} ; then AC_MSG_RESULT(yes) DEAL_II_TRILINOS_STATIC=yes + elif test -f $DEAL_II_TRILINOS_LIBDIR/libtrilinos_epetra${static_lib_suffix} ; then + AC_MSG_RESULT(yes) + DEAL_II_TRILINOS_STATIC=yes + DEAL_II_TRILINOS_LIBPREFIX="libtrilinos_" else AC_MSG_RESULT(no) fi @@ -7155,7 +7164,7 @@ AC_DEFUN(DEAL_II_WITH_ZLIB, dnl AC_CHECK_HEADER(zlib.h, [ DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-l$zlib) - AC_DEFINE(HAVE_LIBZ) + AC_DEFINE(HAVE_LIBZ,[],"") ]) ]) ]) diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index a0553351f5..c44ec33bdf 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -73,6 +73,7 @@ DEAL_II_TRILINOS_STATIC = @DEAL_II_TRILINOS_STATIC@ DEAL_II_TRILINOS_VERSION_MAJOR = @DEAL_II_TRILINOS_VERSION_MAJOR@ DEAL_II_TRILINOS_VERSION_MINOR = @DEAL_II_TRILINOS_VERSION_MINOR@ DEAL_II_TRILINOS_VERSION_SUBMINOR = @DEAL_II_TRILINOS_VERSION_SUBMINOR@ +DEAL_II_TRILINOS_LIBPREFIX = @DEAL_II_TRILINOS_LIBPREFIX@ USE_CONTRIB_MUMPS = @USE_CONTRIB_MUMPS@ DEAL_II_MUMPS_DIR = @DEAL_II_MUMPS_DIR@ @@ -207,25 +208,25 @@ endif # sync. ifeq ($(USE_CONTRIB_TRILINOS),yes) DEAL_II_TRILINOS_LIBS = \ - stratimikosamesos \ - stratimikosaztecoo \ - stratimikosifpack \ - stratimikosml \ - stratimikos \ - ml \ - amesos \ - belos \ - ifpack \ - aztecoo \ - rtop \ - sacado \ - thyra \ - thyraepetra \ - thyraepetraext \ - epetraext \ - epetra \ - teuchos \ - triutils + $(DEAL_II_TRILINOS_LIBPREFIX)stratimikosamesos \ + $(DEAL_II_TRILINOS_LIBPREFIX)stratimikosaztecoo \ + $(DEAL_II_TRILINOS_LIBPREFIX)stratimikosifpack \ + $(DEAL_II_TRILINOS_LIBPREFIX)stratimikosml \ + $(DEAL_II_TRILINOS_LIBPREFIX)stratimikos \ + $(DEAL_II_TRILINOS_LIBPREFIX)ml \ + $(DEAL_II_TRILINOS_LIBPREFIX)amesos \ + $(DEAL_II_TRILINOS_LIBPREFIX)belos \ + $(DEAL_II_TRILINOS_LIBPREFIX)ifpack \ + $(DEAL_II_TRILINOS_LIBPREFIX)aztecoo \ + $(DEAL_II_TRILINOS_LIBPREFIX)rtop \ + $(DEAL_II_TRILINOS_LIBPREFIX)sacado \ + $(DEAL_II_TRILINOS_LIBPREFIX)thyra \ + $(DEAL_II_TRILINOS_LIBPREFIX)thyraepetra \ + $(DEAL_II_TRILINOS_LIBPREFIX)thyraepetraext \ + $(DEAL_II_TRILINOS_LIBPREFIX)epetraext \ + $(DEAL_II_TRILINOS_LIBPREFIX)epetra \ + $(DEAL_II_TRILINOS_LIBPREFIX)teuchos \ + $(DEAL_II_TRILINOS_LIBPREFIX)triutils ifeq ($(enable-shared),yes) lib-contrib-trilinos = \ diff --git a/deal.II/configure b/deal.II/configure index a1afa9ed76..8b839c3b6c 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 23258 . +# From configure.in Revision: 23358 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for deal.II 7.1.pre. # @@ -642,6 +642,7 @@ DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR DEAL_II_EXPAND_TRILINOS_MPI_VECTOR DEAL_II_EXPAND_TRILINOS_VECTOR +DEAL_II_TRILINOS_LIBPREFIX DEAL_II_TRILINOS_VERSION_SUBMINOR DEAL_II_TRILINOS_VERSION_MINOR DEAL_II_TRILINOS_VERSION_MAJOR @@ -10529,14 +10530,14 @@ $as_echo "#define DEAL_II_USE_TRILINOS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Trilinos version" >&5 $as_echo_n "checking for Trilinos version... " >&6; } - DEAL_II_TRILINOS_VERSION_MAJOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_MAJOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+//g;'` - DEAL_II_TRILINOS_VERSION_MINOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_MINOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_MINOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+\d?\d(\d\d)\d\d/\1/g;' \ | perl -pi -e 's/0(\d)/\1/g;'` - DEAL_II_TRILINOS_VERSION_SUBMINOR=`cat $DEAL_II_TRILINOS_DIR/include/Trilinos_version.h \ + DEAL_II_TRILINOS_VERSION_SUBMINOR=`cat $DEAL_II_TRILINOS_INCDIR/Trilinos_version.h \ | grep "#define TRILINOS_MAJOR_MINOR_VERSION" \ | perl -pi -e 's/.*VERSION\s+\d?\d\d\d(\d\d)/\1/g;' \ | perl -pi -e 's/0(\d)/\1/g;'` @@ -10547,6 +10548,7 @@ $as_echo "$DEAL_II_TRILINOS_VERSION_MAJOR.$DEAL_II_TRILINOS_VERSION_MINOR.$DEAL_ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Epetra_config.h presence" >&5 $as_echo_n "checking Epetra_config.h presence... " >&6; } if test -f $DEAL_II_TRILINOS_INCDIR/Epetra_config.h ; then @@ -10650,6 +10652,11 @@ $as_echo_n "checking whether Trilinos uses shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } DEAL_II_TRILINOS_SHARED=yes + elif test -f $DEAL_II_TRILINOS_LIBDIR/libtrilinos_epetra${shared_lib_suffix} ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DEAL_II_TRILINOS_SHARED=yes + DEAL_II_TRILINOS_LIBPREFIX="trilinos_" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10661,6 +10668,11 @@ $as_echo_n "checking whether Trilinos uses static libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } DEAL_II_TRILINOS_STATIC=yes + elif test -f $DEAL_II_TRILINOS_LIBDIR/libtrilinos_epetra${static_lib_suffix} ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DEAL_II_TRILINOS_STATIC=yes + DEAL_II_TRILINOS_LIBPREFIX="libtrilinos_" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -11405,7 +11417,8 @@ if test "x$ac_cv_header_zlib_h" = x""yes; then : LIBS="-l$zlib $LIBS" - $as_echo "#define HAVE_LIBZ 1" >>confdefs.h + +$as_echo "#define HAVE_LIBZ /**/" >>confdefs.h fi @@ -14676,10 +14689,10 @@ if test "x$darwin_shared_lib" = "xyes" ; then if test "x$DARWIN_GCC_WEAK_LINKAGE_BUG" = "xyes" ; then echo " WARNING: The installed compiler version seems to be " - echo " WARNING: the Apple gcc3.3, build 1666, which does not" + echo " WARNING: Apple gcc3.3, build 1666, which does not" echo " WARNING: work properly for building dynamics libs" echo " WARNING: Please install Apple's November 2004 patch" - echo " WARNING: for the gcc, which can be found on:" + echo " WARNING: for gcc, which can be found on:" echo " WARNING: http://www.apple.com/developer" echo fi diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index b3966391e0..69369ef287 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -29,6 +29,12 @@ inconvenience this causes.

General

    +
  1. Fixed: On Debian, the Trilinos packages use a different layout +of include files and library names. The ./configure +script can now deal with this. +
    +(Walter Landry, 2011/02/22) +
  2. Improved: Linking the deal.II libraries on file systems that are mounted remotely from a file server took painfully long. This is now fixed by linking everything on the local file system -- 2.39.5