Merge bitcoin/bitcoin#24254: build: Add Boost.Process usage check

abc057c603 build: Add Boost.Process usage check (Hennadii Stepanov)

Pull request description:

  This PR adds a check that Boost.Process can be used without linking any libraries (header-only).
  Disable the functionality if that is not the case.

  Fixes bitcoin/bitcoin#24314.

ACKs for top commit:
  fanquake:
    ACK abc057c603

Tree-SHA512: ed2a32b1f751ec6f88cc7220766edd4cdab93c1d0515c892aa3094ee8d5b13ef569830d6e7a7a00c0197b117585dc526d00d943cc99a1f8c8a66ac4e20fe2061
This commit is contained in:
fanquake 2022-02-14 20:20:21 +00:00
commit 988058defb
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -1437,8 +1437,20 @@ if test "$use_external_signer" != "no"; then
use_external_signer="no";
;;
*)
use_external_signer="yes"
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
AC_MSG_CHECKING([whether Boost.Process can be used])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
[have_boost_process="yes"],
[have_boost_process="no"])
AC_MSG_RESULT([$have_boost_process])
if test "$have_boost_process" == "yes"; then
use_external_signer="yes"
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
else
if test "$use_external_signer" = "yes"; then
AC_MSG_ERROR([External signing is not supported for this Boost version])
fi
use_external_signer="no";
fi
;;
esac
fi