diff options
author | fanquake <fanquake@gmail.com> | 2024-04-04 12:05:16 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-04-04 12:05:16 +0100 |
commit | 4654cc32248d788ac1160ca320ea68d31357d0c9 (patch) | |
tree | cd6a9d7a793e98bf7f6c53387169032a15cfccb8 /src/secp256k1/configure.ac | |
parent | 71c51c161d476cc495afdb7864283fdb84d2dc0c (diff) | |
parent | 53eec53dca1cb677d11564b055d3b8581ddd6747 (diff) | |
download | bitcoin-4654cc32248d788ac1160ca320ea68d31357d0c9.tar.xz |
Update secp256k1 subtree to latest master
Diffstat (limited to 'src/secp256k1/configure.ac')
-rw-r--r-- | src/secp256k1/configure.ac | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/secp256k1/configure.ac b/src/secp256k1/configure.ac index 2c1596775e..158ed5d769 100644 --- a/src/secp256k1/configure.ac +++ b/src/secp256k1/configure.ac @@ -387,29 +387,32 @@ SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS" ### Handle module options ### -if test x"$enable_module_ecdh" = x"yes"; then - SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ECDH=1" -fi - -if test x"$enable_module_recovery" = x"yes"; then - SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_RECOVERY=1" +# Processing must be done in a reverse topological sorting of the dependency graph +# (dependent module first). +if test x"$enable_module_ellswift" = x"yes"; then + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1" fi if test x"$enable_module_schnorrsig" = x"yes"; then - SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1" + if test x"$enable_module_extrakeys" = x"no"; then + AC_MSG_ERROR([Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.]) + fi enable_module_extrakeys=yes + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1" fi -if test x"$enable_module_ellswift" = x"yes"; then - SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1" -fi - -# Test if extrakeys is set after the schnorrsig module to allow the schnorrsig -# module to set enable_module_extrakeys=yes if test x"$enable_module_extrakeys" = x"yes"; then SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_EXTRAKEYS=1" fi +if test x"$enable_module_recovery" = x"yes"; then + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_RECOVERY=1" +fi + +if test x"$enable_module_ecdh" = x"yes"; then + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ECDH=1" +fi + if test x"$enable_external_default_callbacks" = x"yes"; then SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" fi |