[Dovecot] Define custom ldap libraries when building Dovecot

Timo Sirainen tss at iki.fi
Tue Jan 15 08:48:56 EET 2013

On Sat, 2013-01-12 at 11:50 +0200, Nikolaos Milas wrote:
> On 11/1/2013 11:02 μμ, Nikolaos Milas wrote:
> > I would like to compile Dovecot using custom ldap libraries, located 
> > at a particular custom system location. 
> Sorry, I got it. According to http://wiki2.dovecot.org/CompilingSource I 
> should use:
> CPPFLAGS="-I/usr/local/openldap/include" 
> LDFLAGS="-L/usr/local/openldap/lib64 -lldap -llber" ./configure
> I found (coincidentally) that it also works simply with 
> "LDFLAGS="-L/usr/local/openldap/lib64" but I guess it is more correct to 
> use the full syntax: LDFLAGS="-L/usr/local/openldap/lib64 -lldap -llber" 
> (or even "... -lldap" only). However, I can't tell the real difference.

No, it's better to not include the -llibs in there. The -ldl in the wiki
page was kind of a special case, and since it only served to confuse
things I removed it.

If you add the -lldap -llber for LDFLAGS then all of the Dovecot
binaries are linked with those, which is unnecessary.

More information about the dovecot mailing list