forked from Mirrors/flatpak-builder
build: Add --enable-p2p configure argument
This mirrors the one for flatpak.git. There are bits of the flatpak-builder code which are P2P-specific and which couldn’t be enabled before. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #68 Approved by: alexlarssontingping/wmclass
parent
9c4007fc0d
commit
6607fd1971
22
configure.ac
22
configure.ac
|
@ -145,6 +145,28 @@ AS_IF([test "x$with_dwarf_header" = "xyes"],
|
||||||
AS_IF([test "x$ac_cv_header_dwarf_h" != "xyes"],
|
AS_IF([test "x$ac_cv_header_dwarf_h" != "xyes"],
|
||||||
[AC_MSG_ERROR([dwarf.h is required but was not found])])])
|
[AC_MSG_ERROR([dwarf.h is required but was not found])])])
|
||||||
|
|
||||||
|
# Do we enable building peer to peer support using libostree’s experimental (non-stable) API?
|
||||||
|
# If so, OSTREE_ENABLE_EXPERIMENTAL_API needs to be #defined before ostree.h is
|
||||||
|
# included.
|
||||||
|
AC_ARG_ENABLE([p2p],
|
||||||
|
[AS_HELP_STRING([--enable-p2p],
|
||||||
|
[Enable unstable peer to peer support [default=no]])],,
|
||||||
|
[enable_p2p=no])
|
||||||
|
AS_IF([test x$enable_p2p = xyes],[
|
||||||
|
PKG_CHECK_MODULES(OSTREE, [ostree-1 >= $OSTREE_REQS])
|
||||||
|
|
||||||
|
ostree_features=$($PKG_CONFIG --variable=features ostree-1)
|
||||||
|
AS_CASE(["$ostree_features"],
|
||||||
|
[*experimental*],[have_ostree_experimental=yes])
|
||||||
|
|
||||||
|
AS_IF([test "x$have_ostree_experimental" != "xyes"],
|
||||||
|
[AC_MSG_ERROR([Experimental API not found in ostree-1, which is needed for --enable-p2p. OSTree must be compiled with --enable-experimental-api.])])
|
||||||
|
|
||||||
|
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])
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL([ENABLE_P2P],[test x$enable_p2p = xyes])
|
||||||
|
|
||||||
AC_ARG_ENABLE(documentation,
|
AC_ARG_ENABLE(documentation,
|
||||||
AC_HELP_STRING([--enable-documentation], [Build documentation]),,
|
AC_HELP_STRING([--enable-documentation], [Build documentation]),,
|
||||||
enable_documentation=yes)
|
enable_documentation=yes)
|
||||||
|
|
Loading…
Reference in New Issue