Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Building zsh/db/gdbm on MacOS Sequoia



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 <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Mon, Jun 29, 2026 at 10:43 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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 <markjreed@xxxxxxxxx>


Messages sorted by: Reverse Date, Date, Thread, Author