Most modern Linux software uses the GNU autotools autoconf, automake and libtool to create platform-dependent Makefiles and to manage library compilation. Another package commonly used along with these tools is pkgconfig, which is used to copy the compiler options, such as library and include paths, of previously installed software applications and libraries.
Cross-compiling STLinux programs that use the autoconf, libtool and pkgconfig system can present problems as package authors and the tools themselves do not always consider the issues involved in cross-development. This means that the resulting scripts, libtool, pkgconfig and Makefiles are often not suited to be used in a mixed environment. In addition, the current autotools packages do not include information about new architectures such as the ST200, which is required for STLinux.
In previous versions of the STLinux distribution separate versions of libtool configuration files (.la files) and pkgconfig files (.pc files) were maintained. This meant that a lot of information was duplicated across the cross and target environments. It also made cross-compiling difficult as the correct files had to be used and the procedure for cross compiling and native compiling was very different.
To overcome these problems, STLinux now ships with specially modified versions of autoconf, automake, libtool and pkgconfig. The first two have been changed to include the ST200 target, and libtool and pkgconfig have been modified to use target .la and .pc files for cross compilation.
The following sections describe how to correctly configure source code packages for cross-compilation, and how to use the ST versions of libtool and pkgconfig. The techniques are applicable for both the ST40 and the ST200 Linux distributions.