trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [21/28] git commit: TS-2504: Set LDFLAGS/CPPFLAGS properly in crypto.m4
Date Mon, 27 Jan 2014 20:41:51 GMT
TS-2504: Set LDFLAGS/CPPFLAGS properly in crypto.m4

At the end of AX_CHECK_OPENSSL(), LDFLAGS/CPPFLAGS/LIBS variables
will be reset, so there is no sense in setting these variables within
AX_CHECK_OPENSSL(). We should set them outside of it.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>


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

Branch: refs/heads/5.0.x
Commit: 0f4c7b8ffb26326dbd2cde77c986726ffe8f0552
Parents: c4b5e55
Author: Yunkai Zhang <qiushu.zyk@taobao.com>
Authored: Sun Jan 26 02:25:57 2014 +0800
Committer: Yunkai Zhang <qiushu.zyk@taobao.com>
Committed: Sun Jan 26 02:43:26 2014 +0800

----------------------------------------------------------------------
 build/crypto.m4 | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f4c7b8f/build/crypto.m4
----------------------------------------------------------------------
diff --git a/build/crypto.m4 b/build/crypto.m4
index 94919dc..08730c9 100644
--- a/build/crypto.m4
+++ b/build/crypto.m4
@@ -22,16 +22,20 @@ dnl
 dnl TS_CHECK_CRYPTO: look for crypto libraries and headers
 dnl
 AC_DEFUN([TS_CHECK_CRYPTO], [
-  enable_crypto=no
   AC_SEARCH_LIBS([crypt], [crypt], [AC_SUBST([LIBCRYPT],["-lcrypt"])])
 
   AX_CHECK_OPENSSL([
-    TS_ADDTO(CPPFLAGS, [$OPENSSL_INCLUDES])
-    TS_ADDTO(LDFLAGS, [$OPENSSL_LDFLAGS])
+    enable_crypto=yes
   ], [
-   AC_ERROR(failed to find OpenSSL)
+    AC_ERROR(failed to find OpenSSL)
+    enable_crypto=no
   ])
 
+  if test "x${enable_crypto}" = "xyes"; then
+    TS_ADDTO(LDFLAGS, [$OPENSSL_LDFLAGS])
+    TS_ADDTO(CPPFLAGS, [$OPENSSL_INCLUDES])
+  fi
+
   dnl add checks for other varieties of ssl here
 ])
 dnl


Mime
View raw message