configure: link -lcrypt32 instead of -lm for wolfSSL on Windows

Syncing it with CMake/FindWolfSSL.

`-lm` is not needed on Windows. As of mingw-w64 14.0.0 it's offered as
a dummy library; in such case it wasn't causing an actual issue.
`-lcryp32` is necessary when linking wolfSSL statically.

Ref: #22249

Closes #22251
This commit is contained in:
Viktor Szakats 2026-07-03 00:18:35 +02:00
parent 84ecfb3ecc
commit 0fff69d514
No known key found for this signature in database

View file

@ -76,6 +76,8 @@ if test "$OPT_WOLFSSL" != "no"; then
if test "$curl_cv_apple" = "yes"; then
addlib="$addlib -framework Security -framework CoreFoundation"
elif test "$curl_cv_native_windows" = "yes"; then
addlib="$addlib -lcrypt32"
else
addlib="$addlib -lm"
fi