{"id":20667008,"url":"https://github.com/lu-zero/autotools-rs","last_synced_at":"2025-08-02T21:05:26.223Z","repository":{"id":44604354,"uuid":"124804198","full_name":"lu-zero/autotools-rs","owner":"lu-zero","description":"build.rs helper to configure and compile autotools and configure/make projects","archived":false,"fork":false,"pushed_at":"2024-04-08T15:59:46.000Z","size":45,"stargazers_count":30,"open_issues_count":8,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-23T09:35:22.025Z","etag":null,"topics":["autotools","cargo","configure","makefile","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lu-zero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-11T22:08:10.000Z","updated_at":"2025-07-12T10:27:20.000Z","dependencies_parsed_at":"2024-06-19T11:29:42.266Z","dependency_job_id":null,"html_url":"https://github.com/lu-zero/autotools-rs","commit_stats":{"total_commits":55,"total_committers":12,"mean_commits":4.583333333333333,"dds":0.6,"last_synced_commit":"d4e25a271aaffb369dd770875890683e9150b090"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/lu-zero/autotools-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Fautotools-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Fautotools-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Fautotools-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Fautotools-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lu-zero","download_url":"https://codeload.github.com/lu-zero/autotools-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Fautotools-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268454340,"owners_count":24253143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autotools","cargo","configure","makefile","rust"],"created_at":"2024-11-16T19:42:35.468Z","updated_at":"2025-08-02T21:05:26.112Z","avatar_url":"https://github.com/lu-zero.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autotools/configure\u0026make support for build.rs\n\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![dependency status](https://deps.rs/repo/github/lu-zero/autotools-rs/status.svg)](https://deps.rs/repo/github/lu-zero/autotools-rs)\n[![crates.io](https://img.shields.io/crates/v/autotools.svg?style=flat)](https://crates.io/crates/autotools)\n[![docs.rs](https://docs.rs/autotools/badge.svg)](https://docs.rs/autotools)\n[![Actions Status](https://github.com/lu-zero/autotools-rs/workflows/autotools-rs-compact/badge.svg)](https://github.com/lu-zero/autotools-rs/actions)\n\n\nA build dependency to compile a native library that uses [autotools][1] or\na compatible `configure` script + `make`.\n\nIt is based on [cmake-rs](https://github.com/alexcrichton/cmake-rs) and\nthe API tries to be as similar as possible to it.\n\n## Autotools concern\nThe generated `configure` script that is often bundled in release tarballs tends to be fairly big, convoluted and at least once has been a vector for\ndelivering malicious code ([CVE-2024-3094][cve-xz].\n\nIt is advised to review `configure.ac` and always regenerate `configure` using [`reconf`][reconf].\n\n[cve-xz]: https://nvd.nist.gov/vuln/detail/CVE-2024-3094\n[reconf]: https://docs.rs/autotools/latest/autotools/struct.Config.html#method.reconf\n\n## Cross compiling\n\n### Emscripten\nFor Emscripten targets like \"wasm32-unknown-emscripten\", `configure` and\n`make` invocations are passed as arguments to `emconfigure` and `emmake`\nrespectively as described in the [Emscripten docs](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system).\n\n### Custom LLVM on macOS\nMake sure to set the env to `CC=clang-{version}` and that the compiler is in the `PATH`. If you are using [install-llvm-action](https://github.com/KyleMayes/install-llvm-action),\nmake sure to set [`env: true`](https://github.com/KyleMayes/install-llvm-action#env).\n\n### Other compilers\nKeep in mind that we rely on `cc-rs` heuristics to select the C and C++ compilers. Some may be missing on your system, please make sure to set\nthe [enviroment variables](https://github.com/rust-lang/cc-rs#external-configuration-via-environment-variables) to select the correct compiler if\nthe heuristics fail (e.g. `musl-gcc` might not exist while `x86_64-linux-musl-gcc` does).\n\n\n\n``` toml\n# Cargo.toml\n[build-dependencies]\nautotools = \"0.2\"\n```\n\n``` rust\n// build.rs\nuse autotools;\n\n// Build the project in the path `foo` and installs it in `$OUT_DIR`\nlet dst = autotools::build(\"foo\");\n\n// Simply link the library without using pkg-config\nprintln!(\"cargo:rustc-link-search=native={}\", dst.display());\nprintln!(\"cargo:rustc-link-lib=static=foo\");\n```\n\n``` rust\n// build.rs\nuse autotools::Config;\n\nlet dst = Config::new(\"foo\")\n    .reconf(\"-ivf\")\n    .enable(\"feature\", None)\n    .with(\"dep\", None)\n    .disable(\"otherfeature\", None)\n    .without(\"otherdep\", None)\n    .cflag(\"-Wall\")\n    .build();\n```\n\n[1]: https://www.gnu.org/software/autoconf/autoconf.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu-zero%2Fautotools-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flu-zero%2Fautotools-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu-zero%2Fautotools-rs/lists"}