Skip to content

Commit

Permalink
m4: add security frameworks on Mac when compiling rustls
Browse files Browse the repository at this point in the history
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.

Fixes curl#6955.
  • Loading branch information
kevinburke committed Apr 24, 2021
1 parent a4554b2 commit 617d5ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions m4/curl-rustls.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 617d5ff

Please sign in to comment.