From 8a1339e38380c2cdb5b848e2746422064b0e55bf Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Wed, 11 Sep 2019 22:58:18 +0100
Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
Bundled libintl did not support linking to internal static
libraries (libmc in our case): directly specified static
libraries are not pulled by libtool and are not usable for
dynamic libraries as PIC-related flags are not passed for
compilation.
This renders bundled libintl library unusable.
The change drops libintl bundling support and always relies
on external libintl (or falls back to disabled NLS).
On a related note gettext-0.20 drops support for bundling
or libintl and this change will ease migration to newer version.
The change is tested on x86_64-gentoo-linux-musl: mc builds
and links all tests successfully. A few tests fail for lack
of NLS support.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
.gitignore | 1 -
Makefile.am | 2 +-
configure.ac | 3 +--
doc/doxygen.cfg | 2 +-
lib/Makefile.am | 2 +-
m4.include/mc-i18n.m4 | 5 -----
6 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/.gitignore b/.gitignore
index 488ed421f..67f81ead2 100644
a
|
b
|
config.sub |
20 | 20 | configure |
21 | 21 | configure.mc |
22 | 22 | gettext.m4 |
23 | | intl |
24 | 23 | install-sh |
25 | 24 | m4 |
26 | 25 | mc.qpg |
diff --git a/Makefile.am b/Makefile.am
index ac05a83ea..f86f6ed38 100644
a
|
b
|
|
1 | 1 | ## Process this file with automake to create Makefile.in. |
2 | 2 | AUTOMAKE_OPTIONS = 1.5 |
3 | 3 | |
4 | | SUBDIRS = intl po lib src doc contrib misc |
| 4 | SUBDIRS = po lib src doc contrib misc |
5 | 5 | |
6 | 6 | if HAVE_TESTS |
7 | 7 | SUBDIRS += tests |
diff --git a/configure.ac b/configure.ac
index f516048a6..79b63b39f 100644
a
|
b
|
dnl ############################################################################ |
272 | 272 | dnl Internationalization |
273 | 273 | dnl ############################################################################ |
274 | 274 | |
275 | | AM_GNU_GETTEXT([no-libtool], [need-ngettext]) |
| 275 | AM_GNU_GETTEXT([external], [need-ngettext]) |
276 | 276 | AM_GNU_GETTEXT_VERSION([0.18.1]) |
277 | 277 | |
278 | 278 | mc_I18N |
… |
… |
doc/hlp/pl/Makefile |
675 | 675 | doc/hlp/ru/Makefile |
676 | 676 | doc/hlp/sr/Makefile |
677 | 677 | |
678 | | intl/Makefile |
679 | 678 | po/Makefile.in |
680 | 679 | ]) |
681 | 680 | |
diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
index 07bc973ae..1118062f6 100644
a
|
b
|
FILE_PATTERNS = *.c \ |
91 | 91 | RECURSIVE = YES |
92 | 92 | EXCLUDE = |
93 | 93 | EXCLUDE_SYMLINKS = NO |
94 | | EXCLUDE_PATTERNS = */intl/* */tests/* */.git/* |
| 94 | EXCLUDE_PATTERNS = */tests/* */.git/* |
95 | 95 | EXCLUDE_SYMBOLS = |
96 | 96 | EXAMPLE_PATH = $(SRCDIR) |
97 | 97 | EXAMPLE_PATTERNS = |
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c448e2ddb..69c47601f 100644
a
|
b
|
else |
74 | 74 | libmc_la_LIBADD += $(GLIB_LIBS) |
75 | 75 | endif |
76 | 76 | |
77 | | libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL) |
| 77 | libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) |
diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
index 724ca5d26..8f1474139 100644
a
|
b
|
dnl @license GPL |
8 | 8 | dnl @copyright Free Software Foundation, Inc. |
9 | 9 | |
10 | 10 | AC_DEFUN([mc_I18N],[ |
11 | | |
12 | | if test "x$USE_INCLUDED_LIBINTL" = xyes; then |
13 | | CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl" |
14 | | fi |
15 | | |
16 | 11 | dnl User visible support for charset conversion. |
17 | 12 | AC_ARG_ENABLE([charset], |
18 | 13 | AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@])) |