Skip to content

RekGRpth/gawkextlib

Repository files navigation

This is gawkextlib.  It contains several shared library extension packages for
gawk, as well as libgawkextlib containing some APIs that are useful for
extension packages.  These extension libraries require the use of gawk (GNU
Awk) version 4.1.1 or later, except for the select and json extensions, which
are currently supported only by gawk 4.2 (API version 2) and later.

The 1.1.0 releases of the extensions should work with both API versions 1
(prior to gawk 4.2) and 2 (starting with gawk 4.2). The API changes did not
affect gawkextlib.

Please download gawkextlib plus one or more individual extensions.  You should
build and install gawkextlib first.  After you untar each package, please cd
into its directory and build as follows:

    ./configure && make && make check && make install && echo Success.

On an rpm-based system, such as Fedora or RHEL or CentOS, you should download
each package's rpm spec file from the rpm-specs directory and place the
tarballs in the customary RPM source directory, which defaults to
$HOME/rpmbuild/SOURCES.  You can then say

    rpmbuild -bb gawkextlib.spec

After installing the gawkextlib rpm, you can then build the individual
extension rpms like so:

    rpmbuild -bb gawk-<extension>.spec

If you would like to build from git sources, please make sure that your
system has these packages installed: autoconf, automake, gettext, libtool,
and autopoint. On many systems, autopoint is part of the gettext package,
but some distributions, such as Ubuntu, place it in a separate package.

With that infrastructure in place, the steps are very similar:

    git clone git://git.code.sf.net/p/gawkextlib/code gawkextlib

Please build lib first, and then the extensions you want, like so:

    autoreconf -i && \
      ./configure && make && make check && make install && echo Success.

Note: if gawk is installed in a non-standard location, please call
`configure --with-gawk=/path/to/gawk`.  Similarly, if you do not
plan to install gawkextlib in the standard location, please use the `--prefix`
option.  So your configure command might look something like:

    configure --with-gawk=/path/to/gawk --prefix=/path/to/gawkextlib

Please use the mailing lists to report bugs or contribute new code.
We welcome the contribution of new extensions.

Developers: please refer to the Development file.  This file has more detailed
instructions for building from git, installing in non-standard locations,
creating new extensions, and testing packages.

Note: if you are using legacy xgawk, please upgrade to gawk version 4.1.1 or
later with these new packages.  There is only one known incompatibility between
xgawk and current gawk: in gawk 4.1 and later, the `@include` and `@load`
directives require double quotes around the filename.  With xgawk, there were
no quotes.  Please let us know if you find any other incompatibilities.