Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure --openssldir to its default location #141

Merged
merged 1 commit into from
May 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,23 @@ impl Build {
env::var("OPENSSL_SRC_PERL").unwrap_or(env::var("PERL").unwrap_or("perl".to_string()));
let mut configure = Command::new(perl_program);
configure.arg("./Configure");

// Change the install directory to happen inside of the build directory.
if host.contains("pc-windows-gnu") {
configure.arg(&format!("--prefix={}", sanitize_sh(&install_dir)));
} else {
configure.arg(&format!("--prefix={}", install_dir.display()));
}

// Specify that openssl directory where things are loaded at runtime is
// not inside our build directory. Instead this should be located in the
// default locations of the OpenSSL build scripts.
if target.contains("windows") {
configure.arg("--openssldir=SYS$MANAGER:[OPENSSL]");
} else {
configure.arg("--openssldir=/usr/local/ssl");
}

configure
// No shared objects, we just want static libraries
.arg("no-dso")
Expand Down