Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

43.4. autoconf-2.73

Programs for producing shell scripts that can automatically configure source code

Version 2.73, release 1
Shelf buildtools — Build systems and build helpers
Phase 30_foundation (Build Foundation), 15 of 127 in build order
Licence GPL-3.0-or-later WITH Autoconf-exception-3.0
Homepage https://www.gnu.org/software/autoconf/
Build time 0.1 SBU
Installed size 3.4 MiB in 67 files
Recipe ports/core/buildtools/autoconf/kpkgbuild

About

GNU Autoconf turns a project’s configure.ac into the portable configure shell script that probes the system before a build. A release tarball usually ships its generated configure, and building it needs nothing from this port; it matters to the recipes that regenerate theirs, because the source is a tag archive with none (as eudev’s and libcap-ng’s are) or because a patch touches configure.ac. Those recipes run autoreconf, which this port installs, either directly (eudev) or through the project’s own autogen.sh (libcap-ng). The port is in the opening run of 30_foundation, ahead of every shelf, because a recipe calls it without naming autoconf in depends.

autoconf is written in Perl and expands its macros with GNU m4, which is why the recipe depends on perl and m4.

Why it is in KDOS

The comment above the 24 ports from fortify-headers to musl-utils in script/phases/30_foundation/packages.txt is quoted in The build foundation.

Sources

Dependencies

Depends on: perl, m4.

Required by (105): abiword, admesh, afflib, aircrack-ng, anthy-unicode, argp-standalone, asio, audiofile, autoconf-archive, automake, avahi, bitwise, brltty, calcurse, catatonit, chemical-mime-data, chocolate-doom, crispy-doom, cyrus-sasl-xoauth2, dasher, dfu-util, dosbox-x, dotconf, erfa, erofs-utils, espeak-ng, expat, f2fs-tools, freedv-gui, ghc, gmime, hamlib, handbrake, id3lib, iverilog, john, kodi, koreader, libao, libcap-ng, libdmtx, libetpan, libiscsi, libixion, libmodbus, libndp, libnova, libraw, libsass, libsigrok, libsigrokdecode, libstrophe, libtpms, libuv, libxdg-basedir, linuxcnc, lnav, lrdf, ltrace, minicom, minidlna, minizip, motif, musl-fts, musl-obstack, nco, nec2c, networkmanager-openvpn, nfs-utils, ocl-icd, openjdk, openocd, opensp, orcaslicer, par2cmdline-turbo, partclone, pcaudiolib, qrencode, sane-backends, sassc, schismtracker, sdl2-gfx, shairplay, sigrok-cli, sleuthkit, slirp4netns, stk, swtpm, system-config-printer, testdisk, thermald, tlf, ubdsrv, universal-ctags, usbmuxd, verilator, voacapl, w3m, xastir, xnec2c, yara, yasm, yices2, zbar, zimg.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/30_foundation/phase.env && kpkg install autoconf'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/buildtools/autoconf.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/buildtools/autoconf
echo '9fd672b1c8425fac2fa67fa0477b990987268b90ff36d5f016dae57be0d6b52e  autoconf-2.73.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/autoconf
SRC=$SRC_ROOT/autoconf-2.73
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf autoconf-2.73.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

./configure --prefix=/usr
make
make DESTDIR=$PKG install

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/autoconf, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf autoconf-2.73-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/autoconf, and runs the triggers its paths call for.

Contents

Installed programs: autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, ifnames.

Installed directories: /usr/share/autoconf, /usr/share/licenses/autoconf.

Short descriptions

autoconf Generate configuration scripts
autoheader Create a template header for configure
autom4te Generate files and scripts thanks to M4
autoreconf Update generated configuration files
autoscan Generate a preliminary configure.ac
autoupdate Update a configure.ac to a newer Autoconf
ifnames Extract CPP conditionals from a set of files