Scalable Interfaces for Geometry and Mesh based Applications

Autotools issues

Posted by on Jun 10, 2014 in SIGMA

If a system does not have GNU autotools (autoconf, automake, and libtool) installed or the installed versions are not configured correctly (e.g. autoconf or automake do not work with libtool) there are two alternatives: either avoid the use of autotools entirely on the target machine or install working versions of the GNU autotools.

If you do not require a checkout from the subversion repository that can be updated or from which changes can be checked in, then the simplest solution is to build the software from a tarball which already contains a complete build system. Such a tarball can be obtained by downloading an release tarball or created by executing ‘make dist’ in some configured copy of the source on some other machine. This tarball will contain the complete build system (including a configure script) which is entirely platform agnostic. Do not run autoreconf or any specific autotool on the target system as you will corrupt the working build system with the improperly installed autotools on the target machine.

If you must install a private copy of GNU autotools on the target machine, the simplest method to create a functioning combination of tools is to follow these steps:

1. Chose a single –prefix directory that will be used for all three autotools. I will assume that the path to this directory is stored in the environmental variable PFX, such that I can use ${PFX} to refer to the directory below and such that the corresponding configure option specified for each tool will be –prefix=${PFX}. Make sure you use the same directory for all three autotools (autoconf, automake, and libtool).

2. Before building any of the autotools, you should add the bin directory where the tools will be installed to your shell path. If your command shell is sh, bash, ksh, etc, then use the following command:

export PATH="${PFX}/bin:${PATH}"

If your shell is csh or tcsh, then do:

setenv PATH "${PFX}/bin:${PATH}"

You may also wish to edit your shell initialization preferences such that this directory is always added to your path when you log in or open a new xterm, because you will also need to make this change to your path to use the tools once they are build and installed.

3. Download, build, and install each of autoconf, automake, and libtool, in that order. After installing each, verify that things are set up as intended by doing something like

which autoconf

by appropriately substituting ‘automake’ or ‘libtoolize’ for ‘autoconf’ after installing the respective tool. Check that the version of the tool that is used by default is the one just installed into ${PFX}/bin. For some shells you may need to issue the ‘rehash’ command after installing each tool. If this is necessary, do so after installing each tool. Then verify the result with the ‘which’ command.

Copyright © 2014 SIGMA. All Rights Reserved.