X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=autoconf%2Fpecl%2Flibcurl.m4;fp=autoconf%2Fpecl%2Flibcurl.m4;h=8de9499e0eaef8351c9a397a1a9e2051f66ee008;hp=4d9920741f7ec73285d39d900813f0c9a22182da;hb=ef9c474299e45b4d952b6a821b11f5121624a5fc;hpb=0dce480530661065d698c9a83753b0d7e63d223a diff --git a/autoconf/pecl/libcurl.m4 b/autoconf/pecl/libcurl.m4 index 4d99207..8de9499 100644 --- a/autoconf/pecl/libcurl.m4 +++ b/autoconf/pecl/libcurl.m4 @@ -160,6 +160,48 @@ AC_DEFUN([PECL_HAVE_LIBCURL_SSL], [dnl fi fi ]) + + PECL_HAVE_CONST([curl/curl.h], [CURL_LOCK_DATA_SSL_SESSION], int, [ + AC_CACHE_CHECK([whether curl_share accepts CURL_LOCK_DATA_SSL_SESSION], PECL_CACHE_VAR([LIBCURL_SHARE_SSL]), [ + PECL_CACHE_VAR([LIBCURL_SHARE_SSL])= + AC_TRY_RUN([ + #include + int main(int argc, char *argv[]) { + CURLSH *ch = curl_share_init(); + return curl_share_setopt(ch, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); + } + ], [ + PECL_CACHE_VAR([LIBCURL_SHARE_SSL])=yes + ], [ + PECL_CACHE_VAR([LIBCURL_SHARE_SSL])=no + ]) + ]) + if test "$PECL_CACHE_VAR([LIBCURL_SHARE_SSL])" = yes; then + PECL_DEFINE([HAVE_LIBCURL_SHARE_SSL], [1]) + fi + ]) + + if test "$PECL_VAR([LIBCURL_SSLLIB])" == "OpenSSL"; then + PECL_HAVE_CONST([curl/curl.h], [CURLOPT_TLS13_CIPHERS], int, [ + AC_CACHE_CHECK([whether curl_easy_setopt accepts CURLOPT_TLS13_CIPHERS], PECL_CACHE_VAR([LIBCURL_TLS13_CIPHERS]), [ + PECL_CACHE_VAR([LIBCURL_TLS13_CIPHERS])= + AC_TRY_RUN([ + #include + int main(int argc, char *argv[]) { + CURL *ch = curl_easy_init(); + return curl_easy_setopt(ch, CURLSHOPT_TLS13_CIPHERS, ""); + } + ], [ + PECL_CACHE_VAR([LIBCURL_TLS13_CIPHERS])=yes + ], [ + PECL_CACHE_VAR([LIBCURL_TLS13_CIPHERS])=no + ]) + ]) + if test "$PECL_CACHE_VAR([LIBCURL_TLS13_CIPHERS])" = yes; then + PECL_DEFINE([HAVE_LIBCURL_TLS13_CIPHERS], [1]) + fi + ]) + fi ]) ]) dnl