diff options
author | ng0 <ng0@n0.is> | 2019-11-06 19:43:08 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-06 19:43:08 +0000 |
commit | 03d326c16b69a3db6b369e8a05fd0fdf23a7cf35 (patch) | |
tree | 5f21975cd8220ffe2ce2894d6146f23eeb3dcfa9 /configure.ac | |
parent | 3671d2089f040bd0a86d263f9baa43ea5341e4f2 (diff) | |
parent | 2e9b725f67d49a9d7a1f053fe52dd4920c9ab1ad (diff) | |
download | gnurl-03d326c16b69a3db6b369e8a05fd0fdf23a7cf35.tar.gz gnurl-03d326c16b69a3db6b369e8a05fd0fdf23a7cf35.tar.bz2 gnurl-03d326c16b69a3db6b369e8a05fd0fdf23a7cf35.zip |
Merge tag 'curl-7_67_0'
7.67.0
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 125 |
1 files changed, 50 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac index a7585da9f..8b91b954a 100755 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ CURL_CHECK_OPTION_CURLDEBUG CURL_CHECK_OPTION_SYMBOL_HIDING CURL_CHECK_OPTION_ARES CURL_CHECK_OPTION_RT +CURL_CHECK_OPTION_ESNI XC_CHECK_PATH_SEPARATOR @@ -1307,10 +1308,6 @@ main() ipv6=yes )) -if test "$ipv6" = "yes"; then - curl_ipv6_msg="enabled" -fi - # Check if struct sockaddr_in6 have sin6_scope_id member if test "$ipv6" = yes; then AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) @@ -2302,12 +2299,7 @@ OPT_WOLFSSL=no _cppflags=$CPPFLAGS _ldflags=$LDFLAGS -AC_ARG_WITH(cyassl,dnl -AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)]) -AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]), - OPT_WOLFSSL=$withval) -dnl provide --with-wolfssl as an alias for --with-cyassl AC_ARG_WITH(wolfssl,dnl AC_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]) AC_HELP_STRING([--without-wolfssl], [disable WolfSSL detection]), @@ -2322,86 +2314,33 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then OPT_WOLFSSL="" fi - dnl This should be reworked to use pkg-config instead - - cyassllibname=cyassl - - if test -z "$OPT_WOLFSSL" ; then - dnl check for lib in system default first - - AC_CHECK_LIB(cyassl, CyaSSL_Init, - dnl libcyassl found, set the variable - [ - AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled]) - AC_SUBST(USE_WOLFSSL, [1]) - WOLFSSL_ENABLED=1 - USE_WOLFSSL="yes" - ssl_msg="CyaSSL" - test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes - ]) - fi - addld="" addlib="" addcflags="" - cyassllib="" if test "x$USE_WOLFSSL" != "xyes"; then - dnl add the path and test again addld=-L$OPT_WOLFSSL/lib$libsuff addcflags=-I$OPT_WOLFSSL/include - cyassllib=$OPT_WOLFSSL/lib$libsuff + wolfssllibpath=$OPT_WOLFSSL/lib$libsuff LDFLAGS="$LDFLAGS $addld" if test "$addcflags" != "-I/usr/include"; then CPPFLAGS="$CPPFLAGS $addcflags" fi - AC_CHECK_LIB(cyassl, CyaSSL_Init, - [ - AC_DEFINE(USE_WOLFSSL, 1, [if CyaSSL is enabled]) - AC_SUBST(USE_WOLFSSL, [1]) - WOLFSSL_ENABLED=1 - USE_WOLFSSL="yes" - ssl_msg="CyaSSL" - test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes - ], - [ - CPPFLAGS=$_cppflags - LDFLAGS=$_ldflags - cyassllib="" - ]) - fi - - addld="" - addlib="" - addcflags="" - - if test "x$USE_WOLFSSL" != "xyes"; then - dnl libcyassl renamed to libwolfssl as of 3.4.0 - addld=-L$OPT_WOLFSSL/lib$libsuff - addcflags=-I$OPT_WOLFSSL/include - cyassllib=$OPT_WOLFSSL/lib$libsuff - - LDFLAGS="$LDFLAGS $addld" - if test "$addcflags" != "-I/usr/include"; then - CPPFLAGS="$CPPFLAGS $addcflags" - fi - - cyassllibname=wolfssl my_ac_save_LIBS="$LIBS" - LIBS="-l$cyassllibname -lm $LIBS" + LIBS="-lwolfssl -lm $LIBS" - AC_MSG_CHECKING([for CyaSSL_Init in -lwolfssl]) + AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ /* These aren't needed for detection and confuse WolfSSL. They are set up properly later if it is detected. */ #undef SIZEOF_LONG #undef SIZEOF_LONG_LONG -#include <cyassl/ssl.h> +#include <wolfssl/ssl.h> ]],[[ - return CyaSSL_Init(); + return wolfSSL_Init(); ]]) ],[ AC_MSG_RESULT(yes) @@ -2410,25 +2349,25 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then WOLFSSL_ENABLED=1 USE_WOLFSSL="yes" ssl_msg="WolfSSL" - test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ AC_MSG_RESULT(no) CPPFLAGS=$_cppflags LDFLAGS=$_ldflags - cyassllib="" + wolfssllibpath="" ]) LIBS="$my_ac_save_LIBS" fi if test "x$USE_WOLFSSL" = "xyes"; then - AC_MSG_NOTICE([detected $cyassllibname]) + AC_MSG_NOTICE([detected wolfSSL]) check_for_ca_bundle=1 - dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined! + dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined! AX_COMPILE_CHECK_SIZEOF(long long) - LIBS="-l$cyassllibname -lm $LIBS" + LIBS="-lwolfssl -lm $LIBS" dnl Recent WolfSSL versions build without SSLv3 by default dnl WolfSSL needs configure --enable-opensslextra to have *get_peer* @@ -2436,15 +2375,15 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then wolfSSL_get_peer_certificate \ wolfSSL_UseALPN) - if test -n "$cyassllib"; then + if test -n "$wolfssllibpath"; then dnl when shared libs were found in a path that the run-time dnl linker doesn't search through, we need to add it to dnl CURL_LIBRARY_PATH to prevent further configure tests to fail dnl due to this if test "x$cross_compiling" != "xyes"; then - CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$cyassllib" + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath" export CURL_LIBRARY_PATH - AC_MSG_NOTICE([Added $cyassllib to CURL_LIBRARY_PATH]) + AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH]) fi fi @@ -4123,6 +4062,7 @@ if test "$ipv6" = "yes"; then AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support]) IPV6_ENABLED=1 AC_SUBST(IPV6_ENABLED) + curl_ipv6_msg="enabled" fi fi @@ -4601,6 +4541,36 @@ if test "$enable_altsvc" = "yes"; then experimental="$experimental alt-svc" fi +dnl ************************************************************* +dnl check whether ESNI support, if desired, is actually available +dnl +if test "x$want_esni" != "xno"; then + AC_MSG_CHECKING([whether ESNI support is available]) + + dnl assume NOT and look for sufficient condition + ESNI_ENABLED=0 + ESNI_SUPPORT='' + + dnl OpenSSL with a chosen ESNI function should be enough + dnl so more exhaustive checking seems unnecessary for now + if test "x$OPENSSL_ENABLED" == "x1"; then + AC_CHECK_FUNCS(SSL_get_esni_status, + ESNI_SUPPORT="ESNI support available (OpenSSL with SSL_get_esni_status)" + ESNI_ENABLED=1) + + dnl add 'elif' chain here for additional implementations + fi + + dnl now deal with whatever we found + if test "x$ESNI_ENABLED" == "x1"; then + AC_DEFINE(USE_ESNI, 1, [if ESNI support is available]) + AC_MSG_RESULT($ESNI_SUPPORT) + experimental="$experimental ESNI" + else + AC_MSG_ERROR([--enable-esni ignored: No ESNI support found]) + fi +fi + dnl ************************************************************ dnl hiding of library internal symbols dnl @@ -4722,6 +4692,10 @@ if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" fi +if test "x$ESNI_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES ESNI" +fi + AC_SUBST(SUPPORT_FEATURES) dnl For supported protocols in pkg-config file @@ -4905,6 +4879,7 @@ AC_MSG_NOTICE([Configured to build gnurl/libgnurl: Alt-svc: ${curl_altsvc_msg} HTTP2: ${curl_h2_msg} HTTP3: ${curl_h3_msg} + ESNI: ${curl_esni_msg} Protocols: ${SUPPORT_PROTOCOLS} Features: ${SUPPORT_FEATURES} valgrind tests: ${valgrind_msg} |