AxKit combines the power of Perl’s rich and varied XML processing facilities with the flexibility of the Apache web server. But instead of using a monolithic package, it takes a more modular approach. This allows developers great flexibility in choosing what lower-level packages they want, but it can mean a more lengthy and complicated installation process. This article comes from chapter two of the book XML Publishing with AxKit by Kip Hampton (O'Reilly, 2004; ISBN: 0596002165).
As I mentioned in this chapter’s introduction, AxKit’s core consists largely of code that glues other things together. In practice, this means that most errors encountered while installing AxKit are due to external dependencies that are missing, broken, out of date, or invisible to AxKit’s Makefile. Including a complete list of various errors that may be encountered among AxKit’s many external dependencies is not realistic here. It would likely be outdated before this book is on the shelves. In general, though, you can use a number of compile-time options when building AxKit. They will help you diagnose (and in many cases, fix) the cause of the trouble. AxKit’s Makefile.PL recognizes the following options:
DEBUG=1
This option causes the Makefile to produce copious amounts of information about each step of the build process. Although wading through the sheer amount of data this option produces can be tedious, you can diagnose most installation problems (missing or unseen libraries, etc.) by setting this flag.
NO_DIRECTIVES=1
This option turns off AxKit’s apache configuration directives, which means you must set these via Apache’s PerlSetVar directives instead. Use this option only in extreme cases in which AxKit’s custom configuration directives conflict with those of another Apache extension module. (These cases are very rare, but they do happen.)
EXPAT_OPTS="..."
This option is relevant only if you do not have the Expat XML parser installed and decide to install it when installing AxKit. This argument takes a list of options to be passed to libexpat’s ./configure command. For example, EXPAT_ OPTS="--prefix=/usr" installs libexpat in /usr/lib, rather than the default location.
LIBS="-L/path/to/somelib -lsomelib"
This option allows you to set your library search path. It is primarily useful for pointing the Makefile to external libraries that you are sure are installed but, for some reason, are being missed during the build process.
INC="-I/path/to/somelib/include" This option is like LIBS, but it sets the include search path.