Add preliminary build glue to include AGMG in the OPM-Core library.
The approach will likely be changed due to the presence of "subdir-objects" in the AM_INIT_AUTOMAKE call.
This commit is contained in:
parent
40ef0e9573
commit
c724bb6b3a
10
Makefile.am
10
Makefile.am
@ -271,3 +271,13 @@ opm/core/linalg/LinearSolverIstl.cpp
|
||||
nobase_include_HEADERS += \
|
||||
opm/core/linalg/LinearSolverIstl.hpp
|
||||
endif
|
||||
|
||||
|
||||
if BUILD_AGMG
|
||||
libopmcore_la_SOURCES += \
|
||||
$(AGMG_SRCDIR)/dagmg.f90 \
|
||||
$(AGMG_SRCDIR)/dagmg_mumps.f90
|
||||
|
||||
libopmcore_la_LDFLAGS += \
|
||||
$(FCLIBS)
|
||||
endif
|
||||
|
@ -42,6 +42,7 @@ AX_BOOST_FILESYSTEM
|
||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
|
||||
AX_DUNE_ISTL
|
||||
OPM_AGMG
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
|
||||
|
29
m4/agmg.m4
Normal file
29
m4/agmg.m4
Normal file
@ -0,0 +1,29 @@
|
||||
AC_DEFUN([OPM_F90_COMPILATION_SYSTEM],
|
||||
[AC_REQUIRE([AC_PROG_FC_C_O])dnl
|
||||
AC_REQUIRE([AC_FC_WRAPPERS])dnl
|
||||
AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])dnl
|
||||
])[]dnl
|
||||
|
||||
AC_DEFUN([OPM_AGMG],dnl
|
||||
[AC_ARG_WITH([agmg],dnl
|
||||
[AS_HELP_STRING([--with-agmg=SRCDIR],dnl
|
||||
[Include DOUBLE PRECISION version Notay's of AGMG Algebraic
|
||||
Multigrid solver from specified source location SRCDIR. Note: this
|
||||
option requires a complete, working Fortran 90 environment.])],
|
||||
[],dnl
|
||||
[with_agmg=no])[]dnl
|
||||
|
||||
AS_IF([test x"$with_agmg" != x"no" -a -d "$with_agmg"],dnl
|
||||
[AS_IF([test -f "$with_agmg/dagmg.f90"],dnl
|
||||
[AC_SUBST([AGMG_SRCDIR], [$with_agmg])[]dnl
|
||||
AC_DEFINE([HAVE_AGMG], [1],dnl
|
||||
[Define to `1' if Notay's AGMG solver is included])[]dnl
|
||||
build_agmg="yes"],dnl
|
||||
[build_agmg="no"])],dnl
|
||||
[build_agmg="no"])[]dnl
|
||||
|
||||
AS_IF([test x"$build_agmg" = x"yes"],dnl
|
||||
[AC_REQUIRE([OPM_F90_COMPILATION_SYSTEM])], [:])[]dnl
|
||||
|
||||
AM_CONDITIONAL([BUILD_AGMG], [test x"$build_agmg" = x"yes"])
|
||||
])[]dnl
|
Loading…
Reference in New Issue
Block a user