[Libguestfs] [PATCH libguestfs 1/2] build: Allow C programs using libguestfs to be compiled against build dir.
Pino Toscano
ptoscano at redhat.com
Wed Mar 11 12:20:47 UTC 2020
On Tuesday, 10 March 2020 16:05:18 CET 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
Or even more easily, covering also the OCaml usage:
$ /path/to/libguestfs/run bash -i
$ ./configure
$ make
$ [etc]
> 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.
> ---
Seems OK, just one thing:
> +Name: libguestfs
> +Version: @VERSION@
> +Description: libguestfs library for accessing and modifying VM images
> +Requires:
> +Cflags: -I${includedir}
> +Libs: -L${libdir} -lguestfs @LIBS@
Not sure where this $LIBS variable comes from, as it is empty (even the
installed libguestfs.pc has this).
I'd drop it from this patch, and I will send a patch for the installed
libguestfs.pc.in.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20200311/6e93f7fd/attachment.sig>
More information about the Libguestfs
mailing list