Recently grabbed OPENLDAP_REL_ENG_2_2 does not build:
cc -O4 -march=pentium4 -mcpu=pentium4 -I../../../include
-I../../../include -I.. -I./.. -I/usr/include/heimdal
-I/usr/include/sasl
-I/usr/local/Berkeley-DB-4.2/include -I/usr/local/sasl/include -c
modrdn.c -o modrdn.o >/dev/null 2>&1
mv -f .libs/modrdn.lo modrdn.lo
make[3]: *** No rule to make target `api.lo', needed by `version.lo'.
Stop. make[3]: Leaving directory
`/home/michael/src/openldap-OPENLDAP_REL_ENG_2_2/ldap/servers/slapd/back-sql'
make[2]: *** [.backend] Error 1
make[2]: Leaving directory
`/home/michael/src/openldap-OPENLDAP_REL_ENG_2_2/ldap/servers/slapd'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory
`/home/michael/src/openldap-OPENLDAP_REL_ENG_2_2/ldap/servers'
make: *** [all-common] Error 1