Re: Building zsh/db/gdbm on MacOS Sequoia

"Mark J. Reed" <[email protected]> Mon, 29 Jun 2026 15:33:22 -0400
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAA=-s3yJKtNUoPZSTjThU0-z0o4R1AmAwH1gT-t-6NUxZvvQVw@mail.gmail.com>
I don't think we want to be in the business of trying to use package
managers to find libraries. If you have libs installed in nonstandard
locations you should set the flags yourself. I mean, I'm guessing if you
have ncurses installed via MacPorts, you probably *want* to link against
that instead of the system one.

I use Homebrew, and so usually stick LDFLAGS=-L$(brew --prefix)/lib
CPPFLAGS=-I$(brew --prefix)/include on my configure line, which is at least
enough to find pcre and gdbm when I --enable those options.

On Mon, Jun 29, 2026 at 2:03 PM Bart Schaefer <[email protected]>
wrote:

> On Mon, Jun 29, 2026 at 10:43 AM Daniel Shahaf <[email protected]>
> wrote:
> >
> > Separately, I've noticed patch replaces $LDFLAGS rather than prepend
> > to it, as it does with $CPPFLAGS.  That seems like it might be
> > unintentional?
>
> Not exactly unintentional but seemed unnecessary when looking through
> some other bits of configure.  However, I didn't consider that LDFLAGS
> might be passed in from the configure arguments, so it probably should
> copy it.
>
> Related, the $PCRE_CONFIG usage not only updates CPPFLAGS but also
> injects a -L flag into $LIBS, which makes the behavior of
> --enable-pcre affect unrelated modules/libraries that might have been
> installed the same way -- e.g., removing --enable-pcre changes the
> ncurses variant that gets chosen (Xcode instead of ports).
>
>

-- 
Mark J. Reed <[email protected]>