From c5da2749e2f7375e292fb0982e8e252ae1adbce3 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 17 Feb 2021 09:12:16 +0800 Subject: [PATCH] build: actually stop configure if Boost isn't available If Boost is not found via AX_BOOST_BASE, we don't actually stop configuring, only a warning is emitted: ```bash checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version MINIMUM_REQUIRED_BOOST or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation. ``` Instead we would usually fail when one of the other AX_BOOST_* macros fails to find a library. These macros are slowly being removed, and in any case, it makes more sense to fail earlier if Boost is missing. If Boost is unavailable, the failure now looks like: ```bash checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version 1.58.0 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation. configure: error: Boost is not available! ``` Note that we now just pass the version into AX_BOOST_BASE, which fixes it's display in the output (rather than MINIMUM_REQUIRED_BOOST). --- configure.ac | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 62f1c308b7..6771992315 100644 --- a/configure.ac +++ b/configure.ac @@ -1377,11 +1377,8 @@ fi if test x$use_boost = xyes; then -dnl Minimum required Boost version -define(MINIMUM_REQUIRED_BOOST, 1.58.0) - -dnl Check for Boost libs -AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST]) +dnl Check for Boost headers +AX_BOOST_BASE([1.58.0],[],[AC_MSG_ERROR([Boost is not available!])]) if test x$want_boost = xno; then AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]]) fi