Created attachment 12316 [details] Patch adding the check for .pc Samba build expects "hardwired" names of ldap libs (ldap.so, lber.so) and also the ldap.h header can not be located on customized path. Even worse is on Solaris 11 which delivers 2 ldap APIS: - "legacy" DS 5 C-SDK represented by: /usr/include/ldap.h /usr/lib/libldap.so -> libldap.so.5 - new OpenLDAP C-SDK represented by: /usr/include/openldap/ldap.h ...lber.h ... /usr/lib/libldap_r.so -> libldap_r.so.${cur.ver.} ...so the default one found by waf is the "wrong one" Here I propose the wide acceptable (not only for Solaris) patches based on pkg-config (site specific) files. For Solaris 11 the .pc files can looks like: $ cat Solaris/ldap.pc Name: ldap Description: DS C-SDK Version: 2.8 Requires: openldap $ cat Solaris/lber.pc Name: lber Description: DS C-SDK BER routines Version: 2.8 Requires: openldap $ cat Solaris/openldap.pc prefix=/usr includedir=${prefix}/include/openldap Name: openldap Description: OpenLDAP C-SDK URL: http://www.openldap.org/ Version: 2.10.7 Libs: -lldap_r -llber Cflags: -I${includedir} ...please evaluate the following patches for upstream. Thank you in advance, Jiri
Created attachment 12317 [details] Search appropriate LDAP API also for "ldb"
Created attachment 12318 [details] ...adds deps for build (to find the correct headers)
Created attachment 12319 [details] ...adds deps for build (to find the correct headers)
Created attachment 12320 [details] ...adds deps for build (to find the correct headers)
Created attachment 12321 [details] ...adds deps for build (to find the correct headers)
Created attachment 12322 [details] small fix of CHECK_STRUCTURE_MEMBER which breaks passing of the "lib=..." parameter.
Created attachment 12324 [details] Git diff agains the *master* Add a ldap and lber as the system libraries.
ssuming you have git installed -- would you mind sending in the patches as "git format-patch --stdout" patches with your authorship and some commit message explaining the checkin? This would make review much more pleasant.
Created attachment 12325 [details] git format-patch master --stdout ...commented Thank you for your attention Volker. I have modified patch a bit because I hit the problem on platform where standard (libldap.so and liblber.so) libs were residing in standard path (using no .pc files). Now it should be OK. Auth. comment was added into the patch.
Created attachment 12348 [details] previous patch with "--amend"-ed comment I have added a comment to act as a commit comment. Patch contents remains the same. I apologize for inconvenience with updating a patches but I am not familiar with git.
Bug 12962 was created and waf core fragment of the original patch was moved there so this bug now depends on Bug 12962