From cb2fef6804273bb3c5b70b3f1d064e6b72ff1c2b Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@dune-project.org>
Date: Wed, 21 Jan 2009 10:14:46 +0000
Subject: [PATCH] The test for the presence of the dune-istl module

[[Imported from SVN: r977]]
---
 configure.ac    |  1 +
 m4/.gitignore   |  3 +++
 m4/Makefile.am  | 10 ++++++++++
 m4/dune_istl.m4 | 21 +++++++++++++++++++++
 4 files changed, 35 insertions(+)
 create mode 100644 m4/.gitignore
 create mode 100644 m4/Makefile.am
 create mode 100644 m4/dune_istl.m4

diff --git a/configure.ac b/configure.ac
index a7741660e..2a853dada 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,5 +37,6 @@ AC_CONFIG_FILES([Makefile
     istl/tutorial/Makefile
     istl/test/Makefile
     istl/Makefile
+    m4/Makefile
     dune-istl.pc])
 AC_OUTPUT
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 000000000..d436efd0f
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,3 @@
+Makefile.in
+Makefile
+
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644
index 000000000..d515e04a2
--- /dev/null
+++ b/m4/Makefile.am
@@ -0,0 +1,10 @@
+# $Id: Makefile.am 5184 2008-04-27 17:37:27Z christi $
+
+ALLM4S = dune_istl.m4
+
+aclocaldir = $(datadir)/aclocal
+aclocal_DATA = $(ALLM4S)
+
+EXTRA_DIST = $(ALLM4S)
+
+include $(top_srcdir)/am/global-rules
diff --git a/m4/dune_istl.m4 b/m4/dune_istl.m4
new file mode 100644
index 000000000..8af757161
--- /dev/null
+++ b/m4/dune_istl.m4
@@ -0,0 +1,21 @@
+AC_DEFUN([DUNE_ISTL_CHECKS],
+[
+  # call IMDX_LIB_METIS directly and not via AC_REQUIRE
+  # because AC_REQUIRE support not allow parameters
+  IMMDX_LIB_METIS(,[true])
+  AC_REQUIRE([DUNE_PATH_PARMETIS])
+  AC_REQUIRE([DUNE_PATH_SUPERLU])
+  AC_REQUIRE([DUNE_PATH_SUPERLU_DIST])
+  AC_REQUIRE([DUNE_PARDISO])
+  AC_REQUIRE([__AC_FC_NAME_MANGLING])
+  AC_REQUIRE([AC_PROG_F77])
+  AC_REQUIRE([ACX_BLAS])
+  # add summary entries for tests not maintained by dune
+  DUNE_ADD_SUMMARY_ENTRY([METIS],[$with_metis])
+  DUNE_ADD_SUMMARY_ENTRY([BLAS],[$acx_blas_ok])
+])
+
+AC_DEFUN([DUNE_ISTL_CHECK_MODULE],
+[
+    DUNE_CHECK_MODULES([dune-istl], [istl/allocator.hh])
+])
-- 
GitLab