Automake Autoconf

Pubs:   https://scholar.google.de/citations?hl=en&user=P1pS4s0AAAAJ

#(Note: If necessary please replace automake-1.14 with your version (e.g. 1.15) by typing “sed -i -e ‘s/1.14/1.15/g’ Makefile”.)
#Makefile.in generated by automake 1.14.1 from Makefile.am.
– autoreconf update the files aclocal.m4, Makefile.in, and configure, (maybe also libtool).
– autoconf update only configure

# INSTALL automake-1.15
#https://askubuntu.com/questions/430706/installing-autotools-autoconf

Installing from repositories is always prefered unless you need the last version of autotools. In that case you will have to download it manually and install it manually. GNU autotools are three packages: Autoconf, Automake and Libtool. Here are the steps to manually install it:

cd /usr/local/src

Autoconf:

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xf autoconf*
cd autoconf-2.69
sh configure –prefix /usr/local
make install

Automake:

wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
tar xf automake*
cd automake-1.15
sh configure –prefix /usr/local
make install

Libtool:

wget http://mirror.jre655.com/GNU/libtool/libtool-2.4.6.tar.gz
tar xf libtool*
cd libtool-2.4.6
sh configure –prefix /usr/local
make install

Most importantly You don’t need autotools installed to run ./configure, that it’s a key feature of autotools. On the other hand if you are not given the configure script you will need autotools installed to generate it.

Note make install will internally call make. Thus, there is no need in this case of calling make. Normally, Autotools expect you to call make without sudo privileges and make install with sudo. In this case for simplicity I skipped this guideline. It’s (or is it?) fairly reasonable to trust there is no malware in the autotools generated Makefile.

#https://developer.gnome.org/anjuta-build-tutorial/stable/create-autotools.html.en

#https://thoughtbot.com/blog/the-magic-behind-configure-make-make-install
Overview

Now we know where this incantation comes from and how it works!

On the maintainer’s system:

aclocal # Set up an m4 environment
autoconf # Generate configure from configure.ac
automake –add-missing # Generate Makefile.in from Makefile.am
./configure # Generate Makefile from Makefile.in
make distcheck # Use Makefile to build and test a tarball to distribute

On the end-user’s system:

./configure # Generate Makefile from Makefile.in
make # Use Makefile to build the program
make install # Use Makefile to install the program

#https://stackoverflow.com/questions/2531827/what-are-makefile-am-and-makefile-in
Makefile.am is a programmer-defined file and is used by automake to generate the Makefile.in file (the .am stands for automake). The configure script typically seen in source tarballs will use the Makefile.in to generate a Makefile.

The configure script itself is generated from a programmer-defined file named either configure.ac or configure.in (deprecated). I prefer .ac (for autoconf) since it differentiates it from the generated Makefile.in files and that way I can have rules such as make dist-clean which runs rm -f *.in. Since it is a generated file, it is not typically stored in a revision system such as Git, SVN, Mercurial or CVS, rather the .ac file would be.

Read more on GNU Autotools. Read about make and Makefile first, then learn about automake, autoconf, libtool, etc.