#build-dependencies

build autotools

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

8 releases

Uses old Rust 2015

0.2.2 Jan 3, 2021
0.2.1 Feb 23, 2019
0.1.4 Feb 11, 2019
0.1.3 Jan 13, 2019
0.1.2 Mar 11, 2018

#16 in Build Utils

Download history 132/week @ 2020-09-27 216/week @ 2020-10-04 129/week @ 2020-10-11 158/week @ 2020-10-18 218/week @ 2020-10-25 356/week @ 2020-11-01 165/week @ 2020-11-08 494/week @ 2020-11-15 132/week @ 2020-11-22 490/week @ 2020-11-29 597/week @ 2020-12-06 529/week @ 2020-12-13 376/week @ 2020-12-20 409/week @ 2020-12-27 313/week @ 2021-01-03 345/week @ 2021-01-10

1,409 downloads per month
Used in 25 crates (12 directly)

MIT license

19KB
339 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