I just forgot to autoconf:-( It works if I use libtool-1.5.24 and run
libtoolize --copy --force aclocal autoconf
However I'm doing something wrong. With libtool 1.5.22, which OpenLDAP uses now, the build/ltmain.sh and build/config.* I generate don't match the existing ones. Nor aclocal.m4 when I run aclocal, but then I don't know which automake version to use.
Is OpenLDAP using a patched libtool? One of the differences is that ltmain.sh contains VERSION=1.5.22-OpenLDAP, while I get VERSION=1.5.22.
build/README is outdated, it says we use libtool 1.4.3.