Subject: Re: [PATCH v3 1/2] macOS: make Homebrew use configurable

From: René Scharfe <[email-masked]>
Date: Tue, 16 Dec 2025 20:11:59 +0100

On 12/16/25 7:53 PM, RenÃ© Scharfe wrote:
> On macOS we opportunistically use Homebrew-installed versions of
> gettext(3) and msgfmt(1).  Make that behavior configurable by providing
> make variables to disable Homebrew usage (NO_HOMEBREW), to allow using a
> non-default installation location (HOMEBREW_PREFIX), and to control the
> use of the individual items (USE_HOMEBREW_GETTEXT, USE_HOMEBREW_MSGFMT).
> 
> Precisely Link the gettext keg (the opt/gettext subdirectory) instead of
> risking to link random other Homebrew-installed libraries as well.
> 
> Signed-off-by: René Scharfe <[email-masked]>
> ---
>  Makefile         | 28 ++++++++++++++++++++++++++++
>  config.mak.uname | 28 ++++++----------------------
>  2 files changed, 34 insertions(+), 22 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index cf3f4b585f..a97e9e4d7d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -100,6 +100,18 @@ include shared.mak
>  # specify your own (or DarwinPort's) include directories and
>  # library directories by defining CFLAGS and LDFLAGS appropriately.
>  #
> +# Define NO_HOMEBREW if you don't want to use libraries and commands
> +# installed by Homebrew.
> +#
> +# Define HOMEBREW_PREFIX if you have Homebrew installed in a non-default
> +# location on macOS or on Linux and want to use it.
> +#
> +# Define USE_HOMEBREW_GETTEXT to link against the gettext library
> +# installed by Homebrew, if present.
> +#
> +# Define USE_HOMEBREW_MSGFMT to use the msgfmt command installed by
> +# Homebrew to compile message catalogs during build, if present.

Do we even need these fine-grained USE_ variables?

René