Tom Lane wrote:
>> I have realized that my modifications in configure.in and
>> src/interfaces/libpq/Makefile to link libpq against
>> OpenLDAP are buggy.
>>
>> Here is a proposed patch to fix it.

[...]

>>   # The backend doesn't need everything that's in LIBS, however
>> ! LIBS := $(filter-out -lz -lreadline -ledit -ltermcap 
>>          -lncurses -lcurses -lldap_r $(PTHREAD_LIBS), $(LIBS))
> 
> This seems pretty risky.  What if PTHREAD_LIBS contains -L switches?
> They'd get removed even if needed for other libraries.
> 
> It would probably be safer not to put LDAP into LIBS at all, 
> but invent two new macros for configure to set, say LDAP_LIBS
> and LDAP_LIBS_R, and add these to the link lines in the backend
> and libpq respectively.

Here is a new patch that replaces the previous one; it adds two
macros LDAP_LIBS_FE and LDAP_LIBS_BE for frontend and backend,
respectively.

I did not only add them to the Makefile for interfaces/libpq,
but also everywhere something is linked against libpq in case
somebody links static.
I don't know if that's necessary, or if static builds are
supported - if not, the changes to those Makefiles should
perhaps not be applied.

Tested on Linux, AIX and Windows.

Yours,
Laurenz Albe

Attachment: ldaplink2.patch
Description: ldaplink2.patch

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to