From 88894df9ce235bf47bcd9f3522472012355e1610 Mon Sep 17 00:00:00 2001 From: "Toby D. Young" Date: Thu, 26 Aug 2010 13:37:22 +0000 Subject: [PATCH] Detect ARPACK and ARPACK architecture git-svn-id: https://svn.dealii.org/trunk@21722 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 44 +++++++++++++++++++++++++++ deal.II/common/Make.global_options.in | 4 +++ deal.II/configure.in | 4 +++ 3 files changed, 52 insertions(+) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 1b12d08979..a88493c4f1 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -6236,6 +6236,7 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl ]) + dnl ------------------------------------------------------------ dnl Check whether MUMPS is installed; and, if so, then check for dnl two known dependecies, namely, SCALAPACK and BLACS. @@ -6350,6 +6351,49 @@ AC_DEFUN(DEAL_II_CONFIGURE_MUMPS, dnl fi ]) +dnl ------------------------------------------------------------ +dnl Check whether ARPACK is installed, and if so store the +dnl respective links +dnl +dnl Usage: DEAL_II_CONFIGURE_ARPACK +dnl +dnl ------------------------------------------------------------ +AC_DEFUN(DEAL_II_CONFIGURE_ARPACK, dnl +[ + AC_MSG_CHECKING([for ARPACK library directory]) + AC_ARG_WITH(arpack, + [AS_HELP_STRING([--with-arpack=path/to/arpack], + [Specify the path to the ARPACK installation, for which the include directory and lib directory are subdirs; use this if you want to override the ARPACK_DIR environment variable.])], + [dnl action-if-given + if test "x$withval" = "xno" ; then + AC_MSG_RESULT([explicitly disabled]) + USE_CONTRIB_ARPACK=no + else + USE_CONTRIB_ARPACK=yes + DEAL_II_ARPACK_DIR="$withval" + AC_MSG_RESULT($DEAL_II_ARPACK_DIR) + dnl Make sure that what was specified is actually correct + if test ! -d $DEAL_II_ARPACK_DIR \ + ; then + AC_MSG_ERROR([Path to ARPACK specified with --with-arpack does not point to a complete ARPACK installation]) + fi + + dnl Grab a meaningful name of the architeture ARPACK was + dnl compiled for + AC_MSG_CHECKING([for ARPACK library architecture]) + ARPACK_ARCH=`cat $DEAL_II_ARPACK_DIR/ARmake.inc \ + | grep "PLAT = " \ + | perl -pi -e 's/.*PLAT =\s+//g;'` + DEAL_II_ARPACK_ARCH="$ARPACK_ARCH" + AC_MSG_RESULT($DEAL_II_ARPACK_ARCH) + fi + ], + [dnl action-if-not-given (do nothing) + USE_CONTRIB_ARPACK=no + AC_MSG_RESULT([no]) + ]) +]) + dnl ------------------------------------------------------------ dnl Check whether Metis is installed, and if so store the diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 0df101db32..ecb52ede24 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -74,6 +74,10 @@ DEAL_II_SCALAPACK_DIR = @DEAL_II_SCALAPACK_DIR@ DEAL_II_BLACS_DIR = @DEAL_II_BLACS_DIR@ DEAL_II_BLACS_ARCH = @DEAL_II_BLACS_ARCH@ +USE_CONTRIB_ARPACK = @USE_CONTRIB_ARPACK@ +DEAL_II_ARPACK_DIR = @DEAL_II_ARPACK_DIR@ +DEAL_II_ARPACK_ARCH = @DEAL_II_ARPACK_ARCH@ + USE_CONTRIB_METIS = @USE_CONTRIB_METIS@ DEAL_II_METIS_LIBDIR = @DEAL_II_METIS_LIBDIR@ diff --git a/deal.II/configure.in b/deal.II/configure.in index b23589e175..7b5edea53b 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -433,6 +433,10 @@ AC_SUBST(DEAL_II_TRILINOS_LIBDIR) AC_SUBST(DEAL_II_TRILINOS_SHARED) AC_SUBST(DEAL_II_TRILINOS_STATIC) +DEAL_II_CONFIGURE_ARPACK +AC_SUBST(USE_CONTRIB_ARPACK) +AC_SUBST(DEAL_II_ARPACK_DIR) + DEAL_II_CONFIGURE_MUMPS AC_SUBST(USE_CONTRIB_MUMPS) AC_SUBST(DEAL_II_MUMPS_DIR) -- 2.39.5