Skip to content

AutoconfAutomake

Tom Mitchell edited this page Jun 11, 2015 · 1 revision

The Portal software uses GNU Autoconf and GNU Automake for portability and configuration. There are a number of files involved, and a number of things to know.

To Do:

  • What does autoconf do?
  • What does automake do?
  • Note: adding new files for installation
  • Note: removing files

The files

  • configure.ac
  • Makefile.am
  • <subdir>/Makefile.am

Autoconf turns the configure.ac file into a configure script that is used to learn about the local environment and generate Makefiles.

The Makefiles are generated from the Makefile.am files by the configure script using automake.

The process

  1. After cloning via git, or copying files to a host for installation, the first step is to generate the configure script from configure.ac. The easiest thing to do is run autoreconf to create it even if it already exists: autoreconf --install
  2. Next, run the configure script. We generally pass additional arguments to specify the destination of files. The --prefix and --sysconfdir arguments in this command are  required  for the software to operate. The --bindir and --sbindir arguments are suggested: ./configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/local/bin --sbindir=/usr/local/sbin
  3. Next, run make
  4. Finally, run make install to install the software on the target host. You will almost certainly have to run this with elevated privileges.
Clone this wiki locally