> LIBS="-L/usr/local/openldap/lib64"
What makes you believe that anything would pay attention to $LIBS? Did you see
this in the code or documentation somewhere?
> %build
> %configure \
> --sysconfdir=%{_sysconfdir}/powerdns \
> --libdir=%{_libdir} \
> --with-sqlite3 \
> --with-socketdir=/var/run/pdns-server \
> --with-modules="" \
> --with-dynmodules="pipe gmysql gpgsql gsqlite3 ldap"
> %{__make}
>
> I am not sure it produces the required result:
> ...
> /bin/sh ../../libtool --tag=CXX --mode=link g++ -D_GNU_SOURCE -O2 -g
> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -module -avoid-version
> -lrt -o libldapbackend.la -rpath /usr/lib64 ldapbackend.lo powerldap.lo
> -lldap_r -lz
> ...
>
> I understand that the compiler probably still uses: /usr/lib64/ for ldap
> libs, although we instructed (?) it to use ldap libs from
> /usr/local/openldap/lib64.
>
> So, there remain two questions:
>
> 1. How to build properly with custom LDAP libs?
You need to pass --libdir=/usr/local/openldap/lib64 on the %configure line.
By the way, the correct place to put 3rd party and unbundled applications, even
on GNU/Linux and especially on CentOS is /opt, in your case /opt/openldap.
Configuration should go in /etc/opt/openldap, and data in /var/opt/openldap.
These are controlled by --prefix=/opt/openldap --sysconfdir=/etc/opt/openldap
--datadir=/var/opt/openldap when OpenLDAP is being built. OpenLDAP's
./configure might have additional switches for this.
Reference:
http://www.pathname.com/fhs/pub/fhs-2.3.html
_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users