]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Detect ARPACK and ARPACK architecture
authorToby D. Young <tyoung@ippt.pan.pl>
Thu, 26 Aug 2010 13:37:22 +0000 (13:37 +0000)
committerToby D. Young <tyoung@ippt.pan.pl>
Thu, 26 Aug 2010 13:37:22 +0000 (13:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@21722 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/common/Make.global_options.in
deal.II/configure.in

index 1b12d08979aa12dfaf2aa7a169ed6fa9a9372442..a88493c4f109ac463a1274c33841383f5f126cf6 100644 (file)
@@ -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
index 0df101db329c1406237cdbd6d09749955a9c533e..ecb52ede24953f46ad39cdba122449457b4c4531 100644 (file)
@@ -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@
 
index b23589e17550fe4a1436678477a0317e17e3aa1b..7b5edea53b736c339e3c1f4921daa85e6cc6c29e 100644 (file)
@@ -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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.