summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2019-08-13 15:46:17 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2019-08-16 09:13:43 +0000
commitebf5d08f47b2f0b3d191b65f6541f61e0ad108b5 (patch)
tree1059dba12b0d66bd609e3406de24fc55858df59d
parentde24b1139044b1044d273c569062cf506f066fc0 (diff)
downloadflatpak-ebf5d08f47b2f0b3d191b65f6541f61e0ad108b5.tar.gz
build: Link against libarchive only when necessary
The libarchive 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 5483ac4e..56dbb7ca 100644
--- a/common/Makefile.am.inc
+++ b/common/Makefile.am.inc
@@ -131,6 +131,7 @@ libflatpak_common_la_SOURCES = \
libflatpak_common_la_CFLAGS = \
-DFLATPAK_COMPILATION \
$(AM_CFLAGS) \
+ $(ARCHIVE_CFLAGS) \
$(BASE_CFLAGS) \
$(HIDDEN_VISIBILITY_CFLAGS) \
$(OSTREE_CFLAGS) \
@@ -144,7 +145,7 @@ libflatpak_common_la_CFLAGS = \
-DLIBEXECDIR=\"$(libexecdir)\" \
-I$(srcdir)/dbus-proxy \
$(NULL)
-libflatpak_common_la_LIBADD = $(AM_LIBADD) libglnx.la $(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) $(LIBSECCOMP_LIBS) $(INTERNAL_GPGME_LIBS) $(SYSTEMD_LIBS) $(DCONF_LIBS)
libflatpak_la_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 70e0dd8b..0d5cb12f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,7 +210,8 @@ AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
POLKIT_GOBJECT_REQUIRED=0.98
-PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0 libarchive >= 2.8.0 libxml-2.0 >= 2.4 ])
+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(SOUP, [libsoup-2.4])
PKG_CHECK_MODULES(DCONF, [dconf >= 0.26], [have_dconf=yes], [have_dconf=no])
if test $have_dconf = yes; then