# Portability with scconfig

Libmawk is configured using an embedded copy of scconfig. In a distribution tarball, it's a snapshot of scconfig; in an svn repository it is an svn external, which guarantees libmawk is using the latest version of scconfig.

Scconfig is a self-contained project configuration tool which depends only on Make and an ANSI (C89) C compiler. Scconfig can test different things on a system, often by compiling and running test programs. Besides saving test results in a text file, it can also generate text files like Makefiles or include files with content depending on those test results.

There are artificial limits on portability tho. While in theory it is possible to scretch the system so that it really works on all operating systems ever existed, or at least on all UNIX-like systems, it is not the goal. This decision is a trade-off between portability and maintainability. Also between portability and code size (or bloat). The artificial limits are:

- a C compiler that fully supports ANSI (C89) C is required
- make supporting traditional Makefiles is required
- no efforts for systems older than 80s UNIX systems; for example libmawk depends on pipe(2), and if it is missing, some of the functionality will be missing
- mawk had support for DOS - this is removed, because
  - it was already marked as somewhat obsolete or at least untested in version 1.3.3, which is the base for libmawk; documentation suggested users should use an older version of mawk on DOS
  - since DOS poses drastic limitation on memory, and mawk seemed to be a memory hog, it is hard to believe someone would actually write an application that would share memory with libmawk and still do something useful - and after all, the purpose of libmawk is exactly embedding awk in applications
  - too many #ifdefs scattered the code for supporting DOS

Libmawk 0.9.7 is reported to configure and compile on the following systems:

system | compiles out of the box | FPE problems | awklib test | binary save/load save/load
[i386] GNU/Linux | yes | no | ok | ok
[amd64] GNU/Linux | yes | no | ok | ok
[i386] Minix |  |  |  |
[i386] NetBSD 4.0 | yes | no | ok | ok
[i386] open solaris 5.11 |  |  |  |
[i386] OpenBSD 5.0 | yes | no | ok | ok
[i386] FreeBSD 9.0 | yes | no | ok | ok
[IP22] IRIX 5.3 | no | minor |  | doesn't work
[i386] Dragonfly BSD 2.10 | yes | no | ok | ok

Libmawk 0.9.6 is reported to configure and compile on the following systems:

system | compiles out of the box | FPE problems | awklib test | binary save/load save/load
i386 GNU/Linux | yes | no | ok | ok
amd64 GNU/Linux | yes | no | ok | ok
i386 Minix | yes | yes | ok | ok
i386 NetBSD 4.0 | yes | yes | ok | ok
i386 open solaris 5.11 | yes | no | ok | ok
i386 OpenBSD 5.0 | yes | yes | ok | ok
i386 FreeBSD 9.0 | yes | yes | ok | ok
IP22 IRIX 5.3 | yes | no | ok | doesn't work
i386 Dragonfly BSD 2.10 | yes | yes | ok | ok