diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-02-25 00:39:23 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 19:54:30 -0400 |
commit | b28a3714c46d96e4c561a582966465beeeebe73b (patch) | |
tree | 60279ab4e010a0089348e000f46198bf3391e3ea /configure.ac | |
parent | af836b94d30d088b02899789b74a1d41a35b9eac (diff) | |
download | lighttpd-git-b28a3714c46d96e4c561a582966465beeeebe73b.tar.gz |
[multiple] ./configure --with-nettle to use Nettle
./configure --with-nettle to use Nettle crypto lib for algorithms,
instead of OpenSSL or wolfSSL. Note: Nettle does not provide TLS.
x-ref:
"How to use SHA-256 without OpenSSL?"
https://redmine.lighttpd.net/boards/2/topics/8903
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e9f0b60e..83d273b8 100644 --- a/configure.ac +++ b/configure.ac @@ -737,6 +737,35 @@ if test "$WITH_OPENSSL" != no && test "$WITH_WOLFSSL" != no; then AC_MSG_ERROR([lighttpd should not be built with both --with-openssl and --with-wolfssl]) fi +dnl Check for Nettle (and overwrite CRYPTO_LIB if set by OpenSSL or wolfSSL) +AC_MSG_NOTICE([----------------------------------------]) +AC_MSG_CHECKING([for Nettle]) +AC_ARG_WITH([nettle], + [AC_HELP_STRING([--with-nettle@<:@=DIR@:>@], + [Include Nettle support (default no)] + )], + [WITH_NETTLE=$withval], + [WITH_NETTLE=no] +) +AC_MSG_RESULT([$WITH_NETTLE]) + +if test "$WITH_NETTLE" != no; then + if test "$WITH_NETTLE" != yes; then + CPPFLAGS="${CPPFLAGS} -I$WITH_NETTLE/include" + LDFLAGS="${LDFLAGS} -L$WITH_NETTLE/lib" + fi + + AC_CHECK_HEADERS([nettle/nettle-types.h], [], [ + AC_MSG_ERROR([nettle headers not found. install them or build without --with-nettle]) + ]) + AC_CHECK_LIB([nettle], [nettle_md5_init], + [CRYPTO_LIB="-lnettle"], + [AC_MSG_ERROR([nettle crypto library not found. install it or build without --with-nettle])] + ) + + AC_SUBST([CRYPTO_LIB]) +fi + dnl pcre support AC_MSG_NOTICE([----------------------------------------]) |