check_config.h: Add dep'n of ECC per-curve options on MBEDTLS_ECP_C
diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h
index b202ddd..e2c04af 100644
--- a/include/mbedtls/check_config.h
+++ b/include/mbedtls/check_config.h
@@ -173,6 +173,21 @@
 #error "MBEDTLS_ECP_C defined, but not all prerequisites"
 #endif
 
+#if ( defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)   ||                  \
+      defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)   ||                  \
+      defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)   ||                  \
+      defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) ||                  \
+      defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) &&                \
+    !defined(MBEDTLS_ECP_C)
+#error "At least one ECP curve enabled, but not all prerequesites"
+#endif
+
 #if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
 #error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
 #endif