Installing Cgipp on a unix system

Most unix-sysadmins and aspiring sysadmins know that unix is pretty much like Plato's ideas, everyone thinks their idea is the original one but is widely different from everyone else. There are small (and sometimes not-so small) differences between the implementations of unix, so some patching of the Makefiles/headerfiles might be needed. I have tried to stay true to ANSI C++ and have not included any fancy coding (like templates, exceptions, etc) so just about any C++ compiler with an iostream library will be able to compile it. It has mainly been tested on unix-flavours with g++ (it uses only libstdc++ and not libg++) which is available (free of charge!) on all(?) unix-platforms. I also use autoconf to provide a configure-script which will check your system for what it needs from your system to compile properly. If you are fairly new to installing libraries, contact your sysadmin or your local guru (if you don't have one, get one) if you run into problems.

If you're lucky, you'll only need to edit one file, mkinfo.mk, where you'll need to set the following variables (as in a Makefile) correct:

The most important defines and details comes either from mkinfo.mk, or the configure script, but if things screw up you might wish to check a couple of headerfiles (it is in 99 of 100 cases not needed), most notably general defines in Defs.H and debugging-defines in Debug.H (new cgi-programmers may be surprised by the attention given to debugging, but it's importance will very soon become apparent).

Run ./configure and if no fatal errors appeared, run (GNU or Sun) make or make shared if your OS supports ELF (SVR4 and Solaris) and you want shared libraries which I use on my biggest site (the Legendary Dragonlands where at least 16 scripts run every minute so the shared cgi-library and the supporting library lies in the cache almost constantly. For even larger sites (50 000+) hits a day, this may be of vital importance. To test it use make examples

Debugging note: if you wish the debugging to be nonstandard (it is almost minimal already), check src/Makefile for options. If you define MAINTAINER you'll get plenty of seemingly useless debugging which will make huge debuggingfiles (expect at least 10-20k each time an app is run)

LIBDIRPATH: If you set the LIBDIR variable in mkinfo.mk to anything nonstandard you should also set the FULLINCLUDE variable in the src/Makefile to also include a correct -L option (example is included in src/Makefile

crude debugging note: If you wish to include "normal" debugging when you create the library, add -g to the CFLAGS in src/Makefile. This will make the library much larger and this form of debugging is IMVHO virtually useless, at least I have yet to see anyone actually use a standard debugger on a cgi-script. Use the cgidebugging provided instead for better results.

Solaris Note: If you wish to compile a shared library on Solaris, edit the SHARELINKFLAG in the src/Makefile

SGI/IRIX Note: If you use SGI C++, you should edit the WARNFLAG and the SHAREDFLAG in the src/Makefile

If you run into other problems, have suggestions, etc., contact me by email at stig@ii.uib.no and I usually answer pretty quick (except in weekends or when I am at work in other cities)