summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-05-29 18:02:24 -0700
committerMatthew Leeds <matthew.leeds@endlessm.com>2018-05-29 18:02:24 -0700
commit313953a3bcd06b2015e0a3474240d785b601de10 (patch)
tree289ad5c0eccfa2335fbd4a318479ea3da80cdedf
parent036053df88d3cc3741ddc60d0d9009bb3530aa71 (diff)
downloadflatpak-313953a3bcd06b2015e0a3474240d785b601de10.tar.gz
Fix build against ostree 2018.6 from git master
This changes the logic in configure.ac that decides whether to enable P2P support, so that we check ostree's feature flags rather than assuming that 2018.6 has P2P support. This is necessary so that building against development versions of 2018.6, which currently don't have the P2P API public, succeeds.
-rw-r--r--configure.ac18
1 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index eca1bff0..62a40938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,25 +277,25 @@ AC_SUBST([SUDO_BIN])
# Decide whether to build with peer to peer support. This requires API in
# libostree which before 2018.6 was experimental.
+#FIXME: Clean up when flatpak depends on 2018.6
enable_p2p=no
-PKG_CHECK_MODULES(OSTREE_P2P_REQ, [ostree-1 >= $OSTREE_REQS ostree-1 < 2018.6],[
+PKG_CHECK_MODULES(OSTREE_P2P_REQ, [ostree-1 >= $OSTREE_REQS],[
ostree_features=$($PKG_CONFIG --variable=features ostree-1)
AS_CASE(["$ostree_features"],
- [*experimental*],[have_ostree_experimental=yes])
+ [*experimental*],[have_ostree_experimental=yes],
+ [*p2p*],[have_ostree_p2p=yes])
- AS_IF([test "x$have_ostree_experimental" != "xyes"],[
- AC_MSG_WARN([Experimental API not found in ostree-1, so flatpak will be compiled without P2P support. OSTree < 2018.6 must be compiled with --enable-experimental-api.])
+ AS_IF([test "x$have_ostree_experimental" != "xyes" && test "x$have_ostree_p2p" != "xyes"],[
+ AC_MSG_WARN([Experimental/P2P API not found in ostree-1, so flatpak will be compiled without P2P support. OSTree < 2018.6 must be compiled with --enable-experimental-api.])
],[
enable_p2p=yes
- AC_DEFINE([OSTREE_ENABLE_EXPERIMENTAL_API],[1],[Define if libostree experimental API should be enabled])
AC_DEFINE([FLATPAK_ENABLE_P2P],[1],[Define if peer to peer support should be enabled])
+ AS_IF([test "x$have_ostree_experimental" == "xyes"],[
+ AC_DEFINE([OSTREE_ENABLE_EXPERIMENTAL_API],[1],[Define if libostree experimental API should be enabled])
+ ])
])
], :)
-PKG_CHECK_MODULES(OSTREE_2018_6, [ostree-1 >= 2018.6],[
- enable_p2p=yes
- AC_DEFINE([FLATPAK_ENABLE_P2P],[1],[Define if peer to peer support should be enabled])
-], :)
AM_CONDITIONAL([ENABLE_P2P],[test x$enable_p2p = xyes])
AC_ARG_WITH(system-install-dir,