CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
- case $host in
- *-apple-*)
- LDFLAGS="$LDFLAGS -framework Security"
- ;;
- *)
- ;;
- esac
## NEW CODE
dnl use pkg-config unless we have been given a path
CPPFLAGS="$CPPFLAGS $addcflags"
fi
+ case $host in
+ *-apple-*)
+ RUSTLS_LDFLAGS="-framework Security -framework Foundation"
+ ;;
+ *)
+ RUSTLS_LDFLAGS="-lpthread -ldl -lm"
+ ;;
+ esac
AC_CHECK_LIB(rustls, rustls_connection_read,
[
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
],
AC_MSG_ERROR([--with-rustls was specified but could not find Rustls.]),
- -lpthread -ldl -lm)
+ $RUSTLS_LDFLAGS)
LIB_RUSTLS="$PREFIX_RUSTLS/lib$libsuff"
if test "$PREFIX_RUSTLS" != "/usr" ; then
- SSL_LDFLAGS="-L$LIB_RUSTLS"
+ SSL_LDFLAGS="-L$LIB_RUSTLS $RUSTLS_LDFLAGS"
SSL_CPPFLAGS="-I$PREFIX_RUSTLS/include"
fi
fi