building Apache 1.3 on AIX

general issues

With Apache <= 1.3.27 on AIX 5.2, you need to apply this patch: http://www.apache.org/dist/httpd/patches/apply_to_1.3.27/aix.patch The configuration problem is fixed with Apache 1.3.28.

choice of compiler

This is either IBM's C for AIX (included in VisualAge C++) or any of the builds of gcc floating around. Personally I use IBM's compiler. It is expected to generate better code, and Apache developers on AIX use it almost exclusively. (Some performance measurements would be nice to include here.) Some of the builds of gcc floating around have complications with Apache. Some of them don't even work. The build of gcc that I recommend is IBM's RPM install of gcc from AIX toolbox download page. I don't recall anybody ever hitting a problem with that gcc and Apache.

building Apache

Grab the tarball from http://www.apache.org/dist/httpd/ and unpack it like this:
gunzip < apache_1.3.27.tar.gz | tar -xvf-
cd apache_1.3.27

building Apache 1.3 with gcc

$ CC=gcc OPTIM='-Wall -g' ./configure --enable-module=most --enable-shared=max --prefix=$HOME/1327_gcc
$ make
With some builds of gcc, you may hit an error like this when linking an Apache DSO:
ld: 0711-317 ERROR: Undefined symbol: .__fixsfsi
It could be something other than __fixsfsi, but for this class of errors the symbol starts with two underscores (i.e., "__"). A leading period may be displayed after "Undefined symbol" in the error message, but it is not part of the symbol.

The fix for this is to add __fixsfsi (and any other such symbols) to the end of src/support/httpd.exp and run make again. This may be an interative process. If you hit a different symbol next time, add it too to src/support/httpd.exp and run make yet again. You shouldn't hit more than a handful of such symbols.

Note: When Apache 1.3.28 is released, you can instead do something like this on your configure so that there are no unresolved gcc symbols in Apache DSOs:

EXTRA_LDFLAGS_SHLIB='-L/directory/containing/libgcc.a -lgcc' ./configure --other-opts
(Support for the EXTRA_LDFLAGS_SHLIB environment variable arrives with Apache 1.3.28.)

And finally:

$ make install

building Apache 1.3 with IBM's C for AIX

$ CC=xlc_r OPTIM='-qinfo=pro -qfullpath -g' ./configure --enable-module=most --enable-shared=max --prefix=$HOME/1327_xlc
$ make
$ make install

configuration and performance tuning

(not even under construction yet)