Add libsodium dependency

Allow to configure with libsodium flag.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
Denis Pynkin 2019-06-15 20:10:47 +03:00
parent 7a95929867
commit 84c8164610
2 changed files with 19 additions and 0 deletions

View File

@ -112,6 +112,10 @@ ostree_SOURCES += \
$(NULL)
endif
if USE_LIBSODIUM
ostree_CFLAGS += $(OT_DEP_LIBSODIUM_CFLAGS)
ostree_LDADD += $(OT_DEP_LIBSODIUM_LIBS)
endif # USE_LIBSODIUM
if USE_CURL_OR_SOUP
ostree_SOURCES += src/ostree/ot-remote-builtin-add-cookie.c \

View File

@ -242,6 +242,21 @@ dnl to link to it directly.
)
AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes)
LIBSODIUM_DEPENDENCY="1.0.14"
AC_ARG_WITH(libsodium,
AS_HELP_STRING([--with-libsodium], [Use libsodium @<:@default=no@:>@]),
[], [with_libsodium=no])
AS_IF([test x$with_libsodium != xno], [
AC_DEFINE([HAVE_LIBSODIUM], 1, [Define if using libsodium])
PKG_CHECK_MODULES(OT_DEP_LIBSODIUM, libsodium >= $LIBSODIUM_DEPENDENCY, have_libsodium=yes, have_libsodium=no)
AS_IF([ test x$have_libsodium = xno ], [
AC_MSG_ERROR([Need LIBSODIUM version $LIBSODIUM_DEPENDENCY or later])
])
OSTREE_FEATURES="$OSTREE_FEATURES libsodium"
], with_libsodium=no )
AM_CONDITIONAL(USE_LIBSODIUM, test "x$have_libsodium" = xyes)
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
# What's in RHEL7.2.
FUSE_DEPENDENCY="fuse >= 2.9.2"