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

Arsen Arsenović arsen@aarsen.me
Fri Sep 29 16:27:15 GMT 2023


Bruno Haible <bruno@clisp.org> writes:

> 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.

Indeed, it feels like tabular data.  I'm unsure what the proper place
for inclusion of this information is for the binutils-gdb tree (but
I'll see about adding it to gcc/doc/install.texi shortly).

Any suggestions?
-- 
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 381 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20230929/e7ab9e65/attachment.sig>


More information about the Binutils mailing list