Skip to content

Commit

Permalink
build: remove unneeded configure $*val setting
Browse files Browse the repository at this point in the history
Setting these values has been redundant since autoconf 2.60, and we
require 2.69. Should not change behaviour. Includes minor formatting
improvements.

secp256k1 also recently made the same change:
bitcoin-core/secp256k1#1079.
  • Loading branch information
fanquake committed Mar 25, 2022
1 parent c9b5790 commit 4ef6189
Showing 1 changed file with 94 additions and 87 deletions.
181 changes: 94 additions & 87 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,10 @@ case $host in
;;
esac

AC_ARG_WITH([seccomp],
[AS_HELP_STRING([--with-seccomp],
[enable experimental syscall sandbox feature (-sandbox), default is yes if seccomp-bpf is detected under Linux x86_64])],
[seccomp_found=$withval],
[seccomp_found=auto])

AC_ARG_ENABLE([c++20],
[AS_HELP_STRING([--enable-c++20],
[enable compilation in c++20 mode (disabled by default)])],
[use_cxx20=$enableval],
[],
[use_cxx20=no])

dnl Require C++17 compiler (no GNU extensions)
Expand Down Expand Up @@ -134,105 +128,109 @@ AC_ARG_VAR([PYTHONPATH], [Augments the default search path for python module fil
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_ENABLE([upnp-default],
[AS_HELP_STRING([--enable-upnp-default],
[if UPNP is enabled, turn it on at startup (default is no)])],
[use_upnp_default=$enableval],
[],
[use_upnp_default=no])

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])
[AS_HELP_STRING([--with-natpmp],
[enable NAT-PMP (default is yes if libnatpmp is found)])],
[],
[use_natpmp=auto])

AC_ARG_ENABLE([natpmp-default],
[AS_HELP_STRING([--enable-natpmp-default],
[if NAT-PMP is enabled, turn it on at startup (default is no)])],
[use_natpmp_default=$enableval],
[use_natpmp_default=no])
[AS_HELP_STRING([--enable-natpmp-default],
[if NAT-PMP is enabled, turn it on at startup (default is no)])],
[],
[use_natpmp_default=no])

AC_ARG_ENABLE(tests,
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
[use_tests=$enableval],
[use_tests=yes])
AS_HELP_STRING([--disable-tests],
[do not compile tests (default is to compile)]),
[],
[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])
AS_HELP_STRING([--disable-gui-tests],
[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
[],
[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])
AS_HELP_STRING([--disable-bench],
[do not compile benchmarks (default is to compile)]),
[],
[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])
AS_HELP_STRING([--enable-extended-functional-tests],
[enable expensive functional tests when using lcov (default no)]),
[],
[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])
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=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])
AS_HELP_STRING([--enable-fuzz-binary],
[enable building of fuzz binary (default yes).]),
[],
[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 when possible)])],
[use_hardening=$enableval],
[],
[use_hardening=auto])

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).
Expand All @@ -241,32 +239,32 @@ 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([--enable-suppress-external-warnings],
[Suppress warnings from external headers (default is no)])],
[suppress_external_warnings=$enableval],
[Suppress warnings from external headers (default is no)])],
[],
[suppress_external_warnings=no])

AC_ARG_ENABLE([lcov],
[AS_HELP_STRING([--enable-lcov],
[enable lcov testing (default is no)])],
[use_lcov=$enableval],
[],
[use_lcov=no])

AC_ARG_ENABLE([lcov-branch-coverage],
[AS_HELP_STRING([--enable-lcov-branch-coverage],
[enable lcov testing branch coverage (default is no)])],
[use_lcov_branch=yes],
[],
[use_lcov_branch=no])

AC_ARG_ENABLE([threadlocal],
[AS_HELP_STRING([--enable-threadlocal],
[enable features that depend on the c++ thread_local keyword (currently just thread names in debug logs). (default is to enable if there is platform support)])],
[use_thread_local=$enableval],
[],
[use_thread_local=auto])

AC_ARG_ENABLE([asm],
[AS_HELP_STRING([--disable-asm],
[disable assembly routines (enabled by default)])],
[use_asm=$enableval],
[],
[use_asm=yes])

if test "$use_asm" = "yes"; then
Expand All @@ -276,69 +274,78 @@ fi
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)
[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])
[AS_HELP_STRING([--enable-debug],
[use compiler flags and macros suited for debugging (default is no)])],
[],
[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])
[AS_HELP_STRING([--with-sanitizers],
[comma separated list of extra sanitizers to build with (default is none enabled)])],
[])

dnl Enable gprof profiling
AC_ARG_ENABLE([gprof],
[AS_HELP_STRING([--enable-gprof],
[use gprof profiling compiler flags (default is no)])],
[enable_gprof=$enableval],
[enable_gprof=no])
[AS_HELP_STRING([--enable-gprof],
[use gprof profiling compiler flags (default is no)])],
[],
[enable_gprof=no])

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])
[AS_HELP_STRING([--enable-werror],
[Treat compiler warnings as errors (default is no)])],
[],
[enable_werror=no])

AC_ARG_ENABLE([external-signer],
[AS_HELP_STRING([--enable-external-signer],[compile external signer support (default is yes, requires Boost::Process)])],
[use_external_signer=$enableval],
[use_external_signer=auto])
[AS_HELP_STRING([--enable-external-signer],
[compile external signer support (default is yes, requires Boost::Process)])],
[],
[use_external_signer=auto])

AC_ARG_ENABLE([lto],
[AS_HELP_STRING([--enable-lto],[build using LTO (default is no)])],
[enable_lto=$enableval],
[enable_lto=no])
[AS_HELP_STRING([--enable-lto],
[build using LTO (default is no)])],
[],
[enable_lto=no])

AC_ARG_WITH([seccomp],
[AS_HELP_STRING([--with-seccomp],
[enable experimental syscall sandbox feature (-sandbox), default is yes if seccomp-bpf is detected under Linux x86_64])],
[],
[seccomp_found=auto])

AC_LANG_PUSH([C++])

Expand Down Expand Up @@ -627,49 +634,49 @@ CPPFLAGS="$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([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
[build_bitcoin_libs=$withval],
[],
[build_bitcoin_libs=yes])

AC_ARG_WITH([daemon],
[AS_HELP_STRING([--with-daemon],
[build bitcoind daemon (default=yes)])],
[build_bitcoind=$withval],
[],
[build_bitcoind=yes])

case $host in
Expand Down

0 comments on commit 4ef6189

Please sign in to comment.