]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
m4: add security frameworks on Mac when compiling rustls
authorKevin Burke <kevin@burke.dev>
Sat, 24 Apr 2021 21:20:08 +0000 (14:20 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 25 Apr 2021 21:30:08 +0000 (23:30 +0200)
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

m4/curl-rustls.m4

index f338222453e5a2a23703d74f4fef51411d7cfc97..12bc8f59e6349a4520cf4c30b14719956ea5a229 100644 (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