Skip to content

Commit

Permalink
Merge #290: configure: Clean ups
Browse files Browse the repository at this point in the history
860e3bb configure: Fix reduced surjection proof size (Tim Ruffing)
0873358 configure: Reorder modules also for AC_ARG_ENABLE (Tim Ruffing)
9de973f configure: Document canonical order of modules (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 860e3bb

Tree-SHA512: cfbaf9cb8a686aeab43ef6727b38d94467b862746062c1c06876bd98614ada7a00bc617481b0e0059dc294250a94a53581f3ffd685aa05c47a665950b280da51
  • Loading branch information
jonasnick committed Feb 16, 2024
2 parents 1e04d32 + 860e3bb commit 900a437
Showing 1 changed file with 39 additions and 32 deletions.
71 changes: 39 additions & 32 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,26 @@ AC_ARG_ENABLE(examples,
AS_HELP_STRING([--enable-examples],[compile the examples [default=no]]), [],
[SECP_SET_DEFAULT([enable_examples], [no], [yes])])

AC_ARG_ENABLE(module_bppp,
AS_HELP_STRING([--enable-module-bppp],[enable Bulletproofs++ module (experimental)]),
[],
[SECP_SET_DEFAULT([enable_module_bppp], [no], [yes])])

AC_ARG_ENABLE(module_ecdh,
AS_HELP_STRING([--enable-module-ecdh],[enable ECDH module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_ecdh], [yes], [yes])])

AC_ARG_ENABLE(module_musig,
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
[],
[SECP_SET_DEFAULT([enable_module_musig], [no], [yes])])

AC_ARG_ENABLE(module_recovery,
AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]), [],
[SECP_SET_DEFAULT([enable_module_recovery], [no], [yes])])

AC_ARG_ENABLE(module_extrakeys,
AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_extrakeys], [yes], [yes])])

AC_ARG_ENABLE(module_schnorrsig,
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])

AC_ARG_ENABLE(module_ellswift,
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])

AC_ARG_ENABLE(module_generator,
AS_HELP_STRING([--enable-module-generator],[enable NUMS generator module [default=no]]),
[],
Expand All @@ -196,28 +198,35 @@ AC_ARG_ENABLE(module_rangeproof,
[],
[SECP_SET_DEFAULT([enable_module_rangeproof], [no], [yes])])

AC_ARG_ENABLE(module_surjectionproof,
AS_HELP_STRING([--enable-module-surjectionproof],[enable surjection proof module [default=no]]),
[],
[SECP_SET_DEFAULT([enable_module_surjectionproof], [no], [yes])])
AC_ARG_ENABLE(reduced_surjection_proof_size,
AS_HELP_STRING([--enable-reduced-surjection-proof-size],[use reduced surjection proof size (disabling parsing and verification) [default=no]]),
[],
[SECP_SET_DEFAULT([enable_reduced_surjection_proof_size], [no], [no])])

AC_ARG_ENABLE(module_whitelist,
AS_HELP_STRING([--enable-module-whitelist],[enable key whitelisting module [default=no]]),
[],
[SECP_SET_DEFAULT([enable_module_whitelist], [no], [yes])])

AC_ARG_ENABLE(module_extrakeys,
AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_extrakeys], [yes], [yes])])

AC_ARG_ENABLE(module_schnorrsig,
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])

AC_ARG_ENABLE(module_ellswift,
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
AC_ARG_ENABLE(module_musig,
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
[],
[SECP_SET_DEFAULT([enable_module_musig], [no], [yes])])

AC_ARG_ENABLE(module_ecdsa_s2c,
AS_HELP_STRING([--enable-module-ecdsa-s2c],[enable ECDSA sign-to-contract module [default=no]]),
[],
[SECP_SET_DEFAULT([enable_module_ecdsa_s2c], [no], [yes])])

AC_ARG_ENABLE(module_bppp,
AS_HELP_STRING([--enable-module-bppp],[enable Bulletproofs++ module (experimental)]),
[],
[SECP_SET_DEFAULT([enable_module_bppp], [no], [yes])])

AC_ARG_ENABLE(module_ecdsa-adaptor,
AS_HELP_STRING([--enable-module-ecdsa-adaptor],[enable ECDSA adaptor module [default=no]]),
[],
Expand All @@ -227,16 +236,6 @@ AC_ARG_ENABLE(external_default_callbacks,
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
[SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])

AC_ARG_ENABLE(module_surjectionproof,
AS_HELP_STRING([--enable-module-surjectionproof],[enable surjection proof module [default=no]]),
[],
[SECP_SET_DEFAULT([enable_module_surjectionproof], [no], [yes])])

AC_ARG_ENABLE(reduced_surjection_proof_size,
AS_HELP_STRING([--enable-reduced-surjection-proof-size],[use reduced surjection proof size (disabling parsing and verification) [default=no]]),
[],
[SECP_SET_DEFAULT([use_reduced_surjection_proof_size], [no], [no])])

# Test-only override of the (autodetected by the C code) "widemul" setting.
# Legal values are:
# * int64 (for [u]int64_t),
Expand Down Expand Up @@ -527,7 +526,7 @@ if test x"$enable_external_default_callbacks" = x"yes"; then
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1"
fi

if test x"$use_reduced_surjection_proof_size" = x"yes"; then
if test x"$enable_reduced_surjection_proof_size" = x"yes"; then
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_REDUCED_SURJECTION_PROOF_SIZE=1"
fi

Expand Down Expand Up @@ -610,6 +609,10 @@ AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)

AC_OUTPUT

# The order in which all modules are listed here should be considered the
# canonical order. This order (or, when appropriate, its reserve) should be used
# everywhere we list or process modules, i.e., here and in other build system
# files and docs.
echo
echo "Build Options:"
echo " with external callbacks = $enable_external_default_callbacks"
Expand All @@ -623,9 +626,13 @@ echo " module recovery = $enable_module_recovery"
echo " module extrakeys = $enable_module_extrakeys"
echo " module schnorrsig = $enable_module_schnorrsig"
echo " module ellswift = $enable_module_ellswift"
# libsecp256k1-zkp modules, in the order they were added to the libsecp256k1-zkp
echo " module generator = $enable_module_generator"
echo " module rangeproof = $enable_module_rangeproof"
echo " module surjectionproof = $enable_module_surjectionproof"
if test x"$enable_module_surjectionproof" = x"yes" && test x"$enable_reduced_surjection_proof_size" = x"yes"; then
echo " reduced proof size = $enable_reduced_surjection_proof_size"
fi
echo " module whitelist = $enable_module_whitelist"
echo " module musig = $enable_module_musig"
echo " module ecdsa-s2c = $enable_module_ecdsa_s2c"
Expand Down

0 comments on commit 900a437

Please sign in to comment.