Re: [libosinfo 2/2] build: add libraries via _LIBADD, not _LDFLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 18, 2013 at 04:18:45PM +0100, Christophe Fergeau wrote:
> From: Ryan Lortie <desrt@xxxxxxxx>
> 
> Make sure we use the _LIBADD variable for adding our dependencies.
> 
> Adding libraries via _LDFLAGS means that we have our libraries appearing
> before the user's LDFLAGS environment variable, which is bad, because
> the LDFLAGS from pkg-config could contain -L for system paths and
> jhbuild sets LDFLAGS to -L${prefix}/lib so that we can find the
> libraries in the user's jhbuild install path.  If the system path flags
> come before the user's directory then we'll get the wrong version.
> 
> Also: automake documentation says it's wrong and would actually error
> out on this if it wasn't hidden behind a variable substitution.
> 
> https://fedorahosted.org/libosinfo/ticket/12
> ---
>  osinfo/Makefile.am | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
> index 20b6a02..21c69e4 100644
> --- a/osinfo/Makefile.am
> +++ b/osinfo/Makefile.am
> @@ -39,12 +39,14 @@ libosinfo_1_0_la_CFLAGS = \
>  	-DLOCALEDIR="\"$(datadir)/locale\"" \
>  	$(NULL)
>  
> -libosinfo_1_0_la_LDFLAGS = \
> -	$(COVERAGE_LDFLAGS) \
> +libosinfo_1_0_la_LIBADD = \
>  	$(LIBXML_LIBS) \
>  	$(LIBXSLT_LIBS) \
>  	$(GOBJECT_LIBS) \
> -	$(GIO_LIBS) \
> +	$(GIO_LIBS)
> +
> +libosinfo_1_0_la_LDFLAGS = \
> +	$(COVERAGE_LDFLAGS) \
>  	$(VERSION_SCRIPT_FLAGS)$(LIBOSINFO_VERSION_FILE) \
>          -version-info $(LIBOSINFO_VERSION_INFO) \
>  	$(NO_UNDEFINED_FLAGS)


ACK matches what we do for libvirt


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux