Re: [RFC PATCH v4 00/19] Modernize the build system
- From
Eli Schwartz <eschwartz@gentoo.org>
- Date
- Nov 11, 2024, 23:55 UTC
- Message-ID
- <f3b00260-ec3d-4607-aaf7-9cfd9898434f@gentoo.org>
- In-Reply-To
- <20241111221320.GF5019@coredump.intra.peff.net>
On 11/11/24 5:13 PM, Jeff King wrote:
> No, they don't. I don't have msgfmt on my system at all, and always > build with NO_GETTEXT.
Well, even systems without msgfmt installed may have the gettext() family of symbols available. On various systems, it may even be built into their libc.
So, detecting and handling this case sensibly out of the box would be good, which I guess means checking for find_program('msgfmt') inside of po/meson.build
That being said, the meson way to handle NO_GETTEXT is to use the build option
meson setup builddir -Dgettext=disabled
That option is a "feature option", which means by default its value is auto, not disabled, and it will check for an available libintl / libc gettext().
The po/ directory is only processed if libintl / libc gettext() is found. Passing -Dgettext=disabled means that it will be forcibly overridden to "not found". Meson will log this configuration message:
Dependency intl skipped: feature gettext disabled
-- Eli Schwartz