Skip to content

Commit eb52535

Browse files
build: Error if required module explicitly off
1 parent cf64681 commit eb52535

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
6767
endif()
6868

6969
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
70+
if(DEFINED SECP256K1_ENABLE_MODULE_EXTRAKEYS AND NOT SECP256K1_ENABLE_MODULE_EXTRAKEYS)
71+
message(FATAL_ERROR "schnorrsig module requires explicitly disabled extrakeys module.")
72+
endif()
7073
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON)
7174
add_compile_definitions(ENABLE_MODULE_SCHNORRSIG=1)
7275
endif()

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ if test x"$enable_module_ellswift" = x"yes"; then
393393
fi
394394

395395
if test x"$enable_module_schnorrsig" = x"yes"; then
396+
if test x"$enable_module_extrakeys" = x"no"; then
397+
AC_MSG_ERROR("schnorrsig module requires explicitly disabled extrakeys module.")
398+
fi
396399
enable_module_extrakeys=yes
397400
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
398401
fi

0 commit comments

Comments
 (0)