I had different problems (I will write on this) to compile on AIX 5.3 ML1 and eventually done.
The only option I cannot use was the --with-perl.
Here the kind of problem:
./configure CC=/usr/vac/bin/cc --enable-aix64 --with-includes=/opt/freeware/include --with-libraries=/opt/freeware/lib --with-perl
…
gmake[3]: Entering directory `/Inst/postgresql-8.0.3/src/pl/plperl'
/usr/vac/bin/cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I. -I../../../src/include -I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE -c -o plperl.o plperl.c
"/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h", line 619.16: 1506-007 (S) "struct drand48_data" is undefined.
"/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h", line 727.16: 1506-007 (S) "struct random_data" is undefined.
"/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h", line 775.16: 1506-007 (S) "struct random_data" is undefined.
gmake[3]: *** [plperl.o] Error 1
gmake[3]: Leaving directory `/Inst/postgresql-8.0.3/src/pl/plperl'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/Inst/postgresql-8.0.3/src/pl'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/Inst/postgresql-8.0.3/src'
gmake: *** [all] Error 2
Vincenzo Volpe