From c2dd313c9a220479ad409bb519187fa9fd503f28 Mon Sep 17 00:00:00 2001 From: Nobuaki Sukegawa Date: Tue, 19 Jan 2016 00:48:46 +0900 Subject: [PATCH 1/2] THRIFT-3555 'configure' script does not honor --with-openssl= for libcrypto for BN_init --- configure.ac | 15 --------------- lib/cpp/Makefile.am | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 3a1314d9ceb..47fdfa0f2b2 100755 --- a/configure.ac +++ b/configure.ac @@ -572,21 +572,6 @@ dnl and we haven't yet found a system where this is a problem. AC_CHECK_LIB(rt, clock_gettime) AC_CHECK_LIB(socket, setsockopt) -if test "$have_cpp" = "yes" ; then -# mingw toolchain used to build "Thrift Compiler for Windows" -# does not support libcrypto, so we just check if we building the cpp library -AC_CHECK_LIB(crypto, - BN_init, - [AC_CHECK_LIB(ssl, - SSL_ctrl, - [LIBS="-lssl -lcrypto $LIBS"], - [AC_MSG_ERROR(["Error: libssl required"])], - -lcrypto - )], - [AC_MSG_ERROR(["Error: libcrypto required."])] -) -fi - AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_INT64_T diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am index dac840a5a1f..6fd15d26e35 100755 --- a/lib/cpp/Makefile.am +++ b/lib/cpp/Makefile.am @@ -35,7 +35,8 @@ pkgconfigdir = $(libdir)/pkgconfig lib_LTLIBRARIES = libthrift.la pkgconfig_DATA = thrift.pc -libthrift_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) +libthrift_la_LDFLAGS = -release $(VERSION) +libthrift_la_LIBADD = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) ## We only build the extra libraries if we have the dependencies, ## but we install all of the headers unconditionally. @@ -58,7 +59,6 @@ endif AM_CXXFLAGS = -Wall -Wextra -pedantic AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(OPENSSL_INCLUDES) -I$(srcdir)/src -D__STDC_LIMIT_MACROS -AM_LDFLAGS = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) # Define the source files for the module From dec2b4ba43aacbb8a4342d932aa38fa61f5beb5a Mon Sep 17 00:00:00 2001 From: Nobuaki Sukegawa Date: Tue, 19 Jan 2016 03:48:41 +0900 Subject: [PATCH 2/2] Fix link of OpenSSLManualInitTest --- lib/cpp/test/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am index 1895afc020b..5f3b117000a 100755 --- a/lib/cpp/test/Makefile.am +++ b/lib/cpp/test/Makefile.am @@ -326,7 +326,9 @@ OpenSSLManualInitTest_SOURCES = \ OpenSSLManualInitTest_LDADD = \ $(top_builddir)/lib/cpp/libthrift.la \ - $(BOOST_TEST_LDADD) + $(BOOST_TEST_LDADD) \ + $(OPENSSL_LDFLAGS) \ + $(OPENSSL_LIBS) # # Common thrift code generation rules