 ./configure --host=arm-linux CC=arm-dspg-linux-gnueabi-gcc CCX=arm-dspg-linux-gnueabi-g++ --prefix=/opt/ldap LDFLAGS='-L/opt/sysroot/lib -L/opt/sysroot/usr/lib' CFLAGS='-I/opt/dspg/v1.2.2-rc4/sysroots/armv5te-dspg-linux-gnueabi/include' --with-yielding_select=manual --with-tls=openssl

After ./configure is called and before calling make, commenting out the line in include/portable.h
#define NEED_MEMCMP_REPLACEMENT 1

make depend

make

make install


ps. ignore the error messages from make install. You've got the lib already if you reach the point. Also, we need both libldap-2.4.so.xxx and liblber-2.4.so.xxx
ps2. as the --prefix, this will put the result to a dummy folder. with-tls will force ldap to use openssl instead of moznss which is the default one.

