lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Mon, Mar 20, 2023 at 12:44 PM Markus Schaaf <markuschaaf@gmail.com> wrote:
That is what pkgconf is for:

$ pkgconf --libs --static readline
-lreadline -lncursesw
$ pkgconf --libs readline
-lreadline

Build-systems like CMake, Meson etc. take care of this, too.


On Debian 10 the readline.pc file is missing, so that does not work. Same thing on macos with Homebrew providing the package, the file exists but has a path pkg-config can't find.
On Debian 11 it has been added.

The command is 'pkg-config' on the systems I use, by the way.

It's kind of hit and miss whether it works for libreadline, so I'm not relying on it. Just specifying -lreadline works well enough for me.


--