aboutsummaryrefslogtreecommitdiff
path: root/openssl/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/build.rs')
-rw-r--r--openssl/build.rs37
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");
+ }
}