diff options
| author | Steven Fackler <[email protected]> | 2016-10-14 11:39:43 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-10-14 11:39:43 -0700 |
| commit | 98e71596fb48ce7cdabd46e581f32a9a54398cce (patch) | |
| tree | 7d600055248d58edfccd4ed5577c32c86bac3ff2 /openssl/build.rs | |
| parent | Rename NoPadding to None (diff) | |
| parent | Ignore DTLS tests on Windows/ARM for now (diff) | |
| download | rust-openssl-98e71596fb48ce7cdabd46e581f32a9a54398cce.tar.xz rust-openssl-98e71596fb48ce7cdabd46e581f32a9a54398cce.zip | |
Merge pull request #464 from alexcrichton/systest
Add support for OpenSSL 1.1.0
Diffstat (limited to 'openssl/build.rs')
| -rw-r--r-- | openssl/build.rs | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/openssl/build.rs b/openssl/build.rs index b07c1b3e..15d4b4db 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -1,28 +1,15 @@ -#[cfg(feature = "c_helpers")] -mod imp { - extern crate gcc; - - use std::env; - use std::path::PathBuf; - - pub fn main() { - let mut config = gcc::Config::new(); - - if let Some(paths) = env::var_os("DEP_OPENSSL_INCLUDE") { - for path in env::split_paths(&paths) { - config.include(PathBuf::from(path)); - } - } - - config.file("src/c_helpers.c").compile("libc_helpers.a"); - } -} - -#[cfg(not(feature = "c_helpers"))] -mod imp { - pub fn main() {} -} +use std::env; fn main() { - imp::main() + if env::var("DEP_OPENSSL_IS_101").is_ok() { + println!("cargo:rustc-cfg=ossl101"); + println!("cargo:rustc-cfg=ossl10x"); + } + if env::var("DEP_OPENSSL_IS_102").is_ok() { + println!("cargo:rustc-cfg=ossl102"); + println!("cargo:rustc-cfg=ossl10x"); + } + if env::var("DEP_OPENSSL_IS_110").is_ok() { + println!("cargo:rustc-cfg=ossl110"); + } } |