Skip to content

Commit e682267

Browse files
build: Error if required module explicitly off
1 parent 89ec583 commit e682267

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
6868
endif()
6969

7070
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
71+
if(DEFINED SECP256K1_ENABLE_MODULE_EXTRAKEYS AND NOT SECP256K1_ENABLE_MODULE_EXTRAKEYS)
72+
message(FATAL_ERROR "Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.")
73+
endif()
7174
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON)
7275
add_compile_definitions(ENABLE_MODULE_SCHNORRSIG=1)
7376
endif()

configure.ac

+3
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ if test x"$enable_module_ellswift" = x"yes"; then
394394
fi
395395

396396
if test x"$enable_module_schnorrsig" = x"yes"; then
397+
if test x"$enable_module_extrakeys" = x"no"; then
398+
AC_MSG_ERROR([Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.])
399+
fi
397400
enable_module_extrakeys=yes
398401
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
399402
fi

0 commit comments

Comments
 (0)