Skip to content

Commit 900a437

Browse files
committed
Merge #290: configure: Clean ups
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
2 parents 1e04d32 + 860e3bb commit 900a437

File tree

1 file changed

+39
-32
lines changed

1 file changed

+39
-32
lines changed

configure.ac

+39-32
Original file line numberDiff line numberDiff line change
@@ -168,24 +168,26 @@ AC_ARG_ENABLE(examples,
168168
AS_HELP_STRING([--enable-examples],[compile the examples [default=no]]), [],
169169
[SECP_SET_DEFAULT([enable_examples], [no], [yes])])
170170

171-
AC_ARG_ENABLE(module_bppp,
172-
AS_HELP_STRING([--enable-module-bppp],[enable Bulletproofs++ module (experimental)]),
173-
[],
174-
[SECP_SET_DEFAULT([enable_module_bppp], [no], [yes])])
175-
176171
AC_ARG_ENABLE(module_ecdh,
177172
AS_HELP_STRING([--enable-module-ecdh],[enable ECDH module [default=yes]]), [],
178173
[SECP_SET_DEFAULT([enable_module_ecdh], [yes], [yes])])
179174

180-
AC_ARG_ENABLE(module_musig,
181-
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
182-
[],
183-
[SECP_SET_DEFAULT([enable_module_musig], [no], [yes])])
184-
185175
AC_ARG_ENABLE(module_recovery,
186176
AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]), [],
187177
[SECP_SET_DEFAULT([enable_module_recovery], [no], [yes])])
188178

179+
AC_ARG_ENABLE(module_extrakeys,
180+
AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module [default=yes]]), [],
181+
[SECP_SET_DEFAULT([enable_module_extrakeys], [yes], [yes])])
182+
183+
AC_ARG_ENABLE(module_schnorrsig,
184+
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
185+
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])
186+
187+
AC_ARG_ENABLE(module_ellswift,
188+
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
189+
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
190+
189191
AC_ARG_ENABLE(module_generator,
190192
AS_HELP_STRING([--enable-module-generator],[enable NUMS generator module [default=no]]),
191193
[],
@@ -196,28 +198,35 @@ AC_ARG_ENABLE(module_rangeproof,
196198
[],
197199
[SECP_SET_DEFAULT([enable_module_rangeproof], [no], [yes])])
198200

201+
AC_ARG_ENABLE(module_surjectionproof,
202+
AS_HELP_STRING([--enable-module-surjectionproof],[enable surjection proof module [default=no]]),
203+
[],
204+
[SECP_SET_DEFAULT([enable_module_surjectionproof], [no], [yes])])
205+
AC_ARG_ENABLE(reduced_surjection_proof_size,
206+
AS_HELP_STRING([--enable-reduced-surjection-proof-size],[use reduced surjection proof size (disabling parsing and verification) [default=no]]),
207+
[],
208+
[SECP_SET_DEFAULT([enable_reduced_surjection_proof_size], [no], [no])])
209+
199210
AC_ARG_ENABLE(module_whitelist,
200211
AS_HELP_STRING([--enable-module-whitelist],[enable key whitelisting module [default=no]]),
201212
[],
202213
[SECP_SET_DEFAULT([enable_module_whitelist], [no], [yes])])
203214

204-
AC_ARG_ENABLE(module_extrakeys,
205-
AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module [default=yes]]), [],
206-
[SECP_SET_DEFAULT([enable_module_extrakeys], [yes], [yes])])
207-
208-
AC_ARG_ENABLE(module_schnorrsig,
209-
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
210-
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])
211-
212-
AC_ARG_ENABLE(module_ellswift,
213-
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
214-
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
215+
AC_ARG_ENABLE(module_musig,
216+
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
217+
[],
218+
[SECP_SET_DEFAULT([enable_module_musig], [no], [yes])])
215219

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

225+
AC_ARG_ENABLE(module_bppp,
226+
AS_HELP_STRING([--enable-module-bppp],[enable Bulletproofs++ module (experimental)]),
227+
[],
228+
[SECP_SET_DEFAULT([enable_module_bppp], [no], [yes])])
229+
221230
AC_ARG_ENABLE(module_ecdsa-adaptor,
222231
AS_HELP_STRING([--enable-module-ecdsa-adaptor],[enable ECDSA adaptor module [default=no]]),
223232
[],
@@ -227,16 +236,6 @@ AC_ARG_ENABLE(external_default_callbacks,
227236
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
228237
[SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
229238

230-
AC_ARG_ENABLE(module_surjectionproof,
231-
AS_HELP_STRING([--enable-module-surjectionproof],[enable surjection proof module [default=no]]),
232-
[],
233-
[SECP_SET_DEFAULT([enable_module_surjectionproof], [no], [yes])])
234-
235-
AC_ARG_ENABLE(reduced_surjection_proof_size,
236-
AS_HELP_STRING([--enable-reduced-surjection-proof-size],[use reduced surjection proof size (disabling parsing and verification) [default=no]]),
237-
[],
238-
[SECP_SET_DEFAULT([use_reduced_surjection_proof_size], [no], [no])])
239-
240239
# Test-only override of the (autodetected by the C code) "widemul" setting.
241240
# Legal values are:
242241
# * int64 (for [u]int64_t),
@@ -527,7 +526,7 @@ if test x"$enable_external_default_callbacks" = x"yes"; then
527526
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1"
528527
fi
529528

530-
if test x"$use_reduced_surjection_proof_size" = x"yes"; then
529+
if test x"$enable_reduced_surjection_proof_size" = x"yes"; then
531530
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_REDUCED_SURJECTION_PROOF_SIZE=1"
532531
fi
533532

@@ -610,6 +609,10 @@ AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
610609

611610
AC_OUTPUT
612611

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

0 commit comments

Comments
 (0)