diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-12-18 16:18:45 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-01-07 10:56:38 +0100 |
commit | 253960b3545ee2b5ef6e3dd0c4b1bf03ae2d3a21 (patch) | |
tree | 5e74012cee232f160a17f55cd49212117af50182 | |
parent | cae27c12c8402f4fb48e7239570d0a32de6a11f6 (diff) | |
download | libosinfo-253960b3545ee2b5ef6e3dd0c4b1bf03ae2d3a21.tar.gz |
build: add libraries via _LIBADD, not _LDFLAGS
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
-rw-r--r-- | osinfo/Makefile.am | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am index 80fa1e2..e767cc4 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) |