aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-03 23:00:14 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-14 19:34:00 +0200
commitabc057c6030b2a0ddab46835a7801054da677781 (patch)
tree78b02113f4f66a0a97d41457fc48b66513a4448e
parent3ce40e64d4ae9419658555fd1fb250b93f52684a (diff)
build: Add Boost.Process usage check
Check that Boost.Process can be used without linking any libraries (header-only). Disable the functionality if that is not the case.
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 11a01f310c..2a1300890f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1418,8 +1418,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