Hello.
I did some fixes to the latest sources of OpenSLP for building under MinGW+MSYS enviroment.
Now it is possible to compile this library with Microsoft Visual Studio or with free GNU tools.
Unfortunately, there are still some issues, because I fixed the sources but not the configure script.
Actually I'm not able to do it because my poor knowledge of build scripts.
For testing if my changes were good, I did these corrections into makefiles and into the enviroment:
==============================================
When ${host_os} is *mingw*, the configure script must avoid to do this action:
linking ../openslp-2.0.beta1/./fnmatch_.h to ./fnmatch.h
because the _WIN32 platform has its separate implementation.
So I had to create a dummy fnmatch_.h into the source tree for allowing the completation of configure.
==============================================
I added "-lws2_32" to libraries.
==============================================
I added slp_win32.c and slpd_win32.c where they are required.
==============================================
I tried first LIBSLP_STATIC, then LIBSLP_EXPORTS.
Creation of static library was successful.
Creation of shared library failed at linking, but changing from "ar" to "gcc -shared" will create correct import library and DLL.
==============================================
getaddrinfo() and freeaddrinfo() are available only from Windows XP and later.
For older version, there is the wspiapi.h file to include.
Perhaps it would be interesting to define the _WIN32_WINNT macro al least to 0x501 with an option to configure.
Unfortunately, there is a little problem with this file, because the w32api package does not provide it yet.
But the solution is quite simple because you just need to copy this file from the Microsoft Platform SDK into the include folder of your GNU compiler (usually c:\mingw\include).
==============================================
I'm sorry to not provide a complete patch.
Unfortunately I'm a win32/win64 developer, I have a moderated knowledge of unix coding techniques, but I'm not so expert to fix the build scripts.
I tried, I regenerated configure script with autoreconf, but compilation failed because it said that some *.m4 files where wrong.
I hope someone else could complete the port, if you need my help for testing contact me freely.
Sincerely,
Carlo Bramini
Fix for this bug.