/[svn]/ircd-hybrid/branches/8.2.x/m4/ax_arg_with_tls.m4
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/m4/ax_arg_with_tls.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9960 by michael, Sat Feb 22 22:01:06 2020 UTC revision 9961 by michael, Fri Jun 4 13:21:56 2021 UTC
# Line 1  Line 1 
1  AC_DEFUN([AX_ARG_WITH_TLS], [  AC_DEFUN([AX_ARG_WITH_TLS], [
2    
3  AC_ARG_WITH(tls, [AS_HELP_STRING([--with-tls], [Enables TLS with specified library. Options: 'openssl', 'wolfssl', 'gnutls' or 'none'])], [with_tls=$withval], [with_tls=auto])  AC_ARG_WITH([tls], [AS_HELP_STRING([--with-tls], [Enables TLS with specified library. Options: 'openssl', 'wolfssl', 'gnutls' or 'none'])], [with_tls=$withval], [with_tls=auto])
4    
5  if test "$with_tls" = "openssl" ||  if test "$with_tls" = "openssl" ||
6     test "$with_tls" = "auto"; then     test "$with_tls" = "auto"; then
7      AC_CHECK_HEADER(openssl/opensslv.h, [      AC_CHECK_HEADER([openssl/opensslv.h], [
8        AC_RUN_IFELSE([        AC_RUN_IFELSE([
9          AC_LANG_PROGRAM([          AC_LANG_PROGRAM([
10            #include <openssl/opensslv.h>            #include <openssl/opensslv.h>
11            #include <stdlib.h>], [            #include <stdlib.h>], [
12            exit(!(OPENSSL_VERSION_NUMBER >= 0x1010100fL)); ])], [AC_CHECK_LIB(crypto, RSA_free, [], [], [])], [], [])])            exit(!(OPENSSL_VERSION_NUMBER >= 0x1010100fL)); ])], [AC_CHECK_LIB([crypto], [RSA_free], [], [], [])], [], [])])
13    
14      AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"], [AC_CHECK_LIB(ssl, SSL_connect)], [])      AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"], [AC_CHECK_LIB([ssl], [SSL_connect])], [])
15    
16      AC_MSG_CHECKING([for LibreSSL, or OpenSSL 1.1.1 and above])      AC_MSG_CHECKING([for LibreSSL, or OpenSSL 1.1.1 and above])
17      AS_IF([test "$ac_cv_lib_ssl_SSL_connect" = "yes"],      AS_IF([test "$ac_cv_lib_ssl_SSL_connect" = "yes"],
18            [AC_MSG_RESULT(found)], [AC_MSG_RESULT(no - LibreSSL/OpenSSL support disabled)])            [AC_MSG_RESULT([found])], [AC_MSG_RESULT([no - LibreSSL/OpenSSL support disabled])])
19    
20  fi  fi
21    
# Line 23  if test "$with_tls" = "gnutls" || Line 23  if test "$with_tls" = "gnutls" ||
23     test "$with_tls" = "auto"; then     test "$with_tls" = "auto"; then
24    if test "$ac_cv_lib_ssl_SSL_connect" != "yes"; then    if test "$ac_cv_lib_ssl_SSL_connect" != "yes"; then
25    
26      AC_CHECK_HEADER(gnutls/gnutls.h, [      AC_CHECK_HEADER([gnutls/gnutls.h], [
27        AC_RUN_IFELSE([        AC_RUN_IFELSE([
28          AC_LANG_PROGRAM([          AC_LANG_PROGRAM([
29            #include <gnutls/gnutls.h>            #include <gnutls/gnutls.h>
30            #include <stdlib.h>], [            #include <stdlib.h>], [
31            exit(!(GNUTLS_VERSION_NUMBER >= 0x030605)); ])], [AC_CHECK_LIB(gnutls, gnutls_init, [], [], [])], [], [])])            exit(!(GNUTLS_VERSION_NUMBER >= 0x030605)); ])], [AC_CHECK_LIB([gnutls], [gnutls_init], [], [], [])], [], [])])
32    
33      AC_MSG_CHECKING([for GnuTLS 3.6.5 and above])      AC_MSG_CHECKING([for GnuTLS 3.6.5 and above])
34      AS_IF([test "$ac_cv_lib_gnutls_gnutls_init" = "yes"],      AS_IF([test "$ac_cv_lib_gnutls_gnutls_init" = "yes"],
35            [AC_MSG_RESULT(found)], [AC_MSG_RESULT(no - GnuTLS support disabled)])            [AC_MSG_RESULT([found])], [AC_MSG_RESULT([no - GnuTLS support disabled])])
36    
37    fi    fi
38  fi  fi
# Line 42  if test "$with_tls" = "wolfssl" || Line 42  if test "$with_tls" = "wolfssl" ||
42    if test "$ac_cv_lib_ssl_SSL_connect" != "yes" &&    if test "$ac_cv_lib_ssl_SSL_connect" != "yes" &&
43       test "$ac_cv_lib_gnutls_gnutls_init" != "yes"; then       test "$ac_cv_lib_gnutls_gnutls_init" != "yes"; then
44    
45      AC_CHECK_HEADER(wolfssl/ssl.h, [      AC_CHECK_HEADER([wolfssl/ssl.h], [
46        AC_RUN_IFELSE([        AC_RUN_IFELSE([
47          AC_LANG_PROGRAM([          AC_LANG_PROGRAM([
48            #include <wolfssl/version.h>            #include <wolfssl/version.h>
49            #include <stdlib.h>], [            #include <stdlib.h>], [
50            exit(!(LIBWOLFSSL_VERSION_HEX >= 0x04003000)); ])], [ AC_CHECK_LIB(wolfssl, wolfSSL_X509_digest, [], [], [])], [], [])])            exit(!(LIBWOLFSSL_VERSION_HEX >= 0x04003000)); ])], [AC_CHECK_LIB([wolfssl], [wolfSSL_X509_digest], [], [], [])], [], [])])
51    
52      AC_MSG_CHECKING([for wolfSSL 4.3.0 and above built with extended/full OpenSSL compatibility layer])      AC_MSG_CHECKING([for wolfSSL 4.3.0 and above built with extended/full OpenSSL compatibility layer])
53      AS_IF([test "$ac_cv_lib_wolfssl_wolfSSL_X509_digest" = "yes"],      AS_IF([test "$ac_cv_lib_wolfssl_wolfSSL_X509_digest" = "yes"],
54            [AC_MSG_RESULT(found)], [AC_MSG_RESULT(no - wolfSSL support disabled)])            [AC_MSG_RESULT([found])], [AC_MSG_RESULT([no - wolfSSL support disabled])])
55    
56    fi    fi
57  fi  fi

Legend:
Removed from v.9960  
changed lines
  Added in v.9961

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28