Fix build on DragonFly

DragonFly has libressl/openssl in ports (/usr/local). With this commit,
rust-openssl builds out of the box given that either libressl or openssl is
installed (which is usually the case).

Tested on DragonFly 5.9-DEVELOPMENT with libressl-3.0.2.
This commit is contained in:
Michael Neumann 2020-03-21 12:46:59 +01:00
parent 1994a523dc
commit 6254c1881b
1 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,11 @@ fn find_openssl_dir(target: &str) -> OsString {
return OsString::from("/usr"); return OsString::from("/usr");
} }
// DragonFly has libressl (or openssl) in ports, but this doesn't include a pkg-config file
if host == target && target.contains("dragonfly") {
return OsString::from("/usr/local");
}
let mut msg = format!( let mut msg = format!(
" "