configure script fails because it can't find the
gettext tools in the current
$PATH. These tools include
msgfmt and other binaries.
On macOS with Homebrew, the
gettext Homebrew package does actually install these binaries, but they are located in the
/usr/local/Cellar/gettext/0.18.1.1/bin directory rather than directly in
The reason for this is that Homebrew installs all "keggs" in the "cellar", and
gettext is a "keg" package.
If everything is working as intended, your
gettext tools should already be symbolically linked from the
Cellar directory to
/usr/local/bin, and if your Homebrew setup is correct,
/usr/local/bin should be in your
Obviously, this is not set up properly, so I'd suggest making sure that your
$PATH is correctly set up with
/usr/bin and that the links for the
gettext tools exists from the cellar to the
/usr/local/bin directory. Fixing one or both of those things will resolve this issue for you.
Update: According to this SuperUser answer, symbolic links to the
gettext tools may not be set up properly by default. The following command will fix it:
$ brew link gettext --force
Once you have compiled your other application, you may undo the above with
$ brew unlink gettext
... if you wish.
This other answer on StackOverflow goes on to explain that executables of Homebrew packages that are "keg-only" (
gettext is one of those) are not linked from the "cellar" to
/usr/local/bin. This is by design. This explains why the
brew link step will be necessary to get your
configure script working properly.
The reason "keg-only" binaries are not put in you
$PATH by default is that they may interfere with similarly named tools already present in the macOS base system.