blob: 8f357378d025211a419d1d840149077b60388753 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 0d677a014a87b968d79eea2353ac4e342b0fd4ca Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyfox@gentoo.org>
3Date: Wed, 11 Sep 2019 22:58:18 +0100
4Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
5
6Bundled libintl did not support linking to internal static
7libraries (libmc in our case): directly specified static
8libraries are not pulled by libtool and are not usable for
9dynamic libraries as PIC-related flags are not passed for
10compilation.
11
12This renders bundled libintl library unusable.
13
14The change drops libintl bundling support and always relies
15on external libintl (or falls back to disabled NLS).
16
17On a related note gettext-0.20 drops support for bundling
18or libintl and this change will ease migration to newer version.
19
20The change is tested on x86_64-gentoo-linux-musl: mc builds
21and links all tests successfully. A few tests fail for lack
22of NLS support.
23
24Upstream-Status: Backport [https://github.com/MidnightCommander/mc/commit/f30e6ff283f4bc86177e4360de94dad794678395]
25Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
26Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
27Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
28---
29 Makefile.am | 2 +-
30 configure.ac | 5 +++--
31 doc/doxygen.cfg | 2 +-
32 lib/Makefile.am | 2 +-
33 m4.include/mc-i18n.m4 | 5 -----
34 5 files changed, 6 insertions(+), 10 deletions(-)
35
36diff --git a/Makefile.am b/Makefile.am
37index ac05a83..f86f6ed 100644
38--- a/Makefile.am
39+++ b/Makefile.am
40@@ -1,7 +1,7 @@
41 ## Process this file with automake to create Makefile.in.
42 AUTOMAKE_OPTIONS = 1.5
43
44-SUBDIRS = intl po lib src doc contrib misc
45+SUBDIRS = po lib src doc contrib misc
46
47 if HAVE_TESTS
48 SUBDIRS += tests
49diff --git a/configure.ac b/configure.ac
50index a1948f6..bbc9e71 100644
51--- a/configure.ac
52+++ b/configure.ac
53@@ -272,7 +272,9 @@ dnl ############################################################################
54 dnl Internationalization
55 dnl ############################################################################
56
57-AM_GNU_GETTEXT([no-libtool], [need-ngettext])
58+AC_CHECK_FUNCS([setlocale])
59+
60+AM_GNU_GETTEXT([external], [need-ngettext])
61 AM_GNU_GETTEXT_VERSION([0.18.1])
62
63 mc_I18N
64@@ -680,7 +682,6 @@ doc/hlp/pl/Makefile
65 doc/hlp/ru/Makefile
66 doc/hlp/sr/Makefile
67
68-intl/Makefile
69 po/Makefile.in
70 ])
71
72diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
73index 07bc973..1118062 100644
74--- a/doc/doxygen.cfg
75+++ b/doc/doxygen.cfg
76@@ -91,7 +91,7 @@ FILE_PATTERNS = *.c \
77 RECURSIVE = YES
78 EXCLUDE =
79 EXCLUDE_SYMLINKS = NO
80-EXCLUDE_PATTERNS = */intl/* */tests/* */.git/*
81+EXCLUDE_PATTERNS = */tests/* */.git/*
82 EXCLUDE_SYMBOLS =
83 EXAMPLE_PATH = $(SRCDIR)
84 EXAMPLE_PATTERNS =
85diff --git a/lib/Makefile.am b/lib/Makefile.am
86index c448e2d..455f9dd 100644
87--- a/lib/Makefile.am
88+++ b/lib/Makefile.am
89@@ -74,4 +74,4 @@ else
90 libmc_la_LIBADD += $(GLIB_LIBS)
91 endif
92
93-libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL)
94+libmc_la_LIBADD += $(PCRE_LIBS)
95diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
96index dd10d00..ec08324 100644
97--- a/m4.include/mc-i18n.m4
98+++ b/m4.include/mc-i18n.m4
99@@ -8,11 +8,6 @@ dnl @license GPL
100 dnl @copyright Free Software Foundation, Inc.
101
102 AC_DEFUN([mc_I18N],[
103-
104- if test "x$USE_INCLUDED_LIBINTL" = xyes; then
105- CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
106- fi
107-
108 dnl User visible support for charset conversion.
109 AC_ARG_ENABLE([charset],
110 AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))