#build-dependencies

build autotools

A build dependency to build native libraries that use configure&make-style build systems

9 releases

Uses old Rust 2015

0.2.3 May 7, 2021
0.2.2 Jan 3, 2021
0.2.1 Feb 23, 2019
0.1.4 Feb 11, 2019
0.1.2 Mar 11, 2018

#39 in Build Utils

Download history 1114/week @ 2021-04-05 396/week @ 2021-04-12 422/week @ 2021-04-19 490/week @ 2021-04-26 325/week @ 2021-05-03 642/week @ 2021-05-10 534/week @ 2021-05-17 308/week @ 2021-05-24 243/week @ 2021-05-31 223/week @ 2021-06-07 273/week @ 2021-06-14 636/week @ 2021-06-21 246/week @ 2021-06-28 299/week @ 2021-07-05 246/week @ 2021-07-12 491/week @ 2021-07-19

2,907 downloads per month
Used in 28 crates (13 directly)

MIT license

23KB
353 lines

autotools/configure&make support for build.rs

LICENSE dependency status crates.io docs.rs

A build dependency to compile a native library that uses autotools or a compatible configure script + make.

It is based on cmake-rs and the API tries to be as similar as possible to it.

For Emscripten targets like "wasm32-unknown-emscripten", configure and make invocations are passed as arguments to emconfigure and emmake respectively as described in the Emscripten docs.

# Cargo.toml
[build-dependencies]
autotools = "0.2"
// build.rs
use autotools;

// Build the project in the path `foo` and installs it in `$OUT_DIR`
let dst = autotools::build("foo");

// Simply link the library without using pkg-config
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=static=foo");
// build.rs
use autotools::Config;

let dst = Config::new("foo")
    .reconf("-ivf")
    .enable("feature", None)
    .with("dep", None)
    .disable("otherfeature", None)
    .without("otherdep", None)
    .cflag("-Wall")
    .build();

Dependencies

~135KB