Commit Graph

22 Commits

Author SHA1 Message Date
Bård Skaflestad
7ccf0350bc Tighten grammar of "HAVE_AGMG" symbol description. 2012-08-14 12:55:57 +02:00
Bård Skaflestad
05410ac950 Always #define "HAVE_DUNE_ISTL".
Define the symbol to zero (false) if unavailable.  This prevents a
diagnostic message concerning an undefined preprocessor symbol when used
in the form

    #if HAVE_DUNE_ISTL
       /* ... */
    #endif
2012-08-14 12:49:56 +02:00
Bård Skaflestad
736020e6fe Always #define "HAVE_AGMG".
Define the symbol to zero (false) if unavailable or unwanted.  This
prevents a diagnostic message concerning an undefined preprocessor
symbol (i.e., "HAVE_AGMG") when used in the form

    #if HAVE_AGMG
       /* ... */
    #endif
2012-08-14 12:42:47 +02:00
Bård Skaflestad
fb614100fe Define `OPM_HAVE_BOOST' to zero if unavailable.
This way, there will be no compiler warnings if the symbol is used
in a way akin to

   #if OPM_HAVE_BOOST
      /* Boost is available */
   #else
      /* Boost is not available */
   #endif
2012-07-12 14:16:54 +02:00
Bård Skaflestad
e5eb4fb12c Fix another fall-out from Boost library clean-up
We failed to propagate the BOOST_\(.*\)FLAGS -> OPM_BOOST_\1FLAGS fix
(commit 6b57a00) to all clients, notably our own macro for recognising
whether or not the Boost.Test library should be linked dynamically or
statically.  This commit remedies that oversight.
2012-07-10 14:50:07 +02:00
Bård Skaflestad
6b57a00b17 Avoid Clobbering Dune's Boost Support.
When OPM-Core is used as a Dune module (e.g., as enabled by commit
789bc5ca7), we stand the risk of creating multiple, conflicting
defintions of crucial <config.h> symbols (e.g. `HAVE_BOOST') and
build variables (e.g., `BOOST_CPPFLAGS' and `BOOST_LDFLAG').

Avoid this situation by prefixing these symbols with an `OPM_'
string such that Dune's `ENABLE_BOOST' solution works as intendend
in modules that are derived in the OPM context.
2012-07-09 17:42:56 +02:00
Roland Kaufmann
3dbe09e573 Locate libopmcore.la in lib/ sub-directory
Since commit 9005e43 library files are put in lib/ also in the
development tree; other projects with dependencies to opm-core now
needs to look there.
2012-07-06 10:14:06 +02:00
Andreas Lauser
6e0a566e53 factor out OPM_CORE_CHECK_MODULES into a separate file
thanks to Roland Kaufmann for suggesting this.
2012-07-05 12:42:49 +02:00
Andreas Lauser
789bc5ca71 opm-core: make it a usable in conjunction wit dunecontrol
This allows projects which use the DUNE build system and want to use
OPM-Core to specify a dependency in their dune.module file. (i.e. they
don't have to worry about compiler and linker flags anymore.)

opm-core can still be used without having DUNE installed, though. This
means that for users which do not need/want a dependency on DUNE,
nothing changes.

v2: avoid naming conflict of the AX_BOOST_BASE macro with dune-common
    by renaming it to OPM_BOOST_BASE.
v3: make the library detection work nicely
v4: Use AX_BOOST_BASE M4 macro from opm-core instead from dune-common
    as base for OPM_BOOST_BASE to get rid of a few bugs, reworded
    commit message. Thanks to Bård Skaflestad for the review.
2012-07-05 12:42:49 +02:00
Bård Skaflestad
d7cfab5ee0 Reference variables using ${...} syntax. 2012-06-29 20:45:14 +02:00
Bård Skaflestad
11d90ddeab Add AC macro to determine how to link Boost.Test
Details:
Test suites based on Boost.Test must know how to include the library
support code into the executables.  If the Boost.Test library is
dynamically linked, then test suites must define the pre-processor
symbol "BOOST_TEST_DYN_LINK".  Otherwise, this symbol must *not* be
defined.

Resolution:
Introduce a new Autoconf macro, OPM_DYNLINK_BOOST_TEST, that defines a
secondary symbol--HAVE_DYNAMIC_BOOST_TEST--if the local computer system
uses dynamic linking.  Test suites (e.g., tests/param_test.cpp) may then
inspect this symbol to determine whether or not to #define
BOOST_TEST_DYN_LINK.

Call the macro from "configure.ac".

Suggested by: Joakim Hove
2012-06-27 16:26:52 +02:00
Bård Skaflestad
496be60220 Don't use AC_REQUIRE within a conditional.
Older versions of Autoconf are not able to place the tests at appropriate
locations.
2012-06-05 19:56:17 +02:00
Bård Skaflestad
c724bb6b3a 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.
2012-06-05 19:44:18 +02:00
Bård Skaflestad
40ef0e9573 Revamp Fortran support in preparation of enabling Notay's AGMG solver.
Specifically:
  - Enable C++, Fortran 77 and Fortran (95+) through Libtool's LT_LANG
    if available and through the traditional AC_PROG_* macros if not.

    This configuration is compatible with the versions of Libtool
    easily available for testing.  For whatever reason--possibly a
    programming error in Libtool proper--invoking the AC_PROG_F*
    macros either directly or through AC_REQUIRE following an LT_INIT
    invocation leads to various ``expanded before required'' warnings.

    Searching the Autotools mailing lists does suggest that the
    interaction of C++, Fortran and Libtool is traditionally somewhat
    unstable but has improved in very recent editions of Autoconf and
    Libtool.

  - Re-factor the LAPACK support out to a custom macro, OPM_LAPACK,
    and invoke it from configure.ac.
2012-06-05 18:40:36 +02:00
Bård Skaflestad
e84d334f68 AX_DUNE_ISTL: Enable result caching. 2012-05-23 19:17:08 +02:00
Bård Skaflestad
8b72f2fc93 Re-factor program text out to helper macro. 2012-05-23 19:11:02 +02:00
Bård Skaflestad
6119d97f40 AX_DUNE_COMMON: Enable result caching. 2012-05-23 19:00:45 +02:00
Bård Skaflestad
876f70fc0b Re-factor program text out to helper macro. 2012-05-23 18:45:08 +02:00
Atgeirr Flø Rasmussen
df5043b264 Use AC_REQUIRE for call to AX_DUNE_COMMON. 2012-04-13 15:45:48 +02:00
Atgeirr Flø Rasmussen
bc371d4df1 Initial version of automatic checking for dune-istl in build system. 2012-04-13 15:35:19 +02:00
Atgeirr Flø Rasmussen
81a72be23b Now detects boost and compiles some tests. 2011-12-19 15:26:26 +01:00
Bård Skaflestad
b7b844bd07 Import BLAS/LAPACK Autoconf support from mainline GNU repo
http://www.gnu.org/software/autoconf-archive/
2010-09-28 12:14:13 +00:00