]> git.proxmox.com Git - cargo.git/blobdiff - vendor/openssl-sys/build/main.rs
Merge branch 'debian/sid' into proxmox/bullseye
[cargo.git] / vendor / openssl-sys / build / main.rs
index 0a34d3d171d117b25a958ac591c1352bed7aa7b7..867e6f922beda3f2a636dfdde2d635e6cd06fcba 100644 (file)
@@ -50,9 +50,21 @@ fn find_openssl(target: &str) -> (Vec<PathBuf>, PathBuf) {
     find_normal::get_openssl(target)
 }
 
+fn check_ssl_kind() {
+    if cfg!(feature = "unstable_boringssl") {
+        println!("cargo:rustc-cfg=boringssl");
+        // BoringSSL does not have any build logic, exit early
+        std::process::exit(0);
+    } else {
+        println!("cargo:rustc-cfg=openssl");
+    }
+}
+
 fn main() {
     check_rustc_versions();
 
+    check_ssl_kind();
+
     let target = env::var("TARGET").unwrap();
 
     let (lib_dirs, include_dir) = find_openssl(&target);
@@ -180,9 +192,9 @@ specific to your distribution:
     # On Alpine Linux
     apk add openssl-dev
 
-See rust-openssl README for more information:
+See rust-openssl documentation for more information:
 
-    https://github.com/sfackler/rust-openssl#linux
+    https://docs.rs/openssl
 ",
                 e
             );
@@ -258,6 +270,8 @@ See rust-openssl README for more information:
             (3, 4, 0) => ('3', '4', '0'),
             (3, 4, _) => ('3', '4', 'x'),
             (3, 5, _) => ('3', '5', 'x'),
+            (3, 6, 0) => ('3', '6', '0'),
+            (3, 6, _) => ('3', '6', 'x'),
             _ => version_error(),
         };
 
@@ -300,7 +314,7 @@ fn version_error() -> ! {
         "
 
 This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5
-through 3.5, but a different version of OpenSSL was found. The build is now aborting
+through 3.6.x, but a different version of OpenSSL was found. The build is now aborting
 due to this version mismatch.
 
 "