[PATCH v2 1/2] *: add modern gettext support

Bruno Haible bruno@clisp.org
Fri Sep 29 15:58:15 GMT 2023


Arsen Arsenović wrote:
> Building without gettext in-tree or on the system
> should result in a working build with no localization, with gettext
> in-tree and on the system it should result in the usage of the system
> gettext, with gettext on the tree but _not_ on the system, it should
> result in a new (static) copy being built and linked into the tools,
> with working localization, and with no gettext in tree but in system
> (either in libc or in libintl) should result in a localized build using
> the system gettext facilities.
> 
> The behavior for the in-tree but also on the system case (e.g. building
> with gettext in-tree on a GNU system) can be overridden with
> --with-included-gettext (which is a configure flag for gettext-runtime,
> and was a configure flag for intl/ before that).

This information is more intelligible when presented as a table. I think
the table is like this, right?

                 Situation                                 ||   Effect
                                                           ||
gettext  |  libintl  | libc has   |         Option         ||   Working
sources  | installed | *gettext() |--with-included-gettext || Localization
in-tree  | on system | functions  |                        ||
---------+-----------+------------+------------------------++----------------------
   -     |     -     |     -      |       (ignored)        ||     No
   -     |     -     |     Y      |       (ignored)        ||  Yes (libc)
   -     |     Y     |     -      |       (ignored)        ||  Yes (libintl)
   -     |     Y     |     Y      |       (ignored)        ||  Yes (libintl)
   Y     |     -     |     -      |           -            ||  Yes (static libintl)
   Y     |     -     |     -      |           Y            ||  Yes (static libintl)
   Y     |     -     |     Y      |           -            ||  Yes (libc)
   Y     |     -     |     Y      |           Y            ||  Yes (static libintl)
   Y     |     Y     |     -      |           -            ||  Yes (libintl)
   Y     |     Y     |     -      |           Y            ||  Yes (static libintl)
   Y     |     Y     |     Y      |           -            ||  Yes (libintl)
   Y     |     Y     |     Y      |           Y            ||  Yes (static libintl)
---------+-----------+------------+------------------------++----------------------

In all of these cases, the localization can be turned off through the
configure option --disable-nls or by the user, at runtime, by choosing the
"C" locale.

I would find it useful to add this table to the documentation or
at least as some internal comments.

Bruno





More information about the Binutils mailing list