diff options
author | Kevin Burke <kevin@burke.dev> | 2021-04-24 14:20:08 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-25 23:30:08 +0200 |
commit | 9f71cc293feced65a062e7f408c8a49435f41f79 (patch) | |
tree | 1e57ba7138f349b4b54552aaf9532b7f80b96693 /m4 | |
parent | 7843fe0a1ba495d8e108115be0f1bab4cf86beb9 (diff) | |
download | curl-9f71cc293feced65a062e7f408c8a49435f41f79.tar.gz |
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
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-rustls.m4 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/m4/curl-rustls.m4 b/m4/curl-rustls.m4 index f33822245..12bc8f59e 100644 --- a/m4/curl-rustls.m4 +++ b/m4/curl-rustls.m4 @@ -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 |