build: Error if required module explicitly off
This commit is contained in:
parent
89ec583ccf
commit
e6822678ea
@ -68,6 +68,9 @@ if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
|
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
|
||||||
|
if(DEFINED SECP256K1_ENABLE_MODULE_EXTRAKEYS AND NOT SECP256K1_ENABLE_MODULE_EXTRAKEYS)
|
||||||
|
message(FATAL_ERROR "Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.")
|
||||||
|
endif()
|
||||||
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON)
|
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON)
|
||||||
add_compile_definitions(ENABLE_MODULE_SCHNORRSIG=1)
|
add_compile_definitions(ENABLE_MODULE_SCHNORRSIG=1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -394,6 +394,9 @@ if test x"$enable_module_ellswift" = x"yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$enable_module_schnorrsig" = x"yes"; then
|
if test x"$enable_module_schnorrsig" = x"yes"; then
|
||||||
|
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
|
enable_module_extrakeys=yes
|
||||||
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
|
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user