[Samba] fix for libldap configure error when using openldap on FreeBSD

Adam Laurie adam.laurie at thebunker.net
Wed Nov 17 18:58:54 GMT 2004

i have seen several reports of the following problem:

   ./configure --with-ldap --with-krb5=/usr/heimdal --with-ads 
--config-cache --with-pam
   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_domain2hostlist... no
   checking for ldap_set_rebind_proc... no
   checking whether ldap_set_rebind_proc takes 3 arguments... 3
   checking for ldap_initialize... no
   configure: error: libldap is needed for LDAP support

despite libldap being present and correct. in my case (FreeBSD 5.2.1), 
this turned out to be a crypto library problem as well as the more 
obvious path issues, and the fix is:

   CFLAGS=-I/usr/local/include CPPFLAGS=-I/usr/local/include 
LDFLAGS="-lcrypto -L/usr/local/lib" ./configure --with-ldap 
--with-krb5=/usr/heimdal --with-ads --config-cache --with-pam

hope this is useful to someone somewhere... :)

please note that i'm not subbed to this list, so copy me in on any 
replies if you want me to see them.

Adam Laurie                         Tel: +44 (20) 7605 7000
The Bunker Secure Hosting Ltd.      Fax: +44 (20) 7605 7099
Shepherds Building                  http://www.thebunker.net
Rockley Road
London W14 0DA                      mailto:adam at thebunker.net
UNITED KINGDOM                      PGP key on keyservers

More information about the samba mailing list