From 7ae3b3af5b3f7505320cc3aca09d4ff9395194b1 Mon Sep 17 00:00:00 2001 From: Seva <seva@binarytrails.net> Date: Sun, 25 Aug 2019 21:42:45 -0400 Subject: [PATCH] configure: use cflags,libs,ldflags of openssl --- configure.ac | 4 +++- src/Makefile.am | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2f44a88c..4e7832b2 100644 --- a/configure.ac +++ b/configure.ac @@ -146,7 +146,9 @@ AS_IF([test "x$with_openssl" != "xno"], [PKG_CHECK_MODULES([OpenSSL], [openssl >= 1.1], [have_openssl=yes], [have_openssl=no])], [have_openssl=no]) AS_IF([test "x$have_openssl" = "xyes"], [ - LDFLAGS="${LDFLAGS} -lssl" + AC_SUBST(OpenSSL_CFLAGS, "") + AC_SUBST(OpenSSL_LIBS, "") + AC_SUBST(OpenSSL_LDFLAGS, "-lssl") AC_MSG_NOTICE([Using OpenSSL]) ], [ AC_MSG_NOTICE([Not using OpenSSL]) diff --git a/src/Makefile.am b/src/Makefile.am index 3381beb3..560dd61e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ lib_LTLIBRARIES = libopendht.la -libopendht_la_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include/opendht @Argon2_CFLAGS@ @JsonCpp_CFLAGS@ @MsgPack_CFLAGS@ -libopendht_la_LIBADD = @Argon2_LIBS@ @JsonCpp_LIBS@ @GnuTLS_LIBS@ @Nettle_LIBS@ -libopendht_la_LDFLAGS = @LDFLAGS@ @Argon2_LDFLAGS@ -version-number @OPENDHT_MAJOR_VERSION@:@OPENDHT_MINOR_VERSION@:@OPENDHT_PATCH_VERSION@ +libopendht_la_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include/opendht @Argon2_CFLAGS@ @JsonCpp_CFLAGS@ @MsgPack_CFLAGS@ @OpenSSL_CFLAGS@ +libopendht_la_LIBADD = @Argon2_LIBS@ @JsonCpp_LIBS@ @GnuTLS_LIBS@ @Nettle_LIBS@ @OpenSSL_LIBS@ +libopendht_la_LDFLAGS = @LDFLAGS@ @Argon2_LDFLAGS@ @OpenSSL_LDFLAGS@ -version-number @OPENDHT_MAJOR_VERSION@:@OPENDHT_MINOR_VERSION@:@OPENDHT_PATCH_VERSION@ libopendht_la_SOURCES = \ dht.cpp \ storage.h \ -- GitLab