[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
B.2.1 Compiling gawk
for Unix-like Systems
The normal installation steps should work on all modern commercial Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin environment for MS-Windows.
After you have extracted the gawk
distribution, cd
to ‘gawk-4.0.0’. Like most GNU software,
gawk
is configured
automatically for your system by running the configure
program.
This program is a Bourne shell script that is generated automatically using
GNU autoconf
.
(The autoconf
software is
described fully in
Autoconf—Generating Automatic Configuration Scripts,
which can be found online at
the Free Software Foundation’s web site.)
To configure gawk
, simply run configure
:
sh ./configure |
This produces a ‘Makefile’ and ‘config.h’ tailored to your system.
The ‘config.h’ file describes various facts about your system.
You might want to edit the ‘Makefile’ to
change the CFLAGS
variable, which controls
the command-line options that are passed to the C compiler (such as
optimization levels or compiling for debugging).
Alternatively, you can add your own values for most make
variables on the command line, such as CC
and CFLAGS
, when
running configure
:
CC=cc CFLAGS=-g sh ./configure |
See the file ‘INSTALL’ in the gawk
distribution for
all the details.
After you have run configure
and possibly edited the ‘Makefile’,
type:
make |
Shortly thereafter, you should have an executable version of gawk
.
That’s all there is to it!
To verify that gawk
is working properly,
run ‘make check’. All of the tests should succeed.
If these steps do not work, or if any of the tests fail,
check the files in the ‘README_d’ directory to see if you’ve
found a known problem. If the failure is not described there,
please send in a bug report (see section Reporting Problems and Bugs).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |