Skip to content

Commit

Permalink
build: Error if required module explicitly off
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Jan 16, 2024
1 parent cf64681 commit eb52535
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
endif()

if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
if(DEFINED SECP256K1_ENABLE_MODULE_EXTRAKEYS AND NOT SECP256K1_ENABLE_MODULE_EXTRAKEYS)
message(FATAL_ERROR "schnorrsig module requires explicitly disabled extrakeys module.")
endif()
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON)
add_compile_definitions(ENABLE_MODULE_SCHNORRSIG=1)
endif()
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ if test x"$enable_module_ellswift" = x"yes"; then
fi

if test x"$enable_module_schnorrsig" = x"yes"; then
if test x"$enable_module_extrakeys" = x"no"; then
AC_MSG_ERROR("schnorrsig module requires explicitly disabled extrakeys module.")
fi
enable_module_extrakeys=yes
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
fi
Expand Down

0 comments on commit eb52535

Please sign in to comment.