91fb52aa31ed6b48b008d84ffe72072e9b0f2716
[feed/packages.git] / net / wget / patches / 002-upstream-fix-disable-ntlm-2.patch
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
5
6 ---
7 configure.ac | 41 +++++++++++++++++++----------------------
8 1 file changed, 19 insertions(+), 22 deletions(-)
9
10 --- a/configure.ac
11 +++ b/configure.ac
12 @@ -622,34 +622,31 @@ AS_IF([test x"$with_ssl" = xopenssl], [
13 ]) # endif: --with-ssl == openssl?
14
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
18 then
19 - if test x"$ENABLE_NTLM" != xno
20 + if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
21 then
22 ENABLE_NTLM=yes
23 AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
24 - fi
25 -else
26 - PKG_CHECK_MODULES([NETTLE], nettle, [
27 - HAVE_NETTLE=yes
28 - LIBS="$NETTLE_LIBS $LIBS"
29 - CFLAGS="$NETTLE_CFLAGS $CFLAGS"
30 - ], [
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])
35 - fi
36 - else
37 - AC_SUBST(NETTLE_LIBS, "-lnettle")
38 + else
39 + PKG_CHECK_MODULES([NETTLE], nettle, [
40 + HAVE_NETTLE=yes
41 LIBS="$NETTLE_LIBS $LIBS"
42 - fi
43 - ])
44 + CFLAGS="$NETTLE_CFLAGS $CFLAGS"
45 + ], [
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])
50 + fi
51 + else
52 + AC_SUBST(NETTLE_LIBS, "-lnettle")
53 + LIBS="$NETTLE_LIBS $LIBS"
54 + fi
55 + ])
56
57 - if test x"$HAVE_NETTLE" = xyes; then
58 - AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
59 - if test x"$ENABLE_NTLM" != xno
60 - then
61 + if test x"$HAVE_NETTLE" = xyes; then
62 + AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle])
63 ENABLE_NTLM=yes
64 AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
65 fi