Ldap compilation fails when I am trying to compile with-threads and
I think you mean --without-threads broke it...
BTW, note that --enable-backends and --enable-overlays enable all
backends/overlays, you don't need --enable-<individual backend/overlay>
switches in addition. And to drop the shell backend as Howard suggests,
you'd then override with --disable-shell.