cmake: optimize OpenSSL fork detection

Stop detecting further forks if one has been positively identified.

Closes #22664
This commit is contained in:
Viktor Szakats 2026-06-22 13:54:52 +02:00
parent 81dcba3549
commit fb22f58cc3
No known key found for this signature in database

View file

@ -851,10 +851,10 @@ if(CURL_USE_OPENSSL)
if(NOT DEFINED HAVE_AWSLC)
check_symbol_exists("OPENSSL_IS_AWSLC" "openssl/base.h" HAVE_AWSLC)
endif()
if(NOT DEFINED HAVE_BORINGSSL)
if(NOT DEFINED HAVE_BORINGSSL AND NOT HAVE_AWSLC)
check_symbol_exists("OPENSSL_IS_BORINGSSL" "openssl/base.h" HAVE_BORINGSSL)
endif()
if(NOT DEFINED HAVE_LIBRESSL)
if(NOT DEFINED HAVE_LIBRESSL AND NOT HAVE_AWSLC AND NOT HAVE_BORINGSSL)
check_symbol_exists("LIBRESSL_VERSION_NUMBER" "openssl/opensslv.h" HAVE_LIBRESSL)
endif()
cmake_pop_check_state()