pkg-config: add argon2 dependency when not using included version

This commit is contained in:
Adrien Beraud committed 2017-06-18 22:14:27 +02:00
1 parent c11dcf5d76
commit 2ed99db9b1
3 files changed
+9 -3

No files matched your search

+4 -1
View File
@@ -33,7 +33,10 @@ endif ()
if (NOT OPENDHT_ARGON2)
find_package(PkgConfig)
pkg_search_module(argon2 libargon2)
if (NOT argon2_FOUND)
if (argon2_FOUND)
message("Argon2 found " ${argon2_req})
set(argon2_lib ", libargon2")
else ()
message("Argon2 not found, using included version.")
set(OPENDHT_ARGON2 ON)
endif()
+4 -1
View File
@@ -104,7 +104,10 @@ AC_ARG_WITH([argon2], AS_HELP_STRING([--without-argon2], [Use included Argon2]))
AS_IF([test "x$with_argon2" != "xno"],
[PKG_CHECK_MODULES([Argon2], [libargon2], [have_argon2=yes], [have_argon2=no])],
[have_argon2=no])
AS_IF([test "x$have_argon2" = "xyes"], [], [
AS_IF([test "x$have_argon2" = "xyes"], [
AC_MSG_NOTICE([Using system Argon2])
AC_SUBST(argon2_lib, [", libargon2"])
], [
AS_IF([test "x$with_argon2" = "xyes"], [
AC_MSG_ERROR([Argon2 requested but not found])
],[
+1 -1
View File
@@ -7,5 +7,5 @@ Description: C++ Distributed Hash Table library
Version: @VERSION@
Libs: -L${libdir} -lopendht
Libs.private: -lpthread
Requires.private: gnutls >= 3.1
Requires.private: gnutls >= 3.1@argon2_lib@
Cflags: -I${includedir}