1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

m4: add security frameworks on Mac when compiling rustls

Previously compiling rustls on Mac would only complete if you also
compiled the SecureTransport TLS backend, which curl would prefer to
the Rust backend.

Appending these flags to LDFLAGS makes it possible to compile the
Rustls backend on Mac without the SecureTransport backend, which means
this patch will make it possible for Mac users to use the Rustls
backend for TLS.

Reviewed-by: Jacob Hoffman-Andrews

Fixes #6955
Cloes #6956
This commit is contained in:
Kevin Burke 2021-04-24 14:20:08 -07:00 committed by Daniel Stenberg
parent 7843fe0a1b
commit 9f71cc293f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -63,6 +63,9 @@ if test "x$OPT_RUSTLS" != xno; then
rustlslib=$OPT_RUSTLS/lib$libsuff
LDFLAGS="$LDFLAGS $addld"
if (test -d "/System/Library/Frameworks/Security.framework" && test "x$cross_compiling" != "xyes"); then
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
fi
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi