Permalink
Browse files

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

  • Loading branch information...
aberaud committed Jun 18, 2017
1 parent c11dcf5 commit 2ed99db9b1ec167327ef8fd7bfa2603b4f1ea009
Showing with 9 additions and 3 deletions.
  1. +4 −1 CMakeLists.txt
  2. +4 −1 configure.ac
  3. +1 −1 opendht.pc.in
View
@@ -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()
View
@@ -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])
],[
View
@@ -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}

0 comments on commit 2ed99db

Please sign in to comment.