summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2019-08-13 16:47:02 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2019-08-16 09:13:43 +0000
commitcde7934041dcff7dea93b03a70a71a0259a9fc13 (patch)
tree62f79d84a7ff5a411cffa37a0f4454242b940610
parentebf5d08f47b2f0b3d191b65f6541f61e0ad108b5 (diff)
downloadflatpak-cde7934041dcff7dea93b03a70a71a0259a9fc13.tar.gz
build: Link against libxml only when necessary
The libxml API is used in a relatively few places inside the 'common' sub-directory. It's definitely not as widespread as GLib. A subsequent commit will leverage this to prevent unused shared libraries from being linked to the session helper. Closes: #3052 Approved by: alexlarsson
-rw-r--r--common/Makefile.am.inc3
-rw-r--r--configure.ac3
2 files changed, 4 insertions, 2 deletions
diff --git a/common/Makefile.am.inc b/common/Makefile.am.inc
index 56dbb7ca..3019802f 100644
--- a/common/Makefile.am.inc
+++ b/common/Makefile.am.inc
@@ -138,6 +138,7 @@ libflatpak_common_la_CFLAGS = \
$(SOUP_CFLAGS) \
$(JSON_CFLAGS) \
$(XAUTH_CFLAGS) \
+ $(XML_CFLAGS) \
$(LIBSECCOMP_CFLAGS) \
$(INTERNAL_GPGME_CFLAGS) \
$(SYSTEMD_CFLAGS) \
@@ -145,7 +146,7 @@ libflatpak_common_la_CFLAGS = \
-DLIBEXECDIR=\"$(libexecdir)\" \
-I$(srcdir)/dbus-proxy \
$(NULL)
-libflatpak_common_la_LIBADD = $(AM_LIBADD) libglnx.la $(ARCHIVE_LIBS) $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) $(JSON_LIBS) $(XAUTH_LIBS) $(LIBSECCOMP_LIBS) $(INTERNAL_GPGME_LIBS) $(SYSTEMD_LIBS) $(DCONF_LIBS)
+libflatpak_common_la_LIBADD = $(AM_LIBADD) libglnx.la $(ARCHIVE_LIBS) $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) $(JSON_LIBS) $(XAUTH_LIBS) $(XML_LIBS) $(LIBSECCOMP_LIBS) $(INTERNAL_GPGME_LIBS) $(SYSTEMD_LIBS) $(DCONF_LIBS)
libflatpak_la_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 0d5cb12f..992ddcf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,8 +211,9 @@ AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
POLKIT_GOBJECT_REQUIRED=0.98
PKG_CHECK_MODULES(ARCHIVE, [libarchive >= 2.8.0])
-PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0 libxml-2.0 >= 2.4 ])
+PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0])
PKG_CHECK_MODULES(SOUP, [libsoup-2.4])
+PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.4])
PKG_CHECK_MODULES(DCONF, [dconf >= 0.26], [have_dconf=yes], [have_dconf=no])
if test $have_dconf = yes; then
AC_DEFINE(HAVE_DCONF, 1, [Define if dconf is available])