aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorlaanwj <126646+laanwj@users.noreply.github.com>2022-02-28 13:47:14 +0100
committerlaanwj <126646+laanwj@users.noreply.github.com>2022-02-28 14:06:16 +0100
commit25290071c434638e2719a99784572deef44542ad (patch)
tree37c3a783a28d337ccd8fe53e7f095efec4e79437 /configure.ac
parent159f89c118645c0f9e23e453f01cede84abac795 (diff)
parent774323e378acea998069980edf50e1a26f4b6b9e (diff)
downloadbitcoin-25290071c434638e2719a99784572deef44542ad.tar.xz
Merge bitcoin/bitcoin#24397: build: Fix Boost.Process check for Boost 1.73 and older
774323e378acea998069980edf50e1a26f4b6b9e ci: Force `--enable-external-signer` to prevent future regressions (Hennadii Stepanov) 69978858a4d8a9c34070f96133b8f95737a6505b build: Fix Boost.Process check for Boost 1.73 and older (Hennadii Stepanov) 2199ef79cba865af7949c3a55938ad54519ca5b8 build: Fix a non-portable use of `test` (Hennadii Stepanov) d436c488d4216298016b09f8f97e10eada489bda build, refactor: Replace tabs with spaces (Hennadii Stepanov) Pull request description: On master (5f44c5c428b696af4214b2519cb2bbeb0e4a1027) Boost.Process check false fails without the `-lpthread` flag. ``` $ grep -C 2 pthread_detach config.log /usr/bin/ld: /tmp/cczCQfQv.o: in function `boost::asio::detail::posix_global_impl<boost::asio::system_context>::~posix_global_impl()': conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xa3): undefined reference to `pthread_join' /usr/bin/ld: conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xc4): undefined reference to `pthread_detach' collect2: error: ld returned 1 exit status configure:26674: $? = 1 ``` Not required for Boost 1.74+. ACKs for top commit: laanwj: Code review ACK 774323e378acea998069980edf50e1a26f4b6b9e, is a bugfix/workaround, seems fine to merge last minute for 23.0. Tree-SHA512: 2a9d4b67fd8910e107af972d8c223286b7c933bc310616f86c8b6d8c903438916980fc76bd7e37f2698f6ce5361dc706cbf2933d1ac2c081bcabe1b83ca7d6b6
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ae21dd9a7c..1e6ac93e78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,7 +359,7 @@ esac
if test "$enable_debug" = "yes"; then
dnl Clear default -g -O2 flags
if test "$CXXFLAGS_overridden" = "no"; then
- CXXFLAGS=""
+ CXXFLAGS=""
fi
dnl Disable all optimizations
@@ -978,14 +978,14 @@ AC_CHECK_DECLS([setsid])
AC_CHECK_DECLS([pipe2])
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
- [#if HAVE_ENDIAN_H
+ [#if HAVE_ENDIAN_H
#include <endian.h>
#elif HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif])
AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
- [#if HAVE_BYTESWAP_H
+ [#if HAVE_BYTESWAP_H
#include <byteswap.h>
#endif])
@@ -1438,11 +1438,15 @@ if test "$use_external_signer" != "no"; then
;;
*)
AC_MSG_CHECKING([whether Boost.Process can be used])
+ TEMP_LDFLAGS="$LDFLAGS"
+ dnl Boost 1.73 and older require the following workaround.
+ LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
[have_boost_process="yes"],
[have_boost_process="no"])
+ LDFLAGS="$TEMP_LDFLAGS"
AC_MSG_RESULT([$have_boost_process])
- if test "$have_boost_process" == "yes"; then
+ 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