[Libguestfs] [PATCH libguestfs 1/2] build: Allow C programs using libguestfs to be compiled against build dir.
Eric Blake
eblake at redhat.com
Wed Mar 11 11:52:04 UTC 2020
On 3/10/20 10:05 AM, Richard W.M. Jones wrote:
> We use a similar trick to libvirt to allow external C programs that
> use libguestfs to be compiled against the built (but not installed)
> libguestfs with:
>
> ../libguestfs/run ./configure
> make
>
> What actually happens is we have a second pkg-config file
> (lib/local/libguestfs.pc) which points to the locally built
> libguestfs. The ./run script sets up PKG_CONFIG_PATH to point to this
> directory. Assuming that ./configure is using pkg-config/pkgconf and
> not some other half-baked solution it will pick up the libguestfs.pc
> file from here which will set CFLAGS and LIBS appropriately.
> ---
> .gitignore | 1 +
> configure.ac | 1 +
> lib/Makefile.am | 1 +
> lib/local/libguestfs.pc.in | 36 ++++++++++++++++++++++++++++++++++++
> run.in | 5 +++++
> 5 files changed, 44 insertions(+)
>
I like it. Should we do the same for libnbd's run script?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list