What are the "serious" libraries?

June Bug june at causal.agency
Sat Apr 11 15:14:24 UTC 2020

> On Apr 10, 2020, at 22:56, Joe Nelson <joe at begriffs.com> wrote:
> I'm working on the template for a portable Makefile which searches for
> prerequisite libraries to link to the main program. Here's what I've
> devised (using a made-up example that needs the ncurses and gpgme
> libraries):

Why do this all inside the Makefile? I think it would be easier to
read as a simple configure script, and running ./configure before
make is what’s expected. I write mine to output config.mk and
`include config.mk` in my Makefile. Some advantages: the flags
output by pkg-config are “cached” in the file, and can be manually
adjusted in that file if needed. It’s also a lot easier if you need
to set PKG_CONFIG_PATH (for a library installed in a non-standard
location), you only need to set it for ./configure and after that
make will keep using the right flags.

More information about the Friends mailing list