diff --git a/hts-sys/Cargo.toml b/hts-sys/Cargo.toml index 296a916df..3e561d1f5 100644 --- a/hts-sys/Cargo.toml +++ b/hts-sys/Cargo.toml @@ -35,4 +35,5 @@ static = [] fs-utils = "1.1" bindgen = { version = "0.53.2", default-features = false, features = ["runtime"] } cc = "1.0" -glob = "0.3.0" \ No newline at end of file +glob = "0.3.0" +dirs = "1.0.2" diff --git a/hts-sys/build.rs b/hts-sys/build.rs index 66f745c6c..4b4df7ade 100644 --- a/hts-sys/build.rs +++ b/hts-sys/build.rs @@ -6,6 +6,8 @@ use fs_utils::copy::copy_directory; use glob::glob; +use ::dirs::home_dir; + use std::env; use std::fs; use std::path::PathBuf; @@ -86,8 +88,8 @@ fn main() { .current_dir(out.join("htslib")) .arg("clean") .status().unwrap().success() - - && + + && !Command::new("autoreconf") .current_dir(out.join("htslib")) @@ -99,7 +101,8 @@ fn main() { !Command::new("./configure") .current_dir(out.join("htslib")) .env("CFLAGS", &cc_cflags) - .arg(format!("--host={}", &host)) + .arg(format!("--host={}", &host)) + .arg(format!("--prefix={}/local", home_dir().unwrap().into_os_string().into_string().unwrap())) .status().unwrap().success() { panic!("could not configure htslib nor any of its plugins")