From 34964769399825e45b3efd02e642af97355707ef Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 12 Apr 2010 10:05:24 +0200 Subject: MSVC perf build fixed --- builds/msvc/c_local_lat/c_local_lat.vcproj | 2 +- builds/msvc/c_local_thr/c_local_thr.vcproj | 2 +- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 2 +- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builds/msvc/c_local_lat/c_local_lat.vcproj b/builds/msvc/c_local_lat/c_local_lat.vcproj index bacaadb..a8d9a8d 100644 --- a/builds/msvc/c_local_lat/c_local_lat.vcproj +++ b/builds/msvc/c_local_lat/c_local_lat.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_local_thr/c_local_thr.vcproj b/builds/msvc/c_local_thr/c_local_thr.vcproj index 578de42..38425cc 100644 --- a/builds/msvc/c_local_thr/c_local_thr.vcproj +++ b/builds/msvc/c_local_thr/c_local_thr.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_remote_lat/c_remote_lat.vcproj b/builds/msvc/c_remote_lat/c_remote_lat.vcproj index 3a4c94f..5bce7e9 100644 --- a/builds/msvc/c_remote_lat/c_remote_lat.vcproj +++ b/builds/msvc/c_remote_lat/c_remote_lat.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > diff --git a/builds/msvc/c_remote_thr/c_remote_thr.vcproj b/builds/msvc/c_remote_thr/c_remote_thr.vcproj index cd71d7c..1089549 100644 --- a/builds/msvc/c_remote_thr/c_remote_thr.vcproj +++ b/builds/msvc/c_remote_thr/c_remote_thr.vcproj @@ -166,7 +166,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > -- cgit v1.2.3 From 0024d290765f53428ff78eddc5a4bc675a13c6a7 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 12 Apr 2010 16:49:13 +0200 Subject: Build fixes for cross compiling and Win32 --- configure.in | 27 ++++++++++++++++++--------- foreign/xmlParser/xmlParser.cpp | 2 +- include/zmq.h | 14 ++++++++------ src/Makefile.am | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/configure.in b/configure.in index a196a35..b31f9d5 100644 --- a/configure.in +++ b/configure.in @@ -260,8 +260,15 @@ AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h head # Use c++ in subsequent tests AC_LANG(C++) -# Optional stuff -AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) +# pkg-config is used if found, and is required for builds with OpenPGM. +# However, we need to provide a way to disable it entirely when the user +# knows what she's doing and it's use is undesirable, such as when +# cross-compiling. +AC_ARG_WITH([pkg-config], [AS_HELP_STRING([--without-pkg-config], + [do not use pkg-config [default=no]])]) +if test "x$with_pkg_config" != "xno"; then + AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) +fi # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL @@ -328,15 +335,17 @@ if test "x$with_pgm_ext" != "xno"; then AC_MSG_RESULT([yes]) # Test if we have pkg-config - if test "x$have_pkg_config" != "xyes"; then - AC_MSG_ERROR([the --with-pgm option requires that pkg-config be installed.]); + if test "x$with_pkg_config" != "xno"; then + if test "x$have_pkg_config" != "xyes"; then + AC_MSG_ERROR([the --with-pgm option requires that pkg-config be installed.]); + fi + + # Check for OpenPGM dependencies + PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0]) + LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} " + LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} " fi - # Check for OpenPGM dependencies - PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0]) - LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} " - LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} " - # Gzip, Perl and Python are required duing PGM build AC_CHECK_PROG(have_gzip, gzip, yes, no) if test "x$have_gzip" != "xyes"; then diff --git a/foreign/xmlParser/xmlParser.cpp b/foreign/xmlParser/xmlParser.cpp index 48b02f9..70fe1d9 100644 --- a/foreign/xmlParser/xmlParser.cpp +++ b/foreign/xmlParser/xmlParser.cpp @@ -94,7 +94,7 @@ //#include //#endif #define WIN32_LEAN_AND_MEAN -#include // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files +#include // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files // to have "MessageBoxA" to display error messages for openFilHelper #endif diff --git a/include/zmq.h b/include/zmq.h index fc52584..d251ae8 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -30,13 +30,15 @@ extern "C" { #include "winsock2.h" #endif -/* Microsoft Visual Studio uses non-standard way to export/import symbols. */ -#if defined ZMQ_BUILDING_LIBZMQ_WITH_MSVC -#define ZMQ_EXPORT __declspec(dllexport) -#elif defined _MSC_VER -#define ZMQ_EXPORT __declspec(dllimport) +/* Win32 needs special handling for DLL exports */ +#if defined _WIN32 +# if defined DLL_EXPORT +# define ZMQ_EXPORT __declspec(dllexport) +# else +# define ZMQ_EXPORT __declspec(dllimport) +# endif #else -#define ZMQ_EXPORT +# define ZMQ_EXPORT #endif /******************************************************************************/ diff --git a/src/Makefile.am b/src/Makefile.am index ea7ce54..8277794 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,7 +176,7 @@ libzmq_la_SOURCES = app_thread.hpp \ zmq_listener.cpp if ON_MINGW -libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ +libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ else libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ endif -- cgit v1.2.3 From 370cde09226d8a1b87eeac306fe97d64b4ea63a3 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 12 Apr 2010 17:00:11 +0200 Subject: win build fixed --- builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builds/msvc/libzmq/libzmq.vcproj b/builds/msvc/libzmq/libzmq.vcproj index 567ee5b..a525d09 100644 --- a/builds/msvc/libzmq/libzmq.vcproj +++ b/builds/msvc/libzmq/libzmq.vcproj @@ -40,7 +40,7 @@ />