From: bangerth Date: Fri, 17 Oct 2008 19:54:47 +0000 (+0000) Subject: Check that all header files that we need from Trilinos are actually available. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a1c7530ad1112e82ec87cff596b0fe1f222a059;p=dealii-svn.git Check that all header files that we need from Trilinos are actually available. git-svn-id: https://svn.dealii.org/trunk@17264 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 19840bf58d..f0422c1cf0 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -5464,6 +5464,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl DEAL_II_CHECK_TRILINOS_SHARED_STATIC DEAL_II_CHECK_TRILINOS_WARNINGS + DEAL_II_CHECK_TRILINOS_HEADER_FILES DEAL_II_EXPAND_TRILINOS_VECTOR="TrilinosWrappers::Vector" DEAL_II_EXPAND_TRILINOS_MPI_VECTOR="TrilinosWrappers::MPI::Vector" @@ -5592,7 +5593,67 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_WARNINGS, dnl AC_MSG_RESULT(no) ]) - CXXFLAGS="${OLD_CXXFLAGS}" + CXXFLAGS="${OLD_CXXFLAGS}" +]) + + + +dnl ------------------------------------------------------------ +dnl Trilinos consists of a number of individual packages. We +dnl need several of those so we should make sure at configure +dnl that all necessary Trilinos packages were compiled and installed +dnl when Trilinos was built. +dnl +dnl Usage: DEAL_II_CHECK_TRILINOS_HEADER_FILES +dnl +dnl ------------------------------------------------------------ +AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl +[ + OLD_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-I$DEAL_II_TRILINOS_DIR/include" + AC_CHECK_HEADERS([Amesos.h + AztecOO.h + AztecOO_Operator.h + Epetra_CrsGraph.h + Epetra_CrsMatrix.h + Epetra_Import.h + Epetra_LinearProblem.h + Epetra_Map.h + Epetra_MultiVector.h + Epetra_Operator.h + Epetra_SerialComm.h + Epetra_Vector.h + Ifpack.h + ml_MultiLevelPreconditioner.h + Sacado.hpp + Teuchos_ParameterList.hpp + Teuchos_RCP.hpp + Teuchos_RefCountPtr.hpp + Thyra_AztecOOLinearOpWithSolveFactory.hpp + Thyra_DefaultBlockedLinearOpDecl.hpp + Thyra_DefaultBlockedLinearOp.hpp + Thyra_DefaultInverseLinearOp.hpp + Thyra_EpetraLinearOp.hpp + Thyra_EpetraThyraWrappers.hpp + Thyra_InverseLinearOperator.hpp + Thyra_LinearOperatorDecl.hpp + Thyra_LinearOperatorImpl.hpp + Thyra_LinearOpWithSolveFactoryHelpers.hpp + Thyra_MultiVectorBase.hpp + Thyra_MultiVectorDefaultBase.hpp + Thyra_VectorDecl.hpp + Thyra_VectorImpl.hpp + Thyra_VectorSpaceImpl.hpp + ], + [], + [ + AC_MSG_ERROR([The Trilinos installation is missing one or more + header files necessary for the deal.II Trilinos + interfaces. Please re-install Trilinos with the missing + Trilinos sub-packages enabled.]) + ], + []) + CXXFLAGS="${OLD_CXXFLAGS}" ]) diff --git a/deal.II/configure b/deal.II/configure index e70db828dc..250984217b 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -12385,7 +12385,234 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="${OLD_CXXFLAGS}" + CXXFLAGS="${OLD_CXXFLAGS}" + + + OLD_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-I$DEAL_II_TRILINOS_DIR/include" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in Amesos.h + AztecOO.h + AztecOO_Operator.h + Epetra_CrsGraph.h + Epetra_CrsMatrix.h + Epetra_Import.h + Epetra_LinearProblem.h + Epetra_Map.h + Epetra_MultiVector.h + Epetra_Operator.h + Epetra_SerialComm.h + Epetra_Vector.h + Ifpack.h + ml_MultiLevelPreconditioner.h + Sacado.hpp + Teuchos_ParameterList.hpp + Teuchos_RCP.hpp + Teuchos_RefCountPtr.hpp + Thyra_AztecOOLinearOpWithSolveFactory.hpp + Thyra_DefaultBlockedLinearOpDecl.hpp + Thyra_DefaultBlockedLinearOp.hpp + Thyra_DefaultInverseLinearOp.hpp + Thyra_EpetraLinearOp.hpp + Thyra_EpetraThyraWrappers.hpp + Thyra_InverseLinearOperator.hpp + Thyra_LinearOperatorDecl.hpp + Thyra_LinearOperatorImpl.hpp + Thyra_LinearOpWithSolveFactoryHelpers.hpp + Thyra_MultiVectorBase.hpp + Thyra_MultiVectorDefaultBase.hpp + Thyra_VectorDecl.hpp + Thyra_VectorImpl.hpp + Thyra_VectorSpaceImpl.hpp + +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dealii@dealii.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + + { { echo "$as_me:$LINENO: error: The Trilinos installation is missing one or more + header files necessary for the deal.II Trilinos + interfaces. Please re-install Trilinos with the missing + Trilinos sub-packages enabled." >&5 +echo "$as_me: error: The Trilinos installation is missing one or more + header files necessary for the deal.II Trilinos + interfaces. Please re-install Trilinos with the missing + Trilinos sub-packages enabled." >&2;} + { (exit 1); exit 1; }; } + +fi + +done + + CXXFLAGS="${OLD_CXXFLAGS}" DEAL_II_EXPAND_TRILINOS_VECTOR="TrilinosWrappers::Vector"