Skip to content
Snippets Groups Projects
Commit e84d7f77 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Bugfix] Prevent definition of HAVE_BOOST without value due to race conditions...

[Bugfix] Prevent definition of HAVE_BOOST without value due to race conditions in some autoconf versions.

For some autoconf versions there was a race condition between ax_boost_base.m4 and dune_boost_base.m4 resulting in HAVE_BOOST being defined with no value (instead of ENABLE_BOOST). For others there were even two definitions of it (one with and one without value). 

This patch renames the symbol being defined in dune_boost_base.m4 to HAVE_DUNE_BOOST and defines a value for it if boost is found.

Please change your code such the preprocessor directives checking for boost from
#if HAVE_BOOST
to
#if HAVE_DUNE_BOOST

Resolves flyspray 1265 and presumably 1249.

[[Imported from SVN: r7422]]
parent ac3c5da8
No related branches found
No related tags found
No related merge requests found
......@@ -24,3 +24,5 @@ dune-common-?.?
ltmain.sh
.libs
dependencies.m4
config.guess
config.h.in
......@@ -5,7 +5,7 @@
# Adds boost compiler flags and libraries, and activates
# Boost for the specified targets.
find_package(Boost)
set(HAVE_BOOST ${Boost_FOUND})
set(HAVE_DUNE_BOOST ${Boost_FOUND})
function(add_dune_boost_flags _targets)
if(Boost_FOUND)
......
......@@ -45,7 +45,7 @@
#cmakedefine HAVE_BLAS 1
/* Define to ENABLE_BOOST if the Boost library is available */
#cmakedefine HAVE_BOOST ENABLE_BOOST
#cmakedefine HAVE_DUNE_BOOST ENABLE_BOOST
/* Define to 1 if you have <boost/make_shared.hpp>. */
#cmakedefine HAVE_BOOST_MAKE_SHARED_HPP 1
......
......@@ -17,7 +17,7 @@
#
# And sets:
#
# HAVE_BOOST
# HAVE_DUNE_BOOST
# ENABLE_BOOST or undefined. Whether boost was found. The correct way to
# to check this is "#if HAVE_BOOST": This way boost features will be disabled
# unless ${BOOST_CPPFLAGS} was given when compiling
......@@ -25,7 +25,7 @@
AC_DEFUN([DUNE_BOOST_BASE],
[
AX_BOOST_BASE([$1],[
AC_DEFINE(HAVE_BOOST, [ENABLE_BOOST],[Define to ENABLE_BOOST if the Boost library is available])
AC_DEFINE(HAVE_DUNE_BOOST, [ENABLE_BOOST],[Define to ENABLE_BOOST if the Boost library is available])
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DENABLE_BOOST"
AC_SUBST(BOOST_CPPFLAGS)
# execute ACTION-IF-FOUND (if present):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment