8.55. Autoconf-2.72

The Autoconf package contains programs for producing shell scripts that can automatically configure source code.

Approximate build time: less than 0.1 SBU (about 0.4 SBU with tests)
Required disk space: 25 MB

8.55.1. Installation of Autoconf

Create the PKGBUILD for the Autoconf package with the following commands:

mkdir /sources/autoconf
cd /sources/autoconf
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>

pkgname="autoconf"
pkgver="2.72"
pkgrel="1"
pkgdesc="The Autoconf package contains programs for producing shell scripts that can automatically configure source code."
arch=('x86'
      'x86_64')
url="https://www.gnu.org/software/autoconf/"
license=('custom'
         'GPLv2')
groups=('core')
depends=('bash'
         'coreutils'
         'grep'
         'm4'
         'make'
         'sed'
         'texinfo'
         'rootfs')
makedepends=('perl')
checkdepends=('automake'
              'diffutils'
              'findutils'
              'gcc'
              'libtool')
optdepends=('emacs')
source=('https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz')
md5sums=('1be79f7106ab6767f18391c5e22be701')
    
build(){
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

check(){
  cd ${pkgname}-${pkgver}
  make check
}

package(){
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
REALEOF

Prepare the build directory for the pacman user and build the package:

chown -R root:pacman .
chmod 2775 .
chmod 664 PKGBUILD
su pacman -c 'makepkg -L --nodeps'

Add the newly created package to the central package repository:

cp autoconf-2.72-1-$(uname -m).pkg.tar.xz \
   /srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
         /srv/pacman/repos/LFS/autoconf-2.72-1-$(uname -m).pkg.tar.xz

Update the local cache and install the Autoconf package:

pacman -Syu
pacman -S autoconf --overwrite \* -dd --noconfirm

Finally, copy the source files into the source repository and clean up the build directory:

mkdir /srv/pacman/source/LFS/autoconf
cp PKGBUILD /srv/pacman/source/LFS/autoconf
cd /sources
rm -rf autoconf

8.55.2. Contents of Autoconf

Installed programs: autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, and ifnames
Installed directory: /usr/share/autoconf

Short Descriptions

autoconf

Produces shell scripts that automatically configure software source code packages to adapt to many kinds of Unix-like systems; the configuration scripts it produces are independent—running them does not require the autoconf program

autoheader

A tool for creating template files of C #define statements for configure to use

autom4te

A wrapper for the M4 macro processor

autoreconf

Automatically runs autoconf, autoheader, aclocal, automake, gettextize, and libtoolize in the correct order to save time when changes are made to autoconf and automake template files

autoscan

Helps to create a configure.in file for a software package; it examines the source files in a directory tree, searching them for common portability issues, and creates a configure.scan file that serves as a preliminary configure.in file for the package

autoupdate

Modifies a configure.in file that still calls autoconf macros by their old names to use the current macro names

ifnames

Helps when writing configure.in files for a software package; it prints the identifiers that the package uses in C preprocessor conditionals [If a package has already been set up to have some portability, this program can help determine what configure needs to check for. It can also fill in gaps in a configure.in file generated by autoscan.]