I've just compiled php-5.1.6 on an AIX-5.2 box,
and of course I had to hack a file or two the let things
(like /usr/local/include/c++/3.3.3/cstdlib to let re2c compile,
$ORAHOME/rdbms/public/oratypes.h to let ora*b8 defined even in 32bit mode
and /usr/local/sbin/apxs to not worry about the non-existence of
libphp5.so (which is actually in the libphp5.a archive))
but I had to hack even PHP's Makefile,
which I reported as bug, but certainly I was not clear or correct
enough to explain the problem. See here:

(All this mess gave me an impression that someone
(sometime in the far past) decided that AIX do not have shared
Have anyone else experienced this problem?