[pypy-commit] pypy default: Static linking of openssl, 2nd version

arigo noreply at buildbot.pypy.org
Fri Aug 31 10:14:01 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r57044:1bff7a98c57e
Date: 2012-08-31 10:13 +0200
http://bitbucket.org/pypy/pypy/changeset/1bff7a98c57e/

Log:	Static linking of openssl, 2nd version

diff --git a/pypy/rlib/ropenssl.py b/pypy/rlib/ropenssl.py
--- a/pypy/rlib/ropenssl.py
+++ b/pypy/rlib/ropenssl.py
@@ -7,6 +7,7 @@
 
 link_files = []
 testonly_libraries = []
+include_dirs = []
 if sys.platform == 'win32' and platform.name != 'mingw32':
     libraries = ['libeay32', 'ssleay32',
                  'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32']
@@ -29,6 +30,15 @@
         # and 0.9.8/1.0.0
         link_files += ['/usr/lib/libssl.a', '/usr/lib/libcrypto.a']
         testonly_libraries += ['ssl', 'crypto']
+    elif (sys.platform.startswith('linux') and
+        os.path.exists('/usr/local/ssl/lib/libssl.a') and
+        os.path.exists('/usr/local/ssl/lib/libcrypto.a')):
+        # use static linking, 2nd version
+        include_dirs += ['/usr/local/ssl/include']
+        link_files += ['/usr/local/ssl/lib/libssl.a',
+                       '/usr/local/ssl/lib/libcrypto.a',
+                       '-ldl']
+        testonly_libraries += ['ssl', 'crypto']
     else:
         libraries += ['ssl', 'crypto']
 
@@ -45,6 +55,7 @@
     link_files = link_files,
     testonly_libraries = testonly_libraries,
     includes = includes,
+    include_dirs = include_dirs,
     export_symbols = [],
     post_include_bits = [
         # Unnamed structures are not supported by rffi_platform.


More information about the pypy-commit mailing list