gawk: Configuration Philosophy

 
 B.2.4 The Configuration Process
 -------------------------------
 
 This minor node is of interest only if you know something about using
 the C language and Unix-like operating systems.
 
    The source code for 'gawk' generally attempts to adhere to formal
 standards wherever possible.  This means that 'gawk' uses library
 routines that are specified by the ISO C standard and by the POSIX
 operating system interface standard.  The 'gawk' source code requires
 using an ISO C compiler (the 1990 standard).
 
    Many Unix systems do not support all of either the ISO or the POSIX
 standards.  The 'missing_d' subdirectory in the 'gawk' distribution
 contains replacement versions of those functions that are most likely to
 be missing.
 
    The 'config.h' file that 'configure' creates contains definitions
 that describe features of the particular operating system where you are
 attempting to compile 'gawk'.  The three things described by this file
 are: what header files are available, so that they can be correctly
 included, what (supposedly) standard functions are actually available in
 your C libraries, and various miscellaneous facts about your operating
 system.  For example, there may not be an 'st_blksize' element in the
 'stat' structure.  In this case, 'HAVE_STRUCT_STAT_ST_BLKSIZE' is
 undefined.
 
    It is possible for your C compiler to lie to 'configure'.  It may do
 so by not exiting with an error when a library function is not
 available.  To get around this, edit the 'custom.h' file.  Use an
 '#ifdef' that is appropriate for your system, and either '#define' any
 constants that 'configure' should have defined but didn't, or '#undef'
 any constants that 'configure' defined and should not have.  The
 'custom.h' file is automatically included by the 'config.h' file.
 
    It is also possible that the 'configure' program generated by
 Autoconf will not work on your system in some other fashion.  If you do
 have a problem, the 'configure.ac' file is the input for Autoconf.  You
 may be able to change this file and generate a new version of
 'configure' that works on your system (SeeBugs for information on
 how to report problems in configuring 'gawk').  The same mechanism may
 be used to send in updates to 'configure.ac' and/or 'custom.h'.