Skip to content

Commit abc057c

Browse files
committed
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.
1 parent 3ce40e6 commit abc057c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

configure.ac

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,20 @@ if test "$use_external_signer" != "no"; then
14181418
use_external_signer="no";
14191419
;;
14201420
*)
1421-
use_external_signer="yes"
1422-
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
1421+
AC_MSG_CHECKING([whether Boost.Process can be used])
1422+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
1423+
[have_boost_process="yes"],
1424+
[have_boost_process="no"])
1425+
AC_MSG_RESULT([$have_boost_process])
1426+
if test "$have_boost_process" == "yes"; then
1427+
use_external_signer="yes"
1428+
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
1429+
else
1430+
if test "$use_external_signer" = "yes"; then
1431+
AC_MSG_ERROR([External signing is not supported for this Boost version])
1432+
fi
1433+
use_external_signer="no";
1434+
fi
14231435
;;
14241436
esac
14251437
fi

0 commit comments

Comments
 (0)