Merge pull request #8 from bska/master

Bring in Various Build-System Fixes
This commit is contained in:
Bård Skaflestad
2012-07-12 07:04:55 -07:00
4 changed files with 57 additions and 4 deletions

View File

@@ -32,6 +32,16 @@ OPM_CORE_CHECKS
OPM_DYNLINK_BOOST_TEST
dnl Substitute Autoconf's abs_*dir variables into the Makefiles for the
dnl benefit of external code that uses these variables to derive
dnl locations (e.g., Dune's DUNE_CHECK_MODULES macro). Automakes prior
dnl to version 1.10 do not automatically substitute these variables into
dnl output files.
AC_SUBST([abs_srcdir])
AC_SUBST([abs_builddir])
AC_SUBST([abs_top_srcdir])
AC_SUBST([abs_top_builddir])
AC_CONFIG_FILES([
Makefile
tests/Makefile

View File

@@ -243,6 +243,8 @@ if test "x$want_boost" = "xyes"; then
fi
# execute ACTION-IF-NOT-FOUND (if present):
ifelse([$3], , :, [$3])
AC_DEFINE([OPM_HAVE_BOOST], [0],dnl
[Define to `0' if the Boost library is not available])
else
AC_SUBST([OPM_BOOST_CPPFLAGS])
AC_SUBST([OPM_BOOST_LDFLAGS])

View File

@@ -24,10 +24,7 @@
#include <opm/core/linalg/LinearSolverIstl.hpp>
// Work around the fact that istl headers expect
// HAVE_BOOST to be 1, and not just defined.
#undef HAVE_BOOST
#define HAVE_BOOST 1
#include <opm/core/utility/have_boost_redef.hpp>
// TODO: clean up includes.
#include <dune/common/deprecated.hh>

View File

@@ -0,0 +1,44 @@
/*===========================================================================
//
// File: have_boost_redef.hpp
//
// Created: 2012-07-12 11:02:22+0200
//
//==========================================================================*/
/*
Copyright 2012 SINTEF ICT, Applied Mathematics.
Copyright 2012 Statoil ASA.
This file is part of the Open Porous Media Project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
// Note: This file should be #include<>d after <config.h> in software
// that uses the ISTL. This is more or less a hack to work around
// Autoconfs that do not correctly process dune-istl's `ENABLE_BOOST'
// feature. We will happily remove this file if a better solution
// presents.
#ifndef OPM_HAVE_BOOST_REDEF_HPP_HEADER
#define OPM_HAVE_BOOST_REDEF_HPP_HEADER
#if defined(HAVE_BOOST)
#undef HAVE_BOOST
#define HAVE_BOOST OPM_HAVE_BOOST
#endif
#endif /* OPM_HAVE_BOOST_REDEF_HPP_HEADER */