From 26b0aea24f9add0a1811e23f709d96b44b459571 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Wed, 3 Mar 2010 17:01:08 +0100 Subject: Win32 build fixes --- configure.in | 8 ++++---- src/Makefile.am | 4 ++++ src/ip.hpp | 10 +++++----- src/uuid.hpp | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index 4c89dde..d838296 100644 --- a/configure.in +++ b/configure.in @@ -198,10 +198,10 @@ case "${host_os}" in AC_CHECK_HEADERS(windows.h) AC_CHECK_LIB(ws2_32, main, , [AC_MSG_ERROR([cannot link with ws2_32.dll.])]) - AC_CHECK_LIB(Rpcrt4, main, , - [AC_MSG_ERROR([cannot link with Rpcrt4.dll.])]) - AC_CHECK_LIB(Iphlpapi, main, , - [AC_MSG_ERROR([cannot link with Iphlpapi.dll.])]) + AC_CHECK_LIB(rpcrt4, main, , + [AC_MSG_ERROR([cannot link with rpcrt4.dll.])]) + AC_CHECK_LIB(iphlpapi, main, , + [AC_MSG_ERROR([cannot link with iphlpapi.dll.])]) CFLAGS="${CFLAGS} -std=c99" on_mingw32="yes" install_man="no" diff --git a/src/Makefile.am b/src/Makefile.am index 4146f68..eeb33d6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -179,7 +179,11 @@ libzmq_la_SOURCES = app_thread.hpp \ zmq_init.cpp \ zmq_listener.cpp +if ON_MINGW +libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ +else libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ +endif if BUILD_PGM diff --git a/src/ip.hpp b/src/ip.hpp index ffab2f2..d963df2 100644 --- a/src/ip.hpp +++ b/src/ip.hpp @@ -30,6 +30,11 @@ #include #include #include +#endif + +#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS +#include +#endif // Some platforms (notably Darwin/OSX and NetBSD) do not define all AI_ // flags for getaddrinfo(). This can be worked around safely by defining @@ -40,11 +45,6 @@ #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0 #endif -#endif - -#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS -#include -#endif namespace zmq { diff --git a/src/uuid.hpp b/src/uuid.hpp index d24ef2c..a39bc99 100644 --- a/src/uuid.hpp +++ b/src/uuid.hpp @@ -29,7 +29,7 @@ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN #include #elif defined ZMQ_HAVE_WINDOWS -#include +#include #endif namespace zmq -- cgit v1.2.3