Re: [Libguestfs] [PATCH] lib: remove extra @LIBS@ from pkg-config file

Pino Toscano
Wed, 11 Mar 2020 12:37:50 -0000

On Wednesday, 11 March 2020 13:32:41 CET Eric Blake
wrote:
> On 3/11/20 7:21 AM, Pino Toscano wrote:
> > At the moment it is empty, so probably it does not exist. Remove it to
> > avoid adding spurious content to the pkg-config file in case that
> > variable will get a value in the future.
> > ---
> >   lib/libguestfs.pc.in | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/libguestfs.pc.in b/lib/libguestfs.pc.in
> > index 679ed7eba..013bf0f28 100644
> > --- a/lib/libguestfs.pc.in
> > +++ b/lib/libguestfs.pc.in
> > @@ -8,4 +8,4 @@ Version: @VERSION@
> >   Description: libguestfs library for accessing and modifying VM
images
> >   Requires:
> >   Cflags:
> > -Libs: -lguestfs @LIBS@
> > +Libs: -lguestfs
>
> If I recall, @LIBS@ is the user-controlled variable for adding
> dependencies on a user-specified library beyond what configure would
> normally find.  You're right that it is usually empty, but if a user
> runs './configure LIBS=...' to pick up something special, then that
> something special had better still be present through uses of the
> resulting library.

That is fine IMHO. The problem is that libguestfs.pc represents the
public interface of libguestfs: any application using libguestfs via
the information in the pkg-config file will most likely honour them.
If I need libguestfs to link to a custom library, it will most
certainly be only needed for the internal implementation, just like all
the libraries currently used are (PCRE, libvirt, libxml2, libselinux,
jansson, FUSE).

--
Pino Toscano