how does libldap detection work in ./configure script?

Tomasz Chmielewski mangoo at wpkg.org
Tue Jan 24 21:16:53 GMT 2006


I'm trying to cross-compile Samba 3.0.21a for a target Linux/mipsel.

Actually, it does compile after some minor chenges, and runs fine.


What I failed to compile is ldap support - if I add --with-ldap to the 
./configure script, it fails:

checking for LDAP support... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking lber.h usability... yes
checking lber.h presence... yes
checking for lber.h... yes
checking for ber_scanf in -llber... yes
checking for ldap_init in -lldap... no
checking for ldap_set_rebind_proc... no
checking whether ldap_set_rebind_proc takes 3 arguments... 3
configure: error: libldap is needed for LDAP support


I am sure that LDFLAGS is correct and contains a libldap.so compiled for 
mipsel:

-L/home/data/wrt54/openldap-2.3.18/libraries/libldap/.libs (...)

# cd /home/data/wrt54/openldap-2.3.18/libraries/libldap/.libs/

# file libldap*
libldap-2.3.so.0:      symbolic link to `libldap-2.3.so.0.2.6'
libldap-2.3.so.0.2.6:  ELF 32-bit LSB shared object, MIPS, version 1 
(SYSV), not stripped
libldap-2.3.so.0.2.6T: ELF 32-bit LSB shared object, MIPS, version 1 
(SYSV), not stripped
libldap.a:             current ar archive
libldap.la:            symbolic link to `../libldap.la'
libldap.lai:           ASCII English text
libldap.so:            symbolic link to `libldap-2.3.so.0.2.6'

# strings libldap.so | grep ldap_init
ldap_init
ldap_initialize
ldap_init: trying %s
ldap_init: using %s
ldap_init: HOME env is %s
ldap_init: HOME env is NULL
ldap_init: %s env is %s
ldap_init: %s env is NULL

Why does configure fail to detect libldap?

Note that liblber is detected (it also comes from the OpenLDAP).

-- 
Tomasz Chmielewski
http://wpkg.org


More information about the samba-technical mailing list