summaryrefslogtreecommitdiff
path: root/package/mutt/0001-Fix-static-build-with-libidn2-and-libunistring.patch
blob: 56b90f5e3b7f965a8956bc375e193d54a6f51b2f (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
From 1baceb95bd8e6f35c25bc7afdc6a88c8f6264f3f Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 20 Aug 2018 19:06:08 +0200
Subject: [PATCH] Fix static build with libidn2 and libunistring

When libidn2 is statically build with libunistring support, mutt needs
to add -lunistring to LIBS.
To do that, add a call to PKG_CHECK_MODULES to retrieve this information
from libidn2.pc

Fixes:
 - http://autobuild.buildroot.net/results/177da8f4798f69298db5385957184f1c53cca923

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 29252173..2e69ac19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1341,6 +1341,10 @@ AC_ARG_WITH(idn2, AS_HELP_STRING([--with-idn2=@<:@PFX@:>@],[Use GNU libidn2 for
             if test "$with_idn2" != "yes" ; then
               CPPFLAGS="$CPPFLAGS -I$with_idn2/include"
               LDFLAGS="$LDFLAGS -L$with_idn2/lib"
+            else
+              PKG_CHECK_MODULES([LIBIDN2], libidn2,
+                                 [CPPFLAGS="$CPPFLAGS $LIBIDN2_CFLAGS"
+                                 LIBS="$LIBIDN2_LIBS"])
             fi
           fi
         ],
-- 
2.14.1