diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-02-11 18:33:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-02-11 21:22:50 (GMT) |
commit | 0e124ddce9726971e579578a49a6e017d98298be (patch) | |
tree | c3161a1b24db34832449f3472cc0b9c4cb3d61c6 /3rdParty | |
parent | d5c88ebfe5b9d4385e8cd7f9b5ef814de03d080f (diff) | |
download | swift-0e124ddce9726971e579578a49a6e017d98298be.zip swift-0e124ddce9726971e579578a49a6e017d98298be.tar.bz2 |
Fix bundled OpenSSL builds.
Change-Id: Ic11b04663f324b75d81a18887cbe4c7324823c86
Diffstat (limited to '3rdParty')
-rw-r--r-- | 3rdParty/OpenSSL/SConscript | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/3rdParty/OpenSSL/SConscript b/3rdParty/OpenSSL/SConscript index dfe78b7..9b84f6d 100644 --- a/3rdParty/OpenSSL/SConscript +++ b/3rdParty/OpenSSL/SConscript @@ -1,4 +1,4 @@ -Import("env") +Import("env", "conf_env") openssl_bundle_dir = "openssl" @@ -13,16 +13,26 @@ if env.get("OPENSSL_BUNDLED", False) : if env["SCONS_STAGE"] == "build" : openssl_env = env.Clone() openssl_env["OPENSSL_BUNDLE_DIR"] = openssl_bundle_dir + openssl_env.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]]) openssl_env.Append(CPPPATH = [ "$OPENSSL_BUNDLE_DIR", "$OPENSSL_BUNDLE_DIR/crypto", "$OPENSSL_BUNDLE_DIR/crypto/asn1", "$OPENSSL_BUNDLE_DIR/crypto/evp", + "$OPENSSL_BUNDLE_DIR/crypto/modes", "$OPENSSL_BUNDLE_DIR/include" ]) openssl_env.Append(CPPDEFINES = ["OPENSSL_THREADS", "_REENTRANT", "DSO_DLFCN", "HAVE_DLFCN_H", "L_ENDIAN"]) - openssl_env.StaticLibrary("crypto", [ + # Detect 32/64 bit + conf = Configure(conf_env) + if conf.CheckDeclaration("__LP64__") : + openssl_env.Append(CPPDEFINES = [("DES_LONG", "unsigned int"), ("MD32_REG_T", "int")]) + else : + openssl_env.Append(CPPDEFINES = [("DES_LONG", "unsigned long")]) + conf.Finish() + + env["OPENSSL_OBJECTS"] = openssl_env.SwiftenObject([ "$OPENSSL_BUNDLE_DIR/crypto/cryptlib.c", "$OPENSSL_BUNDLE_DIR/crypto/mem.c", "$OPENSSL_BUNDLE_DIR/crypto/mem_dbg.c", @@ -576,8 +586,6 @@ if env.get("OPENSSL_BUNDLED", False) : "$OPENSSL_BUNDLE_DIR/crypto/ts/ts_lib.c", "$OPENSSL_BUNDLE_DIR/crypto/ts/ts_conf.c", "$OPENSSL_BUNDLE_DIR/crypto/ts/ts_asn1.c", - ]) - openssl_env.StaticLibrary("ssl", [ "$OPENSSL_BUNDLE_DIR/ssl/s2_meth.c", "$OPENSSL_BUNDLE_DIR/ssl/s2_srvr.c", "$OPENSSL_BUNDLE_DIR/ssl/s2_clnt.c", |