Author: brane
Date: Tue Nov 15 10:57:03 2016
New Revision: 1769776

URL: http://svn.apache.org/viewvc?rev=1769776&view=rev
Log:
Make sure we don't link with the obsolete OpenSSL shipped with macOS.

* SConstruct: Prepend OpenSSL include and library paths on macOS.

Modified:
    serf/trunk/SConstruct

Modified: serf/trunk/SConstruct
URL: 
http://svn.apache.org/viewvc/serf/trunk/SConstruct?rev=1769776&r1=1769775&r2=1769776&view=diff
==============================================================================
--- serf/trunk/SConstruct (original)
+++ serf/trunk/SConstruct Tue Nov 15 10:57:03 2016
@@ -403,8 +403,17 @@ else:
   env.Append(CPPPATH=['$ZLIB/include'])
   env.Append(LIBPATH=['$ZLIB/lib'])
 
-  env.Append(CPPPATH=['$OPENSSL/include'])
-  env.Append(LIBPATH=['$OPENSSL/lib'])
+  # MacOS ships ancient OpenSSL libraries, but no headers, so we can
+  # assume we're building with an OpenSSL installed outside the
+  # default include and link paths. To prevent accidentally linking to
+  # the old shared libraries, make sure that the OpenSSL paths are
+  # first in the search lists.
+  if sys.platform == 'darwin':
+    env.Prepend(CPPPATH=['$OPENSSL/include'])
+    env.Prepend(LIBPATH=['$OPENSSL/lib'])
+  else:
+    env.Append(CPPPATH=['$OPENSSL/include'])
+    env.Append(LIBPATH=['$OPENSSL/lib'])
 
 
 # If build with gssapi, get its information and define SERF_HAVE_GSSAPI


Reply via email to