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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to