dogecoin/build-aux/m4/dogecoin_experimental.m4
Patrick Lodder 5446a74f08
build: explicitly enable experimental functions
Introduces a configure flag --enable-experimental that controls at
configure time whether or not experimental features can be
enabled. This serves as a circuit breaker to both make sure that
CI jobs are configured properly, and ensures manual compilations
are intentionally configuring experimental / non-production code.

Additionally, experimental features get listed in the summary after
configuration completes if enabled.

Further work can insert compile time checks with static_asserts
against the ALLOW_DOGECOIN_EXPERIMENTAL macro.
2022-10-30 13:20:25 +01:00

12 lines
520 B
Plaintext

dnl Copyright (c) 2022 The Dogecoin 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 function to make experimental flag checking easy
dnl experimental functions simply call this macro inside their checks
AC_DEFUN([DOGECOIN_REQUIRE_EXPERIMENTAL],[
if test x$allow_experimental != xyes; then
AC_MSG_ERROR([Experimental features need to be enabled explicitly. Use --enable-experimental.])
fi
])