1 From c69030a904f8ab25b9ca2704c8a6dd03554e9503 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
3 Date: Sun, 11 Dec 2022 13:31:38 +0100
4 Subject: [PATCH] * configure.ac: Disable nettle if NTLM is explicitly disabled
7 configure.ac | 41 +++++++++++++++++++----------------------
8 1 file changed, 19 insertions(+), 22 deletions(-)
12 @@ -622,34 +622,31 @@ AS_IF([test x"$with_ssl" = xopenssl], [
13 ]) # endif: --with-ssl == openssl?
15 dnl Enable NTLM if requested and if SSL is available.
16 -if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
17 +if test x"$ENABLE_NTLM" != xno
19 - if test x"$ENABLE_NTLM" != xno
20 + if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
23 AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
26 - PKG_CHECK_MODULES([NETTLE], nettle, [
28 - LIBS="$NETTLE_LIBS $LIBS"
29 - CFLAGS="$NETTLE_CFLAGS $CFLAGS"
31 - AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)])
32 - if test x"$HAVE_NETTLE" != xyes; then
33 - if test x"$ENABLE_NTLM" = xyes; then
34 - AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting])
37 - AC_SUBST(NETTLE_LIBS, "-lnettle")
39 + PKG_CHECK_MODULES([NETTLE], nettle, [
41 LIBS="$NETTLE_LIBS $LIBS"
44 + CFLAGS="$NETTLE_CFLAGS $CFLAGS"
46 + AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)])
47 + if test x"$HAVE_NETTLE" != xyes; then
48 + if test x"$ENABLE_NTLM" = xyes; then
49 + AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting])
52 + AC_SUBST(NETTLE_LIBS, "-lnettle")
53 + LIBS="$NETTLE_LIBS $LIBS"
57 - if test x"$HAVE_NETTLE" = xyes; then
58 - AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
59 - if test x"$ENABLE_NTLM" != xno
61 + if test x"$HAVE_NETTLE" = xyes; then
62 + AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
64 AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])