Commit Graph

53 Commits

Author SHA1 Message Date
Roland Kaufmann
19780beef9 Compatibility module for dunecontrol-driven clients
If a client generated with duneproject/built with dunecontrol has a
dependency to opm-core, the macros defined in this file is expected
to exist and will be called to search for the opm-core library.

All that is done here is to use the pkg-config helper module and
import the configuration that was written by the CMake system (which
even may have been called earlier in the same dunecontrol "session")
2013-05-24 11:41:05 +02:00
Roland Kaufmann
e33ba0d45f Library to pick up configuration from pkg-config files
Pkg-config files are written as part of the CMake configuration, and
these can be imported into AutoTools-driven projects to get the correct
compiler and linker options that has been probed.
2013-05-24 11:39:52 +02:00
Roland Kaufmann
4d57ea718f Remove AutoTools files that searches for libraries
These are now superceded by CMake equivalents, and will over time
diverge from the main tree as they are no longer maintained.
2013-05-24 11:37:42 +02:00
Bård Skaflestad
c245a0ae7a Catch up to ERT library reorganisation
Specifically, changing locations of headers and library renaming

    libgeometry.a -> libert_geometry.a
2013-02-05 15:19:36 +01:00
Bård Skaflestad
845db22a52 Avoid clobbering existing tests for SuperLU
We inherited this test from the Dune repositories, but failed to install
sufficient protection in the form of symbol renaming to guarantee that
both tests could coexist.

This issue was exposed by a recent pull request in the OPM-Porsol
repository, namely OPM/opm-porsol#16.
2013-01-30 19:50:32 +01:00
Bård Skaflestad
8741c93a1a Merge pull request #107 from blattms/issue-106-superlu
Make superlu available in all OPM modules again.
2012-12-03 15:04:06 -08:00
Markus Blatt
2c63359542 Added a guard to the SuperLU test. If HAVE_SUPERLU is 1 from a run of the
SuperLU test within DUNE, we skip testing for it again as the additional test
would fail in some cases.
2012-12-03 16:47:04 +01:00
Roland Kaufmann
ea2bb23bf8 Include all libraries and headers necessary to build
List all dependencies of opm-core as well as the library itself;
otherwise the user must generate the list of dependencies, including
all the probes.
2012-11-30 13:36:45 +01:00
Bård Skaflestad
8cda8dfda0 Don't use '==' when '=' is equally good
There is no need to use Bash-specific operators when the pure sh(1)
built-in test operators have the exact same semantics.  This increases
portability to systems for which /bin/sh is *not* Bash (or Dash).
2012-10-25 00:22:22 +02:00
Roland Kaufmann
e8444f91e0 Replace deprecated AC_TRY_COMPILE with AC_COMPILE_IFELSE 2012-10-24 12:01:38 +02:00
Roland Kaufmann
bb96a2e269 Refrain from using reserved names ac_* for variables 2012-10-24 11:39:51 +02:00
Roland Kaufmann
9063a47051 Disable checks for C++11 if C++0x is disabled
By adding an extra test we can avoid the somehow illogical possibility
of building with '--enable-gxx11check --disable-gxx0xcheck'.
2012-10-24 11:25:28 +02:00
Roland Kaufmann
6d2f7e1f7c Compile with C++0x support if possible
Since DUNE does this, it might a good idea to track the same ABI.
2012-10-24 10:32:23 +02:00
Roland Kaufmann
056bce2128 Distinguish between C++0x and C++11 in conf. opts.
Surely this must have been a copy&paste error.
2012-10-24 10:28:48 +02:00
Roland Kaufmann
2a43bd305a Add macros for testing C++0x/11 support in compiler
These files are shamelessly ripped from dune-common/m4 (e28ca3)
2012-10-24 10:23:51 +02:00
Roland Kaufmann
1689074d4f Abort build process if BLAS or LAPACK not found 2012-10-14 21:58:28 +02:00
Roland Kaufmann
c8a52177bf Honor explicit specification of BLAS/LAPACK libraries
Only probe for libraries on system if no library is specified. If there
is an error with the library that is specified as an argument, then
raise an error instead of continuing to look for other libraries with a
simple warning buried deep in the configuration log.
2012-10-14 21:58:27 +02:00
Roland Kaufmann
3521a0bdc6 Use round parenthesis for Make variables 2012-10-14 10:19:35 +02:00
Bård Skaflestad
31174cf727 Merge remote-tracking branch 'upstream/master' into ert
Conflicts:
	Makefile.am
	opm/core/grid/cpgpreprocess/preprocess.h
	tests/Makefile.am

This brings ert branch up-to-date with current Github master branch.
2012-10-12 00:43:51 +02:00
Markus Blatt
33ce431875 renamed DUNE_PATH_SUPERLU to OPM_PATH_SUPERLU such that the test within DUNE is not overwritten in other DUNE modules. 2012-10-09 09:48:14 +02:00
Markus Blatt
85194789aa Pipe to /dev/null to prevent error message from appearing in include path. 2012-10-08 15:34:25 +02:00
Markus Blatt
a953a47fbb Removed DUNE artefacts.
Now uses AX_BLAS instead of ACX_BLAS.
2012-10-08 10:55:53 +02:00
Markus Blatt
0db6439b9b Merged latest changes from upstream branch 2012-10-05 10:11:31 +02:00
Bård Skaflestad
b7c0ba8b1a Expose the Boost library directory to the build system.
This enables explicitly encoding the directory, e.g., in the OPM-Core
run-path.  This, in turn, reduces the burden on library clients that
would otherwise have to satisfy library link requirements in addition to
any other link requirements they might have.
2012-10-05 00:33:59 +02:00
Bård Skaflestad
233e3601a8 Simplify the logic to support --with-unit*=speciallib syntax
This change implements the approach of (e.g.,) ax_boost_system.m4, but
may lose some of the initial refinements.  In that case, we will have to
refine this code.
2012-10-05 00:33:27 +02:00
Markus Blatt
694890e0cf Added missing m4 file with the test for SuperLU 2012-10-04 11:39:49 +02:00
Markus Blatt
ae52de0426 Added test for SuperLU and adapted the Makefile.am to support it 2012-10-04 11:37:28 +02:00
Atgeirr Flø Rasmussen
00bbfa06a8 Merge branch 'master' into ert
Conflicts:
	Makefile.am
	configure.ac
	examples/Makefile.am
	opm/core/GridManager.cpp
	opm/core/eclipse/EclipseGridParser.cpp
	opm/core/grid/cpgpreprocess/preprocess.h
	tests/Makefile.am
2012-09-05 13:36:19 +02:00
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
d2e3dbcb03 Catch up to library rename: libutil -> libert_util. 2012-06-28 14:36:45 +02:00
Bård Skaflestad
f57ba7dd0b Merge remote-tracking branch 'upstream/ert' into ert
Bring in upstream changes.
2012-06-28 13:30:28 +02:00
Bård Skaflestad
41736965ff Tentative refinement of ERT Autoconf support.
Add a new macro, "ERT", that uses AC_LINK_IFELSE to test if the ECL and
related libraries are available of the local computer system.  Call the
macro from "configure.ac".

Also, adapt the main "Makefile.am" to the results of the "ERT" macro.
2012-06-28 13:27:03 +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