From 4d689ef51a8af1d8d3a6662b41df344ca6d48a96 Mon Sep 17 00:00:00 2001 From: Vladimir Stoiakin <VStoiakin@lavabit.com> Date: Mon, 6 Apr 2020 00:04:02 +0300 Subject: [PATCH] update opendht.pc --- README.md | 2 +- configure.ac | 3 +++ opendht.pc.in | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7686722b..f2f16579 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Build instructions: <https://github.com/savoirfairelinux/opendht/wiki/Build-the- #### How-to build a simple client app ```bash -g++ main.cpp -std=c++14 -lopendht -lgnutls +g++ main.cpp -std=c++14 -lopendht ``` ## Examples diff --git a/configure.ac b/configure.ac index 42354ecb..9c2b3264 100644 --- a/configure.ac +++ b/configure.ac @@ -140,6 +140,7 @@ AS_IF([test "x$with_jsoncpp" != "xno"], AS_IF([test "x$have_jsoncpp" = "xyes"], [ AC_MSG_NOTICE([Using JsonCpp]) CPPFLAGS+=" -DOPENDHT_JSONCPP" + AC_SUBST(jsoncpp_lib, [", jsoncpp"]) ], [ AC_MSG_NOTICE([Not using JsonCpp]) AM_COND_IF(PROXY_CLIENT_OR_SERVER, AC_MSG_ERROR(["JsonCpp is required for proxy/push notification support"])) @@ -151,6 +152,7 @@ AS_IF([test "x$with_openssl" != "xno"], [have_openssl=no]) AS_IF([test "x$have_openssl" = "xyes"], [ AC_MSG_NOTICE([Using OpenSSL]) + AC_SUBST(openssl_lib, [", openssl"]) ], [ AC_MSG_NOTICE([Not using OpenSSL]) ]) @@ -175,6 +177,7 @@ AM_COND_IF([PROXY_CLIENT_OR_SERVER], [ # http_parser has no pkgconfig, instead we check with: AC_CHECK_LIB(http_parser, exit,, AC_MSG_ERROR([Missing HttpParser library files])) AC_CHECK_HEADERS([http_parser.h], [http_parser_headers=yes; break;]) + AC_SUBST(http_parser_lib, ["-lhttp_parser"]) AS_IF([test "x$http_parser_headers" != "xyes"], AC_MSG_ERROR([Missing HttpParser headers files])) ]) diff --git a/opendht.pc.in b/opendht.pc.in index 0aae92c6..c7e2f968 100644 --- a/opendht.pc.in +++ b/opendht.pc.in @@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: OpenDHT -Description: C++ Distributed Hash Table library +Description: C++14 Distributed Hash Table library Version: @VERSION@ Libs: -L${libdir} -lopendht -Libs.private: -lpthread -Requires.private: gnutls >= 3.1@argon2_lib@ +Libs.private: @http_parser_lib@ -lpthread +Requires.private: gnutls >= 3.3, nettle >= 2.4@argon2_lib@@jsoncpp_lib@@openssl_lib@ Cflags: -I${includedir} -- GitLab