serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1814714 - /serf/trunk/SConstruct
Date Thu, 09 Nov 2017 11:41:10 GMT
Author: rhuijben
Date: Thu Nov  9 11:41:10 2017
New Revision: 1814714

URL: http://svn.apache.org/viewvc?rev=1814714&view=rev
Log:
Allow building against OpenSSL 1.1.0 on Windows by linking against the
right library names.

* SConstruct
  Use the new OpenSSL library names if they exist and if not, fallback
  to the legacy Win32 specific names.

Modified:
    serf/trunk/SConstruct

Modified: serf/trunk/SConstruct
URL: http://svn.apache.org/viewvc/serf/trunk/SConstruct?rev=1814714&r1=1814713&r2=1814714&view=diff
==============================================================================
--- serf/trunk/SConstruct (original)
+++ serf/trunk/SConstruct Thu Nov  9 11:41:10 2017
@@ -366,13 +366,20 @@ if sys.platform == 'win32':
                LIBPATH=['$ZLIB'])
 
   # openssl
-  env.Append(LIBS=['libeay32.lib', 'ssleay32.lib'])
   if not env.get('SOURCE_LAYOUT', None):
     env.Append(CPPPATH=['$OPENSSL/include/openssl'],
                LIBPATH=['$OPENSSL/lib'])
   else:
     env.Append(CPPPATH=['$OPENSSL/inc32'],
                LIBPATH=['$OPENSSL/out32dll'])
+  conf = Configure(env)
+  if conf.CheckLib('libcrypto'):
+    # OpenSSL 1.1.0+
+    env.Append(LIBS=['libcrypto.lib', 'libssl.lib'])
+  else:
+    # Legacy OpenSSL
+    env.Append(LIBS=['libeay32.lib', 'ssleay32.lib'])
+  conf.Finish()
 
   # brotli
   if brotli:



Mime
View raw message