[zeromq-dev] Cygwin support patch

Martin Lucina mato at kotelna.sk
Wed Feb 24 18:24:44 CET 2010


bernd at prager.ws said:
> Yes, some suggestions would be welcome.
> Here's the challenge:
> CYGWIN contains 2 different libuuid.a (one in /usr/lib/w32api and one in 
> /usr/lib/e2fsprogs). Only latter has the functions we need.

So the w32api one gets used by default when you say "-luuid" on Cygwin? Or
you have to specify -L for that also?

If the w32api one is used, and it contains UuidCreate() which we already
use on Win32 (MinGW) then the simplest solution would be to just use the
w32api version, and the block of code on lines 24-52 of uuid.cpp suitably
modified if Cygwin doesn't provide the Win32 types.

> I suggest we need to pass the library path then as configure parameter, 
> because without the LDFLAG AC_SEARCH_LIBS won't find it.
> Is this the way to go? Any other suggestions?

Is e2fsprogs installed by default when someone downloads Cygwin? 

If we must modify LDFLAGS then so be it but we need to preserve the
existing value of LDFLAGS which configure has computed up to that point,

LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"

You'll want to test with something like --with-c --with-cpp --with-perf and
with and without --disable-shared parameters to configure to make sure all
the combinations work.

> And yes, of course AC_MSG_CHECKING should be AC_MSG_CHECKING([whether 
> correct libuuid is installed])
> I missed that.

AC_SEARCH_LIBS outputs a message by itself so you don't really need the

Anyhow, I guess I should go find a Windows box, install Cygwin on it and
try this out ...


More information about the zeromq-dev mailing list