diff --git a/.gitignore b/.gitignore index 07756b69a..9663a64c7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,16 +18,16 @@ Makefile.in .libs *.la *.lo -/aclocal.m4 -/autom4te.cache -/build-aux -/config.* -/configure -/libtool -.dirstamp +builds/gnu/aclocal.m4 +builds/gnu/autom4te.cache +builds/gnu/build-aux +builds/gnu/config.* +builds/gnu/configure +builds/gnu/libtool +builds/gnu/.dirstamp # pkg-config pc file from .pc.in -*.pc +builds/gnu/*.pc # msbuild/msvc /.vs diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index b9312360f..000000000 --- a/Makefile.am +++ /dev/null @@ -1,200 +0,0 @@ -############################################################################### -# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). -# -# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY -# -############################################################################### - -# Automake settings. -#============================================================================== -# Look for macros in the m4 subdirectory. -#------------------------------------------------------------------------------ -ACLOCAL_AMFLAGS = -I m4 - - -# Distribute, make and install products. -#============================================================================== -# files => ${pkgconfigdir} -#------------------------------------------------------------------------------ -pkgconfig_DATA = \ - libbitcoin-node.pc - -# files => ${docdir} -#------------------------------------------------------------------------------ -doc_DATA = \ - AUTHORS \ - COPYING \ - ChangeLog \ - INSTALL \ - NEWS \ - README - -# src/libbitcoin-node.la => ${libdir} -#------------------------------------------------------------------------------ -lib_LTLIBRARIES = src/libbitcoin-node.la -src_libbitcoin_node_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_database_BUILD_CPPFLAGS} ${bitcoin_network_BUILD_CPPFLAGS} -src_libbitcoin_node_la_LIBADD = ${bitcoin_database_LIBS} ${bitcoin_network_LIBS} -src_libbitcoin_node_la_SOURCES = \ - src/block_arena.cpp \ - src/block_memory.cpp \ - src/configuration.cpp \ - src/error.cpp \ - src/estimator.cpp \ - src/full_node.cpp \ - src/settings.cpp \ - src/channels/channel_peer.cpp \ - src/chasers/chaser.cpp \ - src/chasers/chaser_block.cpp \ - src/chasers/chaser_check.cpp \ - src/chasers/chaser_confirm.cpp \ - src/chasers/chaser_estimate.cpp \ - src/chasers/chaser_header.cpp \ - src/chasers/chaser_snapshot.cpp \ - src/chasers/chaser_storage.cpp \ - src/chasers/chaser_template.cpp \ - src/chasers/chaser_transaction.cpp \ - src/chasers/chaser_validate.cpp \ - src/chasers/chaser_validate_batch.cpp \ - src/chasers/chaser_validate_capture.cpp \ - src/chasers/chaser_validate_parallel.cpp \ - src/messages/block.cpp \ - src/messages/transaction.cpp \ - src/protocols/protocol.cpp \ - src/protocols/protocol_block_in_106.cpp \ - src/protocols/protocol_block_in_31800.cpp \ - src/protocols/protocol_block_out_106.cpp \ - src/protocols/protocol_block_out_70012.cpp \ - src/protocols/protocol_filter_out_70015.cpp \ - src/protocols/protocol_header_in_31800.cpp \ - src/protocols/protocol_header_in_70012.cpp \ - src/protocols/protocol_header_out_31800.cpp \ - src/protocols/protocol_header_out_70012.cpp \ - src/protocols/protocol_observer.cpp \ - src/protocols/protocol_peer.cpp \ - src/protocols/protocol_performer.cpp \ - src/protocols/protocol_transaction_in_106.cpp \ - src/protocols/protocol_transaction_out_106.cpp \ - src/sessions/session.cpp \ - src/sessions/session_inbound.cpp \ - src/sessions/session_manual.cpp \ - src/sessions/session_outbound.cpp - -# local: test/libbitcoin-node-test -#------------------------------------------------------------------------------ -if WITH_TESTS - -TESTS = libbitcoin-node-test_runner.sh - -check_PROGRAMS = test/libbitcoin-node-test -test_libbitcoin_node_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_database_BUILD_CPPFLAGS} ${bitcoin_network_BUILD_CPPFLAGS} -test_libbitcoin_node_test_LDADD = src/libbitcoin-node.la ${boost_unit_test_framework_LIBS} ${bitcoin_database_LIBS} ${bitcoin_network_LIBS} -test_libbitcoin_node_test_SOURCES = \ - test/block_arena.cpp \ - test/block_memory.cpp \ - test/channel_peer.cpp \ - test/configuration.cpp \ - test/error.cpp \ - test/estimator.cpp \ - test/full_node.cpp \ - test/main.cpp \ - test/settings.cpp \ - test/test.cpp \ - test/test.hpp \ - test/chasers/chaser.cpp \ - test/chasers/chaser_block.cpp \ - test/chasers/chaser_check.cpp \ - test/chasers/chaser_confirm.cpp \ - test/chasers/chaser_estimate.cpp \ - test/chasers/chaser_header.cpp \ - test/chasers/chaser_template.cpp \ - test/chasers/chaser_transaction.cpp \ - test/chasers/chaser_validate.cpp \ - test/protocols/protocol.cpp \ - test/sessions/session.cpp - -endif WITH_TESTS - -# files => ${includedir}/bitcoin -#------------------------------------------------------------------------------ -include_bitcoindir = ${includedir}/bitcoin -include_bitcoin_HEADERS = \ - include/bitcoin/node.hpp - -include_bitcoin_nodedir = ${includedir}/bitcoin/node -include_bitcoin_node_HEADERS = \ - include/bitcoin/node/block_arena.hpp \ - include/bitcoin/node/block_memory.hpp \ - include/bitcoin/node/chase.hpp \ - include/bitcoin/node/configuration.hpp \ - include/bitcoin/node/define.hpp \ - include/bitcoin/node/error.hpp \ - include/bitcoin/node/estimator.hpp \ - include/bitcoin/node/events.hpp \ - include/bitcoin/node/full_node.hpp \ - include/bitcoin/node/settings.hpp \ - include/bitcoin/node/version.hpp - -include_bitcoin_node_channelsdir = ${includedir}/bitcoin/node/channels -include_bitcoin_node_channels_HEADERS = \ - include/bitcoin/node/channels/channel.hpp \ - include/bitcoin/node/channels/channel_peer.hpp \ - include/bitcoin/node/channels/channels.hpp - -include_bitcoin_node_chasersdir = ${includedir}/bitcoin/node/chasers -include_bitcoin_node_chasers_HEADERS = \ - include/bitcoin/node/chasers/chaser.hpp \ - include/bitcoin/node/chasers/chaser_block.hpp \ - include/bitcoin/node/chasers/chaser_check.hpp \ - include/bitcoin/node/chasers/chaser_confirm.hpp \ - include/bitcoin/node/chasers/chaser_estimate.hpp \ - include/bitcoin/node/chasers/chaser_header.hpp \ - include/bitcoin/node/chasers/chaser_organize.hpp \ - include/bitcoin/node/chasers/chaser_snapshot.hpp \ - include/bitcoin/node/chasers/chaser_storage.hpp \ - include/bitcoin/node/chasers/chaser_template.hpp \ - include/bitcoin/node/chasers/chaser_transaction.hpp \ - include/bitcoin/node/chasers/chaser_validate.hpp \ - include/bitcoin/node/chasers/chasers.hpp - -include_bitcoin_node_impl_chasersdir = ${includedir}/bitcoin/node/impl/chasers -include_bitcoin_node_impl_chasers_HEADERS = \ - include/bitcoin/node/impl/chasers/chaser_organize.ipp - -include_bitcoin_node_impl_sessionsdir = ${includedir}/bitcoin/node/impl/sessions -include_bitcoin_node_impl_sessions_HEADERS = \ - include/bitcoin/node/impl/sessions/session_peer.ipp - -include_bitcoin_node_messagesdir = ${includedir}/bitcoin/node/messages -include_bitcoin_node_messages_HEADERS = \ - include/bitcoin/node/messages/block.hpp \ - include/bitcoin/node/messages/messages.hpp \ - include/bitcoin/node/messages/transaction.hpp - -include_bitcoin_node_protocolsdir = ${includedir}/bitcoin/node/protocols -include_bitcoin_node_protocols_HEADERS = \ - include/bitcoin/node/protocols/protocol.hpp \ - include/bitcoin/node/protocols/protocol_block_in_106.hpp \ - include/bitcoin/node/protocols/protocol_block_in_31800.hpp \ - include/bitcoin/node/protocols/protocol_block_out_106.hpp \ - include/bitcoin/node/protocols/protocol_block_out_70012.hpp \ - include/bitcoin/node/protocols/protocol_filter_out_70015.hpp \ - include/bitcoin/node/protocols/protocol_header_in_31800.hpp \ - include/bitcoin/node/protocols/protocol_header_in_70012.hpp \ - include/bitcoin/node/protocols/protocol_header_out_31800.hpp \ - include/bitcoin/node/protocols/protocol_header_out_70012.hpp \ - include/bitcoin/node/protocols/protocol_observer.hpp \ - include/bitcoin/node/protocols/protocol_peer.hpp \ - include/bitcoin/node/protocols/protocol_performer.hpp \ - include/bitcoin/node/protocols/protocol_transaction_in_106.hpp \ - include/bitcoin/node/protocols/protocol_transaction_out_106.hpp \ - include/bitcoin/node/protocols/protocols.hpp - -include_bitcoin_node_sessionsdir = ${includedir}/bitcoin/node/sessions -include_bitcoin_node_sessions_HEADERS = \ - include/bitcoin/node/sessions/session.hpp \ - include/bitcoin/node/sessions/session_inbound.hpp \ - include/bitcoin/node/sessions/session_manual.hpp \ - include/bitcoin/node/sessions/session_outbound.hpp \ - include/bitcoin/node/sessions/session_peer.hpp \ - include/bitcoin/node/sessions/sessions.hpp - diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index a1c20cff6..351fb6f53 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -71,12 +71,11 @@ endif() #------------------------------------------------------------------------------ # Project options. #------------------------------------------------------------------------------ -option( with-tests "Build tests." ON ) +option( with-tests "Compile with unit tests." ON ) #------------------------------------------------------------------------------ # Dependencies. #------------------------------------------------------------------------------ - if ( BUILD_SHARED_LIBS ) set( libbitcoin-database_USE_STATIC_LIBS "OFF" ) set( libbitcoin-network_USE_STATIC_LIBS "OFF" ) @@ -99,7 +98,6 @@ find_package( Boost 1.86.0 REQUIRED #------------------------------------------------------------------------------ # Compiler options. #------------------------------------------------------------------------------ - include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) @@ -171,13 +169,8 @@ endif() #------------------------------------------------------------------------------ # Linker options. #------------------------------------------------------------------------------ - include(CheckLinkerFlag) -#------------------------------------------------------------------------------ -# Configurable file(s). -#------------------------------------------------------------------------------ - #------------------------------------------------------------------------------ # libbitcoin-node library #------------------------------------------------------------------------------ @@ -199,7 +192,7 @@ target_compile_options( libbitcoin-node $<$:-Wno-comment> $<$:-Wno-deprecated-copy> $<$:-Wno-mismatched-tags> - -fstack-protector-all + $<$:-fstack-protector-all> ) file( GLOB_RECURSE libbitcoin_node_HEADERS CONFIGURE_DEPENDS @@ -279,7 +272,7 @@ if ( with-tests ) $<$:-Wno-mismatched-tags> $<$:-Wno-long-long> $<$:-fno-var-tracking-assignments> - -fstack-protector-all + $<$:-fstack-protector-all> ) file( GLOB_RECURSE libbitcoin_node_test_SOURCES CONFIGURE_DEPENDS @@ -304,6 +297,7 @@ if ( with-tests ) SOVERSION ${PROJECT_VERSION_MAJOR} ) endif() + #------------------------------------------------------------------------------ # Installation routine. #------------------------------------------------------------------------------ diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index 7b30920f2..cacf681c6 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -16,9 +16,9 @@ # Default: OFF # -Denable-shani= Use Intel/ARM SHA Extensions. # Default: OFF -# -Dwith-ultrafast= Use shrec/UltrafastSecp256k1. +# -Dwith-ultrafast= Use shrec/UltrafastSecp256k1 library. # Default: OFF -# -Dwith-secp256k1= Use bitcoin-core/secp256k1. +# -Dwith-secp256k1= Use bitcoin-core/secp256k1 library. # Default: ON # -Dwith-ssl= Use embedded ssl library. # Default: ON @@ -512,10 +512,10 @@ main() source_github "${secp256k1_OWNER}" "secp256k1" "${secp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${secp256k1_FLAGS[@]}" - build_cmake "secp256k1" "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "secp256k1" + build_cmake "secp256k1" "." "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "secp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "secp256k1" + clean_cmake "secp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -524,10 +524,10 @@ main() source_github "${UltrafastSecp256k1_OWNER}" "UltrafastSecp256k1" "${UltrafastSecp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${UltrafastSecp256k1_FLAGS[@]}" - build_cmake "UltrafastSecp256k1" "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "UltrafastSecp256k1" + build_cmake "UltrafastSecp256k1" "." "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "UltrafastSecp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "UltrafastSecp256k1" + clean_cmake "UltrafastSecp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -535,43 +535,43 @@ main() source_github "${libbitcoin_system_OWNER}" "libbitcoin-system" "${libbitcoin_system_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_system_FLAGS[@]}" - build_cmake "libbitcoin-system" "builds/cmake" "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-system" + build_cmake "libbitcoin-system" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-system" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-system" + clean_cmake "libbitcoin-system" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_database_OWNER}" "libbitcoin-database" "${libbitcoin_database_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_database_FLAGS[@]}" - build_cmake "libbitcoin-database" "builds/cmake" "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-database" + build_cmake "libbitcoin-database" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-database" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-database" + clean_cmake "libbitcoin-database" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_network_OWNER}" "libbitcoin-network" "${libbitcoin_network_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_network_FLAGS[@]}" - build_cmake "libbitcoin-network" "builds/cmake" "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-network" + build_cmake "libbitcoin-network" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-network" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-network" + clean_cmake "libbitcoin-network" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_node_OWNER}" "libbitcoin-node" "${libbitcoin_node_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_node_FLAGS[@]}" - build_cmake "libbitcoin-node" "builds/cmake" "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + build_cmake "libbitcoin-node" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" if ! [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then - test_cmake "libbitcoin-node" "${PARALLEL}" + test_cmake "libbitcoin-node" "." "${PARALLEL}" fi - install_cmake "libbitcoin-node" + install_cmake "libbitcoin-node" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-node" + clean_cmake "libbitcoin-node" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" @@ -789,9 +789,10 @@ build_boost() build_cmake() { local PROJECT="$1" - local RELATIVE_PATH="$2" - local JOBS="$3" - shift 3 + local RELATIVE_SRC_PATH="$2" + local RELATIVE_OBJ_PATH="$3" + local JOBS="$4" + shift 4 local VERBOSITY_CMAKE="" local VERBOSITY_MAKE="" @@ -806,7 +807,7 @@ build_cmake() # directory rationalization push_directory "${BUILD_SRC_DIR}/${PROJECT}" - push_directory "${RELATIVE_PATH}" + push_directory "${RELATIVE_SRC_PATH}" local BUILD_PATH="$(pwd)" pop_directory @@ -820,9 +821,14 @@ build_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + create_directory_force "${RELATIVE_OBJ_PATH}" + push_directory "${RELATIVE_OBJ_PATH}" + fi + display_configure_options "$@" - cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_PATH}" + cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_SRC_PATH}" # make if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then @@ -833,6 +839,10 @@ build_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi + msg_success "'${PROJECT}' built successfully." } @@ -840,7 +850,8 @@ build_cmake() clean_cmake() { local PROJECT="$1" - shift 1 + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to clean ${PROJECT}" @@ -852,6 +863,10 @@ clean_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error cmake --build . --target clean @@ -865,6 +880,9 @@ clean_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' clean complete." } @@ -872,7 +890,8 @@ clean_cmake() install_cmake() { local PROJECT="$1" - shift + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to install ${PROJECT}" @@ -884,6 +903,10 @@ install_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + cmake --install . if [[ ${OS} == Linux ]] && [[ "${PREFIX}" == "/usr/local" ]]; then @@ -892,6 +915,9 @@ install_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' installation complete." } @@ -899,8 +925,9 @@ install_cmake() test_cmake() { local PROJECT="$1" - local JOBS="$2" - shift 2 + local RELATIVE_OBJ_PATH="$2" + local JOBS="$3" + shift 3 msg "Preparing to test ${PROJECT}" @@ -912,6 +939,10 @@ test_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error ctest --test-dir . @@ -939,6 +970,9 @@ test_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' test complete." } @@ -1021,9 +1055,9 @@ help() msg " Default: OFF" msg "-Denable-shani= Use Intel/ARM SHA Extensions." msg " Default: OFF" - msg "-Dwith-ultrafast= Use shrec/UltrafastSecp256k1." + msg "-Dwith-ultrafast= Use shrec/UltrafastSecp256k1 library." msg " Default: OFF" - msg "-Dwith-secp256k1= Use bitcoin-core/secp256k1." + msg "-Dwith-secp256k1= Use bitcoin-core/secp256k1 library." msg " Default: ON" msg "-Dwith-ssl= Use embedded ssl library." msg " Default: ON" diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index a817a6e61..93dbb6daa 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -16,9 +16,9 @@ # Default: OFF # -Denable-shani= Use Intel/ARM SHA Extensions. # Default: OFF -# -Dwith-ultrafast= Use shrec/UltrafastSecp256k1. +# -Dwith-ultrafast= Use shrec/UltrafastSecp256k1 library. # Default: OFF -# -Dwith-secp256k1= Use bitcoin-core/secp256k1. +# -Dwith-secp256k1= Use bitcoin-core/secp256k1 library. # Default: ON # -Dwith-ssl= Use embedded ssl library. # Default: ON @@ -528,10 +528,10 @@ main() source_github "${secp256k1_OWNER}" "secp256k1" "${secp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${secp256k1_FLAGS[@]}" - build_cmake "secp256k1" "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "secp256k1" + build_cmake "secp256k1" "." "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "secp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "secp256k1" + clean_cmake "secp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -540,10 +540,10 @@ main() source_github "${UltrafastSecp256k1_OWNER}" "UltrafastSecp256k1" "${UltrafastSecp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${UltrafastSecp256k1_FLAGS[@]}" - build_cmake "UltrafastSecp256k1" "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "UltrafastSecp256k1" + build_cmake "UltrafastSecp256k1" "." "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "UltrafastSecp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "UltrafastSecp256k1" + clean_cmake "UltrafastSecp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -551,43 +551,43 @@ main() source_github "${libbitcoin_system_OWNER}" "libbitcoin-system" "${libbitcoin_system_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_system_FLAGS[@]}" - build_preset "libbitcoin-system" "builds/cmake" "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-system" + build_preset "libbitcoin-system" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-system" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-system" + clean_cmake "libbitcoin-system" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_database_OWNER}" "libbitcoin-database" "${libbitcoin_database_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_database_FLAGS[@]}" - build_preset "libbitcoin-database" "builds/cmake" "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-database" + build_preset "libbitcoin-database" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-database" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-database" + clean_cmake "libbitcoin-database" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_network_OWNER}" "libbitcoin-network" "${libbitcoin_network_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_network_FLAGS[@]}" - build_preset "libbitcoin-network" "builds/cmake" "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "libbitcoin-network" + build_preset "libbitcoin-network" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "libbitcoin-network" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-network" + clean_cmake "libbitcoin-network" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_node_OWNER}" "libbitcoin-node" "${libbitcoin_node_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_node_FLAGS[@]}" - build_preset "libbitcoin-node" "builds/cmake" "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + build_preset "libbitcoin-node" "builds/cmake" "." "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" if ! [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then - test_cmake "libbitcoin-node" "test" "${PARALLEL}" + test_cmake "libbitcoin-node" "." "${PARALLEL}" fi - install_cmake "libbitcoin-node" + install_cmake "libbitcoin-node" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "libbitcoin-node" + clean_cmake "libbitcoin-node" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" @@ -805,9 +805,10 @@ build_boost() build_cmake() { local PROJECT="$1" - local RELATIVE_PATH="$2" - local JOBS="$3" - shift 3 + local RELATIVE_SRC_PATH="$2" + local RELATIVE_OBJ_PATH="$3" + local JOBS="$4" + shift 4 local VERBOSITY_CMAKE="" local VERBOSITY_MAKE="" @@ -822,7 +823,7 @@ build_cmake() # directory rationalization push_directory "${BUILD_SRC_DIR}/${PROJECT}" - push_directory "${RELATIVE_PATH}" + push_directory "${RELATIVE_SRC_PATH}" local BUILD_PATH="$(pwd)" pop_directory @@ -836,9 +837,14 @@ build_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + create_directory_force "${RELATIVE_OBJ_PATH}" + push_directory "${RELATIVE_OBJ_PATH}" + fi + display_configure_options "$@" - cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_PATH}" + cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_SRC_PATH}" # make if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then @@ -849,6 +855,10 @@ build_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi + msg_success "'${PROJECT}' built successfully." } @@ -856,9 +866,10 @@ build_cmake() build_preset() { local PROJECT="$1" - local RELATIVE_PATH="$2" - local JOBS="$3" - shift 3 + local RELATIVE_SRC_PATH="$2" + local RELATIVE_OBJ_PATH="$3" + local JOBS="$4" + shift 4 local VERBOSITY_CMAKE="" local VERBOSITY_MAKE="" @@ -873,7 +884,7 @@ build_preset() # directory rationalization push_directory "${BUILD_SRC_DIR}/${PROJECT}" - push_directory "${RELATIVE_PATH}" + push_directory "${RELATIVE_SRC_PATH}" local BUILD_PATH="$(pwd)" pop_directory @@ -887,9 +898,14 @@ build_preset() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + create_directory_force "${RELATIVE_OBJ_PATH}" + push_directory "${RELATIVE_OBJ_PATH}" + fi + display_configure_options "$@" - cmake ${VERBOSITY_CMAKE} -LA --preset="${BUILD_PRESET}" "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_PATH}" + cmake ${VERBOSITY_CMAKE} -LA --preset="${BUILD_PRESET}" "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_SRC_PATH}" # make if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then @@ -900,6 +916,10 @@ build_preset() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi + msg_success "'${PROJECT}' built successfully." } @@ -907,7 +927,8 @@ build_preset() clean_cmake() { local PROJECT="$1" - shift 1 + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to clean ${PROJECT}" @@ -919,6 +940,10 @@ clean_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error cmake --build . --target clean @@ -932,6 +957,9 @@ clean_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' clean complete." } @@ -939,7 +967,8 @@ clean_cmake() install_cmake() { local PROJECT="$1" - shift + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to install ${PROJECT}" @@ -951,6 +980,10 @@ install_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + cmake --install . if [[ ${OS} == Linux ]] && [[ "${PREFIX}" == "/usr/local" ]]; then @@ -959,6 +992,9 @@ install_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' installation complete." } @@ -966,8 +1002,9 @@ install_cmake() test_cmake() { local PROJECT="$1" - local JOBS="$2" - shift 2 + local RELATIVE_OBJ_PATH="$2" + local JOBS="$3" + shift 3 msg "Preparing to test ${PROJECT}" @@ -979,6 +1016,10 @@ test_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error ctest --test-dir . @@ -1006,6 +1047,9 @@ test_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' test complete." } @@ -1089,9 +1133,9 @@ help() msg " Default: OFF" msg "-Denable-shani= Use Intel/ARM SHA Extensions." msg " Default: OFF" - msg "-Dwith-ultrafast= Use shrec/UltrafastSecp256k1." + msg "-Dwith-ultrafast= Use shrec/UltrafastSecp256k1 library." msg " Default: OFF" - msg "-Dwith-secp256k1= Use bitcoin-core/secp256k1." + msg "-Dwith-secp256k1= Use bitcoin-core/secp256k1 library." msg " Default: ON" msg "-Dwith-ssl= Use embedded ssl library." msg " Default: ON" diff --git a/AUTHORS b/builds/gnu/AUTHORS similarity index 100% rename from AUTHORS rename to builds/gnu/AUTHORS diff --git a/COPYING b/builds/gnu/COPYING similarity index 100% rename from COPYING rename to builds/gnu/COPYING diff --git a/ChangeLog b/builds/gnu/ChangeLog similarity index 100% rename from ChangeLog rename to builds/gnu/ChangeLog diff --git a/INSTALL b/builds/gnu/INSTALL similarity index 100% rename from INSTALL rename to builds/gnu/INSTALL diff --git a/builds/gnu/Makefile.am b/builds/gnu/Makefile.am new file mode 100644 index 000000000..07610b0a0 --- /dev/null +++ b/builds/gnu/Makefile.am @@ -0,0 +1,246 @@ +############################################################################### +# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). +# +# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY +# +############################################################################### + +# Automake settings. +#============================================================================== +# Look for macros in the 'm4' subdirectory. +#------------------------------------------------------------------------------ +ACLOCAL_AMFLAGS = -I m4 + +# Distribute data. +#============================================================================== +# files => ${pkgconfigdir} +#------------------------------------------------------------------------------ +pkgconfig_DATA = \ + libbitcoin-node.pc + +# files => ${docdir} +#------------------------------------------------------------------------------ +doc_DATA = \ + AUTHORS \ + COPYING \ + ChangeLog \ + INSTALL \ + NEWS \ + README + +# Libraries. +#============================================================================== +# Target library 'src/libbitcoin-node.la' +#------------------------------------------------------------------------------ +lib_LTLIBRARIES = src/libbitcoin-node.la + +src_libbitcoin_node_la_LIBS = src/libbitcoin-node.la + +src_libbitcoin_node_la_CPPFLAGS = \ + -I${srcdir}/../../include \ + ${libbitcoin_database_BUILD_CPPFLAGS} \ + ${libbitcoin_network_BUILD_CPPFLAGS} + +src_libbitcoin_node_la_LDFLAGS = \ + ${libbitcoin_database_LDFLAGS} \ + ${libbitcoin_network_LDFLAGS} + +src_libbitcoin_node_la_LIBADD = \ + ${libbitcoin_database_LIBS} \ + ${libbitcoin_network_LIBS} + +src_libbitcoin_node_la_SOURCES = \ + ${srcdir}/../../src/block_arena.cpp \ + ${srcdir}/../../src/block_memory.cpp \ + ${srcdir}/../../src/configuration.cpp \ + ${srcdir}/../../src/error.cpp \ + ${srcdir}/../../src/estimator.cpp \ + ${srcdir}/../../src/full_node.cpp \ + ${srcdir}/../../src/settings.cpp \ + ${srcdir}/../../src/channels/channel_peer.cpp \ + ${srcdir}/../../src/chasers/chaser.cpp \ + ${srcdir}/../../src/chasers/chaser_block.cpp \ + ${srcdir}/../../src/chasers/chaser_check.cpp \ + ${srcdir}/../../src/chasers/chaser_confirm.cpp \ + ${srcdir}/../../src/chasers/chaser_estimate.cpp \ + ${srcdir}/../../src/chasers/chaser_header.cpp \ + ${srcdir}/../../src/chasers/chaser_snapshot.cpp \ + ${srcdir}/../../src/chasers/chaser_storage.cpp \ + ${srcdir}/../../src/chasers/chaser_template.cpp \ + ${srcdir}/../../src/chasers/chaser_transaction.cpp \ + ${srcdir}/../../src/chasers/chaser_validate.cpp \ + ${srcdir}/../../src/chasers/chaser_validate_batch.cpp \ + ${srcdir}/../../src/chasers/chaser_validate_capture.cpp \ + ${srcdir}/../../src/chasers/chaser_validate_parallel.cpp \ + ${srcdir}/../../src/messages/block.cpp \ + ${srcdir}/../../src/messages/transaction.cpp \ + ${srcdir}/../../src/protocols/protocol.cpp \ + ${srcdir}/../../src/protocols/protocol_block_in_106.cpp \ + ${srcdir}/../../src/protocols/protocol_block_in_31800.cpp \ + ${srcdir}/../../src/protocols/protocol_block_out_106.cpp \ + ${srcdir}/../../src/protocols/protocol_block_out_70012.cpp \ + ${srcdir}/../../src/protocols/protocol_filter_out_70015.cpp \ + ${srcdir}/../../src/protocols/protocol_header_in_31800.cpp \ + ${srcdir}/../../src/protocols/protocol_header_in_70012.cpp \ + ${srcdir}/../../src/protocols/protocol_header_out_31800.cpp \ + ${srcdir}/../../src/protocols/protocol_header_out_70012.cpp \ + ${srcdir}/../../src/protocols/protocol_observer.cpp \ + ${srcdir}/../../src/protocols/protocol_peer.cpp \ + ${srcdir}/../../src/protocols/protocol_performer.cpp \ + ${srcdir}/../../src/protocols/protocol_transaction_in_106.cpp \ + ${srcdir}/../../src/protocols/protocol_transaction_out_106.cpp \ + ${srcdir}/../../src/sessions/session.cpp \ + ${srcdir}/../../src/sessions/session_inbound.cpp \ + ${srcdir}/../../src/sessions/session_manual.cpp \ + ${srcdir}/../../src/sessions/session_outbound.cpp + +include_bitcoindir = \ + ${includedir}/bitcoin + +include_bitcoin_HEADERS = \ + ${srcdir}/../../include/bitcoin/node.hpp + +include_bitcoin_nodedir = \ + ${includedir}/bitcoin/node + +include_bitcoin_node_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/block_arena.hpp \ + ${srcdir}/../../include/bitcoin/node/block_memory.hpp \ + ${srcdir}/../../include/bitcoin/node/chase.hpp \ + ${srcdir}/../../include/bitcoin/node/configuration.hpp \ + ${srcdir}/../../include/bitcoin/node/define.hpp \ + ${srcdir}/../../include/bitcoin/node/error.hpp \ + ${srcdir}/../../include/bitcoin/node/estimator.hpp \ + ${srcdir}/../../include/bitcoin/node/events.hpp \ + ${srcdir}/../../include/bitcoin/node/full_node.hpp \ + ${srcdir}/../../include/bitcoin/node/settings.hpp \ + ${srcdir}/../../include/bitcoin/node/version.hpp + +include_bitcoin_node_channelsdir = \ + ${includedir}/bitcoin/node/channels + +include_bitcoin_node_channels_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/channels/channel.hpp \ + ${srcdir}/../../include/bitcoin/node/channels/channel_peer.hpp \ + ${srcdir}/../../include/bitcoin/node/channels/channels.hpp + +include_bitcoin_node_chasersdir = \ + ${includedir}/bitcoin/node/chasers + +include_bitcoin_node_chasers_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_block.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_check.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_confirm.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_estimate.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_header.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_organize.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_snapshot.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_storage.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_template.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_transaction.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chaser_validate.hpp \ + ${srcdir}/../../include/bitcoin/node/chasers/chasers.hpp + +include_bitcoin_node_impl_chasersdir = \ + ${includedir}/bitcoin/node/impl/chasers + +include_bitcoin_node_impl_chasers_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/impl/chasers/chaser_organize.ipp + +include_bitcoin_node_impl_sessionsdir = \ + ${includedir}/bitcoin/node/impl/sessions + +include_bitcoin_node_impl_sessions_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/impl/sessions/session_peer.ipp + +include_bitcoin_node_messagesdir = \ + ${includedir}/bitcoin/node/messages + +include_bitcoin_node_messages_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/messages/block.hpp \ + ${srcdir}/../../include/bitcoin/node/messages/messages.hpp \ + ${srcdir}/../../include/bitcoin/node/messages/transaction.hpp + +include_bitcoin_node_protocolsdir = \ + ${includedir}/bitcoin/node/protocols + +include_bitcoin_node_protocols_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_block_in_106.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_block_in_31800.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_block_out_106.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_block_out_70012.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_filter_out_70015.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_header_in_31800.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_header_in_70012.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_header_out_31800.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_header_out_70012.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_observer.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_peer.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_performer.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_transaction_in_106.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocol_transaction_out_106.hpp \ + ${srcdir}/../../include/bitcoin/node/protocols/protocols.hpp + +include_bitcoin_node_sessionsdir = \ + ${includedir}/bitcoin/node/sessions + +include_bitcoin_node_sessions_HEADERS = \ + ${srcdir}/../../include/bitcoin/node/sessions/session.hpp \ + ${srcdir}/../../include/bitcoin/node/sessions/session_inbound.hpp \ + ${srcdir}/../../include/bitcoin/node/sessions/session_manual.hpp \ + ${srcdir}/../../include/bitcoin/node/sessions/session_outbound.hpp \ + ${srcdir}/../../include/bitcoin/node/sessions/session_peer.hpp \ + ${srcdir}/../../include/bitcoin/node/sessions/sessions.hpp + +# Tests. +#============================================================================== +# Target test 'test/libbitcoin-node-test' +#------------------------------------------------------------------------------ +if WITH_TESTS + +check_PROGRAMS = test/libbitcoin-node-test + +test_libbitcoin_node_test_CPPFLAGS = \ + ${boost_BUILD_CPPFLAGS} \ + ${boost_unit_test_framework_BUILD_CPPFLAGS} \ + ${src_libbitcoin_node_la_CPPFLAGS} + +test_libbitcoin_node_test_LDFLAGS = \ + ${boost_LDFLAGS} \ + ${boost_unit_test_framework_LDFLAGS} \ + ${src_libbitcoin_node_la_LDFLAGS} + +test_libbitcoin_node_test_LDADD = \ + ${boost_LIBS} \ + ${boost_unit_test_framework_LIBS} \ + ${src_libbitcoin_node_la_LIBS} \ + ${src_libbitcoin_node_la_LIBADD} + +test_libbitcoin_node_test_SOURCES = \ + ${srcdir}/../../test/block_arena.cpp \ + ${srcdir}/../../test/block_memory.cpp \ + ${srcdir}/../../test/channel_peer.cpp \ + ${srcdir}/../../test/configuration.cpp \ + ${srcdir}/../../test/error.cpp \ + ${srcdir}/../../test/estimator.cpp \ + ${srcdir}/../../test/full_node.cpp \ + ${srcdir}/../../test/main.cpp \ + ${srcdir}/../../test/settings.cpp \ + ${srcdir}/../../test/test.cpp \ + ${srcdir}/../../test/chasers/chaser.cpp \ + ${srcdir}/../../test/chasers/chaser_block.cpp \ + ${srcdir}/../../test/chasers/chaser_check.cpp \ + ${srcdir}/../../test/chasers/chaser_confirm.cpp \ + ${srcdir}/../../test/chasers/chaser_estimate.cpp \ + ${srcdir}/../../test/chasers/chaser_header.cpp \ + ${srcdir}/../../test/chasers/chaser_template.cpp \ + ${srcdir}/../../test/chasers/chaser_transaction.cpp \ + ${srcdir}/../../test/chasers/chaser_validate.cpp \ + ${srcdir}/../../test/protocols/protocol.cpp \ + ${srcdir}/../../test/sessions/session.cpp + +TESTS = test_runner.sh + +endif WITH_TESTS diff --git a/NEWS b/builds/gnu/NEWS similarity index 100% rename from NEWS rename to builds/gnu/NEWS diff --git a/README b/builds/gnu/README similarity index 100% rename from README rename to builds/gnu/README diff --git a/builds/gnu/configure.ac b/builds/gnu/configure.ac new file mode 100644 index 000000000..d1ad07084 --- /dev/null +++ b/builds/gnu/configure.ac @@ -0,0 +1,261 @@ +############################################################################### +# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). +# +# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY +# +############################################################################### + +# Standard declarations. +#============================================================================== +# Requires Automake 1.14 or newer. + +# Declare the required version of Autoconf. +AC_PREREQ([2.65]) + +# Process command-line arguments and perform initialization and verification. +AC_INIT([libbitcoin-node], [4.0.0], [eric@voskuil.org]) + +# Do compilation tests. +AC_LANG(C++) + +# Specify the temporary directory for build tools. +AC_CONFIG_AUX_DIR([build-aux]) + +# Specify the directory of additional local Autoconf macros. +AC_CONFIG_MACRO_DIR([m4]) + +# Run macros for operation of generated Makefiles, enable non-recursive make. +# Unless [foreign] is specified standard GNU files will be required, +# specifically: AUTHORS, COPYING, INSTALL, NEWS, README and ChangeLog. +AM_INIT_AUTOMAKE([subdir-objects]) + +# Enable C and POSIX extensions that may be disabled on certain platforms. +AC_USE_SYSTEM_EXTENSIONS + +# Enable the archiver. +AM_PROG_AR + +# Initialize libtool. +LT_PREREQ(2.4.2) + +# Enable shared libraries if available, and static if they don't conflict. +LT_INIT +AC_SUBST([LIBTOOL_DEPS]) + +# Determine C++ compiler to use. +AC_PROG_CXX + +# Enable sed for substitution. +AC_PROG_SED + +# Compute the canonical host-system type variable host, including host_os. +AC_CANONICAL_HOST + +# Enable silent rules option. +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +# Check for pkg-config. +PKG_PROG_PKG_CONFIG +AS_IF([test -n "${PKG_CONFIG}"], [], + [AC_MSG_ERROR([pkg-config is required but was not found.])]) + +AS_IF([test "x${enable_static}" != "xno"], + [AC_SUBST([PKG_CONFIG], ["${PKG_CONFIG} --static"])]) + +# Declare environment variables that affect the build. +#------------------------------------------------------------------------------ +AC_ARG_VAR([CC], "C compiler to use, such as gcc or clang") +AC_ARG_VAR([CXX], "C++ compiler to use, such as g++ or clang++") +AC_ARG_VAR([PKG_CONFIG_PATH], "Additional directories for package discovery.") + +repository_root_dir="@abs_top_srcdir@/../.." + +# Check for baseline language coverage in the compiler for the C++20 standard. +#------------------------------------------------------------------------------ +AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory]) + +# Process options. +#============================================================================== +AC_MSG_CHECKING([--enable-isystem option]) +AC_ARG_ENABLE([isystem], + AS_HELP_STRING([--enable-isystem], + [Substitute -isystem for -I in dependencies. @<:@default=no@:>@]), + [enable_isystem=$enableval], + [enable_isystem=no]) +AC_MSG_RESULT([$enable_isystem]) +AM_CONDITIONAL([ENABLE_ISYSTEM], [test "x${enable_isystem}" != "xno"]) + +AC_MSG_CHECKING([--with-pkgconfigdir option]) +AC_ARG_WITH([pkgconfigdir], + AS_HELP_STRING([--with-pkgconfigdir=DIR], + [Path to pkgconfig directory. @<:@default=${libdir}/pkgconfig@:>@]), + [with_pkgconfigdir=$withval], + [with_pkgconfigdir=${libdir}/pkgconfig]) +AC_MSG_RESULT([$with_pkgconfigdir]) +AC_SUBST([pkgconfigdir],[${with_pkgconfigdir}]) + +AC_MSG_CHECKING([--enable-ndebug option]) +AC_ARG_ENABLE([ndebug], + AS_HELP_STRING([--enable-ndebug], + [Compile with NDEBUG assertion. @<:@default=no@:>@]), + [enable_ndebug=$enableval], + [enable_ndebug=no]) +AC_MSG_RESULT([$enable_ndebug]) +AM_CONDITIONAL([ENABLE_NDEBUG], [test "x${enable_ndebug}" != "xno"]) +AS_IF([test "x${enable_ndebug}" != "xno"], [AC_DEFINE([NDEBUG])]) + +AS_IF([test "x${enable_shared}" != "xno"], [AC_DEFINE([BOOST_ALL_DYN_LINK])]) + +AC_MSG_CHECKING([--with-tests option]) +AC_ARG_WITH([tests], + AS_HELP_STRING([--with-tests], + [Compile with unit tests. @<:@default=yes@:>@]), + [with_tests=$withval], + [with_tests=yes]) +AC_MSG_RESULT([$with_tests]) +AM_CONDITIONAL([WITH_TESTS], [test "x${with_tests}" != "xno"]) + +# Set flags. +#============================================================================== +AX_CHECK_COMPILE_FLAG([-Wall], + [ + CFLAGS="${CFLAGS} -Wall"; + CXXFLAGS="${CXXFLAGS} -Wall"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wextra], + [ + CFLAGS="${CFLAGS} -Wextra"; + CXXFLAGS="${CXXFLAGS} -Wextra"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-reorder], + [ + CXXFLAGS="${CXXFLAGS} -Wno-reorder"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], + [ + CXXFLAGS="${CXXFLAGS} -Wno-missing-field-initializers"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-missing-braces], + [ + CXXFLAGS="${CXXFLAGS} -Wno-missing-braces"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-comment], + [ + CXXFLAGS="${CXXFLAGS} -Wno-comment"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-deprecated-copy], + [ + CXXFLAGS="${CXXFLAGS} -Wno-deprecated-copy"; + ]) + +AS_CASE([${CC}], [*clang*], + [ + AX_CHECK_COMPILE_FLAG([-Wno-mismatched-tags], + [ + CXXFLAGS="${CXXFLAGS} -Wno-mismatched-tags"; + ]) + ]) + +AX_CHECK_COMPILE_FLAG([-fstack-protector-all], + [ + CXXFLAGS="${CXXFLAGS} -fstack-protector-all"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-ignored-attributes], + [ + libbitcoin_node_test_CXXFLAGS="${libbitcoin_node_test_CXXFLAGS} -Wno-ignored-attributes"; + ]) + +AX_CHECK_COMPILE_FLAG([-Wno-long-long], + [ + libbitcoin_node_test_CXXFLAGS="${libbitcoin_node_test_CXXFLAGS} -Wno-long-long"; + ]) + +AS_CASE([${CC}], [*gnu*], + [ + AX_CHECK_COMPILE_FLAG([-fno-var-tracking-assignments], + [ + libbitcoin_node_test_CXXFLAGS="${libbitcoin_node_test_CXXFLAGS} -fno-var-tracking-assignments"; + ]) + ]) + +# Check dependencies. +#============================================================================== +PKG_CHECK_MODULES( + [libbitcoin_database], + [libbitcoin-database >= 4.0.0], + [], + [ + AC_MSG_ERROR([libbitcoin-database >= 4.0.0 is required but was not found.]) + ]) +AC_SUBST([libbitcoin_database_PKG], ['libbitcoin-database >= 4.0.0']) +AC_SUBST([libbitcoin_database_CPPFLAGS], [${libbitcoin_database_CFLAGS}]) +AC_SUBST([libbitcoin_database_ISYS_CPPFLAGS], [`echo ${libbitcoin_database_CPPFLAGS} | ${SED} s/^-I/-isystem/g | ${SED} s/' -I'/' -isystem'/g`]) +AC_MSG_NOTICE([libbitcoin_database_CPPFLAGS : ${libbitcoin_database_CPPFLAGS}]) +AC_MSG_NOTICE([libbitcoin_database_ISYS_CPPFLAGS : ${libbitcoin_database_ISYS_CPPFLAGS}]) +AC_MSG_NOTICE([libbitcoin_database_OTHER_CFLAGS : ${libbitcoin_database_OTHER_CFLAGS}]) +AC_MSG_NOTICE([libbitcoin_database_INCLUDEDIR : ${libbitcoin_database_INCLUDEDIR}]) +AC_MSG_NOTICE([libbitcoin_database_LIBS : ${libbitcoin_database_LIBS}]) +AS_IF([test "x${enable_isystem}" != "xno"], + [AC_SUBST([libbitcoin_database_BUILD_CPPFLAGS], [${libbitcoin_database_ISYS_CPPFLAGS}])], + [AC_SUBST([libbitcoin_database_BUILD_CPPFLAGS], [${libbitcoin_database_CPPFLAGS}])]) +AC_MSG_NOTICE([libbitcoin_database_BUILD_CPPFLAGS : ${libbitcoin_database_BUILD_CPPFLAGS}]) + +PKG_CHECK_MODULES( + [libbitcoin_network], + [libbitcoin-network >= 4.0.0], + [], + [ + AC_MSG_ERROR([libbitcoin-network >= 4.0.0 is required but was not found.]) + ]) +AC_SUBST([libbitcoin_network_PKG], ['libbitcoin-network >= 4.0.0']) +AC_SUBST([libbitcoin_network_CPPFLAGS], [${libbitcoin_network_CFLAGS}]) +AC_SUBST([libbitcoin_network_ISYS_CPPFLAGS], [`echo ${libbitcoin_network_CPPFLAGS} | ${SED} s/^-I/-isystem/g | ${SED} s/' -I'/' -isystem'/g`]) +AC_MSG_NOTICE([libbitcoin_network_CPPFLAGS : ${libbitcoin_network_CPPFLAGS}]) +AC_MSG_NOTICE([libbitcoin_network_ISYS_CPPFLAGS : ${libbitcoin_network_ISYS_CPPFLAGS}]) +AC_MSG_NOTICE([libbitcoin_network_OTHER_CFLAGS : ${libbitcoin_network_OTHER_CFLAGS}]) +AC_MSG_NOTICE([libbitcoin_network_INCLUDEDIR : ${libbitcoin_network_INCLUDEDIR}]) +AC_MSG_NOTICE([libbitcoin_network_LIBS : ${libbitcoin_network_LIBS}]) +AS_IF([test "x${enable_isystem}" != "xno"], + [AC_SUBST([libbitcoin_network_BUILD_CPPFLAGS], [${libbitcoin_network_ISYS_CPPFLAGS}])], + [AC_SUBST([libbitcoin_network_BUILD_CPPFLAGS], [${libbitcoin_network_CPPFLAGS}])]) +AC_MSG_NOTICE([libbitcoin_network_BUILD_CPPFLAGS : ${libbitcoin_network_BUILD_CPPFLAGS}]) + +AX_BOOST_BASE([1.86.0], + [ + AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}]) + AC_SUBST([boost_ISYSTEM_CPPFLAGS], [`echo ${boost_CPPFLAGS} | ${SED} s/^-I/-isystem/g | ${SED} s/' -I'/' -isystem'/g`]) + AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}]) + AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}]) + AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}]) + AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}]) + ], + [ + AC_MSG_ERROR([Boost 1.86.0 or later is required but was not found.]) + ]) + +AS_IF([test "x${enable_isystem}" != "xno"], + [ AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYSTEM_CPPFLAGS}]) ], + [ AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}]) ]) + +AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}]) + +AS_IF([(test "x${with_tests}" != "xno")], + [ + AX_BOOST_UNIT_TEST_FRAMEWORK + AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}]) + AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}]) + ]) + +AC_CONFIG_FILES([ + Makefile + libbitcoin-node.pc + ]) + +AC_OUTPUT diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index f0c767be2..3e39d14cd 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -16,9 +16,9 @@ # Default: --disable-sse41 # ---shani Use Intel/ARM SHA Extensions. # Default: --disable-shani -# ---ultrafast Use shrec/UltrafastSecp256k1. +# ---ultrafast Use shrec/UltrafastSecp256k1 library. # Default: --without-ultrafast -# ---secp256k1 Use bitcoin-core/secp256k1. +# ---secp256k1 Use bitcoin-core/secp256k1 library. # Default: --with-secp256k1 # ---ssl Use embedded ssl library. # Default: --with-ssl @@ -547,10 +547,10 @@ main() source_github "${secp256k1_OWNER}" "secp256k1" "${secp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${secp256k1_FLAGS[@]}" - build_gnu "secp256k1" "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" - install_gnu "secp256k1" + build_gnu "secp256k1" "." "." "${PARALLEL}" "${secp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" + install_gnu "secp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_gnu "secp256k1" + clean_gnu "secp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -559,10 +559,10 @@ main() source_github "${UltrafastSecp256k1_OWNER}" "UltrafastSecp256k1" "${UltrafastSecp256k1_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${UltrafastSecp256k1_FLAGS[@]}" - build_cmake "UltrafastSecp256k1" "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" - install_cmake "UltrafastSecp256k1" + build_cmake "UltrafastSecp256k1" "." "." "${PARALLEL}" "${UltrafastSecp256k1_OPTIONS[@]}" "${CONFIGURE_OPTIONS_CMAKE[@]}" + install_cmake "UltrafastSecp256k1" "." if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_cmake "UltrafastSecp256k1" + clean_cmake "UltrafastSecp256k1" "." fi export CPPFLAGS="${SAVE_CPPFLAGS}" fi @@ -570,43 +570,43 @@ main() source_github "${libbitcoin_system_OWNER}" "libbitcoin-system" "${libbitcoin_system_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_system_FLAGS[@]}" - build_gnu "libbitcoin-system" "." "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" - install_gnu "libbitcoin-system" + build_gnu "libbitcoin-system" "builds/gnu" "builds/gnu" "${PARALLEL}" "${libbitcoin_system_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" + install_gnu "libbitcoin-system" "builds/gnu" if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_gnu "libbitcoin-system" + clean_gnu "libbitcoin-system" "builds/gnu" fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_database_OWNER}" "libbitcoin-database" "${libbitcoin_database_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_database_FLAGS[@]}" - build_gnu "libbitcoin-database" "." "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" - install_gnu "libbitcoin-database" + build_gnu "libbitcoin-database" "builds/gnu" "builds/gnu" "${PARALLEL}" "${libbitcoin_database_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" + install_gnu "libbitcoin-database" "builds/gnu" if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_gnu "libbitcoin-database" + clean_gnu "libbitcoin-database" "builds/gnu" fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_network_OWNER}" "libbitcoin-network" "${libbitcoin_network_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_network_FLAGS[@]}" - build_gnu "libbitcoin-network" "." "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" - install_gnu "libbitcoin-network" + build_gnu "libbitcoin-network" "builds/gnu" "builds/gnu" "${PARALLEL}" "${libbitcoin_network_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" + install_gnu "libbitcoin-network" "builds/gnu" if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_gnu "libbitcoin-network" + clean_gnu "libbitcoin-network" "builds/gnu" fi export CPPFLAGS="${SAVE_CPPFLAGS}" source_github "${libbitcoin_node_OWNER}" "libbitcoin-node" "${libbitcoin_node_TAG}" local SAVE_CPPFLAGS="${CPPFLAGS}" export CPPFLAGS="${CPPFLAGS} ${libbitcoin_node_FLAGS[@]}" - build_gnu "libbitcoin-node" "." "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" + build_gnu "libbitcoin-node" "builds/gnu" "builds/gnu" "${PARALLEL}" "${libbitcoin_node_OPTIONS[@]}" "${CONFIGURE_OPTIONS_GNU[@]}" if ! [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then - test_gnu "libbitcoin-node" "${PARALLEL}" + test_gnu "libbitcoin-node" "builds/gnu" "${PARALLEL}" fi - install_gnu "libbitcoin-node" + install_gnu "libbitcoin-node" "builds/gnu" if [[ "${BUILD_POST_INSTALL_CLEAN}" == "yes" ]]; then - clean_gnu "libbitcoin-node" + clean_gnu "libbitcoin-node" "builds/gnu" fi export CPPFLAGS="${SAVE_CPPFLAGS}" @@ -824,9 +824,10 @@ build_boost() build_gnu() { local PROJECT="$1" - local RELATIVE_PATH="$2" - local JOBS="$3" - shift 3 + local RELATIVE_SRC_PATH="$2" + local RELATIVE_OBJ_PATH="$3" + local JOBS="$4" + shift 4 local VERBOSITY_GNU="" local VERBOSITY_MAKE="" @@ -841,7 +842,7 @@ build_gnu() # directory rationalization push_directory "${BUILD_SRC_DIR}/${PROJECT}" - push_directory "${RELATIVE_PATH}" + push_directory "${RELATIVE_SRC_PATH}" local BUILD_PATH="$(pwd)" pop_directory @@ -855,6 +856,11 @@ build_gnu() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + create_directory_force "${RELATIVE_OBJ_PATH}" + push_directory "${RELATIVE_OBJ_PATH}" + fi + # configuration push_directory "${BUILD_PATH}" autoreconf ${VERBOSITY_GNU} -i @@ -873,6 +879,10 @@ build_gnu() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi + msg_success "'${PROJECT}' built successfully." } @@ -880,9 +890,10 @@ build_gnu() build_cmake() { local PROJECT="$1" - local RELATIVE_PATH="$2" - local JOBS="$3" - shift 3 + local RELATIVE_SRC_PATH="$2" + local RELATIVE_OBJ_PATH="$3" + local JOBS="$4" + shift 4 local VERBOSITY_CMAKE="" local VERBOSITY_MAKE="" @@ -897,7 +908,7 @@ build_cmake() # directory rationalization push_directory "${BUILD_SRC_DIR}/${PROJECT}" - push_directory "${RELATIVE_PATH}" + push_directory "${RELATIVE_SRC_PATH}" local BUILD_PATH="$(pwd)" pop_directory @@ -911,9 +922,14 @@ build_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + create_directory_force "${RELATIVE_OBJ_PATH}" + push_directory "${RELATIVE_OBJ_PATH}" + fi + display_configure_options "$@" - cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_PATH}" + cmake ${VERBOSITY_CMAKE} -LA "$@" "${BUILD_SRC_DIR}/${PROJECT}/${RELATIVE_SRC_PATH}" # make if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then @@ -924,6 +940,10 @@ build_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi + msg_success "'${PROJECT}' built successfully." } @@ -931,7 +951,8 @@ build_cmake() clean_cmake() { local PROJECT="$1" - shift 1 + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to clean ${PROJECT}" @@ -943,6 +964,10 @@ clean_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error cmake --build . --target clean @@ -956,6 +981,9 @@ clean_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' clean complete." } @@ -963,7 +991,8 @@ clean_cmake() install_cmake() { local PROJECT="$1" - shift + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to install ${PROJECT}" @@ -975,6 +1004,10 @@ install_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + cmake --install . if [[ ${OS} == Linux ]] && [[ "${PREFIX}" == "/usr/local" ]]; then @@ -983,6 +1016,9 @@ install_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' installation complete." } @@ -990,8 +1026,9 @@ install_cmake() test_cmake() { local PROJECT="$1" - local JOBS="$2" - shift 2 + local RELATIVE_OBJ_PATH="$2" + local JOBS="$3" + shift 3 msg "Preparing to test ${PROJECT}" @@ -1003,6 +1040,10 @@ test_cmake() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error ctest --test-dir . @@ -1030,6 +1071,9 @@ test_cmake() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' test complete." } @@ -1037,7 +1081,8 @@ test_cmake() clean_gnu() { local PROJECT="$1" - shift 1 + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to clean ${PROJECT}" @@ -1049,6 +1094,10 @@ clean_gnu() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error make clean @@ -1062,6 +1111,9 @@ clean_gnu() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' clean complete." } @@ -1069,7 +1121,8 @@ clean_gnu() install_gnu() { local PROJECT="$1" - shift + local RELATIVE_OBJ_PATH="$2" + shift 2 msg "Preparing to install ${PROJECT}" @@ -1081,6 +1134,10 @@ install_gnu() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + make install if [[ ${OS} == Linux ]] && [[ "${PREFIX}" == "/usr/local" ]]; then @@ -1089,6 +1146,9 @@ install_gnu() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' installation complete." } @@ -1096,8 +1156,9 @@ install_gnu() test_gnu() { local PROJECT="$1" - local JOBS="$2" - shift 2 + local RELATIVE_OBJ_PATH="$2" + local JOBS="$3" + shift 3 msg "Preparing to test ${PROJECT}" @@ -1109,6 +1170,10 @@ test_gnu() push_directory "${BUILD_OBJ_DIR}/${PROJECT}" fi + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + push_directory "${RELATIVE_OBJ_PATH}" + fi + disable_exit_on_error if [[ ${JOBS} -gt ${SEQUENTIAL} ]]; then @@ -1140,6 +1205,9 @@ test_gnu() pop_directory # BUILD_OBJ_DIR pop_directory # BUILD_SRC_DIR/PROJECT + if [[ "${RELATIVE_OBJ_PATH}" != "." ]]; then + pop_directory + fi msg_success "'${PROJECT}' test complete." } @@ -1222,9 +1290,9 @@ help() msg " Default: --disable-sse41" msg "---shani Use Intel/ARM SHA Extensions." msg " Default: --disable-shani" - msg "---ultrafast Use shrec/UltrafastSecp256k1." + msg "---ultrafast Use shrec/UltrafastSecp256k1 library." msg " Default: --without-ultrafast" - msg "---secp256k1 Use bitcoin-core/secp256k1." + msg "---secp256k1 Use bitcoin-core/secp256k1 library." msg " Default: --with-secp256k1" msg "---ssl Use embedded ssl library." msg " Default: --with-ssl" diff --git a/libbitcoin-node.pc.in b/builds/gnu/libbitcoin-node.pc.in similarity index 59% rename from libbitcoin-node.pc.in rename to builds/gnu/libbitcoin-node.pc.in index 043856b6b..4c9fdaadc 100644 --- a/libbitcoin-node.pc.in +++ b/builds/gnu/libbitcoin-node.pc.in @@ -5,6 +5,7 @@ # ############################################################################### + # Substitutions #============================================================================== prefix=@prefix@ @@ -12,6 +13,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ + # Metadata #============================================================================== Name: libbitcoin-node @@ -22,15 +24,13 @@ Version: @PACKAGE_VERSION@ # Variables #============================================================================== -# Dependencies that publish package configuration. -#------------------------------------------------------------------------------ -Requires: libbitcoin-database >= 4.0.0 libbitcoin-network >= 4.0.0 - -# Include directory and any other required compiler flags. -#------------------------------------------------------------------------------ -Cflags: -I${includedir} +Requires: \ + @libbitcoin_database_PKG@ \ + @libbitcoin_network_PKG@ -# Lib directory, lib and any required that do not publish pkg-config. -#------------------------------------------------------------------------------ -Libs: -L${libdir} -lbitcoin-node +Cflags: \ + -I${includedir} +Libs: \ + -L${libdir} \ + -lbitcoin-node diff --git a/m4/.gitignore b/builds/gnu/m4/.gitignore similarity index 100% rename from m4/.gitignore rename to builds/gnu/m4/.gitignore diff --git a/m4/ax_boost_base.m4 b/builds/gnu/m4/ax_boost_base.m4 similarity index 100% rename from m4/ax_boost_base.m4 rename to builds/gnu/m4/ax_boost_base.m4 diff --git a/m4/ax_boost_unit_test_framework.m4 b/builds/gnu/m4/ax_boost_unit_test_framework.m4 similarity index 100% rename from m4/ax_boost_unit_test_framework.m4 rename to builds/gnu/m4/ax_boost_unit_test_framework.m4 diff --git a/m4/ax_check_compile_flag.m4 b/builds/gnu/m4/ax_check_compile_flag.m4 similarity index 100% rename from m4/ax_check_compile_flag.m4 rename to builds/gnu/m4/ax_check_compile_flag.m4 diff --git a/m4/ax_check_link_flag.m4 b/builds/gnu/m4/ax_check_link_flag.m4 similarity index 100% rename from m4/ax_check_link_flag.m4 rename to builds/gnu/m4/ax_check_link_flag.m4 diff --git a/m4/ax_check_preproc_flag.m4 b/builds/gnu/m4/ax_check_preproc_flag.m4 similarity index 100% rename from m4/ax_check_preproc_flag.m4 rename to builds/gnu/m4/ax_check_preproc_flag.m4 diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/builds/gnu/m4/ax_cxx_compile_stdcxx.m4 similarity index 100% rename from m4/ax_cxx_compile_stdcxx.m4 rename to builds/gnu/m4/ax_cxx_compile_stdcxx.m4 diff --git a/libbitcoin-node-test_runner.sh b/builds/gnu/test_runner.sh similarity index 68% rename from libbitcoin-node-test_runner.sh rename to builds/gnu/test_runner.sh index 5b444aa4f..f3aaa30e9 100755 --- a/libbitcoin-node-test_runner.sh +++ b/builds/gnu/test_runner.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################### -# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). +# Copyright (c) 2014-2026 libbitcoin-node-test developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # @@ -9,18 +9,16 @@ # Define tests and options. #============================================================================== BOOST_UNIT_TEST_OPTIONS=\ -"--run_test=* "\ -"--log_level=warning "\ -"--show_progress=no "\ -"--detect_memory_leak=0 "\ -"--report_level=no "\ -"--build_info=yes" - + "--log_level=warning "\ + "--show_progress=no "\ + "--detect_memory_leak=0 "\ + "--report_level=no "\ + "--build-info=yes "\ + "--run_tests=*" # Run tests. #============================================================================== -# ALlow CI to send errors to standard output -if [[ $CI == true ]]; then +if [[ ${CI} == true ]]; then ./test/libbitcoin-node-test ${BOOST_UNIT_TEST_OPTIONS} else ./test/libbitcoin-node-test ${BOOST_UNIT_TEST_OPTIONS} > test.log diff --git a/builds/msvc/debug.natvis b/builds/msvc/debug.natvis index a329a0eea..753d3ef7b 100644 --- a/builds/msvc/debug.natvis +++ b/builds/msvc/debug.natvis @@ -6,15 +6,10 @@ | --> - - { m_backend } - - { m_data } - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 3312f59b3..000000000 --- a/configure.ac +++ /dev/null @@ -1,334 +0,0 @@ -############################################################################### -# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). -# -# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY -# -############################################################################### - -# Standard declarations. -#============================================================================== -# Requires Automake 1.14 or newer. - -# Declare the required version of Autoconf. -AC_PREREQ([2.65]) - -# Process command-line arguments and perform initialization and verification. -AC_INIT([libbitcoin-node], [4.0.0], [eric@voskuil.org]) - -# Do compilation tests. -AC_LANG(C++) - -# Specify the temporary directory for build tools. -AC_CONFIG_AUX_DIR([build-aux]) - -# Specify the directory of additional local Autoconf macros. -AC_CONFIG_MACRO_DIR([m4]) - -# Run macros for operation of generated Makefiles, enable non-recursive make. -# Unless [foreign] is specified standard GNU files will be required, -# specifically: AUTHORS, COPYING, INSTALL, NEWS, README and ChangeLog. -AM_INIT_AUTOMAKE([subdir-objects]) - -# Enable C and POSIX extensions that may be disabled on certain platforms. -AC_USE_SYSTEM_EXTENSIONS - -# Enable the archiver. -AM_PROG_AR - -# Initialize libtool. -LT_PREREQ(2.4.2) - -# Enable shared libraries if available, and static if they don't conflict. -LT_INIT -AC_SUBST([LIBTOOL_DEPS]) - -# Determine C++ compiler to use. -AC_PROG_CXX - -# Enable sed for substitution. -AC_PROG_SED - -# Compute the canonical host-system type variable host, including host_os. -AC_CANONICAL_HOST - -# Enable silent rules option. -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -# Check for pkg-config. -PKG_PROG_PKG_CONFIG -AS_IF([test -n "$PKG_CONFIG"], [], - [AC_MSG_ERROR([pkg-config is required but was not found.])]) - -AS_CASE([${enable_static}], - [yes], [AC_SUBST([PKG_CONFIG], ["$PKG_CONFIG --static"])], - []) - -# Declare environment variables that affect the build. -#------------------------------------------------------------------------------ -AC_ARG_VAR([CC], "C compiler to use, such as gcc or clang") -AC_ARG_VAR([CXX], "C++ compiler to use, such as g++ or clang++") -AC_ARG_VAR([PKG_CONFIG_PATH], "Additional directories for package discovery.") - -# Check for baseline language coverage in the compiler for the C++20 standard. -#------------------------------------------------------------------------------ -AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory]) - - -# Process options. -#============================================================================== -# Implement --with-bash-completiondir and output ${bash_completiondir} and declare BASH_COMPLETIONDIR. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--with-bash-completiondir option]) -AC_ARG_WITH([bash-completiondir], - AS_HELP_STRING([--with-bash-completiondir[=DIR]], - [Install bash completion support, optionally specifying the directory. This option may require elevated permissions. @<:@default=no@:>@]), - [bash_completiondir=$withval], - [bash_completiondir=no]) -AC_MSG_RESULT([$bash_completiondir]) -AC_SUBST([bash_completiondir]) -AM_CONDITIONAL([BASH_COMPLETIONDIR], [test x$bash_completiondir != xno]) - -# Implement --with-pkgconfigdir and output ${pkgconfigdir}. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--with-pkgconfigdir option]) -AC_ARG_WITH([pkgconfigdir], - AS_HELP_STRING([--with-pkgconfigdir=DIR], - [Path to pkgconfig directory. @<:@default=${libdir}/pkgconfig@:>@]), - [pkgconfigdir=$withval], - [pkgconfigdir=${libdir}/pkgconfig]) -AC_MSG_RESULT([$pkgconfigdir]) -AC_SUBST([pkgconfigdir]) - -# Implement --with-tests and declare WITH_TESTS. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--with-tests option]) -AC_ARG_WITH([tests], - AS_HELP_STRING([--with-tests], - [Compile with unit tests. @<:@default=yes@:>@]), - [with_tests=$withval], - [with_tests=yes]) -AC_MSG_RESULT([$with_tests]) -AM_CONDITIONAL([WITH_TESTS], [test x$with_tests != xno]) - -# Implement --with-console and declare WITH_CONSOLE. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--with-console option]) -AC_ARG_WITH([console], - AS_HELP_STRING([--with-console], - [Compile console application. @<:@default=yes@:>@]), - [with_console=$withval], - [with_console=yes]) -AC_MSG_RESULT([$with_console]) -AM_CONDITIONAL([WITH_CONSOLE], [test x$with_console != xno]) - -# Implement --enable-ndebug and define NDEBUG. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--enable-ndebug option]) -AC_ARG_ENABLE([ndebug], - AS_HELP_STRING([--enable-ndebug], - [Compile without debug assertions. @<:@default=yes@:>@]), - [enable_ndebug=$enableval], - [enable_ndebug=yes]) -AC_MSG_RESULT([$enable_ndebug]) -AS_CASE([${enable_ndebug}], [yes], AC_DEFINE([NDEBUG])) - -# Inherit --enable-shared and define BOOST_ALL_DYN_LINK. -#------------------------------------------------------------------------------ -AS_CASE([${enable_shared}], [yes], AC_DEFINE([BOOST_ALL_DYN_LINK])) - -# Implement --enable-isystem. -#------------------------------------------------------------------------------ -AC_MSG_CHECKING([--enable-isystem option]) -AC_ARG_ENABLE([isystem], - AS_HELP_STRING([--enable-isystem], - [Substitute -isystem for -I in dependencies. @<:@default=no@:>@]), - [enable_isystem=$enableval], - [enable_isystem=no]) -AC_MSG_RESULT([$enable_isystem]) - - -# Set flags. -#============================================================================== -# Require c++20 for all c++ products. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-std=c++20], - [CXXFLAGS="$CXXFLAGS -std=c++20"])]) - -# Warn on all stuff. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wall], - [CFLAGS="$CFLAGS -Wall"])]) - -# Warn on all stuff. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wall], - [CXXFLAGS="$CXXFLAGS -Wall"])]) - -# Warn on extra stuff. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wextra], - [CFLAGS="$CFLAGS -Wextra"])]) - -# Warn on extra stuff. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wextra], - [CXXFLAGS="$CXXFLAGS -Wextra"])]) - -# Disallow warning on style order of declarations. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wno-reorder], - [CXXFLAGS="$CXXFLAGS -Wno-reorder"])]) - -# Suppress warning for incomplete field initialization. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], - [CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"])]) - -# Conform to style. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wno-missing-braces], - [CXXFLAGS="$CXXFLAGS -Wno-missing-braces"])]) - -# Ignore comments within comments or commenting of backslash extended lines. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wno-comment], - [CXXFLAGS="$CXXFLAGS -Wno-comment"])]) - -# Suppress warning for copy of implicitly generated copy constructor. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_COMPILE_FLAG([-Wno-deprecated-copy], - [CXXFLAGS="$CXXFLAGS -Wno-deprecated-copy"])]) - -# Conflict in stdlib under clang. Enabled in clang only. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*clang*], - [AX_CHECK_COMPILE_FLAG([-Wno-mismatched-tags], - [CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags"])]) - -# Address -undefined dynamic_lookup MacOS error. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_LINK_FLAG([-no_fixup_chains], - [LDFLAGS="$LDFLAGS -no_fixup_chains"])]) - -# Protect stack. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_LINK_FLAG([-fstack-protector], - [LDFLAGS="$LDFLAGS -fstack-protector"])]) - -# Protect stack comprehensively. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_CHECK_LINK_FLAG([-fstack-protector-all], - [LDFLAGS="$LDFLAGS -fstack-protector-all"])]) - - -# Check dependencies. -#============================================================================== -# Require Boost of at least version 1.86.0 and output ${boost_CPPFLAGS/LDFLAGS}. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*], - [AX_BOOST_BASE([1.86.0], - [AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}]) - AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`]) - AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}]) - AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}]) - AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}]) - AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])], - [AC_MSG_ERROR([Boost 1.86.0 or later is required but was not found.])])]) - -AS_CASE([${enable_isystem}],[yes], - [AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])], - [AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])]) - -AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}]) - -AS_CASE([${with_tests}], [yes], - [AX_BOOST_UNIT_TEST_FRAMEWORK - AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}]) - AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])], - [AC_SUBST([boost_unit_test_framework_LIBS], [])]) - -# Require bash-completion of at least version 2.0.0 and output ${bash_completion_CPPFLAGS/LIBS/PKG}. -#------------------------------------------------------------------------------ -AS_CASE([${bash_completiondir}], [yes], - [PKG_CHECK_MODULES([bash_completion], [bash-completion >= 2.0.0], [], - [ - bash_completion_INCLUDEDIR="" - bash_completion_OTHER_CFLAGS="" - bash_completiondir="${datadir}/bash-completion/completions" - ]) - AC_SUBST([bash_completion_PKG], ['bash-completion >= 2.0.0']) - AC_SUBST([bash_completion_CPPFLAGS], [${bash_completion_CFLAGS}]) - AC_SUBST([bash_completion_ISYS_CPPFLAGS], [`echo ${bash_completion_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`]]) - AC_MSG_NOTICE([bash_completion_CPPFLAGS : ${bash_completion_CPPFLAGS}]) - AC_MSG_NOTICE([bash_completion_ISYS_CPPFLAGS : ${bash_completion_ISYS_CPPFLAGS}]) - AC_MSG_NOTICE([bash_completion_OTHER_CFLAGS : ${bash_completion_OTHER_CFLAGS}]) - AC_MSG_NOTICE([bash_completion_INCLUDEDIR : ${bash_completion_INCLUDEDIR}]) - AC_MSG_NOTICE([bash_completion_LIBS : ${bash_completion_LIBS}])], - [AC_SUBST([bash_completion_PKG], [])]) - -AS_CASE([${enable_isystem}],[yes], - [AC_SUBST([bash_completion_BUILD_CPPFLAGS], [${bash_completion_ISYS_CPPFLAGS}])], - [AC_SUBST([bash_completion_BUILD_CPPFLAGS], [${bash_completion_CPPFLAGS}])]) - -AC_MSG_NOTICE([bash_completion_BUILD_CPPFLAGS : ${bash_completion_BUILD_CPPFLAGS}]) - -# Require bitcoin-database of at least version 4.0.0 and output ${bitcoin_database_CPPFLAGS/LIBS/PKG}. -#------------------------------------------------------------------------------ -PKG_CHECK_MODULES([bitcoin_database], [libbitcoin-database >= 4.0.0], [], - [ - AC_MSG_ERROR([libbitcoin-database >= 4.0.0 is required but was not found.]) - ]) -AC_SUBST([bitcoin_database_PKG], ['libbitcoin-database >= 4.0.0']) -AC_SUBST([bitcoin_database_CPPFLAGS], [${bitcoin_database_CFLAGS}]) -AC_SUBST([bitcoin_database_ISYS_CPPFLAGS], [`echo ${bitcoin_database_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`]]) -AC_MSG_NOTICE([bitcoin_database_CPPFLAGS : ${bitcoin_database_CPPFLAGS}]) -AC_MSG_NOTICE([bitcoin_database_ISYS_CPPFLAGS : ${bitcoin_database_ISYS_CPPFLAGS}]) -AC_MSG_NOTICE([bitcoin_database_OTHER_CFLAGS : ${bitcoin_database_OTHER_CFLAGS}]) -AC_MSG_NOTICE([bitcoin_database_INCLUDEDIR : ${bitcoin_database_INCLUDEDIR}]) -AC_MSG_NOTICE([bitcoin_database_LIBS : ${bitcoin_database_LIBS}]) - -AS_CASE([${enable_isystem}],[yes], - [AC_SUBST([bitcoin_database_BUILD_CPPFLAGS], [${bitcoin_database_ISYS_CPPFLAGS}])], - [AC_SUBST([bitcoin_database_BUILD_CPPFLAGS], [${bitcoin_database_CPPFLAGS}])]) - -AC_MSG_NOTICE([bitcoin_database_BUILD_CPPFLAGS : ${bitcoin_database_BUILD_CPPFLAGS}]) - -# Require bitcoin-network of at least version 4.0.0 and output ${bitcoin_network_CPPFLAGS/LIBS/PKG}. -#------------------------------------------------------------------------------ -PKG_CHECK_MODULES([bitcoin_network], [libbitcoin-network >= 4.0.0], [], - [ - AC_MSG_ERROR([libbitcoin-network >= 4.0.0 is required but was not found.]) - ]) -AC_SUBST([bitcoin_network_PKG], ['libbitcoin-network >= 4.0.0']) -AC_SUBST([bitcoin_network_CPPFLAGS], [${bitcoin_network_CFLAGS}]) -AC_SUBST([bitcoin_network_ISYS_CPPFLAGS], [`echo ${bitcoin_network_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`]]) -AC_MSG_NOTICE([bitcoin_network_CPPFLAGS : ${bitcoin_network_CPPFLAGS}]) -AC_MSG_NOTICE([bitcoin_network_ISYS_CPPFLAGS : ${bitcoin_network_ISYS_CPPFLAGS}]) -AC_MSG_NOTICE([bitcoin_network_OTHER_CFLAGS : ${bitcoin_network_OTHER_CFLAGS}]) -AC_MSG_NOTICE([bitcoin_network_INCLUDEDIR : ${bitcoin_network_INCLUDEDIR}]) -AC_MSG_NOTICE([bitcoin_network_LIBS : ${bitcoin_network_LIBS}]) - -AS_CASE([${enable_isystem}],[yes], - [AC_SUBST([bitcoin_network_BUILD_CPPFLAGS], [${bitcoin_network_ISYS_CPPFLAGS}])], - [AC_SUBST([bitcoin_network_BUILD_CPPFLAGS], [${bitcoin_network_CPPFLAGS}])]) - -AC_MSG_NOTICE([bitcoin_network_BUILD_CPPFLAGS : ${bitcoin_network_BUILD_CPPFLAGS}]) - - -# Process outputs into templates. -#============================================================================== -AC_CONFIG_FILES([Makefile libbitcoin-node.pc]) -AC_OUTPUT