On Thu, 27 Feb 2020 at 18:55:19 +0100, Andreas Tille wrote: > Any idea how to convince pkgconfig that the library is there?
Suppose the library's normal pkg-config file, when it has been installed system-wide, will be called NAME.pc (so that you find it by using `pkg-config --cflags --libs NAME`). Write out an extra .pc file named NAME-uninstalled.pc, with appropriate CFLAGS and LIBS to link the just-built library; then add the directory containing that file to the PKG_CONFIG_PATH environment variable. pkg-config has a special case so that it automatically looks for NAME-uninstalled.pc before NAME.pc. For example, telepathy-glib (as in `pkg-config --cflags --libs telepathy-glib`) installs this, with the obvious @substitutions@ applied, when installed system-wide: https://sources.debian.org/src/telepathy-glib/0.24.1-2/telepathy-glib/telepathy-glib.pc.in/ During ./configure, it also fills in some different @substitutions@ into this file: https://sources.debian.org/src/telepathy-glib/0.24.1-2/telepathy-glib/telepathy-glib-uninstalled.pc.in/ If you add the directory containing the resulting telepathy-glib-uninstalled.pc to your PKG_CONFIG_PATH, then you can run `pkg-config --cflags --libs telepathy-glib` and get something like: -I/tmp/telepathy-glib -I/tmp/telepathy-glib/builddir -l/tmp/telepathy-glib/builddir/libtelepathy-glib.la (plus the CFLAGS and LIBS of its dependencies like dbus-1). smcv