dnl is stored.
dnl
dnl
-dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
+dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
dnl
dnl $Id$
+dnl ------------------------------------------------------------
+dnl Check whether Trilinos is installed, and if so store the
+dnl respective links
+dnl
+dnl Usage: DEAL_II_CONFIGURE_TRILINOS
+dnl
+dnl ------------------------------------------------------------
+AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl
+[
+ AC_MSG_CHECKING(for Trilinos library directory)
+
+ AC_ARG_WITH(trilinos,
+ [ --with-trilinos=/path/to/trilinos Specify the path to the Trilinos installation,
+ of which the include and lib directories
+ are subdirs; use this if you want to override
+ the TRILINOS_DIR environment variable.],
+ [
+ dnl Special case when someone does --with-petsc=no
+ if test "x$withval" = "xno" ; then
+ AC_MSG_RESULT([explicitly disabled])
+ USE_CONTRIB_TRILINOS=no
+ else
+ USE_CONTRIB_TRILINOS=yes
+ DEAL_II_TRILINOS_DIR=$withval
+ AC_MSG_RESULT($DEAL_II_TRILINOS_DIR)
+
+ dnl Make sure that what was specified is actually correct
+ if test ! -d $DEAL_II_TRILINOS_DIR/include \
+ -o ! -d $DEAL_II_TRILINOS_DIR/lib ; then
+ AC_MSG_ERROR([Path to Trilinos specified with --with-trilinos does not
+ point to a complete Trilinos installation])
+ fi
+ fi
+ ],
+ [
+ dnl Take something from the environment variables, if it is there
+ if test "x$TRILINOS_DIR" != "x" ; then
+ USE_CONTRIB_TRILINOS=yes
+ DEAL_II_TRILINOS_DIR="$TRILINOS_DIR"
+ AC_MSG_RESULT($DEAL_II_TRILINOS_DIR)
+
+ dnl Make sure that what this is actually correct
+ if test ! -d $DEAL_II_TRILINOS_DIR/include \
+ -o ! -d $DEAL_II_TRILINOS_DIR/lib ; then
+ AC_MSG_ERROR([The path to Trilinos specified in the TRILINOS_DIR
+ environment variable does not
+ point to a complete Trilinos installation])
+ fi
+ else
+ USE_CONTRIB_TRILINOS=no
+ DEAL_II_TRILINOS_DIR=""
+ AC_MSG_RESULT(not found)
+ fi
+ ])
+
+ dnl If we have found PETSc, determine and set additional pieces of data
+ if test "$USE_CONTRIB_TRILINOS" = "yes" ; then
+ AC_DEFINE(DEAL_II_USE_TRILINOS, 1,
+ [Defined if a Trilinos installation was found and is going
+ to be used])
+
+ dnl Set an additional variable (not via AC_DEFINE, since we don't want
+ dnl to have it in config.h) which we can use in doc/doxygen/options.dox.in.
+ dnl If we have Trilinos, then the value of this variable expands to
+ dnl defining the string "DEAL_II_USE_TRILINOS" for the preprocessor. If
+ dnl we don't have no Trilinos, then it does not define this string.
+ DEAL_II_DEFINE_DEAL_II_USE_TRILINOS=DEAL_II_USE_TRILINOS
+
+ DEAL_II_CHECK_TRILINOS_SHARED_STATIC
+
+ dnl Finally set with_trilinos if this hasn't happened yet
+ if test "x$with_trilinos" = "x" ; then
+ with_trilinos="yes"
+ fi
+ fi
+])
+
+
+
+dnl ------------------------------------------------------------
+dnl Check whether the installed version of Trilinos uses shared
+dnl or static libs, or both
+dnl
+dnl Usage: DEAL_II_CHECK_TRILINOS_SHARED_STATIC
+dnl
+dnl ------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_TRILINOS_SHARED_STATIC, dnl
+[
+ dnl Check using the epetra library since that should always be there
+
+ AC_MSG_CHECKING(whether Trilinos uses shared libraries)
+ if test -f $DEAL_II_TRILINOS_DIR/lib/libepetra${shared_lib_suffix} ; then
+ AC_MSG_RESULT(yes)
+ DEAL_II_TRILINOS_SHARED=yes
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ AC_MSG_CHECKING(whether Trilinos uses static libraries)
+ if test -f $DEAL_II_TRILINOS_DIR/lib/libepetra${static_lib_suffix} ; then
+ AC_MSG_RESULT(yes)
+ DEAL_II_TRILINOS_STATIC=yes
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ dnl Make sure something is set at least
+ if test "x${DEAL_II_TRILINOS_SHARED}${DEAL_II_TRILINOS_STATIC}" = "x" ; then
+ AC_MSG_ERROR([Unable to determine whether Trilinos uses shared or
+ static libraries.])
+ fi
+])
+
+
dnl ------------------------------------------------------------
dnl Check whether Metis is installed, and if so store the
dnl respective links
if test "x$1" != "xyes" ; then lapack="$1"; else lapack="lapack"; fi
AC_CHECK_LIB($lapack, dgbsv_,
[ LIBS="-l$lapack $LIBS"
- AC_DEFINE(HAVE_LIBLAPACK)
+ AC_DEFINE([HAVE_LIBLAPACK], [1],
+ [Defined if deal.II was configured with LAPACK support])
],
[AC_MSG_ERROR([LAPACK library $lapack not found])]
)
AC_CHECK_LIB($blas, daxpy_,
[
LIBS="-l$blas $LIBS"
- AC_DEFINE(HAVE_LIBBLAS)
+ AC_DEFINE([HAVE_LIBBLAS], [1],
+ [Defined if deal.II was configured with BLAS support])
],,$F77LIBS)
AC_SUBST(NEEDS_F77LIBS, "yes")
else
AC_CHECK_LIB($blas, daxpy_,
[
LIBS="-l$blas $LIBS"
- AC_DEFINE(HAVE_LIBBLAS)
+ AC_DEFINE([HAVE_LIBBLAS], [1],
+ [Defined if deal.II was configured with BLAS support])
],,$F77LIBS)
AC_SUBST(NEEDS_F77LIBS, "yes")
/* Defined if a PETSc installation was found and is going to be used */
#undef DEAL_II_USE_PETSC
+/* Defined if a Trilinos installation was found and is going to be used */
+#undef DEAL_II_USE_TRILINOS
+
/* This error appears in the Apple edition of the gcc 3.3, which ships with
Darwin7.9.0 and probably previous version. It leads to problems during
linking. For the details, look at aclocal.m4 in the top-level directory. */
/* Define to 1 if you have the `amd' library (-lamd). */
#undef HAVE_LIBAMD
-/* Define to 1 if you have the `blas' library (-lblas). */
+/* Defined if deal.II was configured with BLAS support */
#undef HAVE_LIBBLAS
-/* Define to 1 if you have the `lapack' library (-llapack). */
+/* Defined if deal.II was configured with LAPACK support */
#undef HAVE_LIBLAPACK
/* Define to 1 if you have the `NetCDF' library (-lnetcdf). */
DEAL_II_PETSC_VERSION_SUBMINOR = @DEAL_II_PETSC_VERSION_SUBMINOR@
DEAL_II_PETSC_MPIUNI_LIB = @DEAL_II_PETSC_MPIUNI_LIB@
+USE_CONTRIB_TRILINOS = @USE_CONTRIB_TRILINOS@
+DEAL_II_TRILINOS_DIR = @DEAL_II_TRILINOS_DIR@
+DEAL_II_TRILINOS_SHARED = @DEAL_II_TRILINOS_SHARED@
+DEAL_II_TRILINOS_STATIC = @DEAL_II_TRILINOS_STATIC@
+
USE_CONTRIB_METIS = @USE_CONTRIB_METIS@
DEAL_II_METIS_DIR = @DEAL_II_METIS_DIR@
include-path-petsc = $(DEAL_II_PETSC_DIR)/include
include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)
+include-path-trilinos = $(DEAL_II_TRILINOS_DIR)/include
include-path-metis = $(DEAL_II_METIS_DIR)/Lib
# include paths as command line flags. while compilers allow a space between
@UMFPACK_INCLUDE_DIR@ @HSL_INCLUDE_DIR@ \
-I$D/contrib
-# add PETSc and METIS include path if necessary. this rule
+# add PETSc, Trilinos and METIS include path if necessary. this rule
# (and the one further down below to get correct flags) should eventually
# be replaced by something where we do not blindly include PETSc make files
# (and thus import all of its variables), but rather set up a scheme to
INCLUDE += -I$(include-path-petsc) -I$(include-path-petsc-bmake)\
$(MPI_INCLUDE)
endif
+
+ifeq ($(USE_CONTRIB_TRILINOS),yes)
+ INCLUDE += -I$(include-path-trilinos)
+endif
+
ifeq ($(USE_CONTRIB_METIS),yes)
INCLUDE += -I$(include-path-metis)
endif
# compile flags for C compiler
CFLAGS = @CFLAGS@
-# PETSc wants to see a whole lot of other flags being passed. ...
+# PETSc wants to see a whole lot of other flags being passed...
ifeq ($(USE_CONTRIB_PETSC),yes)
# set PETSC_DIR and PETSC_ARCH to be used in variables file
PETSC_DIR = $(DEAL_II_PETSC_DIR)
DEAL_II_PETSC_VERSION_SUBMINOR
DEAL_II_PETSC_MPIUNI_LIB
DEAL_II_DEFINE_DEAL_II_USE_PETSC
+USE_CONTRIB_TRILINOS
+DEAL_II_TRILINOS_DIR
+DEAL_II_TRILINOS_SHARED
+DEAL_II_TRILINOS_STATIC
NEEDS_F77LIBS
HSL_INCLUDE_DIR
USE_CONTRIB_HSL
--with-petsc-arch=architecture Specify the architecture for your PETSc
installation; use this if you want to override
the PETSC_ARCH environment variable.
+ --with-trilinos=/path/to/trilinos Specify the path to the Trilinos installation,
+ of which the include and lib directories
+ are subdirs; use this if you want to override
+ the TRILINOS_DIR environment variable.
--with-blas=blaslib use the blas library blaslib. Make sure
the path to the libary is searched by ld, since
it is included by the argument -lblaslib. If no
-
{ echo "$as_me:$LINENO: checking for PETSc library directory" >&5
echo $ECHO_N "checking for PETSc library directory... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for Trilinos library directory" >&5
+echo $ECHO_N "checking for Trilinos library directory... $ECHO_C" >&6; }
+
+
+# Check whether --with-trilinos was given.
+if test "${with_trilinos+set}" = set; then
+ withval=$with_trilinos;
+ if test "x$withval" = "xno" ; then
+ { echo "$as_me:$LINENO: result: explicitly disabled" >&5
+echo "${ECHO_T}explicitly disabled" >&6; }
+ USE_CONTRIB_TRILINOS=no
+ else
+ USE_CONTRIB_TRILINOS=yes
+ DEAL_II_TRILINOS_DIR=$withval
+ { echo "$as_me:$LINENO: result: $DEAL_II_TRILINOS_DIR" >&5
+echo "${ECHO_T}$DEAL_II_TRILINOS_DIR" >&6; }
+
+ if test ! -d $DEAL_II_TRILINOS_DIR/include \
+ -o ! -d $DEAL_II_TRILINOS_DIR/lib ; then
+ { { echo "$as_me:$LINENO: error: Path to Trilinos specified with --with-trilinos does not
+ point to a complete Trilinos installation" >&5
+echo "$as_me: error: Path to Trilinos specified with --with-trilinos does not
+ point to a complete Trilinos installation" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+else
+
+ if test "x$TRILINOS_DIR" != "x" ; then
+ USE_CONTRIB_TRILINOS=yes
+ DEAL_II_TRILINOS_DIR="$TRILINOS_DIR"
+ { echo "$as_me:$LINENO: result: $DEAL_II_TRILINOS_DIR" >&5
+echo "${ECHO_T}$DEAL_II_TRILINOS_DIR" >&6; }
+
+ if test ! -d $DEAL_II_TRILINOS_DIR/include \
+ -o ! -d $DEAL_II_TRILINOS_DIR/lib ; then
+ { { echo "$as_me:$LINENO: error: The path to Trilinos specified in the TRILINOS_DIR
+ environment variable does not
+ point to a complete Trilinos installation" >&5
+echo "$as_me: error: The path to Trilinos specified in the TRILINOS_DIR
+ environment variable does not
+ point to a complete Trilinos installation" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ USE_CONTRIB_TRILINOS=no
+ DEAL_II_TRILINOS_DIR=""
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+ fi
+
+fi
+
+
+ if test "$USE_CONTRIB_TRILINOS" = "yes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_USE_TRILINOS 1
+_ACEOF
+
+
+ DEAL_II_DEFINE_DEAL_II_USE_TRILINOS=DEAL_II_USE_TRILINOS
+
+
+
+ { echo "$as_me:$LINENO: checking whether Trilinos uses shared libraries" >&5
+echo $ECHO_N "checking whether Trilinos uses shared libraries... $ECHO_C" >&6; }
+ if test -f $DEAL_II_TRILINOS_DIR/lib/libepetra${shared_lib_suffix} ; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ DEAL_II_TRILINOS_SHARED=yes
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+
+ { echo "$as_me:$LINENO: checking whether Trilinos uses static libraries" >&5
+echo $ECHO_N "checking whether Trilinos uses static libraries... $ECHO_C" >&6; }
+ if test -f $DEAL_II_TRILINOS_DIR/lib/libepetra${static_lib_suffix} ; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ DEAL_II_TRILINOS_STATIC=yes
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+
+ if test "x${DEAL_II_TRILINOS_SHARED}${DEAL_II_TRILINOS_STATIC}" = "x" ; then
+ { { echo "$as_me:$LINENO: error: Unable to determine whether Trilinos uses shared or
+ static libraries." >&5
+echo "$as_me: error: Unable to determine whether Trilinos uses shared or
+ static libraries." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+ if test "x$with_trilinos" = "x" ; then
+ with_trilinos="yes"
+ fi
+ fi
+
+
+
+
+
+
if test "x$with_umfpack" != "x" -a "x$with_umfpack" != "xno" ; then
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
LIBS="-l$blas $LIBS"
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBBLAS 1
_ACEOF
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
LIBS="-l$blas $LIBS"
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBBLAS 1
_ACEOF
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
LIBS="-l$lapack $LIBS"
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBLAPACK 1
_ACEOF
cat >conf$$subs.sed <<_ACEOF
DEAL_II_PETSC_MPIUNI_LIB!$DEAL_II_PETSC_MPIUNI_LIB$ac_delim
DEAL_II_DEFINE_DEAL_II_USE_PETSC!$DEAL_II_DEFINE_DEAL_II_USE_PETSC$ac_delim
+USE_CONTRIB_TRILINOS!$USE_CONTRIB_TRILINOS$ac_delim
+DEAL_II_TRILINOS_DIR!$DEAL_II_TRILINOS_DIR$ac_delim
+DEAL_II_TRILINOS_SHARED!$DEAL_II_TRILINOS_SHARED$ac_delim
+DEAL_II_TRILINOS_STATIC!$DEAL_II_TRILINOS_STATIC$ac_delim
NEEDS_F77LIBS!$NEEDS_F77LIBS$ac_delim
HSL_INCLUDE_DIR!$HSL_INCLUDE_DIR$ac_delim
USE_CONTRIB_HSL!$USE_CONTRIB_HSL$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
AC_MSG_RESULT(---------------- configuring additional libs ----------------)
-dnl First check for PETSc
-
DEAL_II_CONFIGURE_PETSC
AC_SUBST(USE_CONTRIB_PETSC)
AC_SUBST(DEAL_II_PETSC_DIR)
AC_SUBST(DEAL_II_PETSC_MPIUNI_LIB)
AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_PETSC)
+DEAL_II_CONFIGURE_TRILINOS
+AC_SUBST(USE_CONTRIB_TRILINOS)
+AC_SUBST(DEAL_II_TRILINOS_DIR)
+AC_SUBST(DEAL_II_TRILINOS_SHARED)
+AC_SUBST(DEAL_II_TRILINOS_STATIC)
dnl Make sure we configure for libraries used by other libraries. For
../../examples/step-26/doc \
../../examples/step-27/doc \
../../examples/step-28/doc \
- ../../examples/step-29/doc
+ ../../examples/step-29/doc \
+ ../../examples/step-99/doc
# [WB] Set MT flags so that the corresponding documentation will always be visible,
# [WB] irrespective of whether MT is actually switched on or not.
# [GK] Define a variable doxygen in order to mask out inline functions
-PREDEFINED = DOXYGEN=1 DEBUG=1 DEAL_II_USE_PETSC=1 \
+PREDEFINED = DOXYGEN=1 DEBUG=1 DEAL_II_USE_PETSC=1 DEAL_II_USE_TRILINOS=1 \
DEAL_II_USE_MT=1 DEAL_II_USE_MT_POSIX=1
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
PREDEFINED = DOXYGEN=1 \
DEBUG=1 \
DEAL_II_USE_PETSC=1 \
+ DEAL_II_USE_TRILINOS=1 \
DEAL_II_USE_MT=1 \
DEAL_II_USE_MT_POSIX=1