I've been looking at fixing readelf and other parts of binutils that output incorrectly pluralized messages. For example, readelf will display information about a section that "contains 1 entries" or "There are 1 section headers". Fixing this properly requires us to use ngettext, and I see that gcc currently uses ngettext in a number of places (gcc/cp/pt.c, gcc/diagnostic.c, gcc/collect2.c). "Good", says I, "We can just copy gcc", but that led to some questions, and I figured I really ought to look into what exactly was required.
This patch is the result of that investigation, correcting an oversight in the gcc configure machinery. There are (or used to be) gettext implementations that lack ngettext. See config/gettext.m4. Committed as obvious after testing both --enable-nls and --disable-nls builds. * configure.ac: Invoke AM_GNU_GETTEXT with need_ngettext. * configure: Regenerate. diff --git a/intl/configure.ac b/intl/configure.ac index 698c330..36cf97f 100644 --- a/intl/configure.ac +++ b/intl/configure.ac @@ -4,7 +4,7 @@ AC_CONFIG_SRCDIR(gettext.c) AC_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR(../config) AM_GNU_GETTEXT_VERSION(0.12.1) -AM_GNU_GETTEXT +AM_GNU_GETTEXT([], [need-ngettext]) # This replaces the extensive use of DEFS in the original Makefile.in. AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.]) -- Alan Modra Australia Development Lab, IBM