Hm, I think I ran into this recently as well. getaddrinfo() on AIX appears to be rather broken, the easiest fix is to tell configure not to use it. Set ac_cv_func_getaddrinfo=no when running configure.
Particularly AIX 5.1. 5.2 seems to do OK, at least for OpenLDAP's relatively modest requirements.
Donn Cave, email@example.com