21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

272 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>$ LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"$ export LDFLAGS$ RANLIB="echo"$ export RANLIB$ ./configure --prefix=c:/usr --without-included-gettext$ make AR=emxomfarThese are just suggestions. You may use any other set of (self-consistent) environmentvariables and compiler flags.To get an FHS-compliant file hierarchy it is recommended to use the additionalconfigure options ‘--infodir=c:/usr/share/info’, ‘--mandir=c:/usr/share/man’ and‘--libexecdir=c:/usr/lib’.If you use GCC 2.95 it is recommended to use also:$ LIBS="-lgcc"$ export LIBSYou can also get an a.out executable if you prefer:$ CPPFLAGS="-D__ST_MT_ERRNO__"$ export CPPFLAGS$ CFLAGS="-O2 -Zmt"$ export CFLAGS$ LDFLAGS="-s -Zstack 0x6000"$ LIBS="-lgcc"$ unset RANLIB$ ./configure --prefix=c:/usr$ makeNOTE: Versions later than GCC 2.95, i.e., GCC 3.x using the Innotek libc werenot tested.NOTE: Even if the compiled gawk.exe (a.out) executable contains a DOSheader, it does not work under DOS. To compile an executable that runs underDOS, "-DPIPES_SIMULATED" must be added to CPPFLAGS. But then somenonstandard extensions of gawk (e.g., ‘|&’) do not work!After compilation the internal tests can be performed. Enter ‘make check CMP="diff-a"’ at your command prompt. All tests except for the pid test are expected to workproperly. The pid test fails because child processes are not started by fork().‘make install’ works as expected.NOTE: Most OS/2 ports of GNU make are not able to handle the Makefilesof this package. If you encounter any problems with make try GNUMake 3.79.1 or later versions. You should find the latest version onftp://hobbes.nmsu.edu/pub/os2/.B.3.1.3 Compiling gawk For Dynamic LibrariesTo compile gawk with dynamic extension support, uncomment the definitions of DYN_FLAGS,DYN_EXP, DYN_OBJ, and DYN_MAKEXP in the configuration section of the ‘Makefile’. Thereare two definitions for DYN_MAKEXP: pick the one that matches your target.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!