aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-02-17 09:12:16 +0800
committerfanquake <fanquake@gmail.com>2021-02-17 09:17:37 +0800
commitc5da2749e2f7375e292fb0982e8e252ae1adbce3 (patch)
tree6f1cd349a4a126d2a2280eea585a3105bbc33fd0 /configure.ac
parentcad8b527eaf7a93877e2249960866fd4db2d1c14 (diff)
downloadbitcoin-c5da2749e2f7375e292fb0982e8e252ae1adbce3.tar.xz
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 <boost/version.hpp>. 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 <boost/version.hpp>. 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).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files 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