Skip to content
Snippets Groups Projects
Commit 9b8358cd authored by Seva's avatar Seva Committed by Adrien Béraud
Browse files

configure: set openssl & fmt flags with pkg_check_modules

parent 7ae3b3af
No related branches found
No related tags found
No related merge requests found
...@@ -146,9 +146,6 @@ AS_IF([test "x$with_openssl" != "xno"], ...@@ -146,9 +146,6 @@ AS_IF([test "x$with_openssl" != "xno"],
[PKG_CHECK_MODULES([OpenSSL], [openssl >= 1.1], [have_openssl=yes], [have_openssl=no])], [PKG_CHECK_MODULES([OpenSSL], [openssl >= 1.1], [have_openssl=yes], [have_openssl=no])],
[have_openssl=no]) [have_openssl=no])
AS_IF([test "x$have_openssl" = "xyes"], [ AS_IF([test "x$have_openssl" = "xyes"], [
AC_SUBST(OpenSSL_CFLAGS, "")
AC_SUBST(OpenSSL_LIBS, "")
AC_SUBST(OpenSSL_LDFLAGS, "-lssl")
AC_MSG_NOTICE([Using OpenSSL]) AC_MSG_NOTICE([Using OpenSSL])
], [ ], [
AC_MSG_NOTICE([Not using OpenSSL]) AC_MSG_NOTICE([Not using OpenSSL])
...@@ -163,8 +160,14 @@ AS_IF([test "x$with_http_parser_fork" = "xyes"],[ ...@@ -163,8 +160,14 @@ AS_IF([test "x$with_http_parser_fork" = "xyes"],[
]) ])
AM_COND_IF([PROXY_CLIENT_OR_SERVER], [ AM_COND_IF([PROXY_CLIENT_OR_SERVER], [
AC_CHECK_HEADERS([asio.hpp], exit,, AC_MSG_ERROR([Missing Asio header files])) AC_CHECK_HEADERS([asio.hpp], exit,, AC_MSG_ERROR([Missing Asio headers files]))
PKG_CHECK_MODULES([Fmt], [fmt >= 5.3.0]) CXXFLAGS="${CXXFLAGS} -DASIO_STANDALONE"
PKG_CHECK_MODULES([Fmt], [fmt >= 5.3.0], [have_fmt=yes], [have_fmt=no])
AS_IF([test "x$have_fmt" = "xyes"], [
AC_MSG_NOTICE([Using libfmt])
], [
AC_MSG_NOTICE([Missing libfmt files])
])
# http_parser has no pkgconfig, instead we check with: # http_parser has no pkgconfig, instead we check with:
AC_CHECK_LIB(http_parser, exit,, AC_MSG_ERROR([Missing HttpParser library files])) 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_CHECK_HEADERS([http_parser.h], [http_parser_headers=yes; break;])
......
lib_LTLIBRARIES = libopendht.la lib_LTLIBRARIES = libopendht.la
libopendht_la_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include/opendht @Argon2_CFLAGS@ @JsonCpp_CFLAGS@ @MsgPack_CFLAGS@ @OpenSSL_CFLAGS@ libopendht_la_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include/opendht @Argon2_CFLAGS@ @JsonCpp_CFLAGS@ @MsgPack_CFLAGS@ @OpenSSL_CFLAGS@ @Fmt_CFLAGS@
libopendht_la_LIBADD = @Argon2_LIBS@ @JsonCpp_LIBS@ @GnuTLS_LIBS@ @Nettle_LIBS@ @OpenSSL_LIBS@ libopendht_la_LIBADD = @Argon2_LIBS@ @JsonCpp_LIBS@ @GnuTLS_LIBS@ @Nettle_LIBS@ @OpenSSL_LIBS@ @Fmt_LIBS@
libopendht_la_LDFLAGS = @LDFLAGS@ @Argon2_LDFLAGS@ @OpenSSL_LDFLAGS@ -version-number @OPENDHT_MAJOR_VERSION@:@OPENDHT_MINOR_VERSION@:@OPENDHT_PATCH_VERSION@ libopendht_la_LDFLAGS = @LDFLAGS@ @Argon2_LDFLAGS@ @OpenSSL_LDFLAGS@ @Fmt_LDFLAGS@ -version-number @OPENDHT_MAJOR_VERSION@:@OPENDHT_MINOR_VERSION@:@OPENDHT_PATCH_VERSION@
libopendht_la_SOURCES = \ libopendht_la_SOURCES = \
dht.cpp \ dht.cpp \
storage.h \ storage.h \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment