summaryrefslogtreecommitdiff
path: root/net-libs/gnutls/files/gnutls-3.7.4-configure-compression.patch
blob: edd688d9b58ab6f730c2b0d446ef86af9724a848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
https://gitlab.com/gnutls/gnutls/-/merge_requests/1557

From: Sam James <sam@gentoo.org>
Date: Fri, 18 Mar 2022 05:40:28 +0000
Subject: [PATCH 1/2] configure.ac: fix brotli/zstd configure argument name

The old `./configure` arguments for brotli and zstd respectively
were inconsistent with the `./configure --help` output.

Old: --without-libbrotli --without-libzstd (also --with-*)
New: --without-brotli --without-zstd (also --with-*)

Fixes: https://gitlab.com/gnutls/gnutls/-/issues/1342
Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -1010,7 +1010,7 @@ if test x$ac_zlib != xno; then
 fi
 AC_SUBST(LIBZ_PC)
 
-AC_ARG_WITH(libbrotli,
+AC_ARG_WITH(brotli,
 	    AS_HELP_STRING([--without-brotli], [disable brotli compression support]),
 	    ac_brotli=$withval, ac_brotli=yes)
 AC_MSG_CHECKING([whether to include brotli compression support])
@@ -1033,7 +1033,7 @@ else
 fi
 AM_CONDITIONAL(HAVE_LIBBROTLI, test "$with_libbrotlienc" != "no" && test "$with_libbrotlidec" != "no")
 
-AC_ARG_WITH(libzstd,
+AC_ARG_WITH(zstd,
 	    AS_HELP_STRING([--without-zstd], [disable zstd compression support]),
 	    ac_zstd=$withval, ac_zstd=yes)
 AC_MSG_CHECKING([whether to include zstd compression support])
GitLab

From: Sam James <sam@gentoo.org>
Date: Fri, 18 Mar 2022 05:51:29 +0000
Subject: [PATCH 2/2] configure.ac: fix zstd detection

Fixes typo in zstd detection.

None of the used autoconf macros will define `has_zstd_h` so
configure will (AFAICT) always fail to find zstd, even if it succeeded
via pkg-config moments before.

Drop it and rely solely on pkg-config as that's the only search
we're actually doing.

Fixes: https://gitlab.com/gnutls/gnutls/-/issues/1343
Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -1040,7 +1040,7 @@ AC_MSG_CHECKING([whether to include zstd compression support])
 if test x$ac_zstd != xno; then
     AC_MSG_RESULT(yes)
     PKG_CHECK_MODULES(LIBZSTD, [libzstd >= 1.3.0], [with_libzstd=yes], [with_libzstd=no])
-    if test "${with_libzstd}" = "yes" && test "${has_zstd_h}" = "yes"; then
+    if test "${with_libzstd}" = "yes"; then
 	AC_DEFINE([HAVE_LIBZSTD], 1, [Define if ZSTD compression is enabled.])
 	if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
 	    GNUTLS_REQUIRES_PRIVATE="Requires.private: libzstd"
GitLab