diff options
author | Niall <Niall.oReilly@ucd.ie> | 2019-06-04 15:53:02 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-10-02 12:33:08 +0200 |
commit | 0f48055c40e3a10da6a535ce70407b25ea7fe855 (patch) | |
tree | 5b6d3782e4a2d56c5285fae17dfd6d4c47710d16 /configure.ac | |
parent | 475324b272f3112c64b696871d7775cfdf32b45f (diff) | |
download | curl-0f48055c40e3a10da6a535ce70407b25ea7fe855.tar.gz |
ESNI: initial build/setup
Closes #4011
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 07e0a502e..a2adb9c4f 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 @@ -4497,6 +4498,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 @@ -4618,6 +4649,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 @@ -4801,6 +4836,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: Alt-svc: ${curl_altsvc_msg} HTTP2: ${curl_h2_msg} HTTP3: ${curl_h3_msg} + ESNI: ${curl_esni_msg} Protocols: ${SUPPORT_PROTOCOLS} Features: ${SUPPORT_FEATURES} ]) |