You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ns...@apache.org on 2016/01/23 16:21:55 UTC

[4/4] thrift git commit: THRIFT-3555 'configure' script does not honor --with-openssl= for libcrypto for BN_init Client: Build Patch: Nobuaki Sukegawa

THRIFT-3555 'configure' script does not honor --with-openssl=<path> for libcrypto for BN_init
Client: Build
Patch: Nobuaki Sukegawa

This closes #805


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/a837085e
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/a837085e
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/a837085e

Branch: refs/heads/master
Commit: a837085ecea66e4dcbd96ef906fea3a5273b91ca
Parents: 6076970
Author: Nobuaki Sukegawa <ns...@apache.org>
Authored: Tue Jan 19 00:48:46 2016 +0900
Committer: Nobuaki Sukegawa <ns...@apache.org>
Committed: Sun Jan 24 00:13:44 2016 +0900

----------------------------------------------------------------------
 configure.ac             | 15 ---------------
 lib/cpp/Makefile.am      |  4 ++--
 lib/cpp/test/Makefile.am |  4 +++-
 3 files changed, 5 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/a837085e/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 92dc58c..cca432c 100755
--- a/configure.ac
+++ b/configure.ac
@@ -571,21 +571,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

http://git-wip-us.apache.org/repos/asf/thrift/blob/a837085e/lib/cpp/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index dac840a..6fd15d2 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
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/a837085e/lib/cpp/test/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 1895afc..5f3b117 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