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>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Sergei Trofimovich 2019-09-11 22:58:18 +01:00 committed by Andrew Borodin
parent 3195dd7169
commit f30e6ff283
6 changed files with 6 additions and 11 deletions

1
.gitignore vendored
View File

@ -20,7 +20,6 @@ config.sub
configure
configure.mc
gettext.m4
intl
install-sh
m4
mc.qpg

View File

@ -1,7 +1,7 @@
## Process this file with automake to create Makefile.in.
AUTOMAKE_OPTIONS = 1.5
SUBDIRS = intl po lib src doc contrib misc
SUBDIRS = po lib src doc contrib misc
if HAVE_TESTS
SUBDIRS += tests

View File

@ -272,7 +272,9 @@ dnl ############################################################################
dnl Internationalization
dnl ############################################################################
AM_GNU_GETTEXT([no-libtool], [need-ngettext])
AC_CHECK_FUNCS([setlocale])
AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION([0.18.1])
mc_I18N
@ -674,7 +676,6 @@ doc/hlp/pl/Makefile
doc/hlp/ru/Makefile
doc/hlp/sr/Makefile
intl/Makefile
po/Makefile.in
])

View File

@ -91,7 +91,7 @@ FILE_PATTERNS = *.c \
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */intl/* */tests/* */.git/*
EXCLUDE_PATTERNS = */tests/* */.git/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = $(SRCDIR)
EXAMPLE_PATTERNS =

View File

@ -74,4 +74,4 @@ else
libmc_la_LIBADD += $(GLIB_LIBS)
endif
libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL)
libmc_la_LIBADD += $(PCRE_LIBS)

View File

@ -8,11 +8,6 @@ dnl @license GPL
dnl @copyright Free Software Foundation, Inc.
AC_DEFUN([mc_I18N],[
if test "x$USE_INCLUDED_LIBINTL" = xyes; then
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
fi
dnl User visible support for charset conversion.
AC_ARG_ENABLE([charset],
AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))