Lines Matching +full:- +full:- +full:with +full:- +full:openssl
21 # SPDX-License-Identifier: curl
29 dnl Check for OpenSSL libraries and headers
36 dnl backup the pre-ssl variables
44 *-*-msys* | *-*-mingw*)
47 LIBS="-lgdi32 $LIBS"
66 dnl --with-openssl (without path) used
71 dnl check the given --with-openssl spot
75 dnl Try pkg-config even when cross-compiling. Since we
79 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
87 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
94 if test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
95 AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-openssl prefix!])
99 dnl in case pkg-config comes up empty, use what we got
100 dnl via --with-openssl
103 SSL_LDFLAGS="-L$LIB_OPENSSL"
104 SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
111 CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
115 $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
118 $PKGCONFIG --libs-only-L openssl 2>/dev/null`
121 $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
123 AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
124 AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
125 AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
127 LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
129 dnl use the values pkg-config reported. This is here
130 dnl instead of below with CPPFLAGS and LDFLAGS because we only
131 dnl learn about this via pkg-config. If we only have
132 dnl the argument to --with-openssl we don't know what
146 LIBS="-lcrypto $LIBS"
148 if test -n "$LIB_OPENSSL" ; then
149 LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
150 LDFLAGSPC="$CLEANLDFLAGSPC -L$LIB_OPENSSL"
152 if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
153 # only set this if pkg-config wasn't used
154 CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
156 # Linking previously failed, try extra paths from --with-openssl or
157 # pkg-config. Use a different function name to avoid reusing the earlier
161 LIBS="-lcrypto $LIBS"], [
163 dnl still no, but what about with -ldl?
164 AC_MSG_CHECKING([OpenSSL linking with -ldl])
165 LIBS="-lcrypto $CLEANLIBS -ldl"
167 #include <openssl/err.h>
177 dnl ok, so what about both -ldl and -lpthread?
180 AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
181 LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
184 #include <openssl/err.h>
211 AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
213 LIBS="-lRSAglue -lrsaref $LIBS"
225 dnl Have the libraries--check for OpenSSL headers
226 AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
227 openssl/pem.h openssl/ssl.h openssl/err.h,
228 ssl_msg="OpenSSL"
229 test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
231 AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
240 AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
245 dnl These can only exist if OpenSSL exists
250 #include <openssl/base.h>
264 AC_MSG_CHECKING([for AWS-LC])
267 #include <openssl/base.h>
270 #error not AWS-LC
275 ssl_msg="AWS-LC"
284 #include <openssl/opensslv.h>
295 AC_MSG_CHECKING([for OpenSSL >= v3])
298 #include <openssl/opensslv.h>
308 ssl_msg="OpenSSL v3+"
314 dnl is this OpenSSL (fork) providing the original QUIC API?
318 AC_MSG_NOTICE([OpenSSL fork speaks QUIC API])
320 AC_MSG_NOTICE([OpenSSL version does not speak QUIC API])
324 if test -n "$LIB_OPENSSL"; then
325 dnl when the ssl shared libs were found in a path that the run-time
335 LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE openssl"
338 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
345 AC_MSG_ERROR([--with-openssl was given but OpenSSL could not be detected])
348 dnl ---
349 dnl We require OpenSSL with SRP support.
350 dnl ---
352 AC_MSG_CHECKING([for SRP support in OpenSSL])
355 #include <openssl/ssl.h>
369 dnl ---
370 dnl Whether the OpenSSL configuration will be loaded automatically
371 dnl ---
373 AC_ARG_ENABLE(openssl-auto-load-config,
374 AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configurati…
375 AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configura…
377 AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
378 …AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded …
383 dnl ---
384 dnl We may use OpenSSL QUIC.
385 dnl ---
387 AC_MSG_CHECKING([for QUIC support and OpenSSL >= 3.3])
390 #include <openssl/ssl.h>