Go forward to New Configurations.
Go backward to Quick Installation.
Go up to Unix Installation.
The Configuration Process
-------------------------
(This section is of interest only if you know something about using
the C language and the Unix operating system.)
The source code for `gawk' generally attempts to adhere to industry
standards wherever possible. This means that `gawk' uses library
routines that are specified by the ANSI C standard and by the POSIX
operating system interface standard. When using an ANSI C compiler,
function prototypes are provided to help improve the compile-time
checking.
Many older Unix systems do not support all of either the ANSI or the
POSIX standards. The `missing' subdirectory in the `gawk' distribution
contains replacement versions of those subroutines that are most likely
to be missing.
The `config.h' file that is created by the `configure' program
contains definitions that describe features of the particular operating
system where you are attempting to compile `gawk'. For the most part,
it lists which standard subroutines are *not* available. For example,
if your system lacks the `getopt' routine, then `GETOPT_MISSING' would
be defined.
`config.h' also defines constants that describe facts about your
variant of Unix. For example, there may not be an `st_blksize' element
in the `stat' structure. In this case `BLKSIZE_MISSING' would be
defined.
Based on the list in `config.h' of standard subroutines that are
missing, `missing.c' will do a `#include' of the appropriate file(s)
from the `missing' subdirectory.
Conditionally compiled code in the other source files relies on the
other definitions in the `config.h' file.
Besides creating `config.h', `configure' produces a `Makefile' from
`Makefile.in'. There are a number of lines in `Makefile.in' that are
system or feature specific. For example, there is line that begins
with `##MAKE_ALLOCA_C##'. This is normally a comment line, since it
starts with `#'. If a configuration file has `MAKE_ALLOCA_C' in it,
then `configure' will delete the `##MAKE_ALLOCA_C##' from the beginning
of the line. This will enable the rules in the `Makefile' that use a C
version of `alloca'. There are several similar features that work in
this fashion.