diff --git a/README.md b/README.md index 7686722b92aad8ffc577c017152508a7a78c5363..f2f165795efead40f5eb6bf5495a4188b4969dd6 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 42354ecb9cc19486bd369c71e125dc56f2d7acc6..9c2b32645fceba56c7926b26bfef8c8ed74c179f 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 0aae92c65329ce7566020fbf7071eae6798fb0f0..c7e2f96864e0bc093b4b2c3bad0273457d13ab2f 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}