Changes between Version 12 and Version 13 of pm-autotools-intro


Ignore:
Timestamp:
Apr 18, 2007 8:33:50 PM (14 years ago)
Author:
lou
Comment:

Tweaking the wording.

Legend:

Unmodified
Added
Removed
Modified
  • pm-autotools-intro

    v12 v13  
    11= Autotools Basics =
    22
    3 This page gives a general introduction to the autotools, in the specific context of using them in COIN.  If you want to use them, you need to make sure that you are [wiki:pm-get-autotools using the correct version of the autotools].
     3This page gives a general introduction to the autotools, in the specific context of using them in COIN.  If you want to use them, first make sure that you are [wiki:pm-get-autotools using the correct version of the autotools].
    44
    55== {{{autoconf}}} ==
    66
    7 Anyone who has downloaded and installed a GNU package has seen the configure step in the installation process ("{{{... type ./configure ...}}}").  {{{Autoconf}}} is the software that generates the rather complicated shell script, {{{configure}}}, from a simple input file, {{{configure.ac}}}.
     7The goal of {{{autoconf}}} is to provide developers of open source software with an '''easy way to ensure the portability''' of their code.  {{{Autoconf}}} knows how to '''perform tests to find out platform and compiler dependent properties''', for example, the presence of particular program, library, or header files.
    88
    9 The goal of {{{autoconf}}} is to provide developers of open source software with an '''easy way to ensure the portability''' of their code.  {{{Autoconf}}} can '''perform tests to find out platform and compiler dependent properties''', for example, the presence of particular program, library, or header files. The {{{configure}}} script is a shell script for {{{sh}}}, the basic shell that is available on every UNIX-like system (including Linux, Cygwin, and MSys). So that it will work on every system known to the autotools developers, it assumes only the least common denominator over all {{{sh}}} implementations. {{{Configure}}} scripts can be very long --- it takes a lot of simple shell commands to accomplish complicated tests.
     9Anyone who has downloaded and installed a GNU package has seen the configure step in the installation process ("{{{... type ./configure ...}}}"). {{{Autoconf}}} is the software that generates the rather complicated shell script, {{{configure}}}, from a simple input file, {{{configure.ac}}}. The {{{configure}}} script is a shell script for {{{sh}}}, the basic shell that is available on every UNIX-like system (including Linux, Cygwin, and MSys). So that it will work on every system known to the autotools developers, it assumes only the least common denominator over all {{{sh}}} implementations. {{{Configure}}} scripts can be very long --- it takes a lot of simple shell commands to accomplish complicated tests.
    1010
    1111{{{Autoconf}}} uses the macro processor {{{m4}}} to generate the {{{configure}}} script from the {{{configure.ac}}} file.  In {{{configure.ac}}} you specify {{{autoconf}}} macros, some of which take arguments. In a sense these macros can be understood as subroutines, but it's a bit more subtle than that. '''Keep firmly in mind that macros in {{{configure.ac}}} are expanded when the autotools are run, in the project manager's development environment, to create the {{{configure}}} shell script. The shell commands in the {{{configure}}} script are run by the user, in their environment, to adapt the source code and build process to the user's environment.''' An easy and frustrating conceptual mistake, when using the autotools, is to expect shell code to execute during macro expansion.
     
    1313=== Template Files ===
    1414
    15 When run by the user, the {{{configure}}} script will generate '''output files
     15When run by the user, the {{{configure}}} script will '''generate output files
    1616based on templates for these files'''. A template file typically has the extension {{{.in}}}. Template files contain strings ('''{{{autoconf}}} output variable''' names) surrounded by {{{@}}}.
    1717For example, {{{Makefile}}} is generated from {{{Makefile.in}}}.