From d209e4f1566f9240f105bb93ed61bda9b4bb272b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:38:37 +0100 Subject: [PATCH 1/4] doc: Drop mentions of `share/genbuild.sh` --- cmake/script/GenerateBuildInfo.cmake | 2 -- src/clientversion.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/script/GenerateBuildInfo.cmake b/cmake/script/GenerateBuildInfo.cmake index 4a640b9636f..d3ee2eb0621 100644 --- a/cmake/script/GenerateBuildInfo.cmake +++ b/cmake/script/GenerateBuildInfo.cmake @@ -2,8 +2,6 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or https://opensource.org/license/mit/. -# This script is a multiplatform port of the share/genbuild.sh shell script. - macro(fatal_error) message(FATAL_ERROR "\n" "Usage:\n" diff --git a/src/clientversion.cpp b/src/clientversion.cpp index e52703c8bf1..017366543d2 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -25,7 +25,7 @@ const std::string CLIENT_NAME("Satoshi"); #ifdef HAVE_BUILD_INFO #include -// The , which is generated by the build environment (share/genbuild.sh), +// The , which is generated by the build environment (cmake/script/GenerateBuildInfo.cmake), // could contain only one line of the following: // - "#define BUILD_GIT_TAG ...", if the top commit is tagged // - "#define BUILD_GIT_COMMIT ...", if the top commit is not tagged From e268b48419b802857c329a7ae27d3dbe4c1a9a4b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:21:11 +0100 Subject: [PATCH 2/4] doc: Adjust `doc/design/libraries.md` --- doc/design/libraries.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/design/libraries.md b/doc/design/libraries.md index caf414ac476..8a4ee315687 100644 --- a/doc/design/libraries.md +++ b/doc/design/libraries.md @@ -19,7 +19,7 @@ - Most libraries are internal libraries and have APIs which are completely unstable! There are few or no restrictions on backwards compatibility or rules about external dependencies. An exception is *libbitcoin_kernel*, which, at some future point, will have a documented external interface. -- Generally each library should have a corresponding source directory and namespace. Source code organization is a work in progress, so it is true that some namespaces are applied inconsistently, and if you look at [`libbitcoin_*_SOURCES`](../../src/Makefile.am) lists you can see that many libraries pull in files from outside their source directory. But when working with libraries, it is good to follow a consistent pattern like: +- Generally each library should have a corresponding source directory and namespace. Source code organization is a work in progress, so it is true that some namespaces are applied inconsistently, and if you look at [`add_library(bitcoin_* ...)`](../../src/CMakeLists.txt) lists you can see that many libraries pull in files from outside their source directory. But when working with libraries, it is good to follow a consistent pattern like: - *libbitcoin_node* code lives in `src/node/` in the `node::` namespace - *libbitcoin_wallet* code lives in `src/wallet/` in the `wallet::` namespace From d71ac768424333b65a6d88c9752cc9c7fdb276f3 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:31:39 +0100 Subject: [PATCH 3/4] build: Remove Autotools-based build system --- .gitignore | 137 +- Makefile.am | 347 ---- autogen.sh | 29 - build-aux/m4/ax_boost_base.m4 | 256 --- build-aux/m4/ax_check_compile_flag.m4 | 53 - build-aux/m4/ax_check_link_flag.m4 | 53 - build-aux/m4/ax_check_preproc_flag.m4 | 53 - build-aux/m4/ax_cxx_compile_stdcxx.m4 | 1005 ------------ build-aux/m4/ax_pthread.m4 | 522 ------ build-aux/m4/bitcoin_find_bdb48.m4 | 97 -- build-aux/m4/bitcoin_qt.m4 | 374 ----- build-aux/m4/bitcoin_subdir_to_include.m4 | 18 - build-aux/m4/l_atomic.m4 | 65 - build-aux/m4/l_socket.m4 | 36 - configure.ac | 1759 --------------------- depends/.gitignore | 1 - depends/Makefile | 60 +- depends/config.site.in | 147 -- doc/.gitignore | 1 - doc/man/Makefile.am | 27 - share/genbuild.sh | 49 - src/.bear-tidy-config | 21 - src/Makefile.am | 1133 ------------- src/Makefile.bench.include | 114 -- src/Makefile.crc32c.include | 81 - src/Makefile.leveldb.include | 153 -- src/Makefile.minisketch.include | 39 - src/Makefile.qt.include | 409 ----- src/Makefile.qt_locale.include | 124 -- src/Makefile.qttest.include | 74 - src/Makefile.test.include | 493 ------ src/Makefile.test_fuzz.include | 26 - src/Makefile.test_util.include | 55 - src/Makefile.univalue.include | 6 - src/bench/.gitignore | 1 - src/ipc/capnp/.gitignore | 2 - src/qt/Makefile | 11 - src/qt/test/Makefile | 6 - src/test/.gitignore | 2 - src/test/Makefile | 6 - src/univalue/.gitignore | 32 - src/univalue/lib/.gitignore | 2 - src/univalue/sources.mk | 86 - src/univalue/test/.gitignore | 7 - test/functional/.gitignore | 1 - 45 files changed, 3 insertions(+), 7970 deletions(-) delete mode 100644 Makefile.am delete mode 100755 autogen.sh delete mode 100644 build-aux/m4/ax_boost_base.m4 delete mode 100644 build-aux/m4/ax_check_compile_flag.m4 delete mode 100644 build-aux/m4/ax_check_link_flag.m4 delete mode 100644 build-aux/m4/ax_check_preproc_flag.m4 delete mode 100644 build-aux/m4/ax_cxx_compile_stdcxx.m4 delete mode 100644 build-aux/m4/ax_pthread.m4 delete mode 100644 build-aux/m4/bitcoin_find_bdb48.m4 delete mode 100644 build-aux/m4/bitcoin_qt.m4 delete mode 100644 build-aux/m4/bitcoin_subdir_to_include.m4 delete mode 100644 build-aux/m4/l_atomic.m4 delete mode 100644 build-aux/m4/l_socket.m4 delete mode 100644 configure.ac delete mode 100644 depends/config.site.in delete mode 100644 doc/.gitignore delete mode 100644 doc/man/Makefile.am delete mode 100755 share/genbuild.sh delete mode 100644 src/.bear-tidy-config delete mode 100644 src/Makefile.am delete mode 100644 src/Makefile.bench.include delete mode 100644 src/Makefile.crc32c.include delete mode 100644 src/Makefile.leveldb.include delete mode 100644 src/Makefile.minisketch.include delete mode 100644 src/Makefile.qt.include delete mode 100644 src/Makefile.qt_locale.include delete mode 100644 src/Makefile.qttest.include delete mode 100644 src/Makefile.test.include delete mode 100644 src/Makefile.test_fuzz.include delete mode 100644 src/Makefile.test_util.include delete mode 100644 src/Makefile.univalue.include delete mode 100644 src/bench/.gitignore delete mode 100644 src/ipc/capnp/.gitignore delete mode 100644 src/qt/Makefile delete mode 100644 src/qt/test/Makefile delete mode 100644 src/test/.gitignore delete mode 100644 src/test/Makefile delete mode 100644 src/univalue/.gitignore delete mode 100644 src/univalue/lib/.gitignore delete mode 100644 src/univalue/sources.mk delete mode 100644 src/univalue/test/.gitignore diff --git a/.gitignore b/.gitignore index a09c95d8fa6..a419c9bde74 100644 --- a/.gitignore +++ b/.gitignore @@ -3,154 +3,21 @@ !/build-aux !/build_msvc -*.tar.gz - -*.exe -*.pdb -src/bitcoin -src/bitcoind -src/bitcoin-cli -src/bitcoin-gui -src/bitcoin-node -src/bitcoin-tx -src/bitcoin-util -src/bitcoin-chainstate -src/bitcoin-wallet -src/test/fuzz/fuzz -src/test/test_bitcoin -src/qt/test/test_bitcoin-qt - -# autoreconf -Makefile.in -aclocal.m4 -autom4te.cache/ -build-aux/config.guess -build-aux/config.sub -build-aux/depcomp -build-aux/install-sh -build-aux/ltmain.sh -build-aux/m4/libtool.m4 -build-aux/m4/lt~obsolete.m4 -build-aux/m4/ltoptions.m4 -build-aux/m4/ltsugar.m4 -build-aux/m4/ltversion.m4 -build-aux/missing -build-aux/compile -build-aux/test-driver -config.cache -config.log -config.status -configure -libtool -src/config/bitcoin-config.h -src/config/bitcoin-config.h.in -src/config/stamp-h1 -src/obj -share/setup.nsi -share/qt/Info.plist - -src/qt/*.moc -src/qt/moc_*.cpp -src/qt/forms/ui_*.h - -src/qt/test/moc*.cpp - -src/qt/bitcoin-qt.config -src/qt/bitcoin-qt.creator -src/qt/bitcoin-qt.creator.user -src/qt/bitcoin-qt.files -src/qt/bitcoin-qt.includes - -.deps -.dirstamp -.libs -.*.swp -*~ -*.bak -*.rej -*.orig *.pyc -*.o -*.o-* -*.a -*.pb.cc -*.pb.h -*.dat - -*.log -*.trs -*.zip - -*.json.h -*.raw.h # Only ignore unexpected patches *.patch !contrib/guix/patches/*.patch !depends/patches/**/*.patch -#libtool object files -*.lo -*.la - -# Compilation and Qt preprocessor part -*.qm -Makefile -!depends/Makefile -src/qt/bitcoin-qt -Bitcoin-Qt.app - -# Qt Creator -Makefile.am.user - -# Unit-tests -Makefile.test -bitcoin-qt_test - -# Resources cpp -qrc_*.cpp - -# Mac specific -.DS_Store -build +/CMakeUserPresets.json # Previous releases -releases - -#lcov -*.gcno -*.gcda -/*.info -test_bitcoin.coverage/ -total.coverage/ -fuzz.coverage/ -coverage_percent.txt -/cov_tool_wrapper.sh -qa-assets/ +/releases #build tests -linux-coverage-build -linux-build -win32-build -test/config.ini -test/cache/* -test/.mypy_cache/ test/lint/test_runner/target/ -!src/leveldb*/Makefile - -/doc/doxygen/ - -contrib/devtools/split-debug.sh - -# Output from running db4 installation -db4/ - -# clang-check -*.plist - -dist/ - /guix-build-* /ci/scratch/ diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index b746299a42c..00000000000 --- a/Makefile.am +++ /dev/null @@ -1,347 +0,0 @@ -# Copyright (c) 2013-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -# Pattern rule to print variables, e.g. make print-top_srcdir -print-%: FORCE - @echo '$*'='$($*)' - -ACLOCAL_AMFLAGS = -I build-aux/m4 -SUBDIRS = src -if ENABLE_MAN -SUBDIRS += doc/man -endif -.PHONY: deploy FORCE -.INTERMEDIATE: $(COVERAGE_INFO) - -BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT) -BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT) -BITCOIN_TEST_BIN=$(top_builddir)/src/test/$(BITCOIN_TEST_NAME)$(EXEEXT) -BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT) -BITCOIN_TX_BIN=$(top_builddir)/src/$(BITCOIN_TX_NAME)$(EXEEXT) -BITCOIN_UTIL_BIN=$(top_builddir)/src/$(BITCOIN_UTIL_NAME)$(EXEEXT) -BITCOIN_WALLET_BIN=$(top_builddir)/src/$(BITCOIN_WALLET_TOOL_NAME)$(EXEEXT) -BITCOIN_NODE_BIN=$(top_builddir)/src/$(BITCOIN_MP_NODE_NAME)$(EXEEXT) -BITCOIN_GUI_BIN=$(top_builddir)/src/$(BITCOIN_MP_GUI_NAME)$(EXEEXT) -BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win64-setup$(EXEEXT) - -empty := -space := $(empty) $(empty) - -OSX_APP=Bitcoin-Qt.app -OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME)) -OSX_ZIP = $(OSX_VOLNAME).zip -OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus -OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns -OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed - -DIST_CONTRIB = \ - $(top_srcdir)/test/sanitizer_suppressions/lsan \ - $(top_srcdir)/test/sanitizer_suppressions/tsan \ - $(top_srcdir)/test/sanitizer_suppressions/ubsan \ - $(top_srcdir)/contrib/linearize/linearize-data.py \ - $(top_srcdir)/contrib/linearize/linearize-hashes.py \ - $(top_srcdir)/contrib/signet/miner - -DIST_SHARE = \ - $(top_srcdir)/share/genbuild.sh \ - $(top_srcdir)/share/rpcauth - -BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ - $(top_srcdir)/contrib/devtools/security-check.py \ - $(top_srcdir)/contrib/devtools/utils.py - -WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ - $(top_srcdir)/share/pixmaps/nsis-header.bmp \ - $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ - $(top_srcdir)/doc/README_windows.txt - -OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \ - $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh - -COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \ - test_bitcoin_filtered.info total_coverage.info \ - baseline_filtered.info functional_test.info functional_test_filtered.info \ - test_bitcoin_coverage.info test_bitcoin.info fuzz.info fuzz_filtered.info fuzz_coverage.info - -dist-hook: - -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - - -if TARGET_WINDOWS -$(BITCOIN_WIN_INSTALLER): all-recursive - $(MKDIR_P) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_TEST_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_TX_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_WALLET_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_UTIL_BIN) $(top_builddir)/release - @test -f $(MAKENSIS) && echo 'OutFile "$@"' | cat $(top_builddir)/share/setup.nsi - | $(MAKENSIS) -V2 - || \ - echo error: could not build $@ - @echo built $@ - -deploy: $(BITCOIN_WIN_INSTALLER) -endif - -if TARGET_DARWIN -$(OSX_APP)/Contents/PkgInfo: - $(MKDIR_P) $(@D) - @echo "APPL????" > $@ - -$(OSX_APP)/Contents/Resources/empty.lproj: - $(MKDIR_P) $(@D) - @touch $@ - -$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) - $(MKDIR_P) $(@D) - $(INSTALL_DATA) $< $@ - -$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) - $(MKDIR_P) $(@D) - $(INSTALL_DATA) $< $@ - -$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: all-recursive - $(MKDIR_P) $(@D) - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $@ - -$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: - $(MKDIR_P) $(@D) - echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@ - -OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ - $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ - $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings - -if BUILD_DARWIN -$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING) - $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip - -deploydir: $(OSX_ZIP) -else !BUILD_DARWIN -APP_DIST_DIR=$(top_builddir)/dist - -$(OSX_ZIP): deploydir - if [ -n "$(SOURCE_DATE_EPOCH)" ]; then find $(APP_DIST_DIR) -exec touch -d @$(SOURCE_DATE_EPOCH) {} +; fi - cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@ - -$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING) - OBJDUMP=$(OBJDUMP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) - -deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt -endif !BUILD_DARWIN - -deploy: $(OSX_ZIP) -endif - -$(BITCOIN_QT_BIN): FORCE - $(MAKE) -C src qt/$(@F) - -$(BITCOIND_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_CLI_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_TX_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_UTIL_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_WALLET_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_NODE_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_GUI_BIN): FORCE - $(MAKE) -C src $(@F) - -if USE_LCOV -LCOV_FILTER_PATTERN = \ - -p "/usr/local/" \ - -p "/usr/include/" \ - -p "/usr/lib/" \ - -p "/usr/lib64/" \ - -p "src/leveldb/" \ - -p "src/crc32c/" \ - -p "src/bench/" \ - -p "src/crypto/ctaes" \ - -p "src/minisketch" \ - -p "src/secp256k1" \ - -p "depends" - -DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus - -$(COV_TOOL_WRAPPER): - @echo 'exec $(COV_TOOL) "$$@"' > $(COV_TOOL_WRAPPER) - @chmod +x $(COV_TOOL_WRAPPER) - -baseline.info: $(COV_TOOL_WRAPPER) - $(LCOV) $(LCOV_OPTS) -c -i -d $(abs_builddir)/src -o $@ - -baseline_filtered.info: baseline.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -fuzz.info: baseline_filtered.info - @test/fuzz/test_runner.py $(DIR_FUZZ_SEED_CORPUS) -l DEBUG - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t fuzz-tests -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -fuzz_filtered.info: fuzz.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -test_bitcoin.info: baseline_filtered.info - $(MAKE) -C src/ check - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_bitcoin -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -test_bitcoin_filtered.info: test_bitcoin.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -functional_test.info: test_bitcoin_filtered.info - @test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS) - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t functional-tests -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -functional_test_filtered.info: functional_test.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -fuzz_coverage.info: fuzz_filtered.info - $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt - -test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info - $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -o $@ - -total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info - $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt - -fuzz.coverage/.dirstamp: fuzz_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -total.coverage/.dirstamp: total_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -cov_fuzz: fuzz.coverage/.dirstamp - -cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp - -endif - -dist_noinst_SCRIPTS = autogen.sh - -EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) - -EXTRA_DIST += \ - test/functional \ - test/fuzz - -EXTRA_DIST += \ - test/util/test_runner.py \ - test/util/data/bitcoin-util-test.json \ - test/util/data/blanktxv1.hex \ - test/util/data/blanktxv1.json \ - test/util/data/blanktxv2.hex \ - test/util/data/blanktxv2.json \ - test/util/data/tt-delin1-out.hex \ - test/util/data/tt-delin1-out.json \ - test/util/data/tt-delout1-out.hex \ - test/util/data/tt-delout1-out.json \ - test/util/data/tt-locktime317000-out.hex \ - test/util/data/tt-locktime317000-out.json \ - test/util/data/tx394b54bb.hex \ - test/util/data/txcreate1.hex \ - test/util/data/txcreate1.json \ - test/util/data/txcreate2.hex \ - test/util/data/txcreate2.json \ - test/util/data/txcreatedata1.hex \ - test/util/data/txcreatedata1.json \ - test/util/data/txcreatedata2.hex \ - test/util/data/txcreatedata2.json \ - test/util/data/txcreatedata_seq0.hex \ - test/util/data/txcreatedata_seq0.json \ - test/util/data/txcreatedata_seq1.hex \ - test/util/data/txcreatedata_seq1.json \ - test/util/data/txcreatemultisig1.hex \ - test/util/data/txcreatemultisig1.json \ - test/util/data/txcreatemultisig2.hex \ - test/util/data/txcreatemultisig2.json \ - test/util/data/txcreatemultisig3.hex \ - test/util/data/txcreatemultisig3.json \ - test/util/data/txcreatemultisig4.hex \ - test/util/data/txcreatemultisig4.json \ - test/util/data/txcreatemultisig5.json \ - test/util/data/txcreateoutpubkey1.hex \ - test/util/data/txcreateoutpubkey1.json \ - test/util/data/txcreateoutpubkey2.hex \ - test/util/data/txcreateoutpubkey2.json \ - test/util/data/txcreateoutpubkey3.hex \ - test/util/data/txcreateoutpubkey3.json \ - test/util/data/txcreatescript1.hex \ - test/util/data/txcreatescript1.json \ - test/util/data/txcreatescript2.hex \ - test/util/data/txcreatescript2.json \ - test/util/data/txcreatescript3.hex \ - test/util/data/txcreatescript3.json \ - test/util/data/txcreatescript4.hex \ - test/util/data/txcreatescript4.json \ - test/util/data/txcreatescript5.hex \ - test/util/data/txcreatescript6.hex \ - test/util/data/txcreatesignsegwit1.hex \ - test/util/data/txcreatesignv1.hex \ - test/util/data/txcreatesignv1.json \ - test/util/data/txcreatesignv2.hex \ - test/util/data/txreplace1.hex \ - test/util/data/txreplacenoinputs.hex \ - test/util/data/txreplaceomittedn.hex \ - test/util/data/txreplacesingleinput.hex \ - test/util/rpcauth-test.py - -CLEANFILES = $(OSX_ZIP) $(BITCOIN_WIN_INSTALLER) - -DISTCHECK_CONFIGURE_FLAGS = --enable-man - -doc/doxygen/.stamp: doc/Doxyfile FORCE - $(MKDIR_P) $(@D) - $(DOXYGEN) $^ - $(AM_V_at) touch $@ - -if HAVE_DOXYGEN -docs: doc/doxygen/.stamp -else -docs: - @echo "error: doxygen not found" -endif - -clean-docs: - rm -rf doc/doxygen - -clean-local: clean-docs - rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP) - rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__ - rm -rf dist/ test/lint/test_runner/target/ test/lint/__pycache__ - -test-security-check: -if TARGET_DARWIN - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_MACHO -endif -if TARGET_WINDOWS - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_PE -endif -if TARGET_LINUX - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF - $(AM_V_at) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_ELF -endif diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 69c892ffa0e..00000000000 --- a/autogen.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Copyright (c) 2013-2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -export LC_ALL=C -set -e -srcdir="$(dirname "$0")" -cd "$srcdir" -if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then - LIBTOOLIZE="${GLIBTOOLIZE}" - export LIBTOOLIZE -fi -command -v autoreconf >/dev/null || \ - (echo "configuration failed, please install autoconf first" && exit 1) -autoreconf --install --force --warnings=all - -if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then - chmod ug+w build-aux/config.guess - chmod ug+w src/secp256k1/build-aux/config.guess - cp depends/config.guess build-aux - cp depends/config.guess src/secp256k1/build-aux -fi -if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then - chmod ug+w build-aux/config.sub - chmod ug+w src/secp256k1/build-aux/config.sub - cp depends/config.sub build-aux - cp depends/config.sub src/secp256k1/build-aux -fi diff --git a/build-aux/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4 deleted file mode 100644 index f6620882a21..00000000000 --- a/build-aux/m4/ax_boost_base.m4 +++ /dev/null @@ -1,256 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# DESCRIPTION -# -# Test for the Boost C++ headers of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates -# the $BOOST_ROOT environment variable. Further documentation is available -# at . -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# Note that this macro has been modified compared to upstream. -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# Copyright (c) 2009 Peter Adolphs -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 51 - -# example boost program (need to pass version) -m4_define([_AX_BOOST_BASE_PROGRAM], - [AC_LANG_PROGRAM([[ -#include -]],[[ -(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))])); -]])]) - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], - [use Boost library from a standard location (ARG=yes), - from the specified location (ARG=), - or disable it (ARG=no) - @<:@ARG=yes@:>@ ])], - [ - AS_CASE([$withval], - [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""], - [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""], - [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"]) - ], - [want_boost="yes"]) - -BOOST_CPPFLAGS="" -AS_IF([test "x$want_boost" = "xyes"], - [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])]) -AC_SUBST(BOOST_CPPFLAGS) -]) - - -# convert a version string in $2 to numeric and affect to polymorphic var $1 -AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[ - AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"]) - _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'` - _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'` - AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"], - [AC_MSG_ERROR([You should at least specify libboost major version])]) - _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'` - AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"], - [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"]) - _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"], - [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"]) - _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor` - AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET) -]) - -dnl Run the detection of boost should be run only if $want_boost -AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[ - _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1]) - succeeded=no - - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl On 64-bit systems check for system libraries in both lib64 and lib. - dnl The former is specified by FHS, but e.g. Debian does not adhere to - dnl this (as it rises problems for generic multi-arch support). - dnl The last entry in the list is chosen by default when no libraries - dnl are found, e.g. when only header-only libraries are installed! - AS_CASE([${host_cpu}], - [x86_64],[libsubdirs="lib64 libx32 lib lib64"], - [mips*64*],[libsubdirs="lib64 lib32 lib lib64"], - [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64|e2k],[libsubdirs="lib64 lib lib64"], - [libsubdirs="lib"] - ) - - dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give - dnl them priority over the other paths since, if libs are found there, they - dnl are almost assuredly the ones desired. - AS_CASE([${host_cpu}], - [i?86],[multiarch_libsubdir="lib/i386-${host_os}"], - [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"], - [multiarch_libsubdir="lib/${host_cpu}-${host_os}"] - ) - - dnl first we check the system location for boost libraries - dnl this location is chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[ - AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"]) - AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[ - AC_MSG_RESULT([yes]) - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include" - for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do - AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"]) - AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[ - AC_MSG_RESULT([yes]) - break; - ], - [AC_MSG_RESULT([no])]) - done],[ - AC_MSG_RESULT([no])]) - ],[ - if test X"$cross_compiling" = Xyes; then - search_libsubdirs=$multiarch_libsubdir - else - search_libsubdirs="$multiarch_libsubdir $libsubdirs" - fi - for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local /opt/homebrew ; do - if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then - for libsubdir in $search_libsubdirs ; do - if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include" - break; - fi - done - ]) - - AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - AC_REQUIRE([AC_PROG_CXX]) - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes" ; then - CPPFLAGS="$CPPFLAGS_SAVED" - BOOST_CPPFLAGS= - - _version=0 - if test -n "$_AX_BOOST_BASE_boost_path" ; then - if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then - for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "x$V_CHECK" = "x1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE" - done - dnl if nothing found search for layout used in Windows distributions - if test -z "$BOOST_CPPFLAGS"; then - if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path" - fi - fi - fi - else - if test "x$cross_compiling" != "xyes" ; then - for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local /opt/homebrew ; do - if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then - for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "x$V_CHECK" = "x1" ; then - _version=$_version_tmp - best_path=$_AX_BOOST_BASE_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - fi - - if test -n "$BOOST_ROOT" ; then - for libsubdir in $libsubdirs ; do - if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "x$V_CHECK" = "x1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "x$succeeded" != "xyes" ; then - if test "x$_version" = "x0" ; then - AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) - else - AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) - fi - # execute ACTION-IF-NOT-FOUND (if present): - ifelse([$3], , :, [$3]) - else - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - # execute ACTION-IF-FOUND (if present): - ifelse([$2], , :, [$2]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" -]) diff --git a/build-aux/m4/ax_check_compile_flag.m4 b/build-aux/m4/ax_check_compile_flag.m4 deleted file mode 100644 index bd753b34d7d..00000000000 --- a/build-aux/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/build-aux/m4/ax_check_link_flag.m4 b/build-aux/m4/ax_check_link_flag.m4 deleted file mode 100644 index 03a30ce4c73..00000000000 --- a/build-aux/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_LINK_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/build-aux/m4/ax_check_preproc_flag.m4 b/build-aux/m4/ax_check_preproc_flag.m4 deleted file mode 100644 index e43560fbd3b..00000000000 --- a/build-aux/m4/ax_check_preproc_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's -# preprocessor or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the preprocessor's default -# flags when the check is done. The check is thus made with the flags: -# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the -# preprocessor to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_PREPROC_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AC_DEFUN([AX_CHECK_PREPROC_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [ - ax_check_save_flags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $4 $1" - AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - CPPFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_PREPROC_FLAGS diff --git a/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/build-aux/m4/ax_cxx_compile_stdcxx.m4 deleted file mode 100644 index 51a35054d08..00000000000 --- a/build-aux/m4/ax_cxx_compile_stdcxx.m4 +++ /dev/null @@ -1,1005 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for -# the respective C++ standard version. -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for no added switch, and then for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# Copyright (c) 2016, 2018 Krzesimir Nowak -# Copyright (c) 2019 Enji Cooper -# Copyright (c) 2020 Jason Merrill -# Copyright (c) 2021 Jörn Heusipp -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 14 - -dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro -dnl (serial version number 13). - -AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], - [$1], [20], [ax_cxx_compile_alternatives="20"], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], - [$3], [optional], [ax_cxx_compile_cxx$1_required=false], - [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - - m4_if([$2], [], [dnl - AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, - ax_cv_cxx_compile_cxx$1, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [ax_cv_cxx_compile_cxx$1=yes], - [ax_cv_cxx_compile_cxx$1=no])]) - if test x$ax_cv_cxx_compile_cxx$1 = xyes; then - ac_success=yes - fi]) - - m4_if([$2], [noext], [], [dnl - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - -dnl Test body for checking C++17 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 -) - -dnl Test body for checking C++20 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 -) - - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual ~Base() {} - virtual void f() {} - }; - - struct Derived : public Base - { - virtual ~Derived() override {} - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - -]]) - - -dnl Tests for new features in C++17 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ - -// If the compiler admits that it is not ready for C++17, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201703L - -#error "This is not a C++17 compiler" - -#else - -#include -#include -#include - -namespace cxx17 -{ - - namespace test_constexpr_lambdas - { - - constexpr int foo = [](){return 42;}(); - - } - - namespace test::nested_namespace::definitions - { - - } - - namespace test_fold_expression - { - - template - int multiply(Args... args) - { - return (args * ... * 1); - } - - template - bool all(Args... args) - { - return (args && ...); - } - - } - - namespace test_extended_static_assert - { - - static_assert (true); - - } - - namespace test_auto_brace_init_list - { - - auto foo = {5}; - auto bar {5}; - - static_assert(std::is_same, decltype(foo)>::value); - static_assert(std::is_same::value); - } - - namespace test_typename_in_template_template_parameter - { - - template typename X> struct D; - - } - - namespace test_fallthrough_nodiscard_maybe_unused_attributes - { - - int f1() - { - return 42; - } - - [[nodiscard]] int f2() - { - [[maybe_unused]] auto unused = f1(); - - switch (f1()) - { - case 17: - f1(); - [[fallthrough]]; - case 42: - f1(); - } - return f1(); - } - - } - - namespace test_extended_aggregate_initialization - { - - struct base1 - { - int b1, b2 = 42; - }; - - struct base2 - { - base2() { - b3 = 42; - } - int b3; - }; - - struct derived : base1, base2 - { - int d; - }; - - derived d1 {{1, 2}, {}, 4}; // full initialization - derived d2 {{}, {}, 4}; // value-initialized bases - - } - - namespace test_general_range_based_for_loop - { - - struct iter - { - int i; - - int& operator* () - { - return i; - } - - const int& operator* () const - { - return i; - } - - iter& operator++() - { - ++i; - return *this; - } - }; - - struct sentinel - { - int i; - }; - - bool operator== (const iter& i, const sentinel& s) - { - return i.i == s.i; - } - - bool operator!= (const iter& i, const sentinel& s) - { - return !(i == s); - } - - struct range - { - iter begin() const - { - return {0}; - } - - sentinel end() const - { - return {5}; - } - }; - - void f() - { - range r {}; - - for (auto i : r) - { - [[maybe_unused]] auto v = i; - } - } - - } - - namespace test_lambda_capture_asterisk_this_by_value - { - - struct t - { - int i; - int foo() - { - return [*this]() - { - return i; - }(); - } - }; - - } - - namespace test_enum_class_construction - { - - enum class byte : unsigned char - {}; - - byte foo {42}; - - } - - namespace test_constexpr_if - { - - template - int f () - { - if constexpr(cond) - { - return 13; - } - else - { - return 42; - } - } - - } - - namespace test_selection_statement_with_initializer - { - - int f() - { - return 13; - } - - int f2() - { - if (auto i = f(); i > 0) - { - return 3; - } - - switch (auto i = f(); i + 4) - { - case 17: - return 2; - - default: - return 1; - } - } - - } - - namespace test_template_argument_deduction_for_class_templates - { - - template - struct pair - { - pair (T1 p1, T2 p2) - : m1 {p1}, - m2 {p2} - {} - - T1 m1; - T2 m2; - }; - - void f() - { - [[maybe_unused]] auto p = pair{13, 42u}; - } - - } - - namespace test_non_type_auto_template_parameters - { - - template - struct B - {}; - - B<5> b1; - B<'a'> b2; - - } - - namespace test_structured_bindings - { - - int arr[2] = { 1, 2 }; - std::pair pr = { 1, 2 }; - - auto f1() -> int(&)[2] - { - return arr; - } - - auto f2() -> std::pair& - { - return pr; - } - - struct S - { - int x1 : 2; - volatile double y1; - }; - - S f3() - { - return {}; - } - - auto [ x1, y1 ] = f1(); - auto& [ xr1, yr1 ] = f1(); - auto [ x2, y2 ] = f2(); - auto& [ xr2, yr2 ] = f2(); - const auto [ x3, y3 ] = f3(); - - } - - namespace test_exception_spec_type_system - { - - struct Good {}; - struct Bad {}; - - void g1() noexcept; - void g2(); - - template - Bad - f(T*, T*); - - template - Good - f(T1*, T2*); - - static_assert (std::is_same_v); - - } - - namespace test_inline_variables - { - - template void f(T) - {} - - template inline T g(T) - { - return T{}; - } - - template<> inline void f<>(int) - {} - - template<> int g<>(int) - { - return 5; - } - - } - -} // namespace cxx17 - -#endif // __cplusplus < 201703L - -]]) - - -dnl Tests for new features in C++20 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 202002L - -#error "This is not a C++20 compiler" - -#else - -#include - -namespace cxx20 -{ - -// As C++20 supports feature test macros in the standard, there is no -// immediate need to actually test for feature availability on the -// Autoconf side. - -} // namespace cxx20 - -#endif // __cplusplus < 202002L - -]]) diff --git a/build-aux/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4 deleted file mode 100644 index 9f35d139149..00000000000 --- a/build-aux/m4/ax_pthread.m4 +++ /dev/null @@ -1,522 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is -# needed for multi-threaded programs (defaults to the value of CC -# respectively CXX otherwise). (This is necessary on e.g. AIX to use the -# special cc_r/CC_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also to link with them as well. For example, you might link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threaded programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# CXX="$PTHREAD_CXX" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to -# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2011 Daniel Richard G. -# Copyright (c) 2019 Marc Stevens -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 31 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_SED]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) - AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) - AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) - AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items with a "," contain both -# C compiler flags (before ",") and linker flags (after ","). Other items -# starting with a "-" are C compiler flags, and remaining items are -# library names, except for "none" which indicates that we try without -# any flags at all, and "pthread-config" which is a program returning -# the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case $host_os in - - freebsd*) - - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - - hpux*) - - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." - - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - - openedition*) - - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) - - AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], - [ -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif - ], - [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) - ;; - - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). - - ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" - ;; -esac - -# Are we compiling with Clang? - -AC_CACHE_CHECK([whether $CC is Clang], - [ax_cv_PTHREAD_CLANG], - [ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], - [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - ], - [ax_cv_PTHREAD_CLANG=yes]) - fi - ]) -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" - - -# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) - -# Note that for GCC and Clang -pthread generally implies -lpthread, -# except when -nostdlib is passed. -# This is problematic using libtool to build C++ shared libraries with pthread: -# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 -# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 -# To solve this, first try -pthread together with -lpthread for GCC - -AS_IF([test "x$GCC" = "xyes"], - [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) - -# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first - -AS_IF([test "x$ax_pthread_clang" = "xyes"], - [ax_pthread_flags="-pthread,-lpthread -pthread"]) - - -# The presence of a feature test macro requesting re-entrant function -# definitions is, on some systems, a strong hint that pthreads support is -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - - *) - ax_pthread_check_macro="--" - ;; -esac -AS_IF([test "x$ax_pthread_check_macro" = "x--"], - [ax_pthread_check_cond=0], - [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) - - -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - *,*) - PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` - PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` - AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void *some_global = NULL; - static void routine(void *a) - { - /* To avoid any unused-parameter or - unused-but-set-parameter warning. */ - some_global = a; - } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - AC_MSG_RESULT([$ax_pthread_ok]) - AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - - -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way - -if test "x$ax_pthread_clang" = "xyes"; then - - # Clang takes -pthread; it has never supported any other flag - - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. - - AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [ac_link="$ax_pthread_2step_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [break]) - ]) - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - ]) - - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac - -fi # $ax_pthread_clang = yes - - - -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_CACHE_CHECK([for joinable pthread attribute], - [ax_cv_PTHREAD_JOINABLE_ATTR], - [ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $ax_pthread_attr; return attr /* ; */])], - [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], - []) - done - ]) - AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes"], - [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], - [$ax_cv_PTHREAD_JOINABLE_ATTR], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - ax_pthread_joinable_attr_defined=yes - ]) - - AC_CACHE_CHECK([whether more special flags are required for pthreads], - [ax_cv_PTHREAD_SPECIAL_FLAGS], - [ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac - ]) - AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes"], - [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes]) - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT; - return i;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) - ax_pthread_prio_inherit_defined=yes - ]) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [ - AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) - AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) - ], - [ - AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) - AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) - ] - ) - ]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" -test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" - -AC_SUBST([PTHREAD_LIBS]) -AC_SUBST([PTHREAD_CFLAGS]) -AC_SUBST([PTHREAD_CC]) -AC_SUBST([PTHREAD_CXX]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then - ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 deleted file mode 100644 index 3ef7fab5b5a..00000000000 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ /dev/null @@ -1,97 +0,0 @@ -dnl Copyright (c) 2013-2015 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -AC_DEFUN([BITCOIN_FIND_BDB48],[ - AC_ARG_VAR([BDB_CFLAGS], [C compiler flags for BerkeleyDB, bypasses autodetection]) - AC_ARG_VAR([BDB_LIBS], [Linker flags for BerkeleyDB, bypasses autodetection]) - - if test "$use_bdb" = "no"; then - use_bdb=no - elif test "$BDB_CFLAGS" = ""; then - AC_MSG_CHECKING([for Berkeley DB C++ headers]) - BDB_CPPFLAGS= - bdbpath=X - bdb48path=X - bdbdirlist= - for _vn in 4.8 48 4 5 5.3 ''; do - for _pfx in b lib ''; do - bdbdirlist="$bdbdirlist ${_pfx}db${_vn}" - done - done - for searchpath in $bdbdirlist ''; do - test -n "${searchpath}" && searchpath="${searchpath}/" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <${searchpath}db_cxx.h> - ]],[[ - #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) - #error "failed to find bdb 4.8+" - #endif - ]])],[ - if test "$bdbpath" = "X"; then - bdbpath="${searchpath}" - fi - ],[ - continue - ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <${searchpath}db_cxx.h> - ]],[[ - #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) - #error "failed to find bdb 4.8" - #endif - ]])],[ - bdb48path="${searchpath}" - break - ],[]) - done - if test "$bdbpath" = "X"; then - use_bdb=no - AC_MSG_RESULT([no]) - AC_MSG_WARN([libdb_cxx headers missing]) - AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - elif test "$bdb48path" = "X"; then - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) - AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8]) - AC_MSG_WARN([BDB (legacy) wallets opened by this build will not be portable!]) - use_bdb=yes - ],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8]) - AC_MSG_WARN([BDB (legacy) wallets opened by this build would not be portable!]) - AC_MSG_WARN([If this is intended, pass --with-incompatible-bdb]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - use_bdb=no - ]) - else - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx) - bdbpath="${bdb48path}" - use_bdb=yes - fi - else - BDB_CPPFLAGS=${BDB_CFLAGS} - fi - AC_SUBST(BDB_CPPFLAGS) - - if test "$use_bdb" = "no"; then - use_bdb=no - elif test "$BDB_LIBS" = ""; then - # TODO: Ideally this could find the library version and make sure it matches the headers being used - for searchlib in db_cxx-4.8 db_cxx db4_cxx; do - AC_CHECK_LIB([$searchlib],[main],[ - BDB_LIBS="-l${searchlib}" - break - ]) - done - if test "$BDB_LIBS" = ""; then - AC_MSG_WARN([libdb_cxx headers missing]) - AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - fi - fi - if test "$use_bdb" != "no"; then - AC_DEFINE([USE_BDB], [1], [Define if BDB support should be compiled in]) - use_bdb=yes - fi -]) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 deleted file mode 100644 index 74981278602..00000000000 --- a/build-aux/m4/bitcoin_qt.m4 +++ /dev/null @@ -1,374 +0,0 @@ -dnl Copyright (c) 2013-2016 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -dnl Helper for cases where a qt dependency is not met. -dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. -AC_DEFUN([BITCOIN_QT_FAIL],[ - if test "$bitcoin_qt_want_version" = "auto" && test "$bitcoin_qt_force" != "yes"; then - if test "$bitcoin_enable_qt" != "no"; then - AC_MSG_WARN([$1; bitcoin-qt frontend will not be built]) - fi - bitcoin_enable_qt=no - bitcoin_enable_qt_test=no - else - AC_MSG_ERROR([$1]) - fi -]) - -AC_DEFUN([BITCOIN_QT_CHECK],[ - if test "$bitcoin_enable_qt" != "no" && test "$bitcoin_qt_want_version" != "no"; then - true - $1 - else - true - $2 - fi -]) - -dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing]) -dnl Helper for finding the path of programs needed for Qt. -dnl Inputs: $1: Variable to be set -dnl Inputs: $2: List of programs to search for -dnl Inputs: $3: Look for $2 here before $PATH -dnl Inputs: $4: If "yes", don't fail if $2 is not found. -dnl Output: $1 is set to the path of $2 if found. $2 are searched in order. -AC_DEFUN([BITCOIN_QT_PATH_PROGS],[ - BITCOIN_QT_CHECK([ - if test "$3" != ""; then - AC_PATH_PROGS([$1], [$2], [], [$3]) - else - AC_PATH_PROGS([$1], [$2]) - fi - if test "$$1" = "" && test "$4" != "yes"; then - BITCOIN_QT_FAIL([$1 not found]) - fi - ]) -]) - -dnl Initialize qt input. -dnl This must be called before any other BITCOIN_QT* macros to ensure that -dnl input variables are set correctly. -dnl CAUTION: Do not use this inside of a conditional. -AC_DEFUN([BITCOIN_QT_INIT],[ - dnl enable qt support - AC_ARG_WITH([gui], - [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@], - [build bitcoin-qt GUI (default=auto)])], - [ - bitcoin_qt_want_version=$withval - if test "$bitcoin_qt_want_version" = "yes"; then - bitcoin_qt_force=yes - bitcoin_qt_want_version=auto - fi - ], - [bitcoin_qt_want_version=auto]) - - AS_IF([test "$with_gui" = "qt5_debug"], - [AS_CASE([$host], - [*darwin*], [qt_lib_suffix=_debug], - [qt_lib_suffix= ]); bitcoin_qt_want_version=qt5], - [qt_lib_suffix= ]) - - AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) - AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) - AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) - AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], []) - AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], []) - - AC_ARG_WITH([qtdbus], - [AS_HELP_STRING([--with-qtdbus], - [enable DBus support (default is yes if qt is enabled and QtDBus is found)])], - [use_dbus=$withval], - [use_dbus=auto]) - - AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) -]) - -dnl Find Qt libraries and includes. -dnl -dnl BITCOIN_QT_CONFIGURE([MINIMUM-VERSION]) -dnl -dnl Outputs: See _BITCOIN_QT_FIND_LIBS -dnl Outputs: Sets variables for all qt-related tools. -dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test -AC_DEFUN([BITCOIN_QT_CONFIGURE],[ - qt_version=">= $1" - qt_lib_prefix="Qt5" - BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS]) - - dnl This is ugly and complicated. Yuck. Works as follows: - dnl We check a header to find out whether Qt is built statically. - dnl When Qt is built statically, some plugins must be linked into - dnl the final binary as well. _BITCOIN_QT_CHECK_STATIC_PLUGIN does - dnl a quick link-check and appends the results to QT_LIBS. - BITCOIN_QT_CHECK([ - TEMP_CPPFLAGS=$CPPFLAGS - TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS" - _BITCOIN_QT_IS_STATIC - if test "$bitcoin_cv_static_qt" = "yes"; then - _BITCOIN_QT_CHECK_STATIC_LIBS - - if test "$qt_plugin_path" != ""; then - if test -d "$qt_plugin_path/platforms"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" - fi - if test -d "$qt_plugin_path/styles"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/styles" - fi - if test -d "$qt_plugin_path/accessible"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" - fi - fi - - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) - AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists]) - if test "$TARGET_OS" = "windows"; then - dnl Linking against wtsapi32 is required. See #17749 and - dnl https://bugreports.qt.io/browse/QTBUG-27097. - AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])]) - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows]) - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle]) - AC_DEFINE([QT_QPA_PLATFORM_WINDOWS], [1], [Define this symbol if the qt platform is windows]) - elif test "$TARGET_OS" = "linux"; then - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb]) - AC_DEFINE([QT_QPA_PLATFORM_XCB], [1], [Define this symbol if the qt platform is xcb]) - elif test "$TARGET_OS" = "darwin"; then - AX_CHECK_LINK_FLAG([-framework Carbon], [QT_LIBS="$QT_LIBS -framework Carbon"], [AC_MSG_ERROR(could not link against Carbon framework)]) - AX_CHECK_LINK_FLAG([-framework IOSurface], [QT_LIBS="$QT_LIBS -framework IOSurface"], [AC_MSG_ERROR(could not link against IOSurface framework)]) - AX_CHECK_LINK_FLAG([-framework Metal], [QT_LIBS="$QT_LIBS -framework Metal"], [AC_MSG_ERROR(could not link against Metal framework)]) - AX_CHECK_LINK_FLAG([-framework QuartzCore], [QT_LIBS="$QT_LIBS -framework QuartzCore"], [AC_MSG_ERROR(could not link against QuartzCore framework)]) - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) - AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa]) - fi - fi - CPPFLAGS=$TEMP_CPPFLAGS - CXXFLAGS=$TEMP_CXXFLAGS - ]) - - if test "$qt_bin_path" = ""; then - qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`" - fi - - if test "$use_hardening" != "no"; then - BITCOIN_QT_CHECK([ - AC_MSG_CHECKING([whether -fPIE can be used with this Qt config]) - TEMP_CPPFLAGS=$CPPFLAGS - TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if defined(QT_REDUCE_RELOCATIONS) - choke - #endif - ]])], - [ AC_MSG_RESULT([yes]); QT_PIE_FLAGS=$PIE_FLAGS ], - [ AC_MSG_RESULT([no]); QT_PIE_FLAGS=$PIC_FLAGS] - ) - CPPFLAGS=$TEMP_CPPFLAGS - CXXFLAGS=$TEMP_CXXFLAGS - ]) - else - BITCOIN_QT_CHECK([ - AC_MSG_CHECKING([whether -fPIC is needed with this Qt config]) - TEMP_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if defined(QT_REDUCE_RELOCATIONS) - choke - #endif - ]])], - [ AC_MSG_RESULT([no])], - [ AC_MSG_RESULT([yes]); QT_PIE_FLAGS=$PIC_FLAGS] - ) - CPPFLAGS=$TEMP_CPPFLAGS - ]) - fi - - BITCOIN_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path) - BITCOIN_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path) - BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path) - BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path) - BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes) - BITCOIN_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes) - - MOC_DEFS='-I$(srcdir)' - case $host in - *darwin*) - BITCOIN_QT_CHECK([ - MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC" - base_frameworks="-framework Foundation -framework AppKit" - AX_CHECK_LINK_FLAG([$base_frameworks], [QT_LIBS="$QT_LIBS $base_frameworks"], [AC_MSG_ERROR(could not find base frameworks)]) - ]) - ;; - *mingw*) - BITCOIN_QT_CHECK([ - AX_CHECK_LINK_FLAG([-mwindows], [QT_LDFLAGS="$QT_LDFLAGS -mwindows"], [AC_MSG_WARN([-mwindows linker support not detected])]) - ]) - esac - - - dnl enable qt support - AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI]) - BITCOIN_QT_CHECK([ - bitcoin_enable_qt=yes - bitcoin_enable_qt_test=yes - if test "$have_qt_test" = "no"; then - bitcoin_enable_qt_test=no - fi - bitcoin_enable_qt_dbus=no - if test "$use_dbus" != "no" && test "$have_qt_dbus" = "yes"; then - bitcoin_enable_qt_dbus=yes - fi - if test "$use_dbus" = "yes" && test "$have_qt_dbus" = "no"; then - AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.]) - fi - if test "$LUPDATE" = ""; then - AC_MSG_WARN([lupdate tool is required to update Qt translations.]) - fi - if test "$LCONVERT" = ""; then - AC_MSG_WARN([lconvert tool is required to update Qt translations.]) - fi - ],[ - bitcoin_enable_qt=no - ]) - if test $bitcoin_enable_qt = "yes"; then - AC_MSG_RESULT([$bitcoin_enable_qt ($qt_lib_prefix)]) - else - AC_MSG_RESULT([$bitcoin_enable_qt]) - fi - - AC_SUBST(QT_PIE_FLAGS) - AC_SUBST(QT_INCLUDES) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_LDFLAGS) - AC_SUBST(QT_DBUS_INCLUDES) - AC_SUBST(QT_TEST_INCLUDES) - AC_SUBST(QT_SELECT, qt5) - AC_SUBST(MOC_DEFS) -]) - -dnl All macros below are internal and should _not_ be used from configure.ac. - -dnl Internal. Check if the linked version of Qt was built statically. -dnl -dnl _BITCOIN_QT_IS_STATIC -dnl --------------------- -dnl -dnl Requires: INCLUDES and LIBS must be populated as necessary. -dnl Output: bitcoin_cv_static_qt=yes|no -AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ - AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if !defined(QT_STATIC) - choke - #endif - ]])], - [bitcoin_cv_static_qt=yes], - [bitcoin_cv_static_qt=no]) - ]) -]) - -dnl Internal. Check if the link-requirements for a static plugin are met. -dnl -dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN(PLUGIN, LIBRARIES) -dnl -------------------------------------------------- -dnl -dnl Requires: INCLUDES and LIBS must be populated as necessary. -dnl Inputs: $1: A static plugin name. -dnl Inputs: $2: The libraries that resolve $1. -dnl Output: QT_LIBS is prepended or configure exits. -AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGIN], [ - AC_MSG_CHECKING([for $1 ($2)]) - CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS" - LIBS="$2${qt_lib_suffix} $QT_LIBS $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - Q_IMPORT_PLUGIN($1) - ]])], - [AC_MSG_RESULT([yes]); QT_LIBS="$2${qt_lib_suffix} $QT_LIBS"], - [AC_MSG_RESULT([no]); BITCOIN_QT_FAIL([$1 not found.])]) - LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" -]) - -dnl Internal. Check Qt static libs with PKG_CHECK_MODULES. -dnl -dnl _BITCOIN_QT_CHECK_STATIC_LIBS -dnl ----------------------------- -dnl -dnl Outputs: QT_LIBS is prepended. -AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [ - PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"]) - if test "$TARGET_OS" = "linux"; then - PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "darwin"; then - PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "windows"; then - PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"]) - fi -]) - -dnl Internal. Find Qt libraries using pkg-config. -dnl -dnl _BITCOIN_QT_FIND_LIBS -dnl --------------------- -dnl -dnl Outputs: All necessary QT_* variables are set. -dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. -AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[ - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_CORE_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_CORE_LIBS $QT_LIBS"], - [BITCOIN_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])]) - ]) - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_GUI_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_GUI_LIBS $QT_LIBS"], - [BITCOIN_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])]) - ]) - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_WIDGETS_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_WIDGETS_LIBS $QT_LIBS"], - [BITCOIN_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])]) - ]) - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_NETWORK_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_NETWORK_LIBS $QT_LIBS"], - [BITCOIN_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])]) - ]) - - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test${qt_lib_suffix} $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) - if test "$use_dbus" != "no"; then - PKG_CHECK_MODULES([QT_DBUS], [${qt_lib_prefix}DBus $qt_version], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no]) - fi - ]) -]) diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4 deleted file mode 100644 index 736270afea5..00000000000 --- a/build-aux/m4/bitcoin_subdir_to_include.m4 +++ /dev/null @@ -1,18 +0,0 @@ -dnl Copyright (c) 2013-2014 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE]) -dnl SUBDIRECTORY-NAME must end with a path separator -AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[ - if test "$2" = ""; then - AC_MSG_RESULT([default]) - else - echo "#include <$2$3.h>" >conftest.cpp - newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`] - AC_MSG_RESULT([${newinclpath}]) - if test "${newinclpath}" != ""; then - eval "$1=\"\$$1\"' -I${newinclpath}'" - fi - fi -]) diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 deleted file mode 100644 index 859ddaabbb4..00000000000 --- a/build-aux/m4/l_atomic.m4 +++ /dev/null @@ -1,65 +0,0 @@ -dnl Copyright (c) 2015 Tim Kosse -dnl Copying and distribution of this file, with or without modification, are -dnl permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. This file is offered as-is, without any -dnl warranty. - -# Clang, when building for 32-bit, -# and linking against libstdc++, requires linking with -# -latomic if using the C++ atomic library. -# Can be tested with: clang++ -std=c++20 test.cpp -m32 -# -# Sourced from http://bugs.debian.org/797228 - -m4_define([_CHECK_ATOMIC_testbody], [[ - #include - #include - #include - - using namespace std::chrono_literals; - - int main() { - std::atomic lock{true}; - lock.exchange(false); - - std::atomic t{0s}; - t.store(2s); - auto t1 = t.load(); - t.compare_exchange_strong(t1, 3s); - - std::atomic d{}; - d.store(3.14); - auto d1 = d.load(); - - std::atomic a{}; - int64_t v = 5; - int64_t r = a.fetch_add(v); - return static_cast(r); - } -]]) - -AC_DEFUN([CHECK_ATOMIC], [ - - AC_LANG_PUSH(C++) - TEMP_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" - - AC_MSG_CHECKING([whether std::atomic can be used without link library]) - - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - LIBS="$LIBS -latomic" - AC_MSG_CHECKING([whether std::atomic needs -latomic]) - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([cannot figure out how to use std::atomic]) - ]) - ]) - - CXXFLAGS="$TEMP_CXXFLAGS" - AC_LANG_POP -]) diff --git a/build-aux/m4/l_socket.m4 b/build-aux/m4/l_socket.m4 deleted file mode 100644 index 38923a98fc9..00000000000 --- a/build-aux/m4/l_socket.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Illumos/SmartOS requires linking with -lsocket if -# using getifaddrs & freeifaddrs - -m4_define([_CHECK_SOCKET_testbody], [[ - #include - #include - - int main() { - struct ifaddrs *ifaddr; - getifaddrs(&ifaddr); - freeifaddrs(ifaddr); - } -]]) - -AC_DEFUN([CHECK_SOCKET], [ - - AC_LANG_PUSH(C++) - - AC_MSG_CHECKING([whether ifaddrs funcs can be used without link library]) - - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - LIBS="$LIBS -lsocket" - AC_MSG_CHECKING([whether getifaddrs needs -lsocket]) - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([cannot figure out how to use getifaddrs]) - ]) - ]) - - AC_LANG_POP -]) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 4221a58a216..00000000000 --- a/configure.ac +++ /dev/null @@ -1,1759 +0,0 @@ -AC_PREREQ([2.69]) -define(_CLIENT_VERSION_MAJOR, 28) -define(_CLIENT_VERSION_MINOR, 99) -define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 0) -define(_CLIENT_VERSION_IS_RELEASE, false) -define(_COPYRIGHT_YEAR, 2024) -define(_COPYRIGHT_HOLDERS,[The %s developers]) -define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) -AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/]) -AC_CONFIG_SRCDIR([src/validation.cpp]) -AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([build-aux/m4]) - -m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])]) -PKG_PROG_PKG_CONFIG -if test "$PKG_CONFIG" = ""; then - AC_MSG_ERROR([pkg-config not found]) -fi - -# When compiling with depends, the `PKG_CONFIG_PATH` and `PKG_CONFIG_LIBDIR` variables, -# being set in a `config.site` file, are not exported to let the `--config-cache` option -# work properly. -if test -n "$PKG_CONFIG_PATH"; then - PKG_CONFIG="env PKG_CONFIG_PATH=$PKG_CONFIG_PATH $PKG_CONFIG" -fi -if test -n "$PKG_CONFIG_LIBDIR"; then - PKG_CONFIG="env PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR $PKG_CONFIG" -fi - -BITCOIN_DAEMON_NAME=bitcoind -BITCOIN_GUI_NAME=bitcoin-qt -BITCOIN_TEST_NAME=test_bitcoin -BITCOIN_CLI_NAME=bitcoin-cli -BITCOIN_TX_NAME=bitcoin-tx -BITCOIN_UTIL_NAME=bitcoin-util -BITCOIN_CHAINSTATE_NAME=bitcoin-chainstate -BITCOIN_WALLET_TOOL_NAME=bitcoin-wallet -dnl Multi Process -BITCOIN_MP_NODE_NAME=bitcoin-node -BITCOIN_MP_GUI_NAME=bitcoin-gui - -dnl Unless the user specified ARFLAGS, force it to be cr -dnl This is also the default as-of libtool 2.4.7 -AC_ARG_VAR([ARFLAGS], [Flags for the archiver, defaults to if not set]) -if test "${ARFLAGS+set}" != "set"; then - ARFLAGS="cr" -fi - -AC_CANONICAL_HOST - -AH_TOP([#ifndef BITCOIN_CONFIG_H]) -AH_TOP([#define BITCOIN_CONFIG_H]) -AH_BOTTOM([#endif //BITCOIN_CONFIG_H]) - -dnl Automake init set-up and checks -AM_INIT_AUTOMAKE([1.13 no-define subdir-objects foreign]) - -AM_MAINTAINER_MODE([enable]) - -dnl make the compilation flags quiet unless V=1 is used -AM_SILENT_RULES([yes]) - -dnl Compiler checks (here before libtool). -if test "${CXXFLAGS+set}" = "set"; then - CXXFLAGS_overridden=yes -else - CXXFLAGS_overridden=no -fi -AC_PROG_CXX - -dnl libtool overrides -case $host in - *mingw*) - dnl By default, libtool for mingw refuses to link static libs into a dll for - dnl fear of mixing pic/non-pic objects, and import/export complications. Since - dnl we have those under control, re-enable that functionality. - lt_cv_deplibs_check_method="pass_all" - - dnl Remove unwanted -DDLL_EXPORT from these variables. - dnl We do not use this macro, but system headers may export unwanted symbols - dnl if it's set. - lt_cv_prog_compiler_pic="-DPIC" - lt_cv_prog_compiler_pic_CXX="-DPIC" - ;; - *darwin*) - dnl Because it prints a verbose warning, lld fails the following check - dnl for "-Wl,-single_module" from libtool.m4: - dnl # If there is a non-empty error log, and "single_module" - dnl # appears in it, assume the flag caused a linker warning - dnl "-single_module" works fine on ld64 and lld, so just bypass the test. - dnl Failure to set this to "yes" causes libtool to use a very broken - dnl link-line for shared libs. - lt_cv_apple_cc_single_mod="yes" - ;; -esac - -dnl Require C++20 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory]) - -dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures -dnl that we get the same -std flags for both. -m4_ifdef([AC_PROG_OBJCXX],[ -if test "${OBJCXX+set}" = ""; then - OBJCXX="${CXX}" -fi -AC_PROG_OBJCXX -]) - -dnl OpenBSD ships with 2.4.2 -LT_PREREQ([2.4.2]) -dnl Libtool init checks. -LT_INIT([pic-only win32-dll]) - -dnl Check/return PATH for base programs. -AC_PATH_TOOL([AR], [ar]) -AC_PATH_TOOL([GCOV], [gcov]) -AC_PATH_TOOL([LLVM_COV], [llvm-cov]) -AC_PATH_PROG([LCOV], [lcov]) -dnl The minimum supported version is specified in .python-version and should be used if available, see doc/dependencies.md -AC_PATH_PROGS([PYTHON], [python3.9 python3.10 python3.11 python3.12 python3 python]) -AC_PATH_PROG([GENHTML], [genhtml]) -AC_PATH_PROG([GIT], [git]) -AC_PATH_PROG([CCACHE], [ccache]) -AC_PATH_PROG([XGETTEXT], [xgettext]) -AC_PATH_PROG([HEXDUMP], [hexdump]) -AC_PATH_TOOL([OBJDUMP], [objdump]) -AC_PATH_TOOL([OBJCOPY], [objcopy]) -AC_PATH_PROG([DOXYGEN], [doxygen]) -AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) - -AC_ARG_ENABLE([wallet], - [AS_HELP_STRING([--disable-wallet], - [disable wallet (enabled by default)])], - [enable_wallet=$enableval], - [enable_wallet=auto]) - -AC_ARG_WITH([sqlite], - [AS_HELP_STRING([--with-sqlite=yes|no|auto], - [enable sqlite wallet support (default: auto, i.e., enabled if wallet is enabled and sqlite is found)])], - [use_sqlite=$withval], - [use_sqlite=auto]) - -AC_ARG_WITH([bdb], - [AS_HELP_STRING([--without-bdb], - [disable bdb wallet support (default is enabled if wallet is enabled)])], - [use_bdb=$withval], - [use_bdb=auto]) - -AC_ARG_ENABLE([usdt], - [AS_HELP_STRING([--enable-usdt], - [enable tracepoints for Userspace, Statically Defined Tracing (default is yes if sys/sdt.h is found)])], - [use_usdt=$enableval], - [use_usdt=yes]) - -AC_ARG_WITH([miniupnpc], - [AS_HELP_STRING([--with-miniupnpc], - [enable UPNP (default is yes if libminiupnpc is found)])], - [use_upnp=$withval], - [use_upnp=auto]) - -AC_ARG_WITH([natpmp], - [AS_HELP_STRING([--with-natpmp], - [enable NAT-PMP (default is yes if libnatpmp is found)])], - [use_natpmp=$withval], - [use_natpmp=auto]) - -AC_ARG_ENABLE(tests, - AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]), - [use_tests=$enableval], - [use_tests=yes]) - -AC_ARG_ENABLE(gui-tests, - AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]), - [use_gui_tests=$enableval], - [use_gui_tests=$use_tests]) - -AC_ARG_ENABLE(bench, - AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]), - [use_bench=$enableval], - [use_bench=yes]) - -AC_ARG_ENABLE([extended-functional-tests], - AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]), - [use_extended_functional_tests=$enableval], - [use_extended_functional_tests=no]) - -AC_ARG_ENABLE([fuzz], - AS_HELP_STRING([--enable-fuzz], - [build for fuzzing (default no). enabling this will disable all other targets and override --{enable,disable}-fuzz-binary]), - [enable_fuzz=$enableval], - [enable_fuzz=no]) - -AC_ARG_ENABLE([fuzz-binary], - AS_HELP_STRING([--enable-fuzz-binary], - [enable building of fuzz binary (default yes).]), - [enable_fuzz_binary=$enableval], - [enable_fuzz_binary=yes]) - -AC_ARG_WITH([qrencode], - [AS_HELP_STRING([--with-qrencode], - [enable QR code support (default is yes if qt is enabled and libqrencode is found)])], - [use_qr=$withval], - [use_qr=auto]) - -AC_ARG_ENABLE([hardening], - [AS_HELP_STRING([--disable-hardening], - [do not attempt to harden the resulting executables (default is to harden)])], - [use_hardening=$enableval], - [use_hardening=yes]) - -AC_ARG_ENABLE([reduce-exports], - [AS_HELP_STRING([--enable-reduce-exports], - [attempt to reduce exported symbols in the resulting executables (default is no)])], - [use_reduce_exports=$enableval], - [use_reduce_exports=no]) - -AC_ARG_ENABLE([ccache], - [AS_HELP_STRING([--disable-ccache], - [do not use ccache for building (default is to use if found)])], - [use_ccache=$enableval], - [use_ccache=auto]) - -dnl Suppress warnings from external headers (e.g. Boost, Qt). -dnl May be useful if warnings from external headers clutter the build output -dnl too much, so that it becomes difficult to spot Bitcoin Core warnings -dnl or if they cause a build failure with --enable-werror. -AC_ARG_ENABLE([suppress-external-warnings], - [AS_HELP_STRING([--disable-suppress-external-warnings], - [Do not suppress warnings from external headers (default is to suppress)])], - [suppress_external_warnings=$enableval], - [suppress_external_warnings=yes]) - -AC_ARG_ENABLE([lcov], - [AS_HELP_STRING([--enable-lcov], - [enable lcov testing (default is no)])], - [use_lcov=$enableval], - [use_lcov=no]) - -AC_ARG_ENABLE([zmq], - [AS_HELP_STRING([--disable-zmq], - [disable ZMQ notifications])], - [use_zmq=$enableval], - [use_zmq=yes]) - -AC_ARG_WITH([libmultiprocess], - [AS_HELP_STRING([--with-libmultiprocess=yes|no|auto], - [Build with libmultiprocess library. (default: auto, i.e. detect with pkg-config)])], - [with_libmultiprocess=$withval], - [with_libmultiprocess=auto]) - -AC_ARG_WITH([mpgen], - [AS_HELP_STRING([--with-mpgen=yes|no|auto|PREFIX], - [Build with libmultiprocess codegen tool. Useful to specify different libmultiprocess host system library and build system codegen tool prefixes when cross-compiling (default is host system libmultiprocess prefix)])], - [with_mpgen=$withval], - [with_mpgen=auto]) - -AC_ARG_ENABLE([multiprocess], - [AS_HELP_STRING([--enable-multiprocess], - [build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental (default is no)])], - [enable_multiprocess=$enableval], - [enable_multiprocess=no]) - -AC_ARG_ENABLE(man, - [AS_HELP_STRING([--disable-man], - [do not install man pages (default is to install)])],, - enable_man=yes) -AM_CONDITIONAL([ENABLE_MAN], [test "$enable_man" != "no"]) - -dnl Enable debug -AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [use compiler flags and macros suited for debugging (default is no)])], - [enable_debug=$enableval], - [enable_debug=no]) - -dnl Enable different -fsanitize options -AC_ARG_WITH([sanitizers], - [AS_HELP_STRING([--with-sanitizers], - [comma separated list of extra sanitizers to build with (default is none enabled)])], - [use_sanitizers=$withval]) - -dnl Turn warnings into errors -AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--enable-werror], - [Treat compiler warnings as errors (default is no)])], - [enable_werror=$enableval], - [enable_werror=no]) - -AC_ARG_ENABLE([external-signer], - [AS_HELP_STRING([--enable-external-signer],[compile external signer support (default is yes)])], - [use_external_signer=$enableval], - [use_external_signer=yes]) - -AC_LANG_PUSH([C++]) - -dnl Always set -g -O2 in our CXXFLAGS. Autoconf will try and set CXXFLAGS to "-g -O2" by default, -dnl so we suppress that (if CXXFLAGS hasn't been overridden by the user), given we are adding it -dnl ourselves. -CORE_CXXFLAGS="$CORE_CXXFLAGS -g -O2" - -if test "$CXXFLAGS_overridden" = "no"; then - CXXFLAGS="" -fi - -dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may -dnl appear to succeed because by default they merely emit warnings when they fail. -dnl -dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if -dnl a compile with -Werror can succeed. This is important because the compiler may already be -dnl warning about something unrelated, for example about some path issue. If that is the case, -dnl -Werror cannot be used because all of those warnings would be turned into errors. -AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAG_WERROR="-Werror"], [CXXFLAG_WERROR=""]) - -dnl Check for a flag to turn linker warnings into errors. When flags are passed to linkers via the -dnl compiler driver using a -Wl,-foo flag, linker warnings may be swallowed rather than bubbling up. -dnl See note above, the same applies here as well. -dnl -dnl LDFLAG_WERROR Should only be used when testing -Wl,* -case $host in - *darwin*) - AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [LDFLAG_WERROR="-Wl,-fatal_warnings"], [LDFLAG_WERROR=""]) - ;; - *) - AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [LDFLAG_WERROR="-Wl,--fatal-warnings"], [LDFLAG_WERROR=""]) - ;; -esac - -if test "$enable_debug" = "yes"; then - - dnl Disable all optimizations - AX_CHECK_COMPILE_FLAG([-O0], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"], [], [$CXXFLAG_WERROR]) - - dnl Prefer -g3, fall back to -g if that is unavailable. - AX_CHECK_COMPILE_FLAG( - [-g3], - [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"], - [AX_CHECK_COMPILE_FLAG([-g], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"], [], [$CXXFLAG_WERROR])], - [$CXXFLAG_WERROR]) - - AX_CHECK_PREPROC_FLAG([-DDEBUG], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKCONTENTION], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKCONTENTION"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DRPC_DOC_CHECK], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DRPC_DOC_CHECK"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR]) -fi - -if test "$use_sanitizers" != ""; then - dnl First check if the compiler accepts flags. If an incompatible pair like - dnl -fsanitize=address,thread is used here, this check will fail. This will also - dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined - AX_CHECK_COMPILE_FLAG( - [-fsanitize=$use_sanitizers], - [SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers" - SANITIZER_CFLAGS="-fsanitize=$use_sanitizers"], - [AC_MSG_ERROR([compiler did not accept requested flags])]) - - dnl Some compilers (e.g. GCC) require additional libraries like libasan, - dnl libtsan, libubsan, etc. Make sure linking still works with the sanitize - dnl flag. This is a separate check so we can give a better error message when - dnl the sanitize flags are supported by the compiler but the actual sanitizer - dnl libs are missing. - AX_CHECK_LINK_FLAG( - [-fsanitize=$use_sanitizers], - [SANITIZER_LDFLAGS="-fsanitize=$use_sanitizers"], - [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])], - [], - [AC_LANG_PROGRAM([[ - #include - #include - extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; } - __attribute__((weak)) // allow for libFuzzer linking - ]],[[]])]) -fi - -ERROR_CXXFLAGS= -if test "$enable_werror" = "yes"; then - if test "$CXXFLAG_WERROR" = ""; then - AC_MSG_ERROR([enable-werror set but -Werror is not usable]) - fi - ERROR_CXXFLAGS=$CXXFLAG_WERROR -fi - -AX_CHECK_COMPILE_FLAG([-Wall], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wextra], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wgnu], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"], [], [$CXXFLAG_WERROR]) -dnl some compilers will ignore -Wformat-security without -Wformat, so just combine the two here. -AX_CHECK_COMPILE_FLAG([-Wformat -Wformat-security], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat -Wformat-security"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wvla], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wshadow-field], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wthread-safety], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wloop-analysis"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wunused-member-function], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wdate-time], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wconditional-uninitialized], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wconditional-uninitialized"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-branches"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wimplicit-fallthrough"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wself-assign], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wself-assign"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-Wundef], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wundef"], [], [$CXXFLAG_WERROR]) - -dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all -dnl unknown options if any other warning is produced. Test the -Wfoo case, and -dnl set the -Wno-foo case if it works. -AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"], [], [$CXXFLAG_WERROR]) - -dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. -AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR]) - -dnl Currently all versions of gcc are subject to a class of bugs, see the -dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and -dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set -dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) -AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"]) - -enable_arm_crc=no -enable_arm_shani=no -enable_sse42=no -enable_sse41=no -enable_avx2=no -enable_x86_shani=no - -dnl Check for optional instruction set support. Enabling these does _not_ imply that all code will -dnl be compiled with them, rather that specific objects/libs may use them after checking for runtime -dnl compatibility. - -dnl x86 -AX_CHECK_COMPILE_FLAG([-msse4.2], [SSE42_CXXFLAGS="-msse4.2"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_CXXFLAGS="-msse4.1"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-mavx -mavx2], [AVX2_CXXFLAGS="-mavx -mavx2"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-msse4 -msha], [X86_SHANI_CXXFLAGS="-msse4 -msha"], [], [$CXXFLAG_WERROR]) - -enable_clmul= -AX_CHECK_COMPILE_FLAG([-mpclmul], [enable_clmul=yes], [], [$CXXFLAG_WERROR], [AC_LANG_PROGRAM([ - #include - #include -], [ - __m128i a = _mm_cvtsi64_si128((uint64_t)7); - __m128i b = _mm_clmulepi64_si128(a, a, 37); - __m128i c = _mm_srli_epi64(b, 41); - __m128i d = _mm_xor_si128(b, c); - uint64_t e = _mm_cvtsi128_si64(d); - return e == 0; -])]) - -if test "$enable_clmul" = "yes"; then - CLMUL_CXXFLAGS="-mpclmul" - AC_DEFINE([HAVE_CLMUL], [1], [Define this symbol if clmul instructions can be used]) -fi - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$SSE42_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for SSE4.2 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if defined(_MSC_VER) - #include - #elif defined(__GNUC__) && defined(__SSE4_2__) - #include - #endif - ]],[[ - uint64_t l = 0; - l = _mm_crc32_u8(l, 0); - l = _mm_crc32_u32(l, 0); - l = _mm_crc32_u64(l, 0); - return l; - ]])], - [ AC_MSG_RESULT([yes]); enable_sse42=yes], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$SSE41_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for SSE4.1 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - ]],[[ - __m128i a = _mm_set1_epi32(0); - __m128i b = _mm_set1_epi32(1); - __m128i r = _mm_blend_epi16(a, b, 0xFF); - return _mm_extract_epi32(r, 3); - ]])], - [ AC_MSG_RESULT([yes]); enable_sse41=yes; AC_DEFINE([ENABLE_SSE41], [1], [Define this symbol to build code that uses SSE4.1 intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for AVX2 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - __m256i l = _mm256_set1_epi32(0); - return _mm256_extract_epi32(l, 7); - ]])], - [ AC_MSG_RESULT([yes]); enable_avx2=yes; AC_DEFINE([ENABLE_AVX2], [1], [Define this symbol to build code that uses AVX2 intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$X86_SHANI_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for x86 SHA-NI intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - __m128i i = _mm_set1_epi32(0); - __m128i j = _mm_set1_epi32(1); - __m128i k = _mm_set1_epi32(2); - return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, i, k), 0); - ]])], - [ AC_MSG_RESULT([yes]); enable_x86_shani=yes; AC_DEFINE([ENABLE_X86_SHANI], [1], [Define this symbol to build code that uses x86 SHA-NI intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -# ARM -AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR]) - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for ARMv8 CRC32 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ -#ifdef __aarch64__ - __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0); - vmull_p64(0, 0); -#else -#error "crc32c library does not support hardware acceleration on 32-bit ARM" -#endif - ]])], - [ AC_MSG_RESULT([yes]); enable_arm_crc=yes; ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$ARM_SHANI_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for ARMv8 SHA-NI intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - uint32x4_t a, b, c; - vsha256h2q_u32(a, b, c); - vsha256hq_u32(a, b, c); - vsha256su0q_u32(a, b); - vsha256su1q_u32(a, b, c); - ]])], - [ AC_MSG_RESULT([yes]); enable_arm_shani=yes; AC_DEFINE([ENABLE_ARM_SHANI], [1], [Define this symbol to build code that uses ARMv8 SHA-NI intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO" - -AC_ARG_WITH([utils], - [AS_HELP_STRING([--with-utils], - [build bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet (default=yes)])], - [build_bitcoin_utils=$withval], - [build_bitcoin_utils=yes]) - -AC_ARG_ENABLE([util-cli], - [AS_HELP_STRING([--enable-util-cli], - [build bitcoin-cli])], - [build_bitcoin_cli=$enableval], - [build_bitcoin_cli=$build_bitcoin_utils]) - -AC_ARG_ENABLE([util-tx], - [AS_HELP_STRING([--enable-util-tx], - [build bitcoin-tx])], - [build_bitcoin_tx=$enableval], - [build_bitcoin_tx=$build_bitcoin_utils]) - -AC_ARG_ENABLE([util-wallet], - [AS_HELP_STRING([--enable-util-wallet], - [build bitcoin-wallet])], - [build_bitcoin_wallet=$enableval], - [build_bitcoin_wallet=$build_bitcoin_utils]) - -AC_ARG_ENABLE([util-util], - [AS_HELP_STRING([--enable-util-util], - [build bitcoin-util])], - [build_bitcoin_util=$enableval], - [build_bitcoin_util=$build_bitcoin_utils]) - -AC_ARG_ENABLE([experimental-util-chainstate], - [AS_HELP_STRING([--enable-experimental-util-chainstate], - [build experimental bitcoin-chainstate executable (default=no)])], - [build_bitcoin_chainstate=$enableval], - [build_bitcoin_chainstate=no]) - -AC_ARG_WITH([experimental-kernel-lib], - [AS_HELP_STRING([--with-experimental-kernel-lib], - [build experimental bitcoinkernel library (default is to build if we're building the experimental build-chainstate executable)])], - [build_experimental_kernel_lib=$withval], - [build_experimental_kernel_lib=auto]) - -AC_ARG_WITH([daemon], - [AS_HELP_STRING([--with-daemon], - [build bitcoind daemon (default=yes)])], - [build_bitcoind=$withval], - [build_bitcoind=yes]) - -case $host in - *mingw*) - TARGET_OS=windows - AC_CHECK_LIB([kernel32], [GetModuleFileNameA], [], [AC_MSG_ERROR([libkernel32 missing])]) - AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])]) - AC_CHECK_LIB([gdi32], [main], [], [AC_MSG_ERROR([libgdi32 missing])]) - AC_CHECK_LIB([comdlg32], [main], [], [AC_MSG_ERROR([libcomdlg32 missing])]) - AC_CHECK_LIB([winmm], [main], [], [AC_MSG_ERROR([libwinmm missing])]) - AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])]) - AC_CHECK_LIB([comctl32], [main], [], [AC_MSG_ERROR([libcomctl32 missing])]) - AC_CHECK_LIB([ole32], [CoCreateInstance], [], [AC_MSG_ERROR([libole32 missing])]) - AC_CHECK_LIB([oleaut32], [main], [], [AC_MSG_ERROR([liboleaut32 missing])]) - AC_CHECK_LIB([uuid], [main], [], [AC_MSG_ERROR([libuuid missing])]) - AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])]) - AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])]) - AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])]) - AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])]) - - dnl -static is interpreted by libtool, where it has a different meaning. - dnl In libtool-speak, it's -all-static. - AX_CHECK_LINK_FLAG([-static], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"]) - - AC_PATH_PROG([MAKENSIS], [makensis], [none]) - if test "$MAKENSIS" = "none"; then - AC_MSG_WARN([makensis not found. Cannot create installer.]) - fi - - AC_PATH_TOOL([WINDRES], [windres], [none]) - if test "$WINDRES" = "none"; then - AC_MSG_ERROR([windres not found]) - fi - - CORE_CPPFLAGS="$CORE_CPPFLAGS -DSECP256K1_STATIC" - - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" - dnl Prevent the definition of min/max macros. - dnl We always want to use the standard library. - CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX" - - dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. - dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override - dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are - dnl also overridden to prevent their insertion later. - dnl This should only affect dll's. - archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" - postdeps_CXX= - - dnl We require Windows 7 (NT 6.1) or later - AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [$LDFLAG_WERROR]) - - dnl Avoid the use of aligned vector instructions when building for Windows. - dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412. - AX_CHECK_COMPILE_FLAG([-Wa,-muse-unaligned-vector-move], [CORE_CXXFLAGS="$CORE_CXXFLAGS -Wa,-muse-unaligned-vector-move"], [], [$CXXFLAG_WERROR]) - ;; - *darwin*) - TARGET_OS=darwin - if test $cross_compiling != "yes"; then - BUILD_OS=darwin - - AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR]) - - AC_CHECK_PROG([BREW], [brew], [brew]) - if test "$BREW" = "brew"; then - dnl These Homebrew packages may be keg-only, meaning that they won't be found - dnl in expected paths because they may conflict with system files. Ask - dnl Homebrew where each one is located, then adjust paths accordingly. - dnl It's safe to add these paths even if the functionality is disabled by - dnl the user (--without-wallet or --without-gui for example). - - dnl Homebrew may create symlinks in /usr/local/include for some packages. - dnl Because MacOS's clang internally adds "-I /usr/local/include" to its search - dnl paths, this will negate efforts to use -isystem for those packages, as they - dnl will be found first in /usr/local. Use the internal "-internal-isystem" - dnl option to system-ify all /usr/local/include paths without adding it to the list - dnl of search paths in case it's not already there. - if test "$suppress_external_warnings" != "no"; then - AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem -Xclang /usr/local/include/], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem -Xclang /usr/local/include/"], [], [$CXXFLAG_WERROR]) - fi - - if test "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then - bdb_prefix=$($BREW --prefix berkeley-db@4 2>/dev/null) - dnl This must precede the call to BITCOIN_FIND_BDB48 below. - BDB_CFLAGS="-I$bdb_prefix/include" - BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8" - fi - - if $BREW list --versions qt@5 >/dev/null; then - export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH" - fi - - case $host in - *aarch64*) - dnl The preferred Homebrew prefix for Apple Silicon is /opt/homebrew. - dnl Therefore, as we do not use pkg-config to detect miniupnpc and libnatpmp - dnl packages, we should set the CPPFLAGS and LDFLAGS variables for them - dnl explicitly. - if test "$use_upnp" != "no" && $BREW list --versions miniupnpc >/dev/null; then - miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null) - if test "$suppress_external_warnings" != "no"; then - MINIUPNPC_CPPFLAGS="-isystem $miniupnpc_prefix/include" - else - MINIUPNPC_CPPFLAGS="-I$miniupnpc_prefix/include" - fi - MINIUPNPC_LIBS="-L$miniupnpc_prefix/lib" - fi - if test "$use_natpmp" != "no" && $BREW list --versions libnatpmp >/dev/null; then - libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null) - if test "$suppress_external_warnings" != "no"; then - NATPMP_CPPFLAGS="-isystem $libnatpmp_prefix/include" - else - NATPMP_CPPFLAGS="-I$libnatpmp_prefix/include" - fi - NATPMP_LIBS="-L$libnatpmp_prefix/lib" - fi - ;; - esac - fi - else - case $build_os in - *darwin*) - BUILD_OS=darwin - ;; - *) - AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil]) - AC_PATH_PROG([ZIP], [zip], [zip]) - - dnl libtool will try to strip the static lib, which is a problem for - dnl cross-builds because strip attempts to call a hard-coded ld, - dnl which may not exist in the path. Stripping the .a is not - dnl necessary, so just disable it. - old_striplib= - ;; - esac - fi - - CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" - - dnl ignore deprecated-declarations warnings coming from objcxx code - dnl "'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0". - OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" - ;; - *linux*) - TARGET_OS=linux - ;; -esac - -if test "$use_extended_functional_tests" != "no"; then - AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended) -fi - -if test "$use_lcov" = "yes"; then - if test "$LCOV" = ""; then - AC_MSG_ERROR([lcov testing requested but lcov not found]) - fi - if test "$PYTHON" = ""; then - AC_MSG_ERROR([lcov testing requested but python not found]) - fi - if test "$GENHTML" = ""; then - AC_MSG_ERROR([lcov testing requested but genhtml not found]) - fi - - AC_MSG_CHECKING([whether compiler is Clang]) - AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ - #if defined(__clang__) && defined(__llvm__) - // Compiler is Clang - #else - # error Compiler is not Clang - #endif - ]])],[ - AC_MSG_RESULT([yes]) - if test "$LLVM_COV" = ""; then - AC_MSG_ERROR([lcov testing requested but llvm-cov not found]) - fi - COV_TOOL="$LLVM_COV gcov" - ],[ - AC_MSG_RESULT([no]) - if test "$GCOV" = "x"; then - AC_MSG_ERROR([lcov testing requested but gcov not found]) - fi - COV_TOOL="$GCOV" - ]) - AC_SUBST(COV_TOOL) - AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh") - LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER" - - AX_CHECK_LINK_FLAG([--coverage], [CORE_LDFLAGS="$CORE_LDFLAGS --coverage"], - [AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])]) - AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"], - [AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])]) - CORE_CXXFLAGS="$CORE_CXXFLAGS -Og" - - AC_SUBST(LCOV_OPTS) -fi - -dnl Check for endianness -AC_C_BIGENDIAN - -dnl Check for pthread compile/link requirements -AX_PTHREAD - -dnl Check if -latomic is required for -CHECK_ATOMIC - -dnl The following macro will add the necessary defines to bitcoin-config.h, but -dnl they also need to be passed down to any subprojects. Pull the results out of -dnl the cache and add them to CPPFLAGS. -AC_SYS_LARGEFILE -dnl detect POSIX or GNU variant of strerror_r -AC_FUNC_STRERROR_R - -if test "$ac_cv_sys_file_offset_bits" != "" && - test "$ac_cv_sys_file_offset_bits" != "no" && - test "$ac_cv_sys_file_offset_bits" != "unknown"; then - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi - -if test "$ac_cv_sys_large_files" != "" && - test "$ac_cv_sys_large_files" != "no" && - test "$ac_cv_sys_large_files" != "unknown"; then - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" -fi - -if test "$TARGET_OS" != "windows"; then - dnl All windows code is PIC, forcing it on just adds useless compile warnings - AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"]) -fi - -if test "$use_hardening" != "no"; then - AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) - AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) - - AX_CHECK_COMPILE_FLAG([-fcf-protection=full], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fcf-protection=full"]) - - case $host in - *mingw*) - dnl stack-clash-protection doesn't compile with GCC 10 and earlier. - dnl In any case, it is a no-op for Windows. - dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details. - ;; - *) - AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-clash-protection"], [], [$CXXFLAG_WERROR]) - ;; - esac - - case $host in - *aarch64*) - AX_CHECK_COMPILE_FLAG([-mbranch-protection=bti], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=bti"]) - ;; - esac - - dnl When enable_debug is yes, all optimizations are disabled. - dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning. - dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes. - if test "$enable_debug" != "yes"; then - AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=3],[ - AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[ - HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE" - ]) - HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=3" - ]) - fi - - AX_CHECK_LINK_FLAG([-Wl,--enable-reloc-section], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,--high-entropy-va], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-z,relro], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR]) -fi - -dnl These flags are specific to ld64, and may cause issues with other linkers. -dnl For example: GNU ld will interpret -dead_strip as -de and then try and use -dnl "ad_strip" as the symbol for the entry point. -if test "$TARGET_OS" = "darwin"; then - AX_CHECK_LINK_FLAG([-Wl,-dead_strip], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-dead_strip_dylibs], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip_dylibs"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-fixup_chains], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [$LDFLAG_WERROR]) -fi - -AC_CHECK_HEADERS([sys/select.h sys/prctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) - -AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],, - [#include - #include ] -) - -dnl These are used for daemonization in bitcoind -AC_CHECK_DECLS([fork]) -AC_CHECK_DECLS([setsid]) - -AC_CHECK_DECLS([pipe2]) - -dnl Check for malloc_info (for memory statistics information in getmemoryinfo) -AC_MSG_CHECKING([for getmemoryinfo]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ int f = malloc_info(0, NULL); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOC_INFO], [1], [Define this symbol if you have malloc_info]) ], - [ AC_MSG_RESULT([no])] -) - -dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas) -AC_MSG_CHECKING([for mallopt M_ARENA_MAX]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ mallopt(M_ARENA_MAX, 1); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOPT_ARENA_MAX], [1], [Define this symbol if you have mallopt with M_ARENA_MAX]) ], - [ AC_MSG_RESULT([no])] -) - -dnl Check for posix_fallocate -AC_MSG_CHECKING([for posix_fallocate]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - // same as in src/util/fs_helpers.cpp - #ifdef __linux__ - #ifdef _POSIX_C_SOURCE - #undef _POSIX_C_SOURCE - #endif - #define _POSIX_C_SOURCE 200112L - #endif // __linux__ - #include ]], - [[ int f = posix_fallocate(0, 0, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define this symbol if you have posix_fallocate]) ], - [ AC_MSG_RESULT([no])] -) - -dnl Check for different ways of gathering OS randomness -AC_MSG_CHECKING([for Linux getrandom function]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]], - [[ getrandom(nullptr, 32, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETRANDOM], [1], [Define this symbol if the Linux getrandom function call is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for getentropy via sys/random.h]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]], - [[ getentropy(nullptr, 32) ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY_RAND], [1], [Define this symbol if the BSD getentropy system call is available with sys/random.h]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for sysctl]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[ #ifdef __linux__ - #error "Don't use sysctl on Linux, it's deprecated even when it works" - #endif - sysctl(nullptr, 2, nullptr, nullptr, nullptr, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL], [1], [Define this symbol if the BSD sysctl() is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for sysctl KERN_ARND]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[ #ifdef __linux__ - #error "Don't use sysctl on Linux, it's deprecated even when it works" - #endif - static int name[2] = {CTL_KERN, KERN_ARND}; - sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL_ARND], [1], [Define this symbol if the BSD sysctl(KERN_ARND) is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for fdatasync]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ fdatasync(0); ]])], - [ AC_MSG_RESULT([yes]); HAVE_FDATASYNC=1 ], - [ AC_MSG_RESULT([no]); HAVE_FDATASYNC=0 ] -) -AC_DEFINE_UNQUOTED([HAVE_FDATASYNC], [$HAVE_FDATASYNC], [Define to 1 if fdatasync is available.]) - -AC_MSG_CHECKING([for F_FULLFSYNC]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ fcntl(0, F_FULLFSYNC, 0); ]])], - [ AC_MSG_RESULT([yes]); HAVE_FULLFSYNC=1 ], - [ AC_MSG_RESULT([no]); HAVE_FULLFSYNC=0 ] -) - -AC_MSG_CHECKING([for O_CLOEXEC]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ open("", O_CLOEXEC); ]])], - [ AC_MSG_RESULT([yes]); HAVE_O_CLOEXEC=1 ], - [ AC_MSG_RESULT([no]); HAVE_O_CLOEXEC=0 ] -) -AC_DEFINE_UNQUOTED([HAVE_O_CLOEXEC], [$HAVE_O_CLOEXEC], [Define to 1 if O_CLOEXEC flag is available.]) - -dnl crc32c platform checks -AC_MSG_CHECKING([for __builtin_prefetch]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - char data = 0; - const char* address = &data; - __builtin_prefetch(address, 0, 0); - ]])], - [ AC_MSG_RESULT([yes]); HAVE_BUILTIN_PREFETCH=1 ], - [ AC_MSG_RESULT([no]); HAVE_BUILTIN_PREFETCH=0 ] -) - -AC_MSG_CHECKING([for _mm_prefetch]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ - char data = 0; - const char* address = &data; - _mm_prefetch(address, _MM_HINT_NTA); - ]])], - [ AC_MSG_RESULT([yes]); HAVE_MM_PREFETCH=1 ], - [ AC_MSG_RESULT([no]); HAVE_MM_PREFETCH=0 ] -) - -AC_MSG_CHECKING([for strong getauxval support in the system headers]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - ]], [[ - getauxval(AT_HWCAP); - ]])], - [ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval]) ], - [ AC_MSG_RESULT([no]); HAVE_STRONG_GETAUXVAL=0 ] -) - -# Check for UNIX sockets -AC_MSG_CHECKING(for sockaddr_un) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - struct sockaddr_un addr; - addr.sun_family = AF_UNIX; - ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SOCKADDR_UN], [1], [Define this symbol if platform supports unix domain sockets]) ], - [ AC_MSG_RESULT([no]); ] -) - -have_any_system=no -AC_MSG_CHECKING([for std::system]) -AC_LINK_IFELSE( - [ AC_LANG_PROGRAM( - [[ #include ]], - [[ int nErr = std::system(""); ]] - )], - [ AC_MSG_RESULT([yes]); have_any_system=yes], - [ AC_MSG_RESULT([no]) ] -) - -AC_MSG_CHECKING([for ::_wsystem]) -AC_LINK_IFELSE( - [ AC_LANG_PROGRAM( - [[ #include ]], - [[ int nErr = ::_wsystem(NULL); ]] - )], - [ AC_MSG_RESULT([yes]); have_any_system=yes], - [ AC_MSG_RESULT([no]) ] -) - -if test "$have_any_system" != "no"; then - AC_DEFINE([HAVE_SYSTEM], [1], [Define to 1 if std::system or ::wsystem is available.]) -fi - -dnl SUPPRESSED_CPPFLAGS=SUPPRESS_WARNINGS([$SOME_CPPFLAGS]) -dnl Replace -I with -isystem in $SOME_CPPFLAGS to suppress warnings from -dnl headers from its include directories and return the result. -dnl See -isystem documentation: -dnl https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html -dnl https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-isystem-directory -dnl Do not change "-I/usr/include" to "-isystem /usr/include" because that -dnl is not necessary (/usr/include is already a system directory) and because -dnl it would break GCC's #include_next. -AC_DEFUN([SUPPRESS_WARNINGS], - [[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include/*( |$);-I/usr/include\1;g')]]) - -dnl enable-fuzz should disable all other targets -if test "$enable_fuzz" = "yes"; then - AC_MSG_WARN([enable-fuzz will disable all other targets and force --enable-fuzz-binary=yes]) - build_bitcoin_utils=no - build_bitcoin_cli=no - build_bitcoin_tx=no - build_bitcoin_util=no - build_bitcoin_chainstate=no - build_bitcoin_wallet=no - build_bitcoind=no - bitcoin_enable_qt=no - bitcoin_enable_qt_test=no - bitcoin_enable_qt_dbus=no - use_bench=no - use_tests=no - use_external_signer=no - use_upnp=no - use_natpmp=no - use_zmq=no - enable_fuzz_binary=yes - - AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR]) -else - BITCOIN_QT_INIT - - dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus - BITCOIN_QT_CONFIGURE([5.11.3]) - - dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc - QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES - if test "$suppress_external_warnings" != "no" ; then - QT_INCLUDES=SUPPRESS_WARNINGS($QT_INCLUDES) - QT_DBUS_INCLUDES=SUPPRESS_WARNINGS($QT_DBUS_INCLUDES) - QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES) - fi -fi - -if test "$enable_fuzz_binary" = "yes"; then - AC_MSG_CHECKING([whether main function is needed for fuzz binary]) - AX_CHECK_LINK_FLAG( - [], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]); CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"], - [$SANITIZER_LDFLAGS], - [AC_LANG_PROGRAM([[ - #include - #include - extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } - /* comment to remove the main function ... - ]],[[ - */ int not_main() { - ]])]) -fi - -if test "$enable_wallet" != "no"; then - dnl Check for libdb_cxx only if wallet enabled - if test "$use_bdb" != "no"; then - BITCOIN_FIND_BDB48 - if test "$suppress_external_warnings" != "no" ; then - BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS) - fi - fi - - dnl Check for sqlite3 - if test "$use_sqlite" != "no"; then - PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.17], [have_sqlite=yes], [have_sqlite=no]) - fi - AC_MSG_CHECKING([whether to build wallet with support for sqlite]) - if test "$use_sqlite" = "no"; then - use_sqlite=no - elif test "$have_sqlite" = "no"; then - if test "$use_sqlite" = "yes"; then - AC_MSG_ERROR([sqlite support requested but cannot be built. Use --without-sqlite]) - fi - use_sqlite=no - else - if test "$use_sqlite" != "no"; then - AC_DEFINE([USE_SQLITE],[1],[Define if sqlite support should be compiled in]) - use_sqlite=yes - fi - fi - AC_MSG_RESULT([$use_sqlite]) - - dnl Disable wallet if both --without-bdb and --without-sqlite - if test "$use_bdb$use_sqlite" = "nono"; then - if test "$enable_wallet" = "yes"; then - AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.]) - fi - enable_wallet=no - fi -fi - -if test "$use_usdt" != "no"; then - AC_MSG_CHECKING([whether Userspace, Statically Defined Tracing tracepoints are supported]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [#include ], - [DTRACE_PROBE(context, event); - int a, b, c, d, e, f, g; - DTRACE_PROBE7(context, event, a, b, c, d, e, f, g);] - )], - [AC_MSG_RESULT([yes]); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])], - [AC_MSG_RESULT([no]); use_usdt=no;] - ) -fi -AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) - -if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; then - use_upnp=no - use_natpmp=no - use_zmq=no -fi - -dnl Check for libminiupnpc (optional) -if test "$use_upnp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $MINIUPNPC_CPPFLAGS" - AC_CHECK_HEADERS([miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], [], [have_miniupnpc=no]) - - if test "$have_miniupnpc" != "no"; then - AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS]) - - dnl The minimum supported miniUPnPc API version is set to 17. This excludes - dnl versions with known vulnerabilities. - AC_MSG_CHECKING([whether miniUPnPc API version is supported]) - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if MINIUPNPC_API_VERSION >= 17 - // Everything is okay - #else - # error miniUPnPc API version is too old - #endif - ]])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_WARN([miniUPnPc API version < 17 is unsupported, disabling UPnP support.]) - have_miniupnpc=no - ]) - fi - CPPFLAGS="$TEMP_CPPFLAGS" -fi - -dnl Check for libnatpmp (optional). -if test "$use_natpmp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $NATPMP_CPPFLAGS" - AC_CHECK_HEADERS([natpmp.h], [], [have_natpmp=no]) - - if test "$have_natpmp" != "no"; then - AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS="$NATPMP_LIBS -lnatpmp"], [have_natpmp=no], [$NATPMP_LIBS]) - fi - - CPPFLAGS="$TEMP_CPPFLAGS" -fi - -if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then - use_boost=no -else - use_boost=yes -fi - -if test "$use_boost" = "yes"; then - - dnl Check for Boost headers - AX_BOOST_BASE([1.73.0],[],[AC_MSG_ERROR([Boost is not available!])]) - if test "$want_boost" = "no"; then - AC_MSG_ERROR([Boost is required]) - fi - - dnl we don't use multi_index serialization - BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION" - - dnl Prevent use of std::unary_function, which was removed in C++17, - dnl and will generate warnings with newer compilers for Boost - dnl older than 1.80. - dnl See: https://github.com/boostorg/config/pull/430. - AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR], - [AC_LANG_PROGRAM([[#include ]])]) - - if test "$suppress_external_warnings" != "no"; then - BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) - fi -fi - -case $host in - dnl Re-enable it after enabling Windows support in cpp-subprocess. - *mingw*) - use_external_signer="no" - ;; -esac -if test "$use_external_signer" = "yes"; then - AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled]) -fi -AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "$use_external_signer" = "yes"]) - -dnl Check for reduced exports -if test "$use_reduce_exports" = "yes"; then - AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"], - [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,-no_exported_symbols], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -Wl,-no_exported_symbols"], [], [$LDFLAG_WERROR]) -fi - -if test "$use_tests" = "yes"; then - - if test "$HEXDUMP" = ""; then - AC_MSG_ERROR([hexdump is required for tests]) - fi -fi - -dnl libevent check - -use_libevent=no -if test "$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_tests$use_bench" != "nononononono"; then - PKG_CHECK_MODULES([EVENT], [libevent >= 2.1.8], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.1.8 or greater not found.])]) - if test "$TARGET_OS" != "windows"; then - PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.1.8], [], [AC_MSG_ERROR([libevent_pthreads version 2.1.8 or greater not found.])]) - fi - - if test "$suppress_external_warnings" != "no"; then - EVENT_CFLAGS=SUPPRESS_WARNINGS($EVENT_CFLAGS) - fi -fi - -if test x$use_libevent = xyes; then - TEMP_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $EVENT_CFLAGS" - AC_MSG_CHECKING([if evhttp_connection_get_peer expects const char**]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - evhttp_connection *conn = (evhttp_connection *)1; - const char *host; - uint16_t port; - - evhttp_connection_get_peer(conn, &host, &port); - ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR], [1], [Define this symbol if evhttp_connection_get_peer expects const char**]) ], - [ AC_MSG_RESULT([no]) ] - ) - CXXFLAGS="$TEMP_CXXFLAGS" -fi - -dnl QR Code encoding library check - -if test "$use_qr" != "no"; then - BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) -fi - -dnl ZMQ check - -if test "$use_zmq" = "yes"; then - PKG_CHECK_MODULES([ZMQ], [libzmq >= 4], - AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]), - [AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) - use_zmq=no]) -fi - -if test "$use_zmq" = "yes"; then - dnl Assume libzmq was built for static linking - case $host in - *mingw*) - ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" - ;; - esac -fi - -AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"]) - -dnl libmultiprocess library check - -libmultiprocess_found=no -if test "$with_libmultiprocess" = "yes" || test "$with_libmultiprocess" = "auto"; then - PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [ - libmultiprocess_found=yes; - libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`; - if test "$suppress_external_warnings" != "no" ; then - LIBMULTIPROCESS_CFLAGS=SUPPRESS_WARNINGS($LIBMULTIPROCESS_CFLAGS) - fi - ], [true]) -elif test "$with_libmultiprocess" != "no"; then - AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no]) -fi - -dnl Enable multiprocess check - -if test "$enable_multiprocess" = "yes"; then - if test "$libmultiprocess_found" != "yes"; then - AC_MSG_ERROR([--enable-multiprocess=yes option specified but libmultiprocess library was not found. May need to install libmultiprocess library, or specify install path with PKG_CONFIG_PATH environment variable. Running 'pkg-config --debug libmultiprocess' may be helpful for debugging.]) - fi - build_multiprocess=yes -elif test "$enable_multiprocess" = "auto"; then - build_multiprocess=$libmultiprocess_found -else - build_multiprocess=no -fi - -AM_CONDITIONAL([BUILD_MULTIPROCESS], [test "$build_multiprocess" = "yes"]) -AM_CONDITIONAL([BUILD_BITCOIN_NODE], [test "$build_multiprocess" = "yes"]) -AM_CONDITIONAL([BUILD_BITCOIN_GUI], [test "$build_multiprocess" = "yes"]) - -dnl codegen tools check - -if test "$build_multiprocess" != "no"; then - if test "$with_mpgen" = "yes" || test "$with_mpgen" = "auto"; then - MPGEN_PREFIX="$libmultiprocess_prefix" - elif test "$with_mpgen" != "no"; then - MPGEN_PREFIX="$with_mpgen"; - fi - AC_SUBST(MPGEN_PREFIX) -fi - -AC_MSG_CHECKING([whether to build bitcoind]) -AM_CONDITIONAL([BUILD_BITCOIND], [test $build_bitcoind = "yes"]) -AC_MSG_RESULT($build_bitcoind) - -AC_MSG_CHECKING([whether to build bitcoin-cli]) -AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test $build_bitcoin_cli = "yes"]) -AC_MSG_RESULT($build_bitcoin_cli) - -AC_MSG_CHECKING([whether to build bitcoin-tx]) -AM_CONDITIONAL([BUILD_BITCOIN_TX], [test $build_bitcoin_tx = "yes"]) -AC_MSG_RESULT($build_bitcoin_tx) - -AC_MSG_CHECKING([whether to build bitcoin-wallet]) -AM_CONDITIONAL([BUILD_BITCOIN_WALLET], [test $build_bitcoin_wallet = "yes"]) -AC_MSG_RESULT($build_bitcoin_wallet) - -AC_MSG_CHECKING([whether to build bitcoin-util]) -AM_CONDITIONAL([BUILD_BITCOIN_UTIL], [test $build_bitcoin_util = "yes"]) -AC_MSG_RESULT($build_bitcoin_util) - -AC_MSG_CHECKING([whether to build experimental bitcoin-chainstate]) -if test "$build_bitcoin_chainstate" = "yes"; then - if test "$build_experimental_kernel_lib" = "no"; then - AC_MSG_ERROR([experimental bitcoin-chainstate cannot be built without the experimental bitcoinkernel library. Use --with-experimental-kernel-lib]); - fi -fi -AM_CONDITIONAL([BUILD_BITCOIN_CHAINSTATE], [test $build_bitcoin_chainstate = "yes"]) -AC_MSG_RESULT($build_bitcoin_chainstate) - -AM_CONDITIONAL([BUILD_BITCOIN_KERNEL_LIB], [test "$build_experimental_kernel_lib" != "no" && ( test "$build_experimental_kernel_lib" = "yes" || test "$build_bitcoin_chainstate" = "yes" )]) - -AC_LANG_POP - -if test "$use_ccache" != "no"; then - AC_MSG_CHECKING([if ccache should be used]) - if test "$CCACHE" = ""; then - if test "$use_ccache" = "yes"; then - AC_MSG_ERROR([ccache not found.]); - else - use_ccache=no - fi - else - use_ccache=yes - CC="$ac_cv_path_CCACHE $CC" - CXX="$ac_cv_path_CCACHE $CXX" - fi - AC_MSG_RESULT($use_ccache) - if test "$use_ccache" = "yes"; then - AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) - fi -fi - -dnl enable wallet -AC_MSG_CHECKING([if wallet should be enabled]) -if test "$enable_wallet" != "no"; then - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions]) - enable_wallet=yes - -else - AC_MSG_RESULT([no]) -fi - -dnl enable upnp support -AC_MSG_CHECKING([whether to build with support for UPnP]) -if test "$have_miniupnpc" = "no"; then - if test "$use_upnp" = "yes"; then - AC_MSG_ERROR([UPnP requested but cannot be built. Use --without-miniupnpc]) - fi - AC_MSG_RESULT([no]) - use_upnp=no -else - if test "$use_upnp" != "no"; then - AC_MSG_RESULT([yes]) - use_upnp=yes - AC_DEFINE([USE_UPNP], [1], [Define to 1 if UPnP support should be compiled in.]) - if test "$TARGET_OS" = "windows"; then - MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DMINIUPNP_STATICLIB" - fi - else - AC_MSG_RESULT([no]) - fi -fi - -dnl Enable NAT-PMP support. -AC_MSG_CHECKING([whether to build with support for NAT-PMP]) -if test "$have_natpmp" = "no"; then - if test "$use_natpmp" = "yes"; then - AC_MSG_ERROR([NAT-PMP requested but cannot be built. Use --without-natpmp]) - fi - AC_MSG_RESULT([no]) - use_natpmp=no -else - if test "$use_natpmp" != "no"; then - AC_MSG_RESULT([yes]) - use_natpmp=yes - AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.]) - if test "$TARGET_OS" = "windows"; then - NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB" - fi - else - AC_MSG_RESULT([no]) - fi -fi - -dnl these are only used when qt is enabled -BUILD_TEST_QT="" -if test "$bitcoin_enable_qt" != "no"; then - dnl enable dbus support - AC_MSG_CHECKING([whether to build GUI with support for D-Bus]) - if test "$bitcoin_enable_qt_dbus" != "no"; then - AC_DEFINE([USE_DBUS], [1], [Define if dbus support should be compiled in]) - fi - AC_MSG_RESULT([$bitcoin_enable_qt_dbus]) - - dnl enable qr support - AC_MSG_CHECKING([whether to build GUI with support for QR codes]) - if test "$have_qrencode" = "no"; then - if test "$use_qr" = "yes"; then - AC_MSG_ERROR([QR support requested but cannot be built. Use --without-qrencode]) - fi - use_qr=no - else - if test "$use_qr" != "no"; then - AC_DEFINE([USE_QRCODE], [1], [Define if QR support should be compiled in]) - use_qr=yes - fi - fi - AC_MSG_RESULT([$use_qr]) - - if test "$XGETTEXT" = ""; then - AC_MSG_WARN([xgettext is required to update qt translations]) - fi - - AC_MSG_CHECKING([whether to build test_bitcoin-qt]) - if test "$use_gui_tests$bitcoin_enable_qt_test" = "yesyes"; then - AC_MSG_RESULT([yes]) - BUILD_TEST_QT="yes" - else - AC_MSG_RESULT([no]) - fi -fi - -AC_MSG_CHECKING([whether to build test_bitcoin]) -if test "$use_tests" = "yes"; then - if test "$enable_fuzz" = "yes"; then - AC_MSG_RESULT([no, because fuzzing is enabled]) - else - AC_MSG_RESULT([yes]) - fi - BUILD_TEST="yes" -else - AC_MSG_RESULT([no]) - BUILD_TEST="" -fi - -AC_MSG_CHECKING([whether to reduce exports]) -if test "$use_reduce_exports" = "yes"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then - AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests]) -fi - -AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"]) -AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"]) -AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"]) -AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"]) -AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"]) -AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"]) -AM_CONDITIONAL([USE_BDB], [test "$use_bdb" = "yes"]) -AM_CONDITIONAL([ENABLE_TESTS], [test "$BUILD_TEST" = "yes"]) -AM_CONDITIONAL([ENABLE_FUZZ], [test "$enable_fuzz" = "yes"]) -AM_CONDITIONAL([ENABLE_FUZZ_BINARY], [test "$enable_fuzz_binary" = "yes"]) -AM_CONDITIONAL([ENABLE_QT], [test "$bitcoin_enable_qt" = "yes"]) -AM_CONDITIONAL([ENABLE_QT_TESTS], [test "$BUILD_TEST_QT" = "yes"]) -AM_CONDITIONAL([ENABLE_BENCH], [test "$use_bench" = "yes"]) -AM_CONDITIONAL([USE_QRCODE], [test "$use_qr" = "yes"]) -AM_CONDITIONAL([USE_LCOV], [test "$use_lcov" = "yes"]) -AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"]) -AM_CONDITIONAL([ENABLE_SSE42], [test "$enable_sse42" = "yes"]) -AM_CONDITIONAL([ENABLE_SSE41], [test "$enable_sse41" = "yes"]) -AM_CONDITIONAL([ENABLE_AVX2], [test "$enable_avx2" = "yes"]) -AM_CONDITIONAL([ENABLE_X86_SHANI], [test "$enable_x86_shani" = "yes"]) -AM_CONDITIONAL([ENABLE_ARM_CRC], [test "$enable_arm_crc" = "yes"]) -AM_CONDITIONAL([ENABLE_ARM_SHANI], [test "$enable_arm_shani" = "yes"]) -AM_CONDITIONAL([WORDS_BIGENDIAN], [test "$ac_cv_c_bigendian" = "yes"]) -AM_CONDITIONAL([USE_NATPMP], [test "$use_natpmp" = "yes"]) -AM_CONDITIONAL([USE_UPNP], [test "$use_upnp" = "yes"]) - -dnl for minisketch -AM_CONDITIONAL([ENABLE_CLMUL], [test "$enable_clmul" = "yes"]) - -AC_DEFINE([CLIENT_VERSION_MAJOR], [_CLIENT_VERSION_MAJOR], [Major version]) -AC_DEFINE([CLIENT_VERSION_MINOR], [_CLIENT_VERSION_MINOR], [Minor version]) -AC_DEFINE([CLIENT_VERSION_BUILD], [_CLIENT_VERSION_BUILD], [Version Build]) -AC_DEFINE([CLIENT_VERSION_IS_RELEASE], [_CLIENT_VERSION_IS_RELEASE], [Version is release]) -AC_DEFINE([COPYRIGHT_YEAR], [_COPYRIGHT_YEAR], [Copyright year]) -AC_DEFINE([COPYRIGHT_HOLDERS], ["_COPYRIGHT_HOLDERS"], [Copyright holder(s) before %s replacement]) -AC_DEFINE([COPYRIGHT_HOLDERS_SUBSTITUTION], ["_COPYRIGHT_HOLDERS_SUBSTITUTION"], [Replacement for %s in copyright holders string]) -define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])]) -AC_DEFINE([COPYRIGHT_HOLDERS_FINAL], ["_COPYRIGHT_HOLDERS_FINAL"], [Copyright holder(s)]) -AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR) -AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR) -AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) -AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) -AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) -AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS") -AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION") -AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL") -AC_SUBST(BITCOIN_DAEMON_NAME) -AC_SUBST(BITCOIN_GUI_NAME) -AC_SUBST(BITCOIN_TEST_NAME) -AC_SUBST(BITCOIN_CLI_NAME) -AC_SUBST(BITCOIN_TX_NAME) -AC_SUBST(BITCOIN_UTIL_NAME) -AC_SUBST(BITCOIN_CHAINSTATE_NAME) -AC_SUBST(BITCOIN_WALLET_TOOL_NAME) -AC_SUBST(BITCOIN_MP_NODE_NAME) -AC_SUBST(BITCOIN_MP_GUI_NAME) - -AC_SUBST(RELDFLAGS) -AC_SUBST(CORE_LDFLAGS) -AC_SUBST(CORE_CPPFLAGS) -AC_SUBST(CORE_CXXFLAGS) -AC_SUBST(DEBUG_CPPFLAGS) -AC_SUBST(WARN_CXXFLAGS) -AC_SUBST(NOWARN_CXXFLAGS) -AC_SUBST(DEBUG_CXXFLAGS) -AC_SUBST(ERROR_CXXFLAGS) -AC_SUBST(HARDENED_CXXFLAGS) -AC_SUBST(HARDENED_CPPFLAGS) -AC_SUBST(HARDENED_LDFLAGS) -AC_SUBST(PIC_FLAGS) -AC_SUBST(PIE_FLAGS) -AC_SUBST(SANITIZER_CXXFLAGS) -AC_SUBST(SANITIZER_LDFLAGS) -AC_SUBST(SSE42_CXXFLAGS) -AC_SUBST(SSE41_CXXFLAGS) -AC_SUBST(CLMUL_CXXFLAGS) -AC_SUBST(AVX2_CXXFLAGS) -AC_SUBST(X86_SHANI_CXXFLAGS) -AC_SUBST(ARM_CRC_CXXFLAGS) -AC_SUBST(ARM_SHANI_CXXFLAGS) -AC_SUBST(LIBTOOL_APP_LDFLAGS) -AC_SUBST(USE_SQLITE) -AC_SUBST(USE_BDB) -AC_SUBST(ENABLE_EXTERNAL_SIGNER) -AC_SUBST(USE_UPNP) -AC_SUBST(USE_QRCODE) -AC_SUBST(TESTDEFS) -AC_SUBST(MINIUPNPC_CPPFLAGS) -AC_SUBST(MINIUPNPC_LIBS) -AC_SUBST(NATPMP_CPPFLAGS) -AC_SUBST(NATPMP_LIBS) -AC_SUBST(HAVE_FDATASYNC) -AC_SUBST(HAVE_FULLFSYNC) -AC_SUBST(HAVE_O_CLOEXEC) -AC_SUBST(HAVE_BUILTIN_PREFETCH) -AC_SUBST(HAVE_MM_PREFETCH) -AC_SUBST(HAVE_STRONG_GETAUXVAL) -AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR) -AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) -AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) -AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) -AC_CONFIG_LINKS([contrib/devtools/iwyu/bitcoin.core.imp:contrib/devtools/iwyu/bitcoin.core.imp]) -AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) -AC_CONFIG_LINKS([src/.bear-tidy-config:src/.bear-tidy-config]) -AC_CONFIG_LINKS([src/.clang-tidy:src/.clang-tidy]) -AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) -AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py]) -AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py]) -AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py]) -AC_CONFIG_LINKS([src/qt/Makefile:src/qt/Makefile]) -AC_CONFIG_LINKS([src/qt/test/Makefile:src/qt/test/Makefile]) -AC_CONFIG_LINKS([src/test/Makefile:src/test/Makefile]) - -dnl boost's m4 checks do something really nasty: they export these vars. As a -dnl result, they leak into secp256k1's configure and crazy things happen. -dnl Until this is fixed upstream and we've synced, we'll just un-export them. -CPPFLAGS_TEMP="$CPPFLAGS" -unset CPPFLAGS -CPPFLAGS="$CPPFLAGS_TEMP" - -if test -n "$use_sanitizers"; then - export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS" -fi -ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" -AC_CONFIG_SUBDIRS([src/secp256k1]) - -AC_OUTPUT - -dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows -case ${OS} in - *Windows*) - sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini - mv test/config-2.ini test/config.ini - ;; -esac - -dnl An old hack similar to a98356fee to remove hard-coded -dnl bind_at_load flag from libtool -case $host in - *darwin*) - AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.]) - sed < libtool > libtool-2 '/bind_at_load/d' - mv libtool-2 libtool - chmod 755 libtool - ;; -esac - -echo -echo "Options used to compile and link:" -echo " external signer = $use_external_signer" -echo " multiprocess = $build_multiprocess" -echo " with wallet = $enable_wallet" -if test "$enable_wallet" != "no"; then - echo " with sqlite = $use_sqlite" - echo " with bdb = $use_bdb" -fi -echo " with gui / qt = $bitcoin_enable_qt" -if test $bitcoin_enable_qt != "no"; then - echo " with qr = $use_qr" -fi -echo " with zmq = $use_zmq" -if test $enable_fuzz = "no"; then - echo " with test = $use_tests" -else - echo " with test = not building test_bitcoin because fuzzing is enabled" -fi -echo " with fuzz binary = $enable_fuzz_binary" -echo " with bench = $use_bench" -echo " with upnp = $use_upnp" -echo " with natpmp = $use_natpmp" -echo " USDT tracing = $use_usdt" -echo " sanitizers = $use_sanitizers" -echo " debug enabled = $enable_debug" -echo " werror = $enable_werror" -echo -echo " target os = $host_os" -echo " build os = $build_os" -echo -echo " CC = $CC" -echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS" -echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS" -echo " CXX = $CXX" -echo " CXXFLAGS = $CORE_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $SANITIZER_CXXFLAGS $CXXFLAGS" -echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $SANITIZER_LDFLAGS $CORE_LDFLAGS $LDFLAGS" -echo " AR = $AR" -echo " ARFLAGS = $ARFLAGS" -echo diff --git a/depends/.gitignore b/depends/.gitignore index 19c506ce544..be6280f5990 100644 --- a/depends/.gitignore +++ b/depends/.gitignore @@ -2,7 +2,6 @@ SDKs/ work/ built/ sources/ -config.site x86_64* i686* mips* diff --git a/depends/Makefile b/depends/Makefile index 306e7f93c97..ad1fb2b0499 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -183,7 +183,6 @@ meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hos include funcs.mk -final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in) final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in) final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)) $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) @@ -194,62 +193,6 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); ) touch $@ -# $PATH is not preserved between ./configure and make by convention. Its -# modification and overriding at ./configure time is (as I understand it) -# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros, -# which will expand the program names to their full absolute paths. The notable -# exception is command line overriding: ./configure CC=clang, which skips the -# program name expansion step, and works because the user implicitly indicates -# with CC=clang that clang will be available in $PATH at all times, and is most -# likely part of the user's system. -# -# Therefore, when we "seed the autoconf cache"/"override well-known program -# vars" by setting AR= in our config.site, either one of two things needs -# to be true for the build system to work correctly: -# -# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the -# tool needs to be available in $PATH at all times. -# -# 2. If the tool is _**not**_ expected to be available in $PATH at all times -# it needs to be referred to by its absolute path, such as would be output -# by the AC_PATH_{PROG,TOOL} macros. -# -# Minor note: it is also okay to refer to tools by their absolute path even if -# we expect them to be available in $PATH at all times, more specificity does -# not hurt. -$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id) - @mkdir -p $(@D) - sed -e 's|@HOST@|$(host)|' \ - -e 's|@CC@|$(host_CC)|' \ - -e 's|@CXX@|$(host_CXX)|' \ - -e 's|@AR@|$(host_AR)|' \ - -e 's|@RANLIB@|$(host_RANLIB)|' \ - -e 's|@NM@|$(host_NM)|' \ - -e 's|@STRIP@|$(host_STRIP)|' \ - -e 's|@OBJDUMP@|$(host_OBJDUMP)|' \ - -e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \ - -e 's|@build_os@|$(build_os)|' \ - -e 's|@host_os@|$(host_os)|' \ - -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \ - -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \ - -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \ - -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \ - -e 's|@no_qt@|$(NO_QT)|' \ - -e 's|@no_qr@|$(NO_QR)|' \ - -e 's|@no_zmq@|$(NO_ZMQ)|' \ - -e 's|@no_wallet@|$(NO_WALLET)|' \ - -e 's|@no_bdb@|$(NO_BDB)|' \ - -e 's|@no_sqlite@|$(NO_SQLITE)|' \ - -e 's|@no_upnp@|$(NO_UPNP)|' \ - -e 's|@no_usdt@|$(NO_USDT)|' \ - -e 's|@no_natpmp@|$(NO_NATPMP)|' \ - -e 's|@multiprocess@|$(MULTIPROCESS)|' \ - -e 's|@lto@|$(LTO)|' \ - -e 's|@no_harden@|$(NO_HARDEN)|' \ - -e 's|@debug@|$(DEBUG)|' \ - $< > $@ - touch $@ - ifeq ($(host),$(build)) crosscompiling=FALSE else @@ -316,7 +259,6 @@ check-packages: check-sources: @$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));) -$(host_prefix)/share/config.site: check-packages $(host_prefix)/toolchain.cmake: check-packages check-packages: check-sources @@ -327,7 +269,7 @@ clean-all: clean clean: @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log -install: check-packages $(host_prefix)/share/config.site $(host_prefix)/toolchain.cmake +install: check-packages $(host_prefix)/toolchain.cmake download-one: check-sources $(all_sources) diff --git a/depends/config.site.in b/depends/config.site.in deleted file mode 100644 index f6bed6a9d4c..00000000000 --- a/depends/config.site.in +++ /dev/null @@ -1,147 +0,0 @@ -# shellcheck shell=sh disable=SC2034 # Many variables set will be used in - # ./configure but shellcheck doesn't know - # that, hence: disable=SC2034 - -true # Dummy command because shellcheck treats all directives before first - # command as file-wide, and we only want to disable for one line. - # - # See: https://github.com/koalaman/shellcheck/wiki/Directive - -# shellcheck disable=SC2154 -depends_prefix="$(cd "$(dirname "$ac_site_file")/.." && pwd)" - -cross_compiling=maybe -host_alias="@HOST@" -ac_tool_prefix="${host_alias}-" - -if test -z "$with_boost"; then - with_boost="$depends_prefix" -fi -if test -z "$with_qt_plugindir"; then - with_qt_plugindir="${depends_prefix}/plugins" -fi -if test -z "$with_qt_translationdir"; then - with_qt_translationdir="${depends_prefix}/translations" -fi -if test -z "$with_qt_bindir" && test -z "@no_qt@"; then - with_qt_bindir="${depends_prefix}/native/bin" -fi -if test -z "$with_mpgen" && test -n "@multiprocess@"; then - with_mpgen="${depends_prefix}/native" -fi - -if test -z "$with_qrencode" && test -n "@no_qr@"; then - with_qrencode=no -fi - -if test -z "$enable_wallet" && test -n "@no_wallet@"; then - enable_wallet=no -fi - -if test -z "$with_bdb" && test -n "@no_bdb@"; then - with_bdb=no -fi - -if test -z "$with_sqlite" && test -n "@no_sqlite@"; then - with_sqlite=no -fi - -if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then - enable_multiprocess=yes -fi - -if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then - with_miniupnpc=no -fi - -if test -z "$with_natpmp" && test -n "@no_natpmp@"; then - with_natpmp=no -fi - -if test -z "$with_gui" && test -n "@no_qt@"; then - with_gui=no -fi - -if test -n "@debug@" && test -z "@no_qt@" && test "$with_gui" != "no"; then - with_gui=qt5_debug -fi - -if test -z "$enable_zmq" && test -n "@no_zmq@"; then - enable_zmq=no -fi - -if test -z "$enable_usdt" && test -n "@no_usdt@"; then - enable_usdt=no -fi - -if test "@host_os@" = darwin; then - BREW=no -fi - -if test -z "$enable_hardening" && test -n "@no_harden@"; then - enable_hardening=no -fi - -PKG_CONFIG="$(which pkg-config) --static" - -PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig" -PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig" - -CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}" -LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}" - -if test -n "@CC@" -a -z "${CC}"; then - CC="@CC@" -fi -if test -n "@CXX@" -a -z "${CXX}"; then - CXX="@CXX@" -fi - -if test -n "@AR@"; then - AR="@AR@" - ac_cv_path_AR="${AR}" -fi - -if test -n "@RANLIB@"; then - RANLIB="@RANLIB@" - ac_cv_path_ac_pt_RANLIB="${RANLIB}" -fi - -if test -n "@NM@"; then - NM="@NM@" - ac_cv_path_ac_pt_NM="${NM}" -fi - -if test -n "@STRIP@"; then - STRIP="@STRIP@" - ac_cv_path_ac_pt_STRIP="${STRIP}" -fi - -if test "@host_os@" = darwin; then - if test -n "@OBJDUMP@"; then - OBJDUMP="@OBJDUMP@" - ac_cv_path_OBJDUMP="${OBJDUMP}" - fi - - if test -n "@DSYMUTIL@"; then - DSYMUTIL="@DSYMUTIL@" - ac_cv_path_DSYMUTIL="${DSYMUTIL}" - fi -fi - -if test -n "@debug@"; then - enable_reduce_exports=no -fi - -if test -n "@CFLAGS@"; then - CFLAGS="@CFLAGS@ ${CFLAGS}" -fi -if test -n "@CXXFLAGS@"; then - CXXFLAGS="@CXXFLAGS@ ${CXXFLAGS}" -fi -if test -n "@CPPFLAGS@"; then - CPPFLAGS="@CPPFLAGS@ ${CPPFLAGS}" -fi -if test -n "@LDFLAGS@"; then - LDFLAGS="@LDFLAGS@ ${LDFLAGS}" -fi diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 38498103bb1..00000000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Doxyfile diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am deleted file mode 100644 index 8f890da5327..00000000000 --- a/doc/man/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -dist_man1_MANS= - -if BUILD_BITCOIND - dist_man1_MANS+=bitcoind.1 -endif - -if ENABLE_QT - dist_man1_MANS+=bitcoin-qt.1 -endif - -if BUILD_BITCOIN_CLI - dist_man1_MANS+=bitcoin-cli.1 -endif - -if BUILD_BITCOIN_TX - dist_man1_MANS+=bitcoin-tx.1 -endif - -if BUILD_BITCOIN_UTIL - dist_man1_MANS+=bitcoin-util.1 -endif - -if ENABLE_WALLET -if BUILD_BITCOIN_WALLET - dist_man1_MANS+=bitcoin-wallet.1 -endif -endif diff --git a/share/genbuild.sh b/share/genbuild.sh deleted file mode 100755 index ecc96160e69..00000000000 --- a/share/genbuild.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# Copyright (c) 2012-2021 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -export LC_ALL=C -if [ $# -gt 1 ]; then - cd "$2" || exit 1 -fi -if [ $# -gt 0 ]; then - FILE="$1" - shift - if [ -f "$FILE" ]; then - INFO="$(head -n 1 "$FILE")" - fi -else - echo "Usage: $0 " - exit 1 -fi - -GIT_TAG="" -GIT_COMMIT="" -if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then - # clean 'dirty' status of touched files that haven't been modified - git diff >/dev/null 2>/dev/null - - # if latest commit is tagged and not dirty, then override using the tag name - RAWDESC=$(git describe --abbrev=0 2>/dev/null) - if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 "$RAWDESC" 2>/dev/null)" ]; then - git diff-index --quiet HEAD -- && GIT_TAG=$RAWDESC - fi - - # otherwise generate suffix from git, i.e. string like "59887e8-dirty" - GIT_COMMIT=$(git rev-parse --short=12 HEAD) - git diff-index --quiet HEAD -- || GIT_COMMIT="$GIT_COMMIT-dirty" -fi - -if [ -n "$GIT_TAG" ]; then - NEWINFO="#define BUILD_GIT_TAG \"$GIT_TAG\"" -elif [ -n "$GIT_COMMIT" ]; then - NEWINFO="#define BUILD_GIT_COMMIT \"$GIT_COMMIT\"" -else - NEWINFO="// No build information available" -fi - -# only update build.h if necessary -if [ "$INFO" != "$NEWINFO" ]; then - echo "$NEWINFO" >"$FILE" -fi diff --git a/src/.bear-tidy-config b/src/.bear-tidy-config deleted file mode 100644 index 0ab30a8d9d6..00000000000 --- a/src/.bear-tidy-config +++ /dev/null @@ -1,21 +0,0 @@ -{ - "output": { - "content": { - "include_only_existing_source": true, - "paths_to_include": [], - "paths_to_exclude": [ - "src/crc32c", - "src/crypto/ctaes", - "src/leveldb", - "src/minisketch", - "src/bench/nanobench.cpp", - "src/bench/nanobench.h", - "src/secp256k1" - ] - }, - "format": { - "command_as_array": true, - "drop_output_field": false - } - } -} diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 1ccb5332c44..00000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,1133 +0,0 @@ -# Copyright (c) 2013-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -# Pattern rule to print variables, e.g. make print-top_srcdir -print-%: FORCE - @echo '$*'='$($*)' - -DIST_SUBDIRS = secp256k1 - -AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(SANITIZER_LDFLAGS) $(CORE_LDFLAGS) -AM_CXXFLAGS = $(CORE_CXXFLAGS) $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(SANITIZER_CXXFLAGS) -AM_OBJCXXFLAGS = $(AM_CXXFLAGS) -AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS) -AM_LIBTOOLFLAGS = --preserve-dup-deps -PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) -EXTRA_LIBRARIES = - -lib_LTLIBRARIES = -noinst_LTLIBRARIES = - -bin_PROGRAMS = -noinst_PROGRAMS = -check_PROGRAMS = -TESTS = -BENCHMARKS = - -BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) - -LIBBITCOIN_NODE=libbitcoin_node.a -LIBBITCOIN_COMMON=libbitcoin_common.a -LIBBITCOIN_CONSENSUS=libbitcoin_consensus.a -LIBBITCOIN_CLI=libbitcoin_cli.a -LIBBITCOIN_UTIL=libbitcoin_util.a -LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la -LIBBITCOINQT=qt/libbitcoinqt.a -LIBSECP256K1=secp256k1/libsecp256k1.la - -if ENABLE_ZMQ -LIBBITCOIN_ZMQ=libbitcoin_zmq.a -endif -if BUILD_BITCOIN_KERNEL_LIB -LIBBITCOINKERNEL=libbitcoinkernel.la -endif -if ENABLE_WALLET -LIBBITCOIN_WALLET=libbitcoin_wallet.a -LIBBITCOIN_WALLET_TOOL=libbitcoin_wallet_tool.a -endif - -LIBBITCOIN_CRYPTO = $(LIBBITCOIN_CRYPTO_BASE) -if ENABLE_SSE41 -LIBBITCOIN_CRYPTO_SSE41 = crypto/libbitcoin_crypto_sse41.la -LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41) -if ENABLE_X86_SHANI -LIBBITCOIN_CRYPTO_X86_SHANI = crypto/libbitcoin_crypto_x86_shani.la -LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_X86_SHANI) -endif -endif -if ENABLE_AVX2 -LIBBITCOIN_CRYPTO_AVX2 = crypto/libbitcoin_crypto_avx2.la -LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_AVX2) -endif -if ENABLE_ARM_SHANI -LIBBITCOIN_CRYPTO_ARM_SHANI = crypto/libbitcoin_crypto_arm_shani.la -LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI) -endif -noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO) - -$(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*) - $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) - -# Make is not made aware of per-object dependencies to avoid limiting building parallelization -# But to build the less dependent modules first, we manually select their order here: -EXTRA_LIBRARIES += \ - $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_NODE) \ - $(LIBBITCOIN_CLI) \ - $(LIBBITCOIN_IPC) \ - $(LIBBITCOIN_WALLET) \ - $(LIBBITCOIN_WALLET_TOOL) \ - $(LIBBITCOIN_ZMQ) - -if BUILD_BITCOIND - bin_PROGRAMS += bitcoind -endif - -if BUILD_BITCOIN_NODE - bin_PROGRAMS += bitcoin-node -endif - -if BUILD_BITCOIN_CLI - bin_PROGRAMS += bitcoin-cli -endif - -if BUILD_BITCOIN_TX - bin_PROGRAMS += bitcoin-tx -endif - -if ENABLE_WALLET -if BUILD_BITCOIN_WALLET - bin_PROGRAMS += bitcoin-wallet -endif -endif - -if BUILD_BITCOIN_UTIL - bin_PROGRAMS += bitcoin-util -endif - -if BUILD_BITCOIN_CHAINSTATE - bin_PROGRAMS += bitcoin-chainstate -endif - -.PHONY: FORCE check-symbols check-security -# bitcoin core # -BITCOIN_CORE_H = \ - addresstype.h \ - addrdb.h \ - addrman.h \ - addrman_impl.h \ - attributes.h \ - banman.h \ - base58.h \ - bech32.h \ - bip324.h \ - blockencodings.h \ - blockfilter.h \ - chain.h \ - chainparams.h \ - chainparamsbase.h \ - chainparamsseeds.h \ - checkqueue.h \ - clientversion.h \ - cluster_linearize.h \ - coins.h \ - common/args.h \ - common/bloom.h \ - common/init.h \ - common/run_command.h \ - common/types.h \ - common/url.h \ - compat/assumptions.h \ - compat/byteswap.h \ - compat/compat.h \ - compat/cpuid.h \ - compat/endian.h \ - common/messages.h \ - common/settings.h \ - common/signmessage.h \ - common/system.h \ - compressor.h \ - consensus/consensus.h \ - consensus/tx_check.h \ - consensus/tx_verify.h \ - core_io.h \ - core_memusage.h \ - cuckoocache.h \ - dbwrapper.h \ - deploymentinfo.h \ - deploymentstatus.h \ - external_signer.h \ - flatfile.h \ - headerssync.h \ - httprpc.h \ - httpserver.h \ - i2p.h \ - index/base.h \ - index/blockfilterindex.h \ - index/coinstatsindex.h \ - index/disktxpos.h \ - index/txindex.h \ - indirectmap.h \ - init.h \ - init/common.h \ - interfaces/chain.h \ - interfaces/echo.h \ - interfaces/handler.h \ - interfaces/init.h \ - interfaces/ipc.h \ - interfaces/mining.h \ - interfaces/node.h \ - interfaces/wallet.h \ - kernel/blockmanager_opts.h \ - kernel/chain.h \ - kernel/chainparams.h \ - kernel/chainstatemanager_opts.h \ - kernel/checks.h \ - kernel/coinstats.h \ - kernel/context.h \ - kernel/cs_main.h \ - kernel/disconnected_transactions.h \ - kernel/mempool_entry.h \ - kernel/mempool_limits.h \ - kernel/mempool_options.h \ - kernel/mempool_removal_reason.h \ - kernel/messagestartchars.h \ - kernel/notifications_interface.h \ - kernel/warning.h \ - key.h \ - key_io.h \ - logging.h \ - logging/timer.h \ - mapport.h \ - memusage.h \ - merkleblock.h \ - net.h \ - net_permissions.h \ - net_processing.h \ - net_types.h \ - netaddress.h \ - netbase.h \ - netgroup.h \ - netmessagemaker.h \ - node/abort.h \ - node/blockmanager_args.h \ - node/blockstorage.h \ - node/caches.h \ - node/chainstate.h \ - node/chainstatemanager_args.h \ - node/coin.h \ - node/coins_view_args.h \ - node/connection_types.h \ - node/context.h \ - node/database_args.h \ - node/eviction.h \ - node/interface_ui.h \ - node/kernel_notifications.h \ - node/mempool_args.h \ - node/mempool_persist.h \ - node/mempool_persist_args.h \ - node/miner.h \ - node/mini_miner.h \ - node/minisketchwrapper.h \ - node/peerman_args.h \ - node/protocol_version.h \ - node/psbt.h \ - node/timeoffsets.h \ - node/transaction.h \ - node/txreconciliation.h \ - node/types.h \ - node/utxo_snapshot.h \ - node/warnings.h \ - noui.h \ - outputtype.h \ - policy/feerate.h \ - policy/fees.h \ - policy/fees_args.h \ - policy/packages.h \ - policy/policy.h \ - policy/rbf.h \ - policy/settings.h \ - policy/truc_policy.h \ - pow.h \ - protocol.h \ - psbt.h \ - random.h \ - randomenv.h \ - rest.h \ - rpc/blockchain.h \ - rpc/client.h \ - rpc/mempool.h \ - rpc/mining.h \ - rpc/protocol.h \ - rpc/rawtransaction_util.h \ - rpc/register.h \ - rpc/request.h \ - rpc/server.h \ - rpc/server_util.h \ - rpc/util.h \ - scheduler.h \ - script/descriptor.h \ - script/keyorigin.h \ - script/miniscript.h \ - script/parsing.h \ - script/sigcache.h \ - script/sign.h \ - script/signingprovider.h \ - script/solver.h \ - signet.h \ - streams.h \ - support/allocators/pool.h \ - support/allocators/secure.h \ - support/allocators/zeroafterfree.h \ - support/cleanse.h \ - support/events.h \ - support/lockedpool.h \ - sync.h \ - threadsafety.h \ - torcontrol.h \ - txdb.h \ - txmempool.h \ - txorphanage.h \ - txrequest.h \ - undo.h \ - util/any.h \ - util/asmap.h \ - util/batchpriority.h \ - util/bip32.h \ - util/bitdeque.h \ - util/bitset.h \ - util/bytevectorhash.h \ - util/chaintype.h \ - util/check.h \ - util/epochguard.h \ - util/exception.h \ - util/fastrange.h \ - util/feefrac.h \ - util/fs.h \ - util/fs_helpers.h \ - util/golombrice.h \ - util/hash_type.h \ - util/hasher.h \ - util/insert.h \ - util/macros.h \ - util/moneystr.h \ - util/overflow.h \ - util/overloaded.h \ - util/rbf.h \ - util/readwritefile.h \ - util/result.h \ - util/serfloat.h \ - util/signalinterrupt.h \ - util/sock.h \ - util/strencodings.h \ - util/string.h \ - util/subprocess.h \ - util/syserror.h \ - util/task_runner.h \ - util/thread.h \ - util/threadinterrupt.h \ - util/threadnames.h \ - util/time.h \ - util/tokenpipe.h \ - util/trace.h \ - util/transaction_identifier.h \ - util/translation.h \ - util/types.h \ - util/ui_change_type.h \ - util/vecdeque.h \ - util/vector.h \ - validation.h \ - validationinterface.h \ - versionbits.h \ - wallet/bdb.h \ - wallet/coincontrol.h \ - wallet/coinselection.h \ - wallet/context.h \ - wallet/crypter.h \ - wallet/db.h \ - wallet/dump.h \ - wallet/external_signer_scriptpubkeyman.h \ - wallet/feebumper.h \ - wallet/fees.h \ - wallet/load.h \ - wallet/migrate.h \ - wallet/receive.h \ - wallet/rpc/util.h \ - wallet/rpc/wallet.h \ - wallet/salvage.h \ - wallet/scriptpubkeyman.h \ - wallet/spend.h \ - wallet/sqlite.h \ - wallet/transaction.h \ - wallet/types.h \ - wallet/wallet.h \ - wallet/walletdb.h \ - wallet/wallettool.h \ - wallet/walletutil.h \ - walletinitinterface.h \ - zmq/zmqabstractnotifier.h \ - zmq/zmqnotificationinterface.h \ - zmq/zmqpublishnotifier.h \ - zmq/zmqrpc.h \ - zmq/zmqutil.h - - -obj/build.h: FORCE - @$(MKDIR_P) $(builddir)/obj - $(AM_V_GEN) $(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \ - "$(abs_top_srcdir)" -libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h - -# node # -libbitcoin_node_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(LEVELDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(MINIUPNPC_CPPFLAGS) $(NATPMP_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) -libbitcoin_node_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_node_a_SOURCES = \ - addrdb.cpp \ - addrman.cpp \ - banman.cpp \ - bip324.cpp \ - blockencodings.cpp \ - blockfilter.cpp \ - chain.cpp \ - consensus/tx_verify.cpp \ - dbwrapper.cpp \ - deploymentstatus.cpp \ - flatfile.cpp \ - headerssync.cpp \ - httprpc.cpp \ - httpserver.cpp \ - i2p.cpp \ - index/base.cpp \ - index/blockfilterindex.cpp \ - index/coinstatsindex.cpp \ - index/txindex.cpp \ - init.cpp \ - kernel/chain.cpp \ - kernel/checks.cpp \ - kernel/coinstats.cpp \ - kernel/context.cpp \ - kernel/cs_main.cpp \ - kernel/disconnected_transactions.cpp \ - kernel/mempool_removal_reason.cpp \ - mapport.cpp \ - net.cpp \ - net_processing.cpp \ - netgroup.cpp \ - node/abort.cpp \ - node/blockmanager_args.cpp \ - node/blockstorage.cpp \ - node/caches.cpp \ - node/chainstate.cpp \ - node/chainstatemanager_args.cpp \ - node/coin.cpp \ - node/coins_view_args.cpp \ - node/connection_types.cpp \ - node/context.cpp \ - node/database_args.cpp \ - node/eviction.cpp \ - node/interface_ui.cpp \ - node/interfaces.cpp \ - node/kernel_notifications.cpp \ - node/mempool_args.cpp \ - node/mempool_persist.cpp \ - node/mempool_persist_args.cpp \ - node/miner.cpp \ - node/mini_miner.cpp \ - node/minisketchwrapper.cpp \ - node/peerman_args.cpp \ - node/psbt.cpp \ - node/timeoffsets.cpp \ - node/transaction.cpp \ - node/txreconciliation.cpp \ - node/utxo_snapshot.cpp \ - node/warnings.cpp \ - noui.cpp \ - policy/fees.cpp \ - policy/fees_args.cpp \ - policy/packages.cpp \ - policy/rbf.cpp \ - policy/settings.cpp \ - policy/truc_policy.cpp \ - pow.cpp \ - rest.cpp \ - rpc/blockchain.cpp \ - rpc/fees.cpp \ - rpc/mempool.cpp \ - rpc/mining.cpp \ - rpc/net.cpp \ - rpc/node.cpp \ - rpc/output_script.cpp \ - rpc/rawtransaction.cpp \ - rpc/server.cpp \ - rpc/server_util.cpp \ - rpc/signmessage.cpp \ - rpc/txoutproof.cpp \ - script/sigcache.cpp \ - signet.cpp \ - torcontrol.cpp \ - txdb.cpp \ - txmempool.cpp \ - txorphanage.cpp \ - txrequest.cpp \ - validation.cpp \ - validationinterface.cpp \ - versionbits.cpp \ - $(BITCOIN_CORE_H) - -if ENABLE_WALLET -libbitcoin_node_a_SOURCES += wallet/init.cpp -libbitcoin_node_a_CPPFLAGS += $(BDB_CPPFLAGS) -endif -if !ENABLE_WALLET -libbitcoin_node_a_SOURCES += dummywallet.cpp -endif -# - -# zmq # -if ENABLE_ZMQ -libbitcoin_zmq_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS) -libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_zmq_a_SOURCES = \ - zmq/zmqabstractnotifier.cpp \ - zmq/zmqnotificationinterface.cpp \ - zmq/zmqpublishnotifier.cpp \ - zmq/zmqrpc.cpp \ - zmq/zmqutil.cpp -endif -# - -# wallet # -libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(BDB_CPPFLAGS) $(SQLITE_CFLAGS) -libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_wallet_a_SOURCES = \ - wallet/coincontrol.cpp \ - wallet/context.cpp \ - wallet/crypter.cpp \ - wallet/db.cpp \ - wallet/dump.cpp \ - wallet/external_signer_scriptpubkeyman.cpp \ - wallet/feebumper.cpp \ - wallet/fees.cpp \ - wallet/interfaces.cpp \ - wallet/load.cpp \ - wallet/migrate.cpp \ - wallet/receive.cpp \ - wallet/rpc/addresses.cpp \ - wallet/rpc/backup.cpp \ - wallet/rpc/coins.cpp \ - wallet/rpc/encrypt.cpp \ - wallet/rpc/spend.cpp \ - wallet/rpc/signmessage.cpp \ - wallet/rpc/transactions.cpp \ - wallet/rpc/util.cpp \ - wallet/rpc/wallet.cpp \ - wallet/scriptpubkeyman.cpp \ - wallet/spend.cpp \ - wallet/transaction.cpp \ - wallet/wallet.cpp \ - wallet/walletdb.cpp \ - wallet/walletutil.cpp \ - wallet/coinselection.cpp \ - $(BITCOIN_CORE_H) - -if USE_SQLITE -libbitcoin_wallet_a_SOURCES += wallet/sqlite.cpp -endif -if USE_BDB -libbitcoin_wallet_a_SOURCES += wallet/bdb.cpp wallet/salvage.cpp -endif -# - -# wallet tool # -libbitcoin_wallet_tool_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -libbitcoin_wallet_tool_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_wallet_tool_a_SOURCES = \ - wallet/wallettool.cpp \ - $(BITCOIN_CORE_H) -# - -# crypto # - -# crypto_base contains the unspecialized (unoptimized) versions of our -# crypto functions. Functions that require custom compiler flags and/or -# runtime opt-in are omitted. -crypto_libbitcoin_crypto_base_la_CPPFLAGS = $(AM_CPPFLAGS) - -# Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a -# static version of this library. We don't need a dynamic version, and a dynamic -# version can't be used on windows anyway because the library doesn't currently -# export DLL symbols. -crypto_libbitcoin_crypto_base_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crypto_libbitcoin_crypto_base_la_LDFLAGS = $(AM_LDFLAGS) -static - -crypto_libbitcoin_crypto_base_la_SOURCES = \ - crypto/aes.cpp \ - crypto/aes.h \ - crypto/chacha20.h \ - crypto/chacha20.cpp \ - crypto/chacha20poly1305.h \ - crypto/chacha20poly1305.cpp \ - crypto/common.h \ - crypto/hex_base.cpp \ - crypto/hex_base.h \ - crypto/hkdf_sha256_32.cpp \ - crypto/hkdf_sha256_32.h \ - crypto/hmac_sha256.cpp \ - crypto/hmac_sha256.h \ - crypto/hmac_sha512.cpp \ - crypto/hmac_sha512.h \ - crypto/poly1305.h \ - crypto/poly1305.cpp \ - crypto/muhash.h \ - crypto/muhash.cpp \ - crypto/ripemd160.cpp \ - crypto/ripemd160.h \ - crypto/sha1.cpp \ - crypto/sha1.h \ - crypto/sha256.cpp \ - crypto/sha256.h \ - crypto/sha256_sse4.cpp \ - crypto/sha3.cpp \ - crypto/sha3.h \ - crypto/sha512.cpp \ - crypto/sha512.h \ - crypto/siphash.cpp \ - crypto/siphash.h \ - support/cleanse.cpp - -# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and -# CXXFLAGS above -crypto_libbitcoin_crypto_sse41_la_LDFLAGS = $(AM_LDFLAGS) -static -crypto_libbitcoin_crypto_sse41_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crypto_libbitcoin_crypto_sse41_la_CPPFLAGS = $(AM_CPPFLAGS) -crypto_libbitcoin_crypto_sse41_la_CXXFLAGS += $(SSE41_CXXFLAGS) -crypto_libbitcoin_crypto_sse41_la_CPPFLAGS += -DENABLE_SSE41 -crypto_libbitcoin_crypto_sse41_la_SOURCES = crypto/sha256_sse41.cpp - -# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and -# CXXFLAGS above -crypto_libbitcoin_crypto_avx2_la_LDFLAGS = $(AM_LDFLAGS) -static -crypto_libbitcoin_crypto_avx2_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crypto_libbitcoin_crypto_avx2_la_CPPFLAGS = $(AM_CPPFLAGS) -crypto_libbitcoin_crypto_avx2_la_CXXFLAGS += $(AVX2_CXXFLAGS) -crypto_libbitcoin_crypto_avx2_la_CPPFLAGS += -DENABLE_AVX2 -crypto_libbitcoin_crypto_avx2_la_SOURCES = crypto/sha256_avx2.cpp - -# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and -# CXXFLAGS above -crypto_libbitcoin_crypto_x86_shani_la_LDFLAGS = $(AM_LDFLAGS) -static -crypto_libbitcoin_crypto_x86_shani_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crypto_libbitcoin_crypto_x86_shani_la_CPPFLAGS = $(AM_CPPFLAGS) -crypto_libbitcoin_crypto_x86_shani_la_CXXFLAGS += $(X86_SHANI_CXXFLAGS) -crypto_libbitcoin_crypto_x86_shani_la_CPPFLAGS += -DENABLE_SSE41 -DENABLE_X86_SHANI -crypto_libbitcoin_crypto_x86_shani_la_SOURCES = crypto/sha256_x86_shani.cpp - -# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and -# CXXFLAGS above -crypto_libbitcoin_crypto_arm_shani_la_LDFLAGS = $(AM_LDFLAGS) -static -crypto_libbitcoin_crypto_arm_shani_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crypto_libbitcoin_crypto_arm_shani_la_CPPFLAGS = $(AM_CPPFLAGS) -crypto_libbitcoin_crypto_arm_shani_la_CXXFLAGS += $(ARM_SHANI_CXXFLAGS) -crypto_libbitcoin_crypto_arm_shani_la_CPPFLAGS += -DENABLE_ARM_SHANI -crypto_libbitcoin_crypto_arm_shani_la_SOURCES = crypto/sha256_arm_shani.cpp -# - -# consensus # -libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_consensus_a_SOURCES = \ - arith_uint256.cpp \ - arith_uint256.h \ - consensus/amount.h \ - consensus/merkle.cpp \ - consensus/merkle.h \ - consensus/params.h \ - consensus/tx_check.cpp \ - consensus/validation.h \ - hash.cpp \ - hash.h \ - prevector.h \ - primitives/block.cpp \ - primitives/block.h \ - primitives/transaction.cpp \ - primitives/transaction.h \ - pubkey.cpp \ - pubkey.h \ - script/interpreter.cpp \ - script/interpreter.h \ - script/script.cpp \ - script/script.h \ - script/script_error.cpp \ - script/script_error.h \ - serialize.h \ - span.h \ - tinyformat.h \ - uint256.cpp \ - uint256.h -# - -# common # -libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_common_a_SOURCES = \ - addresstype.cpp \ - base58.cpp \ - bech32.cpp \ - chainparamsbase.cpp \ - chainparams.cpp \ - coins.cpp \ - common/args.cpp \ - common/bloom.cpp \ - common/config.cpp \ - common/init.cpp \ - common/interfaces.cpp \ - common/messages.cpp \ - common/run_command.cpp \ - common/settings.cpp \ - common/signmessage.cpp \ - common/system.cpp \ - common/url.cpp \ - compressor.cpp \ - core_read.cpp \ - core_write.cpp \ - deploymentinfo.cpp \ - external_signer.cpp \ - init/common.cpp \ - kernel/chainparams.cpp \ - key.cpp \ - key_io.cpp \ - merkleblock.cpp \ - net_types.cpp \ - netaddress.cpp \ - netbase.cpp \ - net_permissions.cpp \ - outputtype.cpp \ - policy/feerate.cpp \ - policy/policy.cpp \ - protocol.cpp \ - psbt.cpp \ - rpc/external_signer.cpp \ - rpc/rawtransaction_util.cpp \ - rpc/request.cpp \ - rpc/util.cpp \ - scheduler.cpp \ - script/descriptor.cpp \ - script/miniscript.cpp \ - script/parsing.cpp \ - script/sign.cpp \ - script/signingprovider.cpp \ - script/solver.cpp \ - $(BITCOIN_CORE_H) -# - -# util # -libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_util_a_SOURCES = \ - support/lockedpool.cpp \ - clientversion.cpp \ - logging.cpp \ - random.cpp \ - randomenv.cpp \ - streams.cpp \ - sync.cpp \ - util/asmap.cpp \ - util/batchpriority.cpp \ - util/bip32.cpp \ - util/bytevectorhash.cpp \ - util/chaintype.cpp \ - util/check.cpp \ - util/exception.cpp \ - util/feefrac.cpp \ - util/fs.cpp \ - util/fs_helpers.cpp \ - util/hasher.cpp \ - util/sock.cpp \ - util/syserror.cpp \ - util/moneystr.cpp \ - util/rbf.cpp \ - util/readwritefile.cpp \ - util/signalinterrupt.cpp \ - util/thread.cpp \ - util/threadinterrupt.cpp \ - util/threadnames.cpp \ - util/serfloat.cpp \ - util/strencodings.cpp \ - util/string.cpp \ - util/time.cpp \ - util/tokenpipe.cpp \ - $(BITCOIN_CORE_H) -# - -# cli # -libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_cli_a_SOURCES = \ - compat/stdin.h \ - compat/stdin.cpp \ - rpc/client.cpp \ - $(BITCOIN_CORE_H) - -nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h -# - -# bitcoind & bitcoin-node binaries # -bitcoin_daemon_sources = bitcoind.cpp -bitcoin_bin_cppflags = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -bitcoin_bin_cxxflags = $(AM_CXXFLAGS) $(PIE_FLAGS) -bitcoin_bin_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) - -if TARGET_WINDOWS -bitcoin_daemon_sources += bitcoind-res.rc -endif - -bitcoin_bin_ldadd = \ - $(LIBBITCOIN_WALLET) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_ZMQ) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBLEVELDB) \ - $(LIBMEMENV) \ - $(LIBSECP256K1) - -bitcoin_bin_ldadd += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(SQLITE_LIBS) - -bitcoind_SOURCES = $(bitcoin_daemon_sources) init/bitcoind.cpp -bitcoind_CPPFLAGS = $(bitcoin_bin_cppflags) -bitcoind_CXXFLAGS = $(bitcoin_bin_cxxflags) -bitcoind_LDFLAGS = $(bitcoin_bin_ldflags) -bitcoind_LDADD = $(LIBBITCOIN_NODE) $(bitcoin_bin_ldadd) - -bitcoin_node_SOURCES = $(bitcoin_daemon_sources) init/bitcoin-node.cpp -bitcoin_node_CPPFLAGS = $(bitcoin_bin_cppflags) -bitcoin_node_CXXFLAGS = $(bitcoin_bin_cxxflags) -bitcoin_node_LDFLAGS = $(bitcoin_bin_ldflags) -bitcoin_node_LDADD = $(LIBBITCOIN_NODE) $(bitcoin_bin_ldadd) $(LIBBITCOIN_IPC) $(LIBMULTIPROCESS_LIBS) - -# bitcoin-cli binary # -bitcoin_cli_SOURCES = bitcoin-cli.cpp -bitcoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) -bitcoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) - -if TARGET_WINDOWS -bitcoin_cli_SOURCES += bitcoin-cli-res.rc -endif - -bitcoin_cli_LDADD = \ - $(LIBBITCOIN_CLI) \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_CRYPTO) - -bitcoin_cli_LDADD += $(EVENT_LIBS) -# - -# bitcoin-tx binary # -bitcoin_tx_SOURCES = bitcoin-tx.cpp -bitcoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -bitcoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) - -if TARGET_WINDOWS -bitcoin_tx_SOURCES += bitcoin-tx-res.rc -endif - -bitcoin_tx_LDADD = \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBSECP256K1) -# - -# bitcoin-wallet binary # -bitcoin_wallet_SOURCES = bitcoin-wallet.cpp -bitcoin_wallet_SOURCES += init/bitcoin-wallet.cpp -bitcoin_wallet_CPPFLAGS = $(bitcoin_bin_cppflags) -bitcoin_wallet_CXXFLAGS = $(bitcoin_bin_cxxflags) -bitcoin_wallet_LDFLAGS = $(bitcoin_bin_ldflags) -bitcoin_wallet_LDADD = \ - $(LIBBITCOIN_WALLET_TOOL) \ - $(LIBBITCOIN_WALLET) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBSECP256K1) \ - $(BDB_LIBS) \ - $(SQLITE_LIBS) - -if TARGET_WINDOWS -bitcoin_wallet_SOURCES += bitcoin-wallet-res.rc -endif -# - -# bitcoin-util binary # -bitcoin_util_SOURCES = bitcoin-util.cpp -bitcoin_util_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -bitcoin_util_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -bitcoin_util_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) - -if TARGET_WINDOWS -bitcoin_util_SOURCES += bitcoin-util-res.rc -endif - -bitcoin_util_LDADD = \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBSECP256K1) -# - -# bitcoin-chainstate binary # -bitcoin_chainstate_SOURCES = bitcoin-chainstate.cpp -bitcoin_chainstate_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -bitcoin_chainstate_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) - -bitcoin_chainstate_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(PTHREAD_FLAGS) $(LIBTOOL_APP_LDFLAGS) -static -bitcoin_chainstate_LDADD = $(LIBBITCOINKERNEL) - -# libtool is unable to calculate this indirect dependency, presumably because it's a subproject. -# libsecp256k1 only needs to be linked in when libbitcoinkernel is static. -bitcoin_chainstate_LDADD += $(LIBSECP256K1) -# - -# bitcoinkernel library # -if BUILD_BITCOIN_KERNEL_LIB -lib_LTLIBRARIES += $(LIBBITCOINKERNEL) - -libbitcoinkernel_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) $(PTHREAD_FLAGS) -libbitcoinkernel_la_LIBADD = $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) $(LIBSECP256K1) -libbitcoinkernel_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) - -# libbitcoinkernel requires default symbol visibility, explicitly specify that -# here so that things still work even when user configures with -# --enable-reduce-exports -# -# Note this is a quick hack that will be removed as we incrementally define what -# to export from the library. -libbitcoinkernel_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -fvisibility=default - -# TODO: libbitcoinkernel is a work in progress consensus engine library, as more -# and more modules are decoupled from the consensus engine, this list will -# shrink to only those which are absolutely necessary. -libbitcoinkernel_la_SOURCES = \ - kernel/bitcoinkernel.cpp \ - arith_uint256.cpp \ - chain.cpp \ - clientversion.cpp \ - coins.cpp \ - compressor.cpp \ - consensus/merkle.cpp \ - consensus/tx_check.cpp \ - consensus/tx_verify.cpp \ - core_read.cpp \ - dbwrapper.cpp \ - deploymentinfo.cpp \ - deploymentstatus.cpp \ - flatfile.cpp \ - hash.cpp \ - kernel/chain.cpp \ - kernel/checks.cpp \ - kernel/chainparams.cpp \ - kernel/coinstats.cpp \ - kernel/context.cpp \ - kernel/cs_main.cpp \ - kernel/disconnected_transactions.cpp \ - kernel/mempool_removal_reason.cpp \ - logging.cpp \ - node/blockstorage.cpp \ - node/chainstate.cpp \ - node/utxo_snapshot.cpp \ - policy/feerate.cpp \ - policy/packages.cpp \ - policy/policy.cpp \ - policy/rbf.cpp \ - policy/settings.cpp \ - policy/truc_policy.cpp \ - pow.cpp \ - primitives/block.cpp \ - primitives/transaction.cpp \ - pubkey.cpp \ - random.cpp \ - randomenv.cpp \ - script/interpreter.cpp \ - script/script.cpp \ - script/script_error.cpp \ - script/sigcache.cpp \ - script/solver.cpp \ - signet.cpp \ - streams.cpp \ - support/lockedpool.cpp \ - sync.cpp \ - txdb.cpp \ - txmempool.cpp \ - uint256.cpp \ - util/chaintype.cpp \ - util/check.cpp \ - util/feefrac.cpp \ - util/fs.cpp \ - util/fs_helpers.cpp \ - util/hasher.cpp \ - util/moneystr.cpp \ - util/rbf.cpp \ - util/serfloat.cpp \ - util/signalinterrupt.cpp \ - util/strencodings.cpp \ - util/string.cpp \ - util/syserror.cpp \ - util/threadnames.cpp \ - util/time.cpp \ - util/tokenpipe.cpp \ - validation.cpp \ - validationinterface.cpp \ - versionbits.cpp - -# Required for obj/build.h to be generated first. -# More details: https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html -libbitcoinkernel_la-clientversion.l$(OBJEXT): obj/build.h -endif # BUILD_BITCOIN_KERNEL_LIB -# - -CTAES_DIST = crypto/ctaes/bench.c -CTAES_DIST += crypto/ctaes/ctaes.c -CTAES_DIST += crypto/ctaes/ctaes.h -CTAES_DIST += crypto/ctaes/README.md -CTAES_DIST += crypto/ctaes/test.c - -CLEANFILES = $(EXTRA_LIBRARIES) - -CLEANFILES += *.gcda *.gcno -CLEANFILES += compat/*.gcda compat/*.gcno -CLEANFILES += consensus/*.gcda consensus/*.gcno -CLEANFILES += crc32c/src/*.gcda crc32c/src/*.gcno -CLEANFILES += crypto/*.gcda crypto/*.gcno -CLEANFILES += index/*.gcda index/*.gcno -CLEANFILES += interfaces/*.gcda interfaces/*.gcno -CLEANFILES += node/*.gcda node/*.gcno -CLEANFILES += policy/*.gcda policy/*.gcno -CLEANFILES += primitives/*.gcda primitives/*.gcno -CLEANFILES += rpc/*.gcda rpc/*.gcno -CLEANFILES += script/*.gcda script/*.gcno -CLEANFILES += support/*.gcda support/*.gcno -CLEANFILES += univalue/*.gcda univalue/*.gcno -CLEANFILES += util/*.gcda util/*.gcno -CLEANFILES += wallet/*.gcda wallet/*.gcno -CLEANFILES += wallet/test/*.gcda wallet/test/*.gcno -CLEANFILES += zmq/*.gcda zmq/*.gcno -CLEANFILES += obj/build.h - -EXTRA_DIST = $(CTAES_DIST) - - -config/bitcoin-config.h: config/stamp-h1 - @$(MAKE) -C $(top_builddir) $(subdir)/$(@) -config/stamp-h1: $(top_srcdir)/$(subdir)/config/bitcoin-config.h.in $(top_builddir)/config.status - $(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@) -$(top_srcdir)/$(subdir)/config/bitcoin-config.h.in: $(am__configure_deps) - $(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/bitcoin-config.h.in - -clean-local: - -$(MAKE) -C secp256k1 clean - -rm -f leveldb/*/*.gcda leveldb/*/*.gcno leveldb/helpers/memenv/*.gcda leveldb/helpers/memenv/*.gcno - -rm -f config.h - -rm -rf test/__pycache__ - -.rc.o: - @test -f $(WINDRES) || (echo "windres $(WINDRES) not found, but is required to compile windows resource files"; exit 1) - ## FIXME: How to get the appropriate modulename_CPPFLAGS in here? - $(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@ - -check-symbols: $(bin_PROGRAMS) - @echo "Running symbol and dynamic library checks..." - $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS) - -check-security: $(bin_PROGRAMS) -if HARDEN - @echo "Checking binary security..." - $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS) -endif - -libbitcoin_ipc_mpgen_input = \ - ipc/capnp/echo.capnp \ - ipc/capnp/init.capnp -EXTRA_DIST += $(libbitcoin_ipc_mpgen_input) -%.capnp: - -# Explicitly list dependencies on generated headers as described in -# https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html#Recording-Dependencies-manually -ipc/capnp/libbitcoin_ipc_a-protocol.$(OBJEXT): $(libbitcoin_ipc_mpgen_input:=.h) - -if BUILD_MULTIPROCESS -LIBBITCOIN_IPC=libbitcoin_ipc.a -libbitcoin_ipc_a_SOURCES = \ - ipc/capnp/common-types.h \ - ipc/capnp/context.h \ - ipc/capnp/init-types.h \ - ipc/capnp/protocol.cpp \ - ipc/capnp/protocol.h \ - ipc/context.h \ - ipc/exception.h \ - ipc/interfaces.cpp \ - ipc/process.cpp \ - ipc/process.h \ - ipc/protocol.h -libbitcoin_ipc_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -libbitcoin_ipc_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(LIBMULTIPROCESS_CFLAGS) - -include $(MPGEN_PREFIX)/include/mpgen.mk -libbitcoin_ipc_mpgen_output = \ - $(libbitcoin_ipc_mpgen_input:=.c++) \ - $(libbitcoin_ipc_mpgen_input:=.h) \ - $(libbitcoin_ipc_mpgen_input:=.proxy-client.c++) \ - $(libbitcoin_ipc_mpgen_input:=.proxy-server.c++) \ - $(libbitcoin_ipc_mpgen_input:=.proxy-types.c++) \ - $(libbitcoin_ipc_mpgen_input:=.proxy-types.h) \ - $(libbitcoin_ipc_mpgen_input:=.proxy.h) -nodist_libbitcoin_ipc_a_SOURCES = $(libbitcoin_ipc_mpgen_output) -CLEANFILES += $(libbitcoin_ipc_mpgen_output) -endif - -%.raw.h: %.raw - @$(MKDIR_P) $(@D) - $(AM_V_GEN) { \ - echo "static unsigned const char $(*F)_raw[] = {" && \ - $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ - echo "};"; \ - } > "$@.new" && mv -f "$@.new" "$@" - -include Makefile.minisketch.include - -include Makefile.crc32c.include -include Makefile.leveldb.include - -include Makefile.test_util.include -include Makefile.test_fuzz.include - -include Makefile.test.include - -if ENABLE_BENCH -include Makefile.bench.include -endif - -if ENABLE_QT -include Makefile.qt.include -endif - -if ENABLE_QT_TESTS -include Makefile.qttest.include -endif - -include Makefile.univalue.include diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include deleted file mode 100644 index fe6333d8c0b..00000000000 --- a/src/Makefile.bench.include +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (c) 2015-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -bin_PROGRAMS += bench/bench_bitcoin -BENCH_SRCDIR = bench -BENCH_BINARY = bench/bench_bitcoin$(EXEEXT) - -RAW_BENCH_FILES = \ - bench/data/block413567.raw -GENERATED_BENCH_FILES = $(RAW_BENCH_FILES:.raw=.raw.h) - -bench_bench_bitcoin_SOURCES = \ - $(RAW_BENCH_FILES) \ - bench/addrman.cpp \ - bench/base58.cpp \ - bench/bech32.cpp \ - bench/bench.cpp \ - bench/bench.h \ - bench/bench_bitcoin.cpp \ - bench/bip324_ecdh.cpp \ - bench/block_assemble.cpp \ - bench/ccoins_caching.cpp \ - bench/chacha20.cpp \ - bench/checkblock.cpp \ - bench/checkblockindex.cpp \ - bench/checkqueue.cpp \ - bench/cluster_linearize.cpp \ - bench/crypto_hash.cpp \ - bench/data.cpp \ - bench/data.h \ - bench/descriptors.cpp \ - bench/disconnected_transactions.cpp \ - bench/duplicate_inputs.cpp \ - bench/ellswift.cpp \ - bench/examples.cpp \ - bench/gcs_filter.cpp \ - bench/hashpadding.cpp \ - bench/index_blockfilter.cpp \ - bench/load_external.cpp \ - bench/lockedpool.cpp \ - bench/logging.cpp \ - bench/mempool_eviction.cpp \ - bench/mempool_stress.cpp \ - bench/merkle_root.cpp \ - bench/nanobench.cpp \ - bench/nanobench.h \ - bench/parse_hex.cpp \ - bench/peer_eviction.cpp \ - bench/poly1305.cpp \ - bench/pool.cpp \ - bench/prevector.cpp \ - bench/random.cpp \ - bench/readblock.cpp \ - bench/rollingbloom.cpp \ - bench/rpc_blockchain.cpp \ - bench/rpc_mempool.cpp \ - bench/sign_transaction.cpp \ - bench/streams_findbyte.cpp \ - bench/strencodings.cpp \ - bench/util_time.cpp \ - bench/verify_script.cpp \ - bench/xor.cpp - -nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES) - -bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/ -bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -bench_bench_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -bench_bench_bitcoin_LDADD = \ - $(LIBTEST_UTIL) \ - $(LIBBITCOIN_NODE) \ - $(LIBBITCOIN_WALLET) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBLEVELDB) \ - $(LIBMEMENV) \ - $(LIBSECP256K1) \ - $(LIBUNIVALUE) \ - $(EVENT_PTHREADS_LIBS) \ - $(EVENT_LIBS) \ - $(MINIUPNPC_LIBS) \ - $(NATPMP_LIBS) - -if ENABLE_ZMQ -bench_bench_bitcoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -endif - -if ENABLE_WALLET -bench_bench_bitcoin_SOURCES += bench/coin_selection.cpp -bench_bench_bitcoin_SOURCES += bench/wallet_balance.cpp -bench_bench_bitcoin_SOURCES += bench/wallet_create.cpp -bench_bench_bitcoin_SOURCES += bench/wallet_loading.cpp -bench_bench_bitcoin_SOURCES += bench/wallet_create_tx.cpp -bench_bench_bitcoin_SOURCES += bench/wallet_ismine.cpp - -bench_bench_bitcoin_LDADD += $(BDB_LIBS) $(SQLITE_LIBS) -endif - -CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_BENCH_FILES) - -CLEANFILES += $(CLEAN_BITCOIN_BENCH) - -bench/data.cpp: bench/data/block413567.raw.h - -bitcoin_bench: $(BENCH_BINARY) - -bench: $(BENCH_BINARY) FORCE - $(BENCH_BINARY) - -bitcoin_bench_clean : FORCE - rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY) diff --git a/src/Makefile.crc32c.include b/src/Makefile.crc32c.include deleted file mode 100644 index c4dd84991d2..00000000000 --- a/src/Makefile.crc32c.include +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) 2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -LIBCRC32C_INT = crc32c/libcrc32c.la - -noinst_LTLIBRARIES += $(LIBCRC32C_INT) - -LIBCRC32C = $(LIBCRC32C_INT) - -CRC32C_CPPFLAGS_INT = -CRC32C_CPPFLAGS_INT += -I$(srcdir)/crc32c/include -CRC32C_CPPFLAGS_INT += -DHAVE_BUILTIN_PREFETCH=@HAVE_BUILTIN_PREFETCH@ -CRC32C_CPPFLAGS_INT += -DHAVE_MM_PREFETCH=@HAVE_MM_PREFETCH@ -CRC32C_CPPFLAGS_INT += -DHAVE_STRONG_GETAUXVAL=@HAVE_STRONG_GETAUXVAL@ -CRC32C_CPPFLAGS_INT += -DCRC32C_TESTS_BUILT_WITH_GLOG=0 - -if ENABLE_SSE42 -CRC32C_CPPFLAGS_INT += -DHAVE_SSE42=1 -else -CRC32C_CPPFLAGS_INT += -DHAVE_SSE42=0 -endif - -if ENABLE_ARM_CRC -CRC32C_CPPFLAGS_INT += -DHAVE_ARM64_CRC32C=1 -else -CRC32C_CPPFLAGS_INT += -DHAVE_ARM64_CRC32C=0 -endif - -if WORDS_BIGENDIAN -CRC32C_CPPFLAGS_INT += -DBYTE_ORDER_BIG_ENDIAN=1 -else -CRC32C_CPPFLAGS_INT += -DBYTE_ORDER_BIG_ENDIAN=0 -endif - -crc32c_libcrc32c_la_CPPFLAGS = $(AM_CPPFLAGS) $(CRC32C_CPPFLAGS_INT) $(CRC32C_CPPFLAGS) - -# Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a -# static version of this library. We don't need a dynamic version, and a dynamic -# version can't be used on windows anyway because the library doesn't currently -# export DLL symbols. -crc32c_libcrc32c_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static -crc32c_libcrc32c_la_LDFLAGS = $(AM_LDFLAGS) -static - -crc32c_libcrc32c_la_SOURCES = -crc32c_libcrc32c_la_SOURCES += crc32c/include/crc32c/crc32c.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_arm64.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_arm64_check.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_internal.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_prefetch.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_read_le.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_round_up.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_sse42_check.h -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_sse42.h - -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c.cc -crc32c_libcrc32c_la_SOURCES += crc32c/src/crc32c_portable.cc - -if ENABLE_SSE42 -LIBCRC32C_SSE42_INT = crc32c/libcrc32c_sse42.la -noinst_LTLIBRARIES += $(LIBCRC32C_SSE42_INT) -LIBCRC32C += $(LIBCRC32C_SSE42_INT) - -crc32c_libcrc32c_sse42_la_CPPFLAGS = $(crc32c_libcrc32c_la_CPPFLAGS) -crc32c_libcrc32c_sse42_la_CXXFLAGS = $(crc32c_libcrc32c_la_CXXFLAGS) $(SSE42_CXXFLAGS) -crc32c_libcrc32c_sse42_la_LDFLAGS = $(crc32c_libcrc32c_la_LDFLAGS) - -crc32c_libcrc32c_sse42_la_SOURCES = crc32c/src/crc32c_sse42.cc -endif - -if ENABLE_ARM_CRC -LIBCRC32C_ARM_CRC_INT = crc32c/libcrc32c_arm_crc.la -noinst_LTLIBRARIES += $(LIBCRC32C_ARM_CRC_INT) -LIBCRC32C += $(LIBCRC32C_ARM_CRC_INT) - -crc32c_libcrc32c_arm_crc_la_CPPFLAGS = $(crc32c_libcrc32c_la_CPPFLAGS) -crc32c_libcrc32c_arm_crc_la_CXXFLAGS = $(crc32c_libcrc32c_la_CXXFLAGS) $(ARM_CRC_CXXFLAGS) -crc32c_libcrc32c_arm_crc_la_LDFLAGS = $(crc32c_libcrc32c_la_LDFLAGS) - -crc32c_libcrc32c_arm_crc_la_SOURCES = crc32c/src/crc32c_arm64.cc -endif diff --git a/src/Makefile.leveldb.include b/src/Makefile.leveldb.include deleted file mode 100644 index bf14fe206b9..00000000000 --- a/src/Makefile.leveldb.include +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) 2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -LIBLEVELDB_INT = leveldb/libleveldb.la -LIBMEMENV_INT = leveldb/libmemenv.la - -noinst_LTLIBRARIES += $(LIBLEVELDB_INT) -noinst_LTLIBRARIES += $(LIBMEMENV_INT) - -LIBLEVELDB = $(LIBLEVELDB_INT) $(LIBCRC32C) -LIBMEMENV = $(LIBMEMENV_INT) - -LEVELDB_CPPFLAGS = -LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include - -LEVELDB_CPPFLAGS_INT = -LEVELDB_CPPFLAGS_INT += -I$(srcdir)/leveldb -LEVELDB_CPPFLAGS_INT += -I$(srcdir)/crc32c/include -LEVELDB_CPPFLAGS_INT += -D__STDC_LIMIT_MACROS -LEVELDB_CPPFLAGS_INT += -DHAVE_SNAPPY=0 -DHAVE_CRC32C=1 -LEVELDB_CPPFLAGS_INT += -DHAVE_FDATASYNC=@HAVE_FDATASYNC@ -LEVELDB_CPPFLAGS_INT += -DHAVE_FULLFSYNC=@HAVE_FULLFSYNC@ -LEVELDB_CPPFLAGS_INT += -DHAVE_O_CLOEXEC=@HAVE_O_CLOEXEC@ -LEVELDB_CPPFLAGS_INT += -DFALLTHROUGH_INTENDED=[[fallthrough]] - -if WORDS_BIGENDIAN -LEVELDB_CPPFLAGS_INT += -DLEVELDB_IS_BIG_ENDIAN=1 -else -LEVELDB_CPPFLAGS_INT += -DLEVELDB_IS_BIG_ENDIAN=0 -endif - -if TARGET_WINDOWS -LEVELDB_CPPFLAGS_INT += -DLEVELDB_PLATFORM_WINDOWS -D_UNICODE -DUNICODE -D__USE_MINGW_ANSI_STDIO=1 -else -LEVELDB_CPPFLAGS_INT += -DLEVELDB_PLATFORM_POSIX -endif - -leveldb_libleveldb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LEVELDB_CPPFLAGS_INT) $(LEVELDB_CPPFLAGS) - -# Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a -# static version of this library. We don't need a dynamic version, and a dynamic -# version can't be used on windows anyway because the library doesn't currently -# export DLL symbols. -leveldb_libleveldb_la_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized -Wsuggest-override -Werror=suggest-override, $(AM_CXXFLAGS)) $(PIE_FLAGS) -static -leveldb_libleveldb_la_LDFLAGS = $(AM_LDFLAGS) -static - -leveldb_libleveldb_la_SOURCES= -leveldb_libleveldb_la_SOURCES += leveldb/port/port_stdcxx.h -leveldb_libleveldb_la_SOURCES += leveldb/port/port.h -leveldb_libleveldb_la_SOURCES += leveldb/port/thread_annotations.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/db.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/options.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/comparator.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/filter_policy.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/slice.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/table_builder.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/env.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/export.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/c.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/iterator.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/cache.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/dumpfile.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/table.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/write_batch.h -leveldb_libleveldb_la_SOURCES += leveldb/include/leveldb/status.h -leveldb_libleveldb_la_SOURCES += leveldb/db/log_format.h -leveldb_libleveldb_la_SOURCES += leveldb/db/memtable.h -leveldb_libleveldb_la_SOURCES += leveldb/db/version_set.h -leveldb_libleveldb_la_SOURCES += leveldb/db/write_batch_internal.h -leveldb_libleveldb_la_SOURCES += leveldb/db/filename.h -leveldb_libleveldb_la_SOURCES += leveldb/db/version_edit.h -leveldb_libleveldb_la_SOURCES += leveldb/db/dbformat.h -leveldb_libleveldb_la_SOURCES += leveldb/db/builder.h -leveldb_libleveldb_la_SOURCES += leveldb/db/log_writer.h -leveldb_libleveldb_la_SOURCES += leveldb/db/db_iter.h -leveldb_libleveldb_la_SOURCES += leveldb/db/skiplist.h -leveldb_libleveldb_la_SOURCES += leveldb/db/db_impl.h -leveldb_libleveldb_la_SOURCES += leveldb/db/table_cache.h -leveldb_libleveldb_la_SOURCES += leveldb/db/snapshot.h -leveldb_libleveldb_la_SOURCES += leveldb/db/log_reader.h -leveldb_libleveldb_la_SOURCES += leveldb/table/filter_block.h -leveldb_libleveldb_la_SOURCES += leveldb/table/block_builder.h -leveldb_libleveldb_la_SOURCES += leveldb/table/block.h -leveldb_libleveldb_la_SOURCES += leveldb/table/two_level_iterator.h -leveldb_libleveldb_la_SOURCES += leveldb/table/merger.h -leveldb_libleveldb_la_SOURCES += leveldb/table/format.h -leveldb_libleveldb_la_SOURCES += leveldb/table/iterator_wrapper.h -leveldb_libleveldb_la_SOURCES += leveldb/util/crc32c.h -leveldb_libleveldb_la_SOURCES += leveldb/util/env_posix_test_helper.h -leveldb_libleveldb_la_SOURCES += leveldb/util/env_windows_test_helper.h -leveldb_libleveldb_la_SOURCES += leveldb/util/arena.h -leveldb_libleveldb_la_SOURCES += leveldb/util/random.h -leveldb_libleveldb_la_SOURCES += leveldb/util/posix_logger.h -leveldb_libleveldb_la_SOURCES += leveldb/util/hash.h -leveldb_libleveldb_la_SOURCES += leveldb/util/histogram.h -leveldb_libleveldb_la_SOURCES += leveldb/util/coding.h -leveldb_libleveldb_la_SOURCES += leveldb/util/testutil.h -leveldb_libleveldb_la_SOURCES += leveldb/util/mutexlock.h -leveldb_libleveldb_la_SOURCES += leveldb/util/logging.h -leveldb_libleveldb_la_SOURCES += leveldb/util/no_destructor.h -leveldb_libleveldb_la_SOURCES += leveldb/util/testharness.h -leveldb_libleveldb_la_SOURCES += leveldb/util/windows_logger.h - -leveldb_libleveldb_la_SOURCES += leveldb/db/builder.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/c.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/dbformat.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/db_impl.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/db_iter.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/dumpfile.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/filename.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/log_reader.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/log_writer.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/memtable.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/repair.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/table_cache.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/version_edit.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/version_set.cc -leveldb_libleveldb_la_SOURCES += leveldb/db/write_batch.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/block_builder.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/block.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/filter_block.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/format.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/iterator.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/merger.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/table_builder.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/table.cc -leveldb_libleveldb_la_SOURCES += leveldb/table/two_level_iterator.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/arena.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/bloom.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/cache.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/coding.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/comparator.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/crc32c.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/env.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/filter_policy.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/hash.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/histogram.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/logging.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/options.cc -leveldb_libleveldb_la_SOURCES += leveldb/util/status.cc - -if TARGET_WINDOWS -leveldb_libleveldb_la_SOURCES += leveldb/util/env_windows.cc -else -leveldb_libleveldb_la_SOURCES += leveldb/util/env_posix.cc -endif - -leveldb_libmemenv_la_CPPFLAGS = $(leveldb_libleveldb_la_CPPFLAGS) -leveldb_libmemenv_la_CXXFLAGS = $(leveldb_libleveldb_la_CXXFLAGS) -leveldb_libmemenv_la_LDFLAGS = $(leveldb_libleveldb_la_LDFLAGS) -leveldb_libmemenv_la_SOURCES = leveldb/helpers/memenv/memenv.cc -leveldb_libmemenv_la_SOURCES += leveldb/helpers/memenv/memenv.h diff --git a/src/Makefile.minisketch.include b/src/Makefile.minisketch.include deleted file mode 100644 index c6f894f0ca0..00000000000 --- a/src/Makefile.minisketch.include +++ /dev/null @@ -1,39 +0,0 @@ -include minisketch/sources.mk - -LIBMINISKETCH_CPPFLAGS= -LIBMINISKETCH_CPPFLAGS += -DDISABLE_DEFAULT_FIELDS -DENABLE_FIELD_32 - -LIBMINISKETCH = minisketch/libminisketch.a -MINISKETCH_LIBS = $(LIBMINISKETCH) - -if ENABLE_CLMUL -LIBMINISKETCH_CLMUL = minisketch/libminisketch_clmul.a -LIBMINISKETCH_CPPFLAGS += -DHAVE_CLMUL -MINISKETCH_LIBS += $(LIBMINISKETCH_CLMUL) -endif - -EXTRA_LIBRARIES += $(MINISKETCH_LIBS) - -minisketch_libminisketch_clmul_a_SOURCES = $(MINISKETCH_FIELD_CLMUL_SOURCES_INT) $(MINISKETCH_FIELD_CLMUL_HEADERS_INT) -minisketch_libminisketch_clmul_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(CLMUL_CXXFLAGS) -minisketch_libminisketch_clmul_a_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMINISKETCH_CPPFLAGS) - -minisketch_libminisketch_a_SOURCES = $(MINISKETCH_FIELD_GENERIC_SOURCES_INT) $(MINISKETCH_LIB_SOURCES_INT) -minisketch_libminisketch_a_SOURCES += $(MINISKETCH_FIELD_GENERIC_HEADERS_INT) $(MINISKETCH_LIB_HEADERS_INT) $(MINISKETCH_DIST_HEADERS_INT) -minisketch_libminisketch_a_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMINISKETCH_CPPFLAGS) -minisketch_libminisketch_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) - -if ENABLE_TESTS -if !ENABLE_FUZZ -MINISKETCH_TEST = minisketch/test -TESTS += $(MINISKETCH_TEST) -check_PROGRAMS += $(MINISKETCH_TEST) - -minisketch_test_SOURCES = $(MINISKETCH_TEST_SOURCES_INT) -minisketch_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMINISKETCH_CPPFLAGS) -minisketch_test_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -minisketch_test_LDADD = $(MINISKETCH_LIBS) -minisketch_test_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) - -endif -endif diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include deleted file mode 100644 index 1ac6b746889..00000000000 --- a/src/Makefile.qt.include +++ /dev/null @@ -1,409 +0,0 @@ -# Copyright (c) 2013-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -bin_PROGRAMS += qt/bitcoin-qt - -if BUILD_BITCOIN_GUI - bin_PROGRAMS += bitcoin-gui -endif - -EXTRA_LIBRARIES += qt/libbitcoinqt.a - -# bitcoin qt core # -include Makefile.qt_locale.include - -QT_FORMS_UI = \ - qt/forms/addressbookpage.ui \ - qt/forms/askpassphrasedialog.ui \ - qt/forms/coincontroldialog.ui \ - qt/forms/createwalletdialog.ui \ - qt/forms/editaddressdialog.ui \ - qt/forms/helpmessagedialog.ui \ - qt/forms/intro.ui \ - qt/forms/modaloverlay.ui \ - qt/forms/openuridialog.ui \ - qt/forms/optionsdialog.ui \ - qt/forms/overviewpage.ui \ - qt/forms/psbtoperationsdialog.ui \ - qt/forms/receivecoinsdialog.ui \ - qt/forms/receiverequestdialog.ui \ - qt/forms/debugwindow.ui \ - qt/forms/sendcoinsdialog.ui \ - qt/forms/sendcoinsentry.ui \ - qt/forms/signverifymessagedialog.ui \ - qt/forms/transactiondescdialog.ui - -QT_MOC_CPP = \ - qt/moc_addressbookpage.cpp \ - qt/moc_addresstablemodel.cpp \ - qt/moc_askpassphrasedialog.cpp \ - qt/moc_createwalletdialog.cpp \ - qt/moc_bantablemodel.cpp \ - qt/moc_bitcoin.cpp \ - qt/moc_bitcoinaddressvalidator.cpp \ - qt/moc_bitcoinamountfield.cpp \ - qt/moc_bitcoingui.cpp \ - qt/moc_bitcoinunits.cpp \ - qt/moc_clientmodel.cpp \ - qt/moc_coincontroldialog.cpp \ - qt/moc_coincontroltreewidget.cpp \ - qt/moc_csvmodelwriter.cpp \ - qt/moc_editaddressdialog.cpp \ - qt/moc_guiutil.cpp \ - qt/moc_initexecutor.cpp \ - qt/moc_intro.cpp \ - qt/moc_macdockiconhandler.cpp \ - qt/moc_macnotificationhandler.cpp \ - qt/moc_modaloverlay.cpp \ - qt/moc_notificator.cpp \ - qt/moc_openuridialog.cpp \ - qt/moc_optionsdialog.cpp \ - qt/moc_optionsmodel.cpp \ - qt/moc_overviewpage.cpp \ - qt/moc_peertablemodel.cpp \ - qt/moc_peertablesortproxy.cpp \ - qt/moc_paymentserver.cpp \ - qt/moc_psbtoperationsdialog.cpp \ - qt/moc_qrimagewidget.cpp \ - qt/moc_qvalidatedlineedit.cpp \ - qt/moc_qvaluecombobox.cpp \ - qt/moc_receivecoinsdialog.cpp \ - qt/moc_receiverequestdialog.cpp \ - qt/moc_recentrequeststablemodel.cpp \ - qt/moc_rpcconsole.cpp \ - qt/moc_sendcoinsdialog.cpp \ - qt/moc_sendcoinsentry.cpp \ - qt/moc_signverifymessagedialog.cpp \ - qt/moc_splashscreen.cpp \ - qt/moc_trafficgraphwidget.cpp \ - qt/moc_transactiondesc.cpp \ - qt/moc_transactiondescdialog.cpp \ - qt/moc_transactionfilterproxy.cpp \ - qt/moc_transactionoverviewwidget.cpp \ - qt/moc_transactiontablemodel.cpp \ - qt/moc_transactionview.cpp \ - qt/moc_utilitydialog.cpp \ - qt/moc_walletcontroller.cpp \ - qt/moc_walletframe.cpp \ - qt/moc_walletmodel.cpp \ - qt/moc_walletview.cpp - -BITCOIN_MM = \ - qt/macdockiconhandler.mm \ - qt/macnotificationhandler.mm \ - qt/macos_appnap.mm - -QT_MOC = \ - qt/bitcoinamountfield.moc \ - qt/intro.moc \ - qt/overviewpage.moc \ - qt/rpcconsole.moc - -QT_QRC_CPP = qt/qrc_bitcoin.cpp -QT_QRC = qt/bitcoin.qrc -QT_QRC_LOCALE_CPP = qt/qrc_bitcoin_locale.cpp -QT_QRC_LOCALE = qt/bitcoin_locale.qrc - -BITCOIN_QT_H = \ - qt/addressbookpage.h \ - qt/addresstablemodel.h \ - qt/askpassphrasedialog.h \ - qt/bantablemodel.h \ - qt/bitcoin.h \ - qt/bitcoinaddressvalidator.h \ - qt/bitcoinamountfield.h \ - qt/bitcoingui.h \ - qt/bitcoinunits.h \ - qt/clientmodel.h \ - qt/coincontroldialog.h \ - qt/coincontroltreewidget.h \ - qt/createwalletdialog.h \ - qt/csvmodelwriter.h \ - qt/editaddressdialog.h \ - qt/guiconstants.h \ - qt/guiutil.h \ - qt/initexecutor.h \ - qt/intro.h \ - qt/macdockiconhandler.h \ - qt/macnotificationhandler.h \ - qt/macos_appnap.h \ - qt/modaloverlay.h \ - qt/networkstyle.h \ - qt/notificator.h \ - qt/openuridialog.h \ - qt/optionsdialog.h \ - qt/optionsmodel.h \ - qt/overviewpage.h \ - qt/paymentserver.h \ - qt/peertablemodel.h \ - qt/peertablesortproxy.h \ - qt/platformstyle.h \ - qt/psbtoperationsdialog.h \ - qt/qrimagewidget.h \ - qt/qvalidatedlineedit.h \ - qt/qvaluecombobox.h \ - qt/receivecoinsdialog.h \ - qt/receiverequestdialog.h \ - qt/recentrequeststablemodel.h \ - qt/rpcconsole.h \ - qt/sendcoinsdialog.h \ - qt/sendcoinsentry.h \ - qt/sendcoinsrecipient.h \ - qt/signverifymessagedialog.h \ - qt/splashscreen.h \ - qt/trafficgraphwidget.h \ - qt/transactiondesc.h \ - qt/transactiondescdialog.h \ - qt/transactionfilterproxy.h \ - qt/transactionoverviewwidget.h \ - qt/transactionrecord.h \ - qt/transactiontablemodel.h \ - qt/transactionview.h \ - qt/utilitydialog.h \ - qt/walletcontroller.h \ - qt/walletframe.h \ - qt/walletmodel.h \ - qt/walletmodeltransaction.h \ - qt/walletview.h \ - qt/winshutdownmonitor.h - -QT_RES_FONTS = \ - qt/res/fonts/RobotoMono-Bold.ttf - -QT_RES_ICONS = \ - qt/res/icons/add.png \ - qt/res/icons/address-book.png \ - qt/res/icons/bitcoin.ico \ - qt/res/icons/bitcoin_testnet.ico \ - qt/res/icons/bitcoin.png \ - qt/res/icons/chevron.png \ - qt/res/icons/clock1.png \ - qt/res/icons/clock2.png \ - qt/res/icons/clock3.png \ - qt/res/icons/clock4.png \ - qt/res/icons/clock5.png \ - qt/res/icons/connect0.png \ - qt/res/icons/connect1.png \ - qt/res/icons/connect2.png \ - qt/res/icons/connect3.png \ - qt/res/icons/connect4.png \ - qt/res/icons/edit.png \ - qt/res/icons/editcopy.png \ - qt/res/icons/editpaste.png \ - qt/res/icons/export.png \ - qt/res/icons/eye.png \ - qt/res/icons/eye_minus.png \ - qt/res/icons/eye_plus.png \ - qt/res/icons/fontbigger.png \ - qt/res/icons/fontsmaller.png \ - qt/res/icons/hd_disabled.png \ - qt/res/icons/hd_enabled.png \ - qt/res/icons/history.png \ - qt/res/icons/lock_closed.png \ - qt/res/icons/lock_open.png \ - qt/res/icons/network_disabled.png \ - qt/res/icons/overview.png \ - qt/res/icons/proxy.png \ - qt/res/icons/receive.png \ - qt/res/icons/remove.png \ - qt/res/icons/send.png \ - qt/res/icons/synced.png \ - qt/res/icons/transaction0.png \ - qt/res/icons/transaction2.png \ - qt/res/icons/transaction_abandoned.png \ - qt/res/icons/transaction_conflicted.png \ - qt/res/icons/tx_inout.png \ - qt/res/icons/tx_input.png \ - qt/res/icons/tx_output.png \ - qt/res/icons/tx_mined.png \ - qt/res/icons/warning.png - -BITCOIN_QT_BASE_CPP = \ - qt/bantablemodel.cpp \ - qt/bitcoin.cpp \ - qt/bitcoinaddressvalidator.cpp \ - qt/bitcoinamountfield.cpp \ - qt/bitcoingui.cpp \ - qt/bitcoinunits.cpp \ - qt/clientmodel.cpp \ - qt/csvmodelwriter.cpp \ - qt/guiutil.cpp \ - qt/initexecutor.cpp \ - qt/intro.cpp \ - qt/modaloverlay.cpp \ - qt/networkstyle.cpp \ - qt/notificator.cpp \ - qt/optionsdialog.cpp \ - qt/optionsmodel.cpp \ - qt/peertablemodel.cpp \ - qt/peertablesortproxy.cpp \ - qt/platformstyle.cpp \ - qt/qvalidatedlineedit.cpp \ - qt/qvaluecombobox.cpp \ - qt/rpcconsole.cpp \ - qt/splashscreen.cpp \ - qt/trafficgraphwidget.cpp \ - qt/utilitydialog.cpp - -BITCOIN_QT_WINDOWS_CPP = qt/winshutdownmonitor.cpp - -BITCOIN_QT_WALLET_CPP = \ - qt/addressbookpage.cpp \ - qt/addresstablemodel.cpp \ - qt/askpassphrasedialog.cpp \ - qt/coincontroldialog.cpp \ - qt/coincontroltreewidget.cpp \ - qt/createwalletdialog.cpp \ - qt/editaddressdialog.cpp \ - qt/openuridialog.cpp \ - qt/overviewpage.cpp \ - qt/paymentserver.cpp \ - qt/psbtoperationsdialog.cpp \ - qt/qrimagewidget.cpp \ - qt/receivecoinsdialog.cpp \ - qt/receiverequestdialog.cpp \ - qt/recentrequeststablemodel.cpp \ - qt/sendcoinsdialog.cpp \ - qt/sendcoinsentry.cpp \ - qt/signverifymessagedialog.cpp \ - qt/transactiondesc.cpp \ - qt/transactiondescdialog.cpp \ - qt/transactionfilterproxy.cpp \ - qt/transactionoverviewwidget.cpp \ - qt/transactionrecord.cpp \ - qt/transactiontablemodel.cpp \ - qt/transactionview.cpp \ - qt/walletcontroller.cpp \ - qt/walletframe.cpp \ - qt/walletmodel.cpp \ - qt/walletmodeltransaction.cpp \ - qt/walletview.cpp - -BITCOIN_QT_CPP = $(BITCOIN_QT_BASE_CPP) -if TARGET_WINDOWS -BITCOIN_QT_CPP += $(BITCOIN_QT_WINDOWS_CPP) -endif -if ENABLE_WALLET -BITCOIN_QT_CPP += $(BITCOIN_QT_WALLET_CPP) -endif # ENABLE_WALLET - -QT_RES_ANIMATION = $(wildcard $(srcdir)/qt/res/animation/spinner-*.png) - -BITCOIN_QT_RC = qt/res/bitcoin-qt-res.rc - -BITCOIN_QT_INCLUDES = -DQT_NO_KEYWORDS -DQT_USE_QSTRINGBUILDER - -qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ - $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(QR_CFLAGS) $(BOOST_CPPFLAGS) -qt_libbitcoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) -qt_libbitcoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS) - -qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \ - $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(QT_RES_FONTS) $(QT_RES_ICONS) $(QT_RES_ANIMATION) -if TARGET_DARWIN - qt_libbitcoinqt_a_SOURCES += $(BITCOIN_MM) -endif - -nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP) - -# forms/foo.h -> forms/ui_foo.h -QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h)))) - -# Most files will depend on the forms and moc files as includes. Generate them -# before anything else. -$(QT_MOC): $(QT_FORMS_H) -$(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) $(bitcoin_gui_OBJECTS) : | $(QT_MOC) - -# bitcoin-qt and bitcoin-gui binaries # -bitcoin_qt_cppflags = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ - $(QT_INCLUDES) $(QR_CFLAGS) -bitcoin_qt_cxxflags = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) - -bitcoin_qt_sources = qt/main.cpp -if TARGET_WINDOWS - bitcoin_qt_sources += $(BITCOIN_QT_RC) -endif -bitcoin_qt_ldadd = qt/libbitcoinqt.a $(LIBBITCOIN_NODE) -if ENABLE_WALLET -bitcoin_qt_ldadd += $(LIBBITCOIN_UTIL) $(LIBBITCOIN_WALLET) -endif -if ENABLE_ZMQ -bitcoin_qt_ldadd += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -endif -bitcoin_qt_ldadd += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ - $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) \ - $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) -bitcoin_qt_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -bitcoin_qt_libtoolflags = $(AM_LIBTOOLFLAGS) --tag CXX - -qt_bitcoin_qt_CPPFLAGS = $(bitcoin_qt_cppflags) -qt_bitcoin_qt_CXXFLAGS = $(bitcoin_qt_cxxflags) -qt_bitcoin_qt_SOURCES = $(bitcoin_qt_sources) init/bitcoin-qt.cpp -qt_bitcoin_qt_LDADD = $(bitcoin_qt_ldadd) -qt_bitcoin_qt_LDFLAGS = $(bitcoin_qt_ldflags) -qt_bitcoin_qt_LIBTOOLFLAGS = $(bitcoin_qt_libtoolflags) - -bitcoin_gui_CPPFLAGS = $(bitcoin_qt_cppflags) -bitcoin_gui_CXXFLAGS = $(bitcoin_qt_cxxflags) -bitcoin_gui_SOURCES = $(bitcoin_qt_sources) init/bitcoin-gui.cpp -bitcoin_gui_LDADD = $(bitcoin_qt_ldadd) $(LIBBITCOIN_IPC) $(LIBBITCOIN_UTIL) $(LIBMULTIPROCESS_LIBS) -bitcoin_gui_LDFLAGS = $(bitcoin_qt_ldflags) -bitcoin_gui_LIBTOOLFLAGS = $(bitcoin_qt_libtoolflags) - -#locale/foo.ts -> locale/foo.qm -QT_QM=$(QT_TS:.ts=.qm) - -SECONDARY: $(QT_QM) - -$(srcdir)/qt/bitcoinstrings.cpp: FORCE - @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" - $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" $(PYTHON) ../share/qt/extract_strings_qt.py \ - $(libbitcoin_node_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) \ - $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES) \ - $(BITCOIN_QT_BASE_CPP) $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) - -# The resulted bitcoin_en.xlf source file should follow Transifex requirements. -# See: https://docs.transifex.com/formats/xliff#how-to-distinguish-between-a-source-file-and-a-translation-file -translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) - @test -n $(LUPDATE) || echo "lupdate is required for updating translations" - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) -no-obsolete -I $(srcdir) -locations relative $^ -ts $(srcdir)/qt/locale/bitcoin_en.ts - @test -n $(LCONVERT) || echo "lconvert is required for updating translations" - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -drop-translations -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts - @$(SED) -i.old -e 's|source-language="en" target-language="en"|source-language="en"|' -e '/<\/target>/d' $(srcdir)/qt/locale/bitcoin_en.xlf - @rm -f $(srcdir)/qt/locale/bitcoin_en.xlf.old - -$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM) - @test -f $(RCC) || (echo "rcc $(RCC) not found, but is required for generating qrc cpp files"; exit 1) - @cp -f $< $(@D)/temp_$( $@ - @rm $(@D)/temp_$( $@ - -CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno qt/temp_bitcoin_locale.qrc - -CLEANFILES += $(CLEAN_QT) - -bitcoin_qt_clean: FORCE - rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT) - -bitcoin_qt : qt/bitcoin-qt$(EXEEXT) - -ui_%.h: %.ui - @test -f $(UIC) || (echo "uic $(UIC) not found, but is required for generating ui headers"; exit 1) - @$(MKDIR_P) $(@D) - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false) - -%.moc: %.cpp - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(DEFAULT_INCLUDES) $(QT_INCLUDES_UNSUPPRESSED) $(MOC_DEFS) $< > $@ - -moc_%.cpp: %.h - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(DEFAULT_INCLUDES) $(QT_INCLUDES_UNSUPPRESSED) $(MOC_DEFS) $< > $@ - -%.qm: %.ts - @test -f $(LRELEASE) || (echo "lrelease $(LRELEASE) not found, but is required for generating translations"; exit 1) - @$(MKDIR_P) $(@D) - $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@ diff --git a/src/Makefile.qt_locale.include b/src/Makefile.qt_locale.include deleted file mode 100644 index 70abbffaa5c..00000000000 --- a/src/Makefile.qt_locale.include +++ /dev/null @@ -1,124 +0,0 @@ -QT_TS = \ - qt/locale/bitcoin_am.ts \ - qt/locale/bitcoin_ar.ts \ - qt/locale/bitcoin_az.ts \ - qt/locale/bitcoin_az@latin.ts \ - qt/locale/bitcoin_be.ts \ - qt/locale/bitcoin_bg.ts \ - qt/locale/bitcoin_bn.ts \ - qt/locale/bitcoin_br.ts \ - qt/locale/bitcoin_bs.ts \ - qt/locale/bitcoin_ca.ts \ - qt/locale/bitcoin_cmn.ts \ - qt/locale/bitcoin_cs.ts \ - qt/locale/bitcoin_cy.ts \ - qt/locale/bitcoin_da.ts \ - qt/locale/bitcoin_de.ts \ - qt/locale/bitcoin_de_AT.ts \ - qt/locale/bitcoin_de_CH.ts \ - qt/locale/bitcoin_el.ts \ - qt/locale/bitcoin_en.ts \ - qt/locale/bitcoin_eo.ts \ - qt/locale/bitcoin_es.ts \ - qt/locale/bitcoin_es_CL.ts \ - qt/locale/bitcoin_es_CO.ts \ - qt/locale/bitcoin_es_DO.ts \ - qt/locale/bitcoin_es_MX.ts \ - qt/locale/bitcoin_es_SV.ts \ - qt/locale/bitcoin_es_VE.ts \ - qt/locale/bitcoin_et.ts \ - qt/locale/bitcoin_eu.ts \ - qt/locale/bitcoin_fa.ts \ - qt/locale/bitcoin_fi.ts \ - qt/locale/bitcoin_fil.ts \ - qt/locale/bitcoin_fo.ts \ - qt/locale/bitcoin_fr.ts \ - qt/locale/bitcoin_fr_CM.ts \ - qt/locale/bitcoin_fr_LU.ts \ - qt/locale/bitcoin_ga.ts \ - qt/locale/bitcoin_ga_IE.ts \ - qt/locale/bitcoin_gd.ts \ - qt/locale/bitcoin_gl.ts \ - qt/locale/bitcoin_gl_ES.ts \ - qt/locale/bitcoin_gu.ts \ - qt/locale/bitcoin_ha.ts \ - qt/locale/bitcoin_hak.ts \ - qt/locale/bitcoin_he.ts \ - qt/locale/bitcoin_hi.ts \ - qt/locale/bitcoin_hr.ts \ - qt/locale/bitcoin_hu.ts \ - qt/locale/bitcoin_id.ts \ - qt/locale/bitcoin_is.ts \ - qt/locale/bitcoin_it.ts \ - qt/locale/bitcoin_ja.ts \ - qt/locale/bitcoin_ka.ts \ - qt/locale/bitcoin_kk.ts \ - qt/locale/bitcoin_kk@latin.ts \ - qt/locale/bitcoin_kl.ts \ - qt/locale/bitcoin_km.ts \ - qt/locale/bitcoin_kn.ts \ - qt/locale/bitcoin_ko.ts \ - qt/locale/bitcoin_ku.ts \ - qt/locale/bitcoin_ku_IQ.ts \ - qt/locale/bitcoin_ky.ts \ - qt/locale/bitcoin_la.ts \ - qt/locale/bitcoin_lb.ts \ - qt/locale/bitcoin_lt.ts \ - qt/locale/bitcoin_lv.ts \ - qt/locale/bitcoin_mg.ts \ - qt/locale/bitcoin_mi.ts \ - qt/locale/bitcoin_mk.ts \ - qt/locale/bitcoin_ml.ts \ - qt/locale/bitcoin_mn.ts \ - qt/locale/bitcoin_mr.ts \ - qt/locale/bitcoin_mr_IN.ts \ - qt/locale/bitcoin_ms.ts \ - qt/locale/bitcoin_mt.ts \ - qt/locale/bitcoin_my.ts \ - qt/locale/bitcoin_nb.ts \ - qt/locale/bitcoin_ne.ts \ - qt/locale/bitcoin_nl.ts \ - qt/locale/bitcoin_no.ts \ - qt/locale/bitcoin_pa.ts \ - qt/locale/bitcoin_pam.ts \ - qt/locale/bitcoin_pl.ts \ - qt/locale/bitcoin_pt.ts \ - qt/locale/bitcoin_pt_BR.ts \ - qt/locale/bitcoin_ro.ts \ - qt/locale/bitcoin_ru.ts \ - qt/locale/bitcoin_sc.ts \ - qt/locale/bitcoin_sd.ts \ - qt/locale/bitcoin_si.ts \ - qt/locale/bitcoin_sk.ts \ - qt/locale/bitcoin_sl.ts \ - qt/locale/bitcoin_sn.ts \ - qt/locale/bitcoin_so.ts \ - qt/locale/bitcoin_sq.ts \ - qt/locale/bitcoin_sr.ts \ - qt/locale/bitcoin_sr@ijekavianlatin.ts \ - qt/locale/bitcoin_sr@latin.ts \ - qt/locale/bitcoin_sv.ts \ - qt/locale/bitcoin_sw.ts \ - qt/locale/bitcoin_szl.ts \ - qt/locale/bitcoin_ta.ts \ - qt/locale/bitcoin_te.ts \ - qt/locale/bitcoin_th.ts \ - qt/locale/bitcoin_tk.ts \ - qt/locale/bitcoin_tl.ts \ - qt/locale/bitcoin_tr.ts \ - qt/locale/bitcoin_ug.ts \ - qt/locale/bitcoin_uk.ts \ - qt/locale/bitcoin_ur.ts \ - qt/locale/bitcoin_uz.ts \ - qt/locale/bitcoin_uz@Cyrl.ts \ - qt/locale/bitcoin_uz@Latn.ts \ - qt/locale/bitcoin_vi.ts \ - qt/locale/bitcoin_yo.ts \ - qt/locale/bitcoin_yue.ts \ - qt/locale/bitcoin_zh-Hans.ts \ - qt/locale/bitcoin_zh-Hant.ts \ - qt/locale/bitcoin_zh.ts \ - qt/locale/bitcoin_zh_CN.ts \ - qt/locale/bitcoin_zh_HK.ts \ - qt/locale/bitcoin_zh_TW.ts \ - qt/locale/bitcoin_zu.ts diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include deleted file mode 100644 index 89c659d4b92..00000000000 --- a/src/Makefile.qttest.include +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2013-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -bin_PROGRAMS += qt/test/test_bitcoin-qt -TESTS += qt/test/test_bitcoin-qt - -TEST_QT_MOC_CPP = \ - qt/test/moc_apptests.cpp \ - qt/test/moc_optiontests.cpp \ - qt/test/moc_rpcnestedtests.cpp \ - qt/test/moc_uritests.cpp - -if ENABLE_WALLET -TEST_QT_MOC_CPP += \ - qt/test/moc_addressbooktests.cpp \ - qt/test/moc_wallettests.cpp -endif # ENABLE_WALLET - -TEST_QT_H = \ - qt/test/addressbooktests.h \ - qt/test/apptests.h \ - qt/test/optiontests.h \ - qt/test/rpcnestedtests.h \ - qt/test/uritests.h \ - qt/test/util.h \ - qt/test/wallettests.h - -qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ - $(QT_INCLUDES) $(QT_TEST_INCLUDES) $(BOOST_CPPFLAGS) - -qt_test_test_bitcoin_qt_SOURCES = \ - init/bitcoin-qt.cpp \ - qt/test/apptests.cpp \ - qt/test/optiontests.cpp \ - qt/test/rpcnestedtests.cpp \ - qt/test/test_main.cpp \ - qt/test/uritests.cpp \ - qt/test/util.cpp \ - $(TEST_QT_H) -if ENABLE_WALLET -qt_test_test_bitcoin_qt_SOURCES += \ - qt/test/addressbooktests.cpp \ - qt/test/wallettests.cpp \ - wallet/test/wallet_test_fixture.cpp -endif # ENABLE_WALLET - -nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) - -qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_NODE) $(LIBTEST_UTIL) -if ENABLE_WALLET -qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_UTIL) $(LIBBITCOIN_WALLET) -endif -if ENABLE_ZMQ -qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -endif -qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \ - $(LIBMEMENV) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \ - $(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) \ - $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) -qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -qt_test_test_bitcoin_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) - -CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno - -CLEANFILES += $(CLEAN_BITCOIN_QT_TEST) - -test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT) - -test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE - $(MAKE) check-TESTS TESTS=$^ - -test_bitcoin_qt_clean: FORCE - rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS) diff --git a/src/Makefile.test.include b/src/Makefile.test.include deleted file mode 100644 index c396cc2ebff..00000000000 --- a/src/Makefile.test.include +++ /dev/null @@ -1,493 +0,0 @@ -# Copyright (c) 2013-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -if ENABLE_FUZZ_BINARY -noinst_PROGRAMS += test/fuzz/fuzz -endif - -if ENABLE_TESTS -bin_PROGRAMS += test/test_bitcoin -endif - -TEST_SRCDIR = test -TEST_BINARY=test/test_bitcoin$(EXEEXT) -FUZZ_BINARY=test/fuzz/fuzz$(EXEEXT) - -JSON_TEST_FILES = \ - test/data/script_tests.json \ - test/data/bip341_wallet_vectors.json \ - test/data/base58_encode_decode.json \ - test/data/blockfilters.json \ - test/data/key_io_valid.json \ - test/data/key_io_invalid.json \ - test/data/script_tests.json \ - test/data/sighash.json \ - test/data/tx_invalid.json \ - test/data/tx_valid.json - -RAW_TEST_FILES = \ - test/data/asmap.raw - -GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) - -BITCOIN_TEST_SUITE = \ - test/main.cpp \ - $(TEST_UTIL_H) - -FUZZ_SUITE_LD_COMMON = \ - $(LIBTEST_UTIL) \ - $(LIBTEST_FUZZ) \ - $(LIBBITCOIN_NODE) \ - $(LIBBITCOIN_WALLET) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_CONSENSUS) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBBITCOIN_CLI) \ - $(LIBUNIVALUE) \ - $(LIBLEVELDB) \ - $(LIBMEMENV) \ - $(LIBSECP256K1) \ - $(MINISKETCH_LIBS) \ - $(EVENT_LIBS) \ - $(EVENT_PTHREADS_LIBS) - -if USE_UPNP -FUZZ_SUITE_LD_COMMON += $(MINIUPNPC_LIBS) -endif - -if USE_NATPMP -FUZZ_SUITE_LD_COMMON += $(NATPMP_LIBS) -endif - -# test_bitcoin binary # -BITCOIN_TESTS =\ - test/addrman_tests.cpp \ - test/allocator_tests.cpp \ - test/amount_tests.cpp \ - test/argsman_tests.cpp \ - test/arith_uint256_tests.cpp \ - test/banman_tests.cpp \ - test/base32_tests.cpp \ - test/base58_tests.cpp \ - test/base64_tests.cpp \ - test/bech32_tests.cpp \ - test/bip32_tests.cpp \ - test/bip324_tests.cpp \ - test/blockchain_tests.cpp \ - test/blockencodings_tests.cpp \ - test/blockfilter_index_tests.cpp \ - test/blockfilter_tests.cpp \ - test/blockmanager_tests.cpp \ - test/bloom_tests.cpp \ - test/bswap_tests.cpp \ - test/checkqueue_tests.cpp \ - test/cluster_linearize_tests.cpp \ - test/coins_tests.cpp \ - test/coinscachepair_tests.cpp \ - test/coinstatsindex_tests.cpp \ - test/common_url_tests.cpp \ - test/compilerbug_tests.cpp \ - test/compress_tests.cpp \ - test/crypto_tests.cpp \ - test/cuckoocache_tests.cpp \ - test/dbwrapper_tests.cpp \ - test/denialofservice_tests.cpp \ - test/descriptor_tests.cpp \ - test/disconnected_transactions.cpp \ - test/feefrac_tests.cpp \ - test/flatfile_tests.cpp \ - test/fs_tests.cpp \ - test/getarg_tests.cpp \ - test/hash_tests.cpp \ - test/headers_sync_chainwork_tests.cpp \ - test/httpserver_tests.cpp \ - test/i2p_tests.cpp \ - test/interfaces_tests.cpp \ - test/key_io_tests.cpp \ - test/key_tests.cpp \ - test/logging_tests.cpp \ - test/mempool_tests.cpp \ - test/merkle_tests.cpp \ - test/merkleblock_tests.cpp \ - test/miner_tests.cpp \ - test/miniminer_tests.cpp \ - test/miniscript_tests.cpp \ - test/minisketch_tests.cpp \ - test/multisig_tests.cpp \ - test/net_peer_connection_tests.cpp \ - test/net_peer_eviction_tests.cpp \ - test/net_tests.cpp \ - test/netbase_tests.cpp \ - test/node_warnings_tests.cpp \ - test/orphanage_tests.cpp \ - test/peerman_tests.cpp \ - test/pmt_tests.cpp \ - test/policy_fee_tests.cpp \ - test/policyestimator_tests.cpp \ - test/pool_tests.cpp \ - test/pow_tests.cpp \ - test/prevector_tests.cpp \ - test/raii_event_tests.cpp \ - test/random_tests.cpp \ - test/rbf_tests.cpp \ - test/rest_tests.cpp \ - test/result_tests.cpp \ - test/reverselock_tests.cpp \ - test/rpc_tests.cpp \ - test/sanity_tests.cpp \ - test/scheduler_tests.cpp \ - test/script_p2sh_tests.cpp \ - test/script_parse_tests.cpp \ - test/script_segwit_tests.cpp \ - test/script_standard_tests.cpp \ - test/script_tests.cpp \ - test/scriptnum10.h \ - test/scriptnum_tests.cpp \ - test/serfloat_tests.cpp \ - test/serialize_tests.cpp \ - test/settings_tests.cpp \ - test/sighash_tests.cpp \ - test/sigopcount_tests.cpp \ - test/skiplist_tests.cpp \ - test/sock_tests.cpp \ - test/span_tests.cpp \ - test/streams_tests.cpp \ - test/sync_tests.cpp \ - test/system_tests.cpp \ - test/timeoffsets_tests.cpp \ - test/torcontrol_tests.cpp \ - test/transaction_tests.cpp \ - test/translation_tests.cpp \ - test/txindex_tests.cpp \ - test/txpackage_tests.cpp \ - test/txreconciliation_tests.cpp \ - test/txrequest_tests.cpp \ - test/txvalidation_tests.cpp \ - test/txvalidationcache_tests.cpp \ - test/uint256_tests.cpp \ - test/util_tests.cpp \ - test/util_threadnames_tests.cpp \ - test/validation_block_tests.cpp \ - test/validation_chainstate_tests.cpp \ - test/validation_chainstatemanager_tests.cpp \ - test/validation_flush_tests.cpp \ - test/validation_tests.cpp \ - test/validationinterface_tests.cpp \ - test/versionbits_tests.cpp - -if ENABLE_WALLET -BITCOIN_TESTS += \ - wallet/test/feebumper_tests.cpp \ - wallet/test/psbt_wallet_tests.cpp \ - wallet/test/spend_tests.cpp \ - wallet/test/wallet_tests.cpp \ - wallet/test/walletdb_tests.cpp \ - wallet/test/wallet_crypto_tests.cpp \ - wallet/test/wallet_transaction_tests.cpp \ - wallet/test/coinselector_tests.cpp \ - wallet/test/init_tests.cpp \ - wallet/test/ismine_tests.cpp \ - wallet/test/rpc_util_tests.cpp \ - wallet/test/scriptpubkeyman_tests.cpp \ - wallet/test/walletload_tests.cpp \ - wallet/test/group_outputs_tests.cpp - -FUZZ_SUITE_LD_COMMON +=\ - $(SQLITE_LIBS) \ - $(BDB_LIBS) - -if USE_BDB -BITCOIN_TESTS += wallet/test/db_tests.cpp -endif - -FUZZ_WALLET_SRC = \ - wallet/test/fuzz/coincontrol.cpp \ - wallet/test/fuzz/coinselection.cpp \ - wallet/test/fuzz/crypter.cpp \ - wallet/test/fuzz/fees.cpp \ - wallet/test/fuzz/parse_iso8601.cpp \ - wallet/test/fuzz/wallet_bdb_parser.cpp - -if USE_SQLITE -FUZZ_WALLET_SRC += \ - wallet/test/fuzz/notifications.cpp \ - wallet/test/fuzz/scriptpubkeyman.cpp -endif # USE_SQLITE - -BITCOIN_TEST_SUITE += \ - wallet/test/wallet_test_fixture.cpp \ - wallet/test/wallet_test_fixture.h \ - wallet/test/init_test_fixture.cpp \ - wallet/test/init_test_fixture.h -endif # ENABLE_WALLET - -if BUILD_MULTIPROCESS -# Add boost ipc_tests definition to BITCOIN_TESTS -BITCOIN_TESTS += test/ipc_tests.cpp - -# Build ipc_test code in a separate library so it can be compiled with custom -# LIBMULTIPROCESS_CFLAGS without those flags affecting other tests -LIBBITCOIN_IPC_TEST=libbitcoin_ipc_test.a -EXTRA_LIBRARIES += $(LIBBITCOIN_IPC_TEST) -libbitcoin_ipc_test_a_SOURCES = \ - test/ipc_test.cpp \ - test/ipc_test.h -libbitcoin_ipc_test_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -libbitcoin_ipc_test_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(LIBMULTIPROCESS_CFLAGS) - -# Generate various .c++/.h files from the ipc_test.capnp file -include $(MPGEN_PREFIX)/include/mpgen.mk -EXTRA_DIST += test/ipc_test.capnp -libbitcoin_ipc_test_mpgen_output = \ - test/ipc_test.capnp.c++ \ - test/ipc_test.capnp.h \ - test/ipc_test.capnp.proxy-client.c++ \ - test/ipc_test.capnp.proxy-server.c++ \ - test/ipc_test.capnp.proxy-types.c++ \ - test/ipc_test.capnp.proxy-types.h \ - test/ipc_test.capnp.proxy.h -nodist_libbitcoin_ipc_test_a_SOURCES = $(libbitcoin_ipc_test_mpgen_output) -CLEANFILES += $(libbitcoin_ipc_test_mpgen_output) -endif - -# Explicitly list dependencies on generated headers as described in -# https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html#Recording-Dependencies-manually -test/libbitcoin_ipc_test_a-ipc_test.$(OBJEXT): test/ipc_test.capnp.h - -test_test_bitcoin_SOURCES = $(BITCOIN_TEST_SUITE) $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES) -test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(TESTDEFS) $(BOOST_CPPFLAGS) $(EVENT_CFLAGS) -test_test_bitcoin_LDADD = $(LIBTEST_UTIL) -if ENABLE_WALLET -test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) -test_test_bitcoin_CPPFLAGS += $(BDB_CPPFLAGS) -endif -if BUILD_MULTIPROCESS -test_test_bitcoin_LDADD += $(LIBBITCOIN_IPC_TEST) $(LIBMULTIPROCESS_LIBS) -endif - -test_test_bitcoin_LDADD += $(LIBBITCOIN_NODE) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \ - $(LIBLEVELDB) $(LIBMEMENV) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS) $(MINISKETCH_LIBS) -test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) - -test_test_bitcoin_LDADD += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(SQLITE_LIBS) -test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -static - -if ENABLE_ZMQ -test_test_bitcoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -FUZZ_SUITE_LD_COMMON += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -endif - -if ENABLE_FUZZ_BINARY -test_fuzz_fuzz_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(EVENT_CFLAGS) -test_fuzz_fuzz_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -test_fuzz_fuzz_LDADD = $(FUZZ_SUITE_LD_COMMON) -test_fuzz_fuzz_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -test_fuzz_fuzz_SOURCES = \ - $(FUZZ_WALLET_SRC) \ - test/fuzz/addition_overflow.cpp \ - test/fuzz/addrman.cpp \ - test/fuzz/asmap.cpp \ - test/fuzz/asmap_direct.cpp \ - test/fuzz/autofile.cpp \ - test/fuzz/banman.cpp \ - test/fuzz/base_encode_decode.cpp \ - test/fuzz/bech32.cpp \ - test/fuzz/bip324.cpp \ - test/fuzz/bitdeque.cpp \ - test/fuzz/bitset.cpp \ - test/fuzz/block.cpp \ - test/fuzz/block_header.cpp \ - test/fuzz/block_index.cpp \ - test/fuzz/blockfilter.cpp \ - test/fuzz/bloom_filter.cpp \ - test/fuzz/buffered_file.cpp \ - test/fuzz/chain.cpp \ - test/fuzz/checkqueue.cpp \ - test/fuzz/cluster_linearize.cpp \ - test/fuzz/coins_view.cpp \ - test/fuzz/coinscache_sim.cpp \ - test/fuzz/connman.cpp \ - test/fuzz/crypto.cpp \ - test/fuzz/crypto_aes256.cpp \ - test/fuzz/crypto_aes256cbc.cpp \ - test/fuzz/crypto_chacha20.cpp \ - test/fuzz/crypto_chacha20poly1305.cpp \ - test/fuzz/crypto_common.cpp \ - test/fuzz/crypto_diff_fuzz_chacha20.cpp \ - test/fuzz/crypto_hkdf_hmac_sha256_l32.cpp \ - test/fuzz/crypto_poly1305.cpp \ - test/fuzz/cuckoocache.cpp \ - test/fuzz/decode_tx.cpp \ - test/fuzz/descriptor_parse.cpp \ - test/fuzz/deserialize.cpp \ - test/fuzz/eval_script.cpp \ - test/fuzz/feefrac.cpp \ - test/fuzz/fee_rate.cpp \ - test/fuzz/feeratediagram.cpp \ - test/fuzz/fees.cpp \ - test/fuzz/flatfile.cpp \ - test/fuzz/float.cpp \ - test/fuzz/golomb_rice.cpp \ - test/fuzz/headerssync.cpp \ - test/fuzz/hex.cpp \ - test/fuzz/http_request.cpp \ - test/fuzz/i2p.cpp \ - test/fuzz/integer.cpp \ - test/fuzz/key.cpp \ - test/fuzz/key_io.cpp \ - test/fuzz/kitchen_sink.cpp \ - test/fuzz/load_external_block_file.cpp \ - test/fuzz/locale.cpp \ - test/fuzz/merkleblock.cpp \ - test/fuzz/message.cpp \ - test/fuzz/miniscript.cpp \ - test/fuzz/minisketch.cpp \ - test/fuzz/mini_miner.cpp \ - test/fuzz/muhash.cpp \ - test/fuzz/multiplication_overflow.cpp \ - test/fuzz/net.cpp \ - test/fuzz/net_permissions.cpp \ - test/fuzz/netaddress.cpp \ - test/fuzz/netbase_dns_lookup.cpp \ - test/fuzz/node_eviction.cpp \ - test/fuzz/p2p_handshake.cpp \ - test/fuzz/p2p_transport_serialization.cpp \ - test/fuzz/package_eval.cpp \ - test/fuzz/parse_hd_keypath.cpp \ - test/fuzz/parse_numbers.cpp \ - test/fuzz/parse_script.cpp \ - test/fuzz/parse_univalue.cpp \ - test/fuzz/partially_downloaded_block.cpp \ - test/fuzz/policy_estimator.cpp \ - test/fuzz/policy_estimator_io.cpp \ - test/fuzz/poolresource.cpp \ - test/fuzz/pow.cpp \ - test/fuzz/prevector.cpp \ - test/fuzz/primitives_transaction.cpp \ - test/fuzz/process_message.cpp \ - test/fuzz/process_messages.cpp \ - test/fuzz/protocol.cpp \ - test/fuzz/psbt.cpp \ - test/fuzz/random.cpp \ - test/fuzz/rbf.cpp \ - test/fuzz/rolling_bloom_filter.cpp \ - test/fuzz/rpc.cpp \ - test/fuzz/script.cpp \ - test/fuzz/script_assets_test_minimizer.cpp \ - test/fuzz/script_descriptor_cache.cpp \ - test/fuzz/script_flags.cpp \ - test/fuzz/script_format.cpp \ - test/fuzz/script_interpreter.cpp \ - test/fuzz/script_ops.cpp \ - test/fuzz/script_parsing.cpp \ - test/fuzz/script_sigcache.cpp \ - test/fuzz/script_sign.cpp \ - test/fuzz/scriptnum_ops.cpp \ - test/fuzz/secp256k1_ec_seckey_import_export_der.cpp \ - test/fuzz/secp256k1_ecdsa_signature_parse_der_lax.cpp \ - test/fuzz/signature_checker.cpp \ - test/fuzz/signet.cpp \ - test/fuzz/socks5.cpp \ - test/fuzz/span.cpp \ - test/fuzz/string.cpp \ - test/fuzz/strprintf.cpp \ - test/fuzz/system.cpp \ - test/fuzz/timeoffsets.cpp \ - test/fuzz/torcontrol.cpp \ - test/fuzz/transaction.cpp \ - test/fuzz/tx_in.cpp \ - test/fuzz/tx_out.cpp \ - test/fuzz/tx_pool.cpp \ - test/fuzz/txorphan.cpp \ - test/fuzz/txrequest.cpp \ - test/fuzz/utxo_snapshot.cpp \ - test/fuzz/utxo_total_supply.cpp \ - test/fuzz/validation_load_mempool.cpp \ - test/fuzz/vecdeque.cpp \ - test/fuzz/versionbits.cpp -endif # ENABLE_FUZZ_BINARY - -nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) - -$(BITCOIN_TESTS): $(GENERATED_TEST_FILES) - -CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno test/fuzz/*.gcda test/fuzz/*.gcno test/util/*.gcda test/util/*.gcno $(GENERATED_TEST_FILES) $(addsuffix .log,$(basename $(BITCOIN_TESTS))) - -CLEANFILES += $(CLEAN_BITCOIN_TEST) - -if TARGET_WINDOWS -bitcoin_test: $(TEST_BINARY) -else -if ENABLE_BENCH -bitcoin_test: $(TEST_BINARY) $(BENCH_BINARY) -else -bitcoin_test: $(TEST_BINARY) -endif -endif - -bitcoin_test_check: $(TEST_BINARY) FORCE - $(MAKE) check-TESTS TESTS=$^ - -bitcoin_test_clean : FORCE - rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY) - -check-unit: $(BITCOIN_TESTS:.cpp=.cpp.test) - -check-local: check-unit -if BUILD_BITCOIN_TX - @echo "Running test/util/test_runner.py..." - $(PYTHON) $(top_builddir)/test/util/test_runner.py -endif - @echo "Running test/util/rpcauth-test.py..." - $(PYTHON) $(top_builddir)/test/util/rpcauth-test.py -if TARGET_WINDOWS -else -if ENABLE_BENCH - @echo "Running bench/bench_bitcoin (one iteration sanity check, only high priority)..." - $(BENCH_BINARY) -sanity-check -priority-level=high -endif -endif - $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check - -if ENABLE_TESTS -UNIVALUE_TESTS = univalue/test/object univalue/test/unitester -noinst_PROGRAMS += $(UNIVALUE_TESTS) -TESTS += $(UNIVALUE_TESTS) - -univalue_test_unitester_SOURCES = $(UNIVALUE_TEST_UNITESTER_INT) -univalue_test_unitester_LDADD = $(LIBUNIVALUE) -univalue_test_unitester_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -DJSON_TEST_SRC=\"$(srcdir)/$(UNIVALUE_TEST_DATA_DIR_INT)\" -univalue_test_unitester_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS) - -univalue_test_object_SOURCES = $(UNIVALUE_TEST_OBJECT_INT) -univalue_test_object_LDADD = $(LIBUNIVALUE) -univalue_test_object_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS) -endif - -%.cpp.test: %.cpp - @echo Running tests: $$(\ - cat $< | \ - grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \ - cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\ - ) from $< - $(AM_V_at)export TEST_LOGFILE=$(abs_builddir)/$$(\ - echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/ \ - ) && \ - $(TEST_BINARY) --catch_system_errors=no -l test_suite -t "$$(\ - cat $< | \ - grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \ - cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\ - )" -- DEBUG_LOG_OUT > "$$TEST_LOGFILE" 2>&1 || (cat "$$TEST_LOGFILE" && false) - -%.json.h: %.json - @$(MKDIR_P) $(@D) - $(AM_V_GEN) { \ - echo "#include " && \ - echo "namespace json_tests{" && \ - echo "static const std::string $(*F){" && \ - $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ - echo "};};"; \ - } > "$@.new" && mv -f "$@.new" "$@" diff --git a/src/Makefile.test_fuzz.include b/src/Makefile.test_fuzz.include deleted file mode 100644 index b4337991e42..00000000000 --- a/src/Makefile.test_fuzz.include +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2013-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -LIBTEST_FUZZ=libtest_fuzz.a - -EXTRA_LIBRARIES += \ - $(LIBTEST_FUZZ) - -TEST_FUZZ_H = \ - test/fuzz/fuzz.h \ - test/fuzz/FuzzedDataProvider.h \ - test/fuzz/util.h \ - test/fuzz/util/descriptor.h \ - test/fuzz/util/mempool.h \ - test/fuzz/util/net.h - -libtest_fuzz_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -libtest_fuzz_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libtest_fuzz_a_SOURCES = \ - test/fuzz/fuzz.cpp \ - test/fuzz/util.cpp \ - test/fuzz/util/descriptor.cpp \ - test/fuzz/util/mempool.cpp \ - test/fuzz/util/net.cpp \ - $(TEST_FUZZ_H) diff --git a/src/Makefile.test_util.include b/src/Makefile.test_util.include deleted file mode 100644 index 0c0e849fba3..00000000000 --- a/src/Makefile.test_util.include +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2013-2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -LIBTEST_UTIL=libtest_util.a - -EXTRA_LIBRARIES += \ - $(LIBTEST_UTIL) - -TEST_UTIL_H = \ - test/util/blockfilter.h \ - test/util/chainstate.h \ - test/util/cluster_linearize.h \ - test/util/coins.h \ - test/util/index.h \ - test/util/json.h \ - test/util/logging.h \ - test/util/mining.h \ - test/util/net.h \ - test/util/poolresourcetester.h \ - test/util/random.h \ - test/util/script.h \ - test/util/setup_common.h \ - test/util/str.h \ - test/util/transaction_utils.h \ - test/util/txmempool.h \ - test/util/validation.h - -if ENABLE_WALLET -TEST_UTIL_H += wallet/test/util.h -endif # ENABLE_WALLET - -libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) -libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libtest_util_a_SOURCES = \ - test/util/blockfilter.cpp \ - test/util/coins.cpp \ - test/util/index.cpp \ - test/util/json.cpp \ - test/util/logging.cpp \ - test/util/mining.cpp \ - test/util/net.cpp \ - test/util/random.cpp \ - test/util/script.cpp \ - test/util/setup_common.cpp \ - test/util/str.cpp \ - test/util/transaction_utils.cpp \ - test/util/txmempool.cpp \ - test/util/validation.cpp - -if ENABLE_WALLET -libtest_util_a_SOURCES += wallet/test/util.cpp -endif # ENABLE_WALLET - -libtest_util_a_SOURCES += $(TEST_UTIL_H) diff --git a/src/Makefile.univalue.include b/src/Makefile.univalue.include deleted file mode 100644 index 3644e363688..00000000000 --- a/src/Makefile.univalue.include +++ /dev/null @@ -1,6 +0,0 @@ -include univalue/sources.mk - -LIBUNIVALUE = libunivalue.la -noinst_LTLIBRARIES += $(LIBUNIVALUE) -libunivalue_la_SOURCES = $(UNIVALUE_LIB_SOURCES_INT) $(UNIVALUE_DIST_HEADERS_INT) $(UNIVALUE_LIB_HEADERS_INT) $(UNIVALUE_TEST_FILES_INT) -libunivalue_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) diff --git a/src/bench/.gitignore b/src/bench/.gitignore deleted file mode 100644 index e231fe4cab5..00000000000 --- a/src/bench/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bench_bitcoin diff --git a/src/ipc/capnp/.gitignore b/src/ipc/capnp/.gitignore deleted file mode 100644 index 036df1430c5..00000000000 --- a/src/ipc/capnp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# capnp generated files -*.capnp.* diff --git a/src/qt/Makefile b/src/qt/Makefile deleted file mode 100644 index 3bd6199059b..00000000000 --- a/src/qt/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -.PHONY: FORCE -all: FORCE - $(MAKE) -C .. bitcoin_qt test_bitcoin_qt -clean: FORCE - $(MAKE) -C .. bitcoin_qt_clean test_bitcoin_qt_clean -check: FORCE - $(MAKE) -C .. test_bitcoin_qt_check -bitcoin-qt bitcoin-qt.exe: FORCE - $(MAKE) -C .. bitcoin_qt -apk: FORCE - $(MAKE) -C .. bitcoin_qt_apk diff --git a/src/qt/test/Makefile b/src/qt/test/Makefile deleted file mode 100644 index a02f86b62ac..00000000000 --- a/src/qt/test/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: - $(MAKE) -C ../../ test_bitcoin_qt -clean: - $(MAKE) -C ../../ test_bitcoin_qt_clean -check: - $(MAKE) -C ../../ test_bitcoin_qt_check diff --git a/src/test/.gitignore b/src/test/.gitignore deleted file mode 100644 index 036df1430c5..00000000000 --- a/src/test/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# capnp generated files -*.capnp.* diff --git a/src/test/Makefile b/src/test/Makefile deleted file mode 100644 index 87bf73fec98..00000000000 --- a/src/test/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: - $(MAKE) -C .. bitcoin_test -clean: - $(MAKE) -C .. bitcoin_test_clean -check: - $(MAKE) -C .. bitcoin_test_check diff --git a/src/univalue/.gitignore b/src/univalue/.gitignore deleted file mode 100644 index 19e42f814a5..00000000000 --- a/src/univalue/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -.deps/ -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -compile -config.log -config.status -config.guess -config.sub -configure -depcomp -install-sh -missing -stamp-h1 -univalue-config.h* -test-driver -libtool -ltmain.sh -test-suite.log - -*.a -*.la -*.lo -*.logs -*.o -*.pc -*.trs - -.dirstamp -.libs diff --git a/src/univalue/lib/.gitignore b/src/univalue/lib/.gitignore deleted file mode 100644 index ee7fc2851cd..00000000000 --- a/src/univalue/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -gen -.libs diff --git a/src/univalue/sources.mk b/src/univalue/sources.mk deleted file mode 100644 index 5e4d9c38319..00000000000 --- a/src/univalue/sources.mk +++ /dev/null @@ -1,86 +0,0 @@ -# - All Variables ending in _HEADERS or _SOURCES confuse automake, so the -# _INT postfix is applied. -# - Convenience variables, for example a UNIVALUE_TEST_DIR should not be used -# as they interfere with automatic dependency generation -# - The %reldir% is the relative path from the Makefile.am. - -UNIVALUE_INCLUDE_DIR_INT = %reldir%/include - -UNIVALUE_DIST_HEADERS_INT = -UNIVALUE_DIST_HEADERS_INT += %reldir%/include/univalue.h -UNIVALUE_DIST_HEADERS_INT += %reldir%/include/univalue_utffilter.h -UNIVALUE_DIST_HEADERS_INT += %reldir%/include/univalue_escapes.h - -UNIVALUE_LIB_SOURCES_INT = -UNIVALUE_LIB_SOURCES_INT += %reldir%/lib/univalue.cpp -UNIVALUE_LIB_SOURCES_INT += %reldir%/lib/univalue_get.cpp -UNIVALUE_LIB_SOURCES_INT += %reldir%/lib/univalue_read.cpp -UNIVALUE_LIB_SOURCES_INT += %reldir%/lib/univalue_write.cpp - -UNIVALUE_TEST_DATA_DIR_INT = %reldir%/test - -UNIVALUE_TEST_UNITESTER_INT = -UNIVALUE_TEST_UNITESTER_INT += %reldir%/test/unitester.cpp - -UNIVALUE_TEST_JSON_INT = -UNIVALUE_TEST_JSON_INT += %reldir%/test/test_json.cpp - -UNIVALUE_TEST_OBJECT_INT = -UNIVALUE_TEST_OBJECT_INT += %reldir%/test/object.cpp - -UNIVALUE_TEST_FILES_INT = -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail1.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail2.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail3.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail4.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail5.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail6.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail7.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail8.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail9.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail10.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail11.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail12.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail13.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail14.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail15.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail16.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail17.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail18.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail19.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail20.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail21.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail22.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail23.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail24.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail25.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail26.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail27.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail28.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail29.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail30.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail31.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail32.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail33.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail34.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail35.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail36.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail37.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail38.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail39.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail40.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail41.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail42.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail44.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/fail45.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/pass1.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/pass2.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/pass3.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/pass4.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round1.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round2.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round3.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round4.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round5.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round6.json -UNIVALUE_TEST_FILES_INT += %reldir%/test/round7.json diff --git a/src/univalue/test/.gitignore b/src/univalue/test/.gitignore deleted file mode 100644 index 5812c96b143..00000000000 --- a/src/univalue/test/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ - -object -unitester -test_json - -*.trs -*.log diff --git a/test/functional/.gitignore b/test/functional/.gitignore index cb41d94423e..0d20b6487c6 100644 --- a/test/functional/.gitignore +++ b/test/functional/.gitignore @@ -1,2 +1 @@ *.pyc -cache From faa382ae7642da0e436ea2c7f7eac67386280a7e Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:43:31 +0100 Subject: [PATCH 4/4] ci, doc: Drop reference to `src/.bear-tidy-config` --- ci/test/03_test_script.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 3088898c6a6..baeeca4814d 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -162,8 +162,6 @@ if [ "${RUN_TIDY}" = "true" ]; then echo "^^^ ⚠️ Failure generated from clang-tidy" false fi - # Filter out files by regex here, because regex may not be - # accepted in src/.bear-tidy-config # Filter out: # * qt qrc and moc generated files jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' "${BASE_BUILD_DIR}/compile_commands.json" > tmp.json