[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6102) configure skips winsock check



Full_Name: Christoph Hannebauer
Version: 2.4.16
OS: Windows/cygwin
URL: www.hannebauer.name/configure.in.patch
Submission from: (NULL) (77.189.243.40)


I use cygwin to build OpenLDAP with the MinGW target. The configure script
incorrectly skips the check for winsock. This results in a missing -lws2_32
parameter in some makefiles, I get error messages like

/cygdrive/d/TestProgs/openldap-2.4.16/libraries/liblber/io.c:531: undefined
reference to `_WSASetLastError@4'

The author of ITS#6078 (http://www.openldap.org/its/index.cgi/Incoming?id=6078)
notes that this problem occurs since 2.4.14, but I haven't tested that.

The attached patch file is a diff to configure.in version 1.696. I have tested
it on my machine and it solved the problem (The reason was an erroneous
if-statement. The if-condition should only evaluate true if MS Visual C++ is
used). I've also included another small fix for the winsock detection which
happened to not affect my system, but seemed obviously wrong. It's only a very
minor fix, so I assumed it would be okay to not open another ticket for that
patch. If I am wrong, please notify me and I will split up the patch file.

I hope it's okay to have the legal statement here, otherwise I will include it
as a comment in the patch file:
I, Christoph Hannebauer, hereby place the following modifications to OpenLDAP
Software (and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose with or
without attribution and/or other notice.