summaryrefslogtreecommitdiffstats
path: root/rust/vendor/num-complex/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/vendor/num-complex/build.rs')
-rw-r--r--rust/vendor/num-complex/build.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/rust/vendor/num-complex/build.rs b/rust/vendor/num-complex/build.rs
new file mode 100644
index 0000000..85e88b7
--- /dev/null
+++ b/rust/vendor/num-complex/build.rs
@@ -0,0 +1,20 @@
+extern crate autocfg;
+
+use std::env;
+
+fn main() {
+ let ac = autocfg::new();
+
+ if ac.probe_type("i128") {
+ println!("cargo:rustc-cfg=has_i128");
+ } else if env::var_os("CARGO_FEATURE_I128").is_some() {
+ panic!("i128 support was not detected!");
+ }
+
+ // autocfg doesn't have a direct way to probe for `const fn` yet.
+ if ac.probe_rustc_version(1, 31) {
+ autocfg::emit("has_const_fn");
+ }
+
+ autocfg::rerun_path("build.rs");
+}