[][src]Crate autotools

A build dependency for running the correct autotools commands to build a native library

This crate provides the facilities to setup the build system and build native libraries that leverage autotools or configure & make workalike scripts.

Installation

Add to your Cargo.toml a build dependency:

[build-dependencies]
autotools = "0.1"

## Usage


```no_run
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");
use autotools::Config;

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

Structs

Config

Builder style configuration for a pending autotools build.

Functions

build

Builds the native library rooted at path with the default configure options. This will return the directory in which the library was installed.