autoconf

Rules

autoconf

load("@rules_cc_autoconf//autoconf:autoconf.bzl", "autoconf")

autoconf(name, deps, checks)

Run autoconf-like checks and produce results.

This rule runs compilation checks against the configured cc_toolchain and produces a JSON results file containing the check outcomes. Unlike autoconf_hdr, this rule does not generate any header files - it only performs checks.

Example:

load("@rules_cc_autoconf//autoconf:checks.bzl", "checks")

autoconf(
    name = "config",
    checks = [
        checks.AC_CHECK_HEADER("stdio.h"),
        checks.AC_CHECK_HEADER("stdlib.h"),
        checks.AC_CHECK_FUNC("printf"),
    ],
)

The results can then be used by autoconf_hdr or autoconf_srcs to generate headers or wrapped source files.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsAdditional autoconf or package_info dependencies.List of labelsoptional[]
checksList of JSON-encoded checks from checks (e.g., checks.AC_CHECK_HEADER('stdio.h')).List of stringsoptional[]