0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

build, refactor: Fix indentation for if..then..fi

This makes easier to spot conditional macros.
This commit is contained in:
Hennadii Stepanov 2021-03-02 18:55:07 +02:00
parent b9f41df1ea
commit 9fef209945
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -1379,52 +1379,52 @@ if test "x$use_natpmp" != xno; then
fi fi
if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then
use_boost=no use_boost=no
else else
use_boost=yes use_boost=yes
fi fi
if test x$use_boost = xyes; then if test x$use_boost = xyes; then
dnl Check for Boost headers dnl Check for Boost headers
AX_BOOST_BASE([1.58.0],[],[AC_MSG_ERROR([Boost is not available!])]) AX_BOOST_BASE([1.58.0],[],[AC_MSG_ERROR([Boost is not available!])])
if test x$want_boost = xno; then if test x$want_boost = xno; then
AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]]) AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]])
fi fi
AX_BOOST_SYSTEM AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM AX_BOOST_FILESYSTEM
dnl Opt-in to Boost Process if external signer support is requested dnl Opt-in to Boost Process if external signer support is requested
if test "x$use_external_signer" != xno; then if test "x$use_external_signer" != xno; then
AC_MSG_CHECKING(for Boost Process) AC_MSG_CHECKING(for Boost Process)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]],
[[ boost::process::child* child = new boost::process::child; delete child; ]])], [[ boost::process::child* child = new boost::process::child; delete child; ]])],
[ AC_MSG_RESULT(yes) [ AC_MSG_RESULT(yes)
AC_DEFINE([ENABLE_EXTERNAL_SIGNER],,[define if external signer support is enabled]) AC_DEFINE([ENABLE_EXTERNAL_SIGNER],,[define if external signer support is enabled])
], ],
[ AC_MSG_ERROR([Boost::Process is required for external signer support, but not available!])] [ AC_MSG_ERROR([Boost::Process is required for external signer support, but not available!])]
) )
fi fi
AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "x$use_external_signer" = "xyes"]) AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "x$use_external_signer" = "xyes"])
if test x$suppress_external_warnings != xno; then if test x$suppress_external_warnings != xno; then
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
fi fi
dnl Boost 1.56 through 1.62 allow using std::atomic instead of its own atomic dnl Boost 1.56 through 1.62 allow using std::atomic instead of its own atomic
dnl counter implementations. In 1.63 and later the std::atomic approach is default. dnl counter implementations. In 1.63 and later the std::atomic approach is default.
m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS" BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB" BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB"
fi fi
dnl Check for reduced exports dnl Check for reduced exports
if test x$use_reduce_exports = xyes; then if test x$use_reduce_exports = xyes; then
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"], AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"],
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]]) [AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]])
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]]) AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]])
fi fi
if test x$use_tests = xyes; then if test x$use_tests = xyes; then
@ -1435,25 +1435,25 @@ if test x$use_tests = xyes; then
if test x$use_boost = xyes; then if test x$use_boost = xyes; then
AX_BOOST_UNIT_TEST_FRAMEWORK AX_BOOST_UNIT_TEST_FRAMEWORK
dnl Determine if -DBOOST_TEST_DYN_LINK is needed dnl Determine if -DBOOST_TEST_DYN_LINK is needed
AC_MSG_CHECKING([for dynamic linked boost test]) AC_MSG_CHECKING([for dynamic linked boost test])
TEMP_LIBS="$LIBS" TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_LDFLAGS $BOOST_UNIT_TEST_FRAMEWORK_LIB" LIBS="$LIBS $BOOST_LDFLAGS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
TEMP_CPPFLAGS="$CPPFLAGS" TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_LINK_IFELSE([AC_LANG_SOURCE([ AC_LINK_IFELSE([AC_LANG_SOURCE([
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN #define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
])], ])],
[AC_MSG_RESULT(yes)] [AC_MSG_RESULT(yes)]
[TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"], [TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"],
[AC_MSG_RESULT(no)]) [AC_MSG_RESULT(no)])
LIBS="$TEMP_LIBS" LIBS="$TEMP_LIBS"
CPPFLAGS="$TEMP_CPPFLAGS" CPPFLAGS="$TEMP_CPPFLAGS"
fi fi
fi fi