From cbaa7cfa93893876e4fd8794b6ea39f4d245b6b5 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:45 +0100 Subject: Imported Upstream version 2.1.6 --- AUTHORS | 1 + ChangeLog | 472 ++++++++++++++++ Makefile.am | 1 - Makefile.in | 24 +- NEWS | 42 +- README | 3 +- acinclude.m4 | 374 ++++++------ aclocal.m4 | 158 ++++++ builds/msvc/Makefile.in | 9 +- builds/msvc/msvc.sln | 40 +- builds/redhat/zeromq.spec.in | 139 +++++ configure | 1217 +++++++++++++++++++++++++--------------- configure.in | 109 ++-- doc/Makefile.in | 9 +- doc/zmq.7 | 6 +- doc/zmq_bind.3 | 6 +- doc/zmq_close.3 | 6 +- doc/zmq_connect.3 | 6 +- doc/zmq_cpp.7 | 6 +- doc/zmq_device.3 | 6 +- doc/zmq_epgm.7 | 8 +- doc/zmq_epgm.html | 8 +- doc/zmq_epgm.txt | 5 + doc/zmq_errno.3 | 6 +- doc/zmq_getsockopt.3 | 6 +- doc/zmq_init.3 | 6 +- doc/zmq_inproc.7 | 6 +- doc/zmq_ipc.7 | 6 +- doc/zmq_msg_close.3 | 13 +- doc/zmq_msg_close.html | 15 +- doc/zmq_msg_close.txt | 3 +- doc/zmq_msg_copy.3 | 13 +- doc/zmq_msg_copy.html | 15 +- doc/zmq_msg_copy.txt | 3 +- doc/zmq_msg_data.3 | 6 +- doc/zmq_msg_init.3 | 6 +- doc/zmq_msg_init_data.3 | 22 +- doc/zmq_msg_init_data.html | 13 +- doc/zmq_msg_init_data.txt | 3 + doc/zmq_msg_init_size.3 | 6 +- doc/zmq_msg_move.3 | 13 +- doc/zmq_msg_move.html | 15 +- doc/zmq_msg_move.txt | 3 +- doc/zmq_msg_size.3 | 6 +- doc/zmq_pgm.7 | 8 +- doc/zmq_pgm.html | 8 +- doc/zmq_pgm.txt | 5 + doc/zmq_poll.3 | 6 +- doc/zmq_recv.3 | 11 +- doc/zmq_recv.html | 12 +- doc/zmq_recv.txt | 2 + doc/zmq_send.3 | 13 +- doc/zmq_send.html | 15 +- doc/zmq_send.txt | 6 + doc/zmq_setsockopt.3 | 6 +- doc/zmq_socket.3 | 13 +- doc/zmq_socket.html | 14 +- doc/zmq_socket.txt | 4 +- doc/zmq_strerror.3 | 6 +- doc/zmq_tcp.7 | 6 +- doc/zmq_term.3 | 6 +- doc/zmq_version.3 | 6 +- foreign/openpgm/Makefile.in | 9 +- include/zmq.h | 3 +- include/zmq.hpp | 2 +- perf/Makefile.am | 8 +- perf/Makefile.in | 42 +- perf/inproc_lat.cpp | 232 ++++++++ perf/inproc_thr.cpp | 246 ++++++++ src/Makefile.in | 9 +- src/fq.cpp | 7 +- src/req.cpp | 2 +- src/socket_base.cpp | 22 +- src/tcp_listener.cpp | 3 +- src/thread.cpp | 2 + src/xrep.cpp | 2 +- src/zmq.cpp | 40 +- tests/Makefile.in | 9 +- tests/test_pair_tcp.cpp | 2 +- tests/test_reqrep_tcp.cpp | 2 +- tests/test_shutdown_stress.cpp | 6 +- zeromq.spec | 6 +- 82 files changed, 2770 insertions(+), 871 deletions(-) create mode 100644 builds/redhat/zeromq.spec.in create mode 100644 perf/inproc_lat.cpp create mode 100644 perf/inproc_thr.cpp diff --git a/AUTHORS b/AUTHORS index b75ac86..3ca57ce 100644 --- a/AUTHORS +++ b/AUTHORS @@ -51,6 +51,7 @@ Pavol Malosek Peter Bourgon Pieter Hintjens Piotr Trojanek +Robert G. Jakabosky Sebastian Otaegui Steven McCoy Tamara Kustarova diff --git a/ChangeLog b/ChangeLog index 779b799..5a9a3e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,477 @@ # Generated by Makefile. Do not edit. +commit ee185e241ec2a3091b9200cd5615cfa4f66e7a07 +Author: Pieter Hintjens +Date: Tue Apr 26 19:45:25 2011 +0200 + + Set version number for 2.1.6 + + include/zmq.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit d23534614452c954e7f64052ef232fd176e8897c +Author: Pieter Hintjens +Date: Tue Apr 26 19:44:36 2011 +0200 + + Fixed NEWS for 2.1.6 + + NEWS | 11 ++++++++++- + 1 files changed, 10 insertions(+), 1 deletions(-) + +commit ca24a1baa512751c54a89ab7eb5f815522d77b13 +Author: Pieter Hintjens +Date: Tue Apr 26 19:22:24 2011 +0200 + + Moved tests off 5555 (conflict with Eclipse) + + Signed-off-by: Pieter Hintjens + + tests/test_pair_tcp.cpp | 2 +- + tests/test_reqrep_tcp.cpp | 2 +- + tests/test_shutdown_stress.cpp | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +commit 6f653e39d7a0ade569bc7e78679930a11640de4e +Author: Martin Sustrik +Date: Fri Apr 22 07:51:24 2011 +0200 + + Assert during SUB socket termination fixed. + + Fair queueing algorithm was checking whether the current pipe + is not closed in the middle of reading a multipart message. + However, this is OK when the socket is closing down. + + Signed-off-by: Martin Sustrik + + src/fq.cpp | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +commit fa6541c34e9c9496ad3fe83758773965862e272d +Author: Pieter Hintjens +Date: Tue Apr 26 10:01:56 2011 +0200 + + Ignore generated RHAT spec file + + .gitignore | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 32915f8cadc30a62524ff6fe1c70158934704117 +Author: Mikko Koppanen +Date: Wed Apr 20 21:55:48 2011 +0100 + + Backport spec file changes from upstream + + Makefile.am | 1 - + builds/redhat/zeromq.spec | 139 ------------------------------------------ + builds/redhat/zeromq.spec.in | 139 ++++++++++++++++++++++++++++++++++++++++++ + configure.in | 3 +- + 4 files changed, 141 insertions(+), 141 deletions(-) + +commit 43307455e352769189d427f260c4b48a3a19f7ce +Author: Pieter Hintjens +Date: Wed Apr 20 19:39:57 2011 +0200 + + Fixed bad commit of message validity checking + + include/zmq.h | 2 +- + include/zmq.hpp | 2 +- + src/socket_base.cpp | 12 ++++++------ + src/zmq.cpp | 40 +++++++++++++++++++++++++++++++--------- + 4 files changed, 39 insertions(+), 17 deletions(-) + +commit 205533ac79e6634650c9b77c41ef934084a84619 +Author: Pieter Hintjens +Date: Wed Apr 20 16:17:56 2011 +0200 + + Updated for 2.1.6 + + include/zmq.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit a347a957ecf3dcbf300fd4513d8aad967a492395 +Author: Pieter Hintjens +Date: Wed Apr 20 16:12:15 2011 +0200 + + Fixed error in zmq_msg_t checking, reverted to 2.1.5 + + include/zmq.h | 2 +- + src/socket_base.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit bee9cd8aa40cf82bdb45b88e6d9fc9ef123c118e +Author: Pieter Hintjens +Date: Wed Apr 20 12:39:21 2011 +0200 + + Updated for 2.1.6 + + include/zmq.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit fd089736bcaa196106f516b87b8e8b906ffa8f63 +Author: Pieter Hintjens +Date: Wed Apr 20 12:31:17 2011 +0200 + + Updated news for 2.1.5 + + NEWS | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +commit f5043dff3ec0c1ea4619c89de8186a6d54938d5d +Merge: c27e9d1 8b13301 +Author: Pieter Hintjens +Date: Wed Apr 20 12:29:28 2011 +0200 + + Merge branch 'master' of github.com:zeromq/zeromq2-1 + +commit c27e9d16ad964f3b4252df890a3ec56c1c8ff6d7 +Author: Martin Sustrik +Date: Tue Apr 19 08:08:15 2011 +0200 + + Message validity is checked in the runtime + + Signed-off-by: Martin Sustrik + + doc/zmq_msg_close.txt | 3 ++- + doc/zmq_msg_copy.txt | 3 ++- + doc/zmq_msg_move.txt | 3 ++- + doc/zmq_recv.txt | 2 ++ + doc/zmq_send.txt | 2 ++ + include/zmq.h | 1 + + src/req.cpp | 2 +- + src/socket_base.cpp | 14 ++++++++++++++ + src/xrep.cpp | 2 +- + 9 files changed, 27 insertions(+), 5 deletions(-) + +commit 8b13301225b0ee34397af53a4c824a5bf05388ba +Author: Martin Sustrik +Date: Mon Apr 18 09:11:45 2011 +0200 + + zmq_socket(3) describes the EMFILE error code + + Signed-off-by: Martin Sustrik + + doc/zmq_socket.txt | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +commit 2b07aaad62cfa218fcbc2f586fce94c1f9fc7284 +Author: Martin Sustrik +Date: Fri Apr 15 08:03:26 2011 +0200 + + zmq_send(3) manpage improved + + Signed-off-by: Martin Sustrik + + doc/zmq_send.txt | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +commit 91bfeaf9b9ef1e0370fae31b14b4be3d8b02eff5 +Author: Martin Sustrik +Date: Fri Apr 15 07:59:28 2011 +0200 + + Error handling for accept on Cygwin fixed + + Signed-off-by: Martin Sustrik + + src/tcp_listener.cpp | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit 6ee55af86870e102cf9dab77e7ed217068c8c4d4 +Merge: 5a87743 1b55cf2 +Author: Pieter Hintjens +Date: Thu Apr 7 22:56:19 2011 +0200 + + Merge branch 'master' of github.com:zeromq/zeromq2-1 + +commit 5a8774373279ec9517b89ac21a945ca65fda20d2 +Author: Pieter Hintjens +Date: Thu Apr 7 22:56:09 2011 +0200 + + Reduced stress of shutdown tests + + tests/test_shutdown_stress.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 1b55cf2705b04caa0fc8152e1684389d91e557f0 +Author: Mikko Koppanen +Date: Tue Apr 5 12:00:30 2011 +0100 + + Fix Win32 builds + + src/tcp_socket.cpp | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit 5fe4e9cea8af2c9d5f22d53b92ae202c03ce9c33 +Author: Mikko Koppanen +Date: Mon Apr 4 22:52:02 2011 +0200 + + Make pkg-config dependency conditional + + Signed-off-by: Mikko Koppanen + + autogen.sh | 6 ------ + configure.in | 13 ++++++++----- + 2 files changed, 8 insertions(+), 11 deletions(-) + +commit 28cdcaa8f323e05f7ebb3873c62ed1fd7839136f +Author: Martin Sustrik +Date: Mon Apr 4 13:12:46 2011 +0200 + + Another error handling issue on Win32 solved + + Signed-off-by: Martin Sustrik + + perf/inproc_lat.cpp | 2 +- + perf/inproc_thr.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 08066dcf6511faddf54ede3dd28bf14bf5f89201 +Author: Martin Sustrik +Date: Mon Apr 4 12:49:39 2011 +0200 + + Issue with error checking on Win32 platform fixed + + Signed-off-by: Martin Sustrik + + src/thread.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 6f9cb01eab130589d9c97062847a293b7605d429 +Author: Martin Sustrik +Date: Mon Apr 4 12:12:06 2011 +0200 + + Unreferenced variable removed + + Signed-off-by: Martin Sustrik + + src/tcp_socket.cpp | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +commit 5436832fdfe12c51c869e2cd59722b2be21a5a2a +Author: Pieter Hintjens +Date: Mon Apr 4 10:50:51 2011 +0200 + + Fixed RPM source spec + + builds/redhat/zeromq.spec | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit c493a44a2c1f2eb4e9e2aa37929b16170d849975 +Author: Pieter Hintjens +Date: Mon Apr 4 10:36:24 2011 +0200 + + Fixed bad packaging for zmq_device + + builds/redhat/zeromq.spec | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 122b9a48247d12258710bde53d4298da03661a01 +Author: Robert G. Jakabosky +Date: Sun Apr 3 20:44:02 2011 +0200 + + Add note about thread-safety to zmq_msg_init_data() manpage. + + Signed-off-by: Robert G. Jakabosky + + doc/zmq_msg_init_data.txt | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit 2ec3fdeff4c9b0d825cc5f1192abf3362b0bf771 +Author: Pieter Hintjens +Date: Sun Apr 3 14:28:07 2011 +0200 + + Backported inproc perf tests to 2.x api + + perf/inproc_lat.cpp | 16 ++++++++-------- + perf/inproc_thr.cpp | 12 ++++++------ + 2 files changed, 14 insertions(+), 14 deletions(-) + +commit 4929636cea946892870921162388ecdf39f5267a +Author: Mikko Koppanen +Date: Sun Apr 3 12:51:12 2011 +0100 + + Fix merge conflicts + + acinclude.m4 | 6 +++--- + configure.in | 3 --- + 2 files changed, 3 insertions(+), 6 deletions(-) + +commit 6641ed81d2d2215f6b0d2aafa30c455eafe00c29 +Author: Pieter Hintjens +Date: Sun Apr 3 10:37:12 2011 +0200 + + Updated NEWS + + NEWS | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit 7a5f33ed180303c45b83e224bebaa4d734687fbf +Author: Martin Sustrik +Date: Sun Apr 3 07:36:02 2011 +0200 + + Git ignores .gcno files + + Signed-off-by: Martin Sustrik + + .gitignore | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit 1e3ccf94c3b964ebb5b85c76775489ed73d881d1 +Author: Mikko Koppanen +Date: Sun Apr 3 07:34:14 2011 +0200 + + Additional gcov changes + + Signed-off-by: Mikko Koppanen + + acinclude.m4 | 32 +++++++++++++++++++++----------- + 1 files changed, 21 insertions(+), 11 deletions(-) + +commit 9014b40901bf87c322f69e656ff77c99e34cf1d1 +Author: Mikko Koppanen +Date: Sat Apr 2 22:49:41 2011 +0200 + + Added code coverage checking + + Signed-off-by: Mikko Koppanen + + acinclude.m4 | 8 ++++---- + configure.in | 3 +++ + 2 files changed, 7 insertions(+), 4 deletions(-) + +commit cd299055643ef160e87b7a339cb30aa0bb2eab98 +Author: Mikko Koppanen +Date: Sat Apr 2 22:50:46 2011 +0200 + + Large rename: AC_ZMQ_ to LIBZMQ_ and ac_zmq_ to libzmq_. Fixes "warning suspicious cache-id" + + Signed-off-by: Mikko Koppanen + + acinclude.m4 | 366 +++++++++++++++++++++++++++++++-------------------------- + configure.in | 86 +++++++------- + 2 files changed, 243 insertions(+), 209 deletions(-) + +commit 45f95648b825257f5426263643547a7df9c304b7 +Author: Mikko Koppanen +Date: Sat Apr 2 22:48:52 2011 +0200 + + Add option to build with system opepgm + + Signed-off-by: Mikko Koppanen + + autogen.sh | 6 ++++++ + configure.in | 17 +++++++++++++++++ + 2 files changed, 23 insertions(+), 0 deletions(-) + +commit c54e54b1c32c602d9a188d4f2318f72d4f3b21f9 +Author: Pieter Hintjens +Date: Sat Apr 2 20:17:38 2011 +0200 + + Updated NEWS for patches + + NEWS | 28 +++++++++++++++++++++++----- + 1 files changed, 23 insertions(+), 5 deletions(-) + +commit b4c4648fef62b6aceaad1ab3d47764b9f3c06e47 +Author: Martin Sustrik +Date: Sat Apr 2 19:32:44 2011 +0200 + + Project location on github changed in README file + + Signed-off-by: Martin Sustrik + + README | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +commit 006b72e73d34edda48a477d62042b3b73dfe5166 +Author: Pieter Hintjens +Date: Sat Apr 2 09:22:41 2011 +0200 + + Fixed memory leak with threads on win32 + + Signed-off-by: Pieter Hintjens + + src/thread.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit b65071324288ff5b5c1bfa2439d547a11c40b687 +Author: Martin Sustrik +Date: Sat Apr 2 09:50:35 2011 +0200 + + inproc perf tests now work on Windows + + Signed-off-by: Martin Sustrik + + builds/msvc/inproc_lat/inproc_lat.vcproj | 174 ++++++++++++++++++++++++++++++ + builds/msvc/inproc_thr/inproc_thr.vcproj | 174 ++++++++++++++++++++++++++++++ + builds/msvc/msvc.sln | 40 ++++--- + perf/inproc_lat.cpp | 46 ++++++++- + perf/inproc_thr.cpp | 46 ++++++++- + 5 files changed, 458 insertions(+), 22 deletions(-) + +commit 6da2436ea8944dc8625ccaa005eddc69c5a8942b +Author: Martin Sustrik +Date: Fri Apr 1 11:55:10 2011 +0200 + + inproc_lat and inproc_thr added to .gitignore + + Signed-off-by: Martin Sustrik + + .gitignore | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit e1926d84698cdc2a331123c7d3f6c0d2aa8d8cfd +Author: Martin Sustrik +Date: Fri Apr 1 11:53:51 2011 +0200 + + PGM wire format specification improved in zmq_pgm(7) + + Signed-off-by: Martin Sustrik + + doc/zmq_pgm.txt | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +commit 1fb5a3ee6e07cdbdef31a5dd1abaf8799a88b1a7 +Author: Martin Sustrik +Date: Thu Mar 31 23:16:14 2011 +0200 + + Robert G. Jakabosky added to the AUTHORS file + + Signed-off-by: Martin Sustrik + + AUTHORS | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit 0e528fb7029234f490d77ab7d382d47413f85c4e +Author: Robert G. Jakabosky +Date: Thu Mar 31 23:14:38 2011 +0200 + + Adding thread latency/throughput perf. examples. + + Signed-off-by: Robert G. Jakabosky + + perf/Makefile.am | 8 ++- + perf/inproc_lat.cpp | 190 +++++++++++++++++++++++++++++++++++++++++++++++ + perf/inproc_thr.cpp | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 401 insertions(+), 1 deletions(-) + +commit 51d6e1d47d3a2cf13358b83d312236317a53f435 +Author: Pieter Hintjens +Date: Wed Mar 30 14:45:29 2011 +0200 + + Udated version for next release + + include/zmq.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 5684d43eb3a03cb863f920015c5fa52f73977ec8 +Author: Pieter Hintjens +Date: Wed Mar 30 14:21:58 2011 +0200 + + Fixed whitespace error + + doc/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + commit 3420eb7304ec05e2d7f36ac6f811abf2d0ba8bff Author: Pieter Hintjens Date: Wed Mar 30 14:09:19 2011 +0200 diff --git a/Makefile.am b/Makefile.am index 1e4a404..bf624ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,6 @@ dist-hook: echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec - -sed s/\@PACKAGE_VERSION\@/@PACKAGE_VERSION@/ -i $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging diff --git a/Makefile.in b/Makefile.in index 7ce18c2..30d5d0b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,10 +35,12 @@ build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ - COPYING.LESSER INSTALL NEWS config/compile config/config.guess \ - config/config.sub config/depcomp config/install-sh \ - config/ltmain.sh config/missing + $(srcdir)/Makefile.in \ + $(top_srcdir)/builds/redhat/zeromq.spec.in \ + $(top_srcdir)/configure AUTHORS COPYING COPYING.LESSER INSTALL \ + NEWS config/compile config/config.guess config/config.sub \ + config/depcomp config/install-sh config/ltmain.sh \ + config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ @@ -52,7 +54,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = builds/redhat/zeromq.spec CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -169,6 +171,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -177,6 +181,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -191,8 +198,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -221,6 +226,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ @@ -298,6 +305,8 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +builds/redhat/zeromq.spec: $(top_builddir)/config.status $(top_srcdir)/builds/redhat/zeromq.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -759,7 +768,6 @@ dist-hook: echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec - -sed s/\@PACKAGE_VERSION\@/@PACKAGE_VERSION@/ -i $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging diff --git a/NEWS b/NEWS index a0151b6..3ad869d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,35 @@ +0MQ version 2.1.6 (Stable), released on 2011/04/26 +================================================== + +Bug fixes +--------- + +* Fixed memory leak with threads on Windows. + +* Assert during SUB socket termination fixed. + +Changes +------- + +* Checks zmq_msg_t validity at each operation. + +* Inproc performance tests now work on Windows. + +* PGM wire format specification improved in zmq_pgm(7) + +* Added thread latency/throughput performance examples. + +* Added "--with-system-pgm" configure option to use already installed + OpenPGM. + + +0MQ version 2.1.5 (Broken), released on 2011/04/20 +================================================== + +Note that this version contained a malformed patch and is not usable. +It is not available for download, but is available in the git via the +2.1.5 tag. + 0MQ version 2.1.4 (Stable), released on 2011/03/30 ================================================== @@ -23,7 +55,7 @@ Bug fixes * Fix to PUSH sockets, which would sometimes deliver tail frames of a multipart message to new subscribers (Martin Sustrik). -* Fix to PUB sockets, which would sometimes deliver tail frames of a +* Fix to PUB sockets, which would sometimes deliver tail frames of a multipart message to new subscribers (Martin Sustrik). * Windows build was broken due to EPROTONOSUPPORT not being defined. This @@ -50,10 +82,10 @@ Changes * ZMQ_DEALER and ZMQ_ROUTER macros provided to ease upgrade to 0MQ/3.0. These are scheduled to replace ZMQ_XREQ and ZMQ_XREP (Pieter Hintjens). -* Added man page for zmq_device(3) which was hereto undocumented (Pieter +* Added man page for zmq_device(3) which was hereto undocumented (Pieter Hintjens). -* Removed zmq_queue(3), zmq_forwarder(3), zmq_streamer(3) man pages +* Removed zmq_queue(3), zmq_forwarder(3), zmq_streamer(3) man pages (Pieter Hintjens). OpenPGM Integration @@ -67,7 +99,7 @@ OpenPGM Integration * Build system allows configuration with arbitrary versions of OpenPGM (./configure --with-pgm=libpgm-x.y.z) (Mikko Koppanen). -* OpenPGM uses new PGM_ODATA_MAX_RTE controlling original data instead of +* OpenPGM uses new PGM_ODATA_MAX_RTE controlling original data instead of PGM_TXW_MAX_RTE covering entire channel (Steven McCoy). Building @@ -107,7 +139,7 @@ New functionality * Size of inproc HWM and SWAP is sum of peers' HWMs and SWAPs (Douglas Greager, Martin Sustrik). - + Bug fixes --------- diff --git a/README b/README index dd9ec9f..7f1ebfd 100644 --- a/README +++ b/README @@ -26,8 +26,7 @@ Website: http://www.zeromq.org/ Development mailing list: zeromq-dev@lists.zeromq.org Announcements mailing list: zeromq-announce@lists.zeromq.org -Git repository for this release: http://github.com/zeromq/zeromq2-1. -Repository for current development: http://github.com/zeromq/zeromq2. +Git repository: http://github.com/zeromq/libzmq 0MQ developers can also be found on the IRC channel #zeromq, on the Freenode network (irc.freenode.net). diff --git a/acinclude.m4 b/acinclude.m4 index 1257c9e..bfafc7c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,8 +1,8 @@ dnl ############################################################################## -dnl # AC_ZMQ_CONFIG_LIBTOOL # +dnl # LIBZMQ_CONFIG_LIBTOOL # dnl # Configure libtool. Requires AC_CANONICAL_HOST # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CONFIG_LIBTOOL], [{ +AC_DEFUN([LIBZMQ_CONFIG_LIBTOOL], [{ AC_REQUIRE([AC_CANONICAL_HOST]) # Libtool configuration for different targets @@ -19,192 +19,192 @@ AC_DEFUN([AC_ZMQ_CONFIG_LIBTOOL], [{ }]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using ICC # dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_LANG_ICC], +AC_DEFUN([LIBZMQ_CHECK_LANG_ICC], [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler], + [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER error if not ICC #endif ]])], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) + [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], + [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using Sun Studio # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_LANG_SUN_STUDIO], +AC_DEFUN([LIBZMQ_CHECK_LANG_SUN_STUDIO], [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler], + [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ]])], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) + [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], + [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_LANG_CLANG], +AC_DEFUN([LIBZMQ_CHECK_LANG_CLANG], [AC_CACHE_CHECK([whether we are using clang _AC_LANG compiler], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler], + [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __clang__ error if not clang #endif ]])], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) + [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], + [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_LANG_GCC4], +AC_DEFUN([LIBZMQ_CHECK_LANG_GCC4], [AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], + [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ]])], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) + [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], + [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_DOC_BUILD # +dnl # LIBZMQ_CHECK_DOC_BUILD # dnl # Check whether to build documentation and install man-pages # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_DOC_BUILD], [{ +AC_DEFUN([LIBZMQ_CHECK_DOC_BUILD], [{ # Allow user to disable doc build AC_ARG_WITH([documentation], [AS_HELP_STRING([--without-documentation], [disable documentation build even if asciidoc and xmlto are present [default=no]])]) if test "x$with_documentation" = "xno"; then - ac_zmq_build_doc="no" - ac_zmq_install_man="no" + libzmq_build_doc="no" + libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. - ac_zmq_build_doc="yes" - ac_zmq_install_man="yes" + libzmq_build_doc="yes" + libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. - AC_CHECK_PROG(ac_zmq_have_asciidoc, asciidoc, yes, no) - AC_CHECK_PROG(ac_zmq_have_xmlto, xmlto, yes, no) - if test "x$ac_zmq_have_asciidoc" = "xno" -o "x$ac_zmq_have_xmlto" = "xno"; then - ac_zmq_build_doc="no" + AC_CHECK_PROG(libzmq_have_asciidoc, asciidoc, yes, no) + AC_CHECK_PROG(libzmq_have_xmlto, xmlto, yes, no) + if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then + libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then - ac_zmq_install_man="no" + libzmq_install_man="no" AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.]) AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.]) fi fi # Do not install man pages if on mingw - if test "x$ac_zmq_on_mingw32" = "xyes"; then - ac_zmq_install_man="no" + if test "x$libzmq_on_mingw32" = "xyes"; then + libzmq_install_man="no" fi fi AC_MSG_CHECKING([whether to build documentation]) - AC_MSG_RESULT([$ac_zmq_build_doc]) + AC_MSG_RESULT([$libzmq_build_doc]) AC_MSG_CHECKING([whether to install manpages]) - AC_MSG_RESULT([$ac_zmq_install_man]) + AC_MSG_RESULT([$libzmq_install_man]) - AM_CONDITIONAL(BUILD_DOC, test "x$ac_zmq_build_doc" = "xyes") - AM_CONDITIONAL(INSTALL_MAN, test "x$ac_zmq_install_man" = "xyes") + AM_CONDITIONAL(BUILD_DOC, test "x$libzmq_build_doc" = "xyes") + AM_CONDITIONAL(INSTALL_MAN, test "x$libzmq_install_man" = "xyes") }]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # dnl # Check that compiler for the current language actually works # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_LANG_COMPILER], [{ +AC_DEFUN([LIBZMQ_CHECK_LANG_COMPILER], [{ # Test that compiler for the current language actually works AC_CACHE_CHECK([whether the _AC_LANG compiler works], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works], + [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works], [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) + [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], + [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) ]) - if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then + if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then AC_MSG_ERROR([Unable to find a working _AC_LANG compiler]) fi }]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_COMPILERS # +dnl # LIBZMQ_CHECK_COMPILERS # dnl # Check compiler characteristics. This is so that we can AC_REQUIRE checks # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_COMPILERS], [{ +AC_DEFUN([LIBZMQ_CHECK_COMPILERS], [{ # For that the compiler works and try to come up with the type AC_LANG_PUSH([C]) - AC_ZMQ_CHECK_LANG_COMPILER + LIBZMQ_CHECK_LANG_COMPILER - AC_ZMQ_CHECK_LANG_ICC - AC_ZMQ_CHECK_LANG_SUN_STUDIO - AC_ZMQ_CHECK_LANG_CLANG - AC_ZMQ_CHECK_LANG_GCC4 + LIBZMQ_CHECK_LANG_ICC + LIBZMQ_CHECK_LANG_SUN_STUDIO + LIBZMQ_CHECK_LANG_CLANG + LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C]) AC_LANG_PUSH(C++) - AC_ZMQ_CHECK_LANG_COMPILER + LIBZMQ_CHECK_LANG_COMPILER - AC_ZMQ_CHECK_LANG_ICC - AC_ZMQ_CHECK_LANG_SUN_STUDIO - AC_ZMQ_CHECK_LANG_CLANG - AC_ZMQ_CHECK_LANG_GCC4 + LIBZMQ_CHECK_LANG_ICC + LIBZMQ_CHECK_LANG_SUN_STUDIO + LIBZMQ_CHECK_LANG_CLANG + LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C++]) # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then - if test "xyes" = "x$ac_zmq_cv_c_intel_compiler"; then + if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then - if test "xyes" = "x$ac_zmq_cv_cxx_intel_compiler"; then + if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi }]) dnl ############################################################################ -dnl # AC_ZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # -dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # +dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl ############################################################################ -AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{ +AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG], [{ AC_REQUIRE([AC_PROG_GREP]) AC_MSG_CHECKING([whether _AC_LANG compiler supports $1]) - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" case "x[]_AC_LANG_ABBREV" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" ;; *) @@ -217,18 +217,18 @@ AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{ # Remarks are not turned into errors even with -Werror on [if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" + eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" else - eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" + eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" fi], - [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) + [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) case "x[]_AC_LANG_ABBREV" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -236,42 +236,42 @@ AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{ esac # Restore the werror flag - ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save + ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored - AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [AC_MSG_RESULT(yes) ; $2], [AC_MSG_RESULT(no) ; $3]) }]) dnl #################################################################################### -dnl # AC_ZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # dnl # This macro prepends the flag to CFLAGS or CPPFLAGS accordingly # -dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # +dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl #################################################################################### -AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG_PREPEND], [{ - AC_ZMQ_CHECK_LANG_FLAG([$1]) +AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG_PREPEND], [{ + LIBZMQ_CHECK_LANG_FLAG([$1]) case "x[]_AC_LANG_ABBREV" in xc) - AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CFLAGS="$1 $CFLAGS"; $2], $3) ;; xcxx) - AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CPPFLAGS="$1 $CPPFLAGS"; $2], $3) ;; esac }]) dnl ############################################################################## -dnl # AC_ZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) # dnl # Check whether to enable debug build and set compiler flags accordingly # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_ENABLE_DEBUG], [{ +AC_DEFUN([LIBZMQ_CHECK_ENABLE_DEBUG], [{ # Require compiler specifics - AC_REQUIRE([AC_ZMQ_CHECK_COMPILERS]) + AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) # This flag is checked also in AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], @@ -283,21 +283,21 @@ AC_DEFUN([AC_ZMQ_CHECK_ENABLE_DEBUG], [{ # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ - "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_c_clang_compiler" = "xyes"; then + "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " - elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then + elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then + "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi @@ -317,13 +317,55 @@ AC_DEFUN([AC_ZMQ_CHECK_ENABLE_DEBUG], [{ fi }]) +dnl ############################################################################## +dnl # LIBZMQ_WITH_GCOV([action-if-found], [action-if-not-found]) # +dnl # Check whether to build with code coverage # +dnl ############################################################################## +AC_DEFUN([LIBZMQ_WITH_GCOV], [{ + # Require compiler specifics + AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) + + AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no], + [With GCC Code Coverage reporting.])], + [ZMQ_GCOV="$withval"]) + + AC_MSG_CHECKING(whether to enable code coverage) + + if test "x$ZMQ_GCOV" = "xyes"; then + + if test "x$GXX" != "xyes"; then + AC_MSG_ERROR([--with-gcov=yes works only with GCC]) + fi + + CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" + if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then + CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" + fi + + CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" + if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then + CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" + fi + + CXXFLAGS="-fprofile-arcs" + if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then + CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" + fi + + LIBS="-lgcov ${LIBS}" + fi + + AS_IF([test "x$ZMQ_GCOV" = "xyes"], + [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) +}]) + dnl ############################################################################## dnl # AC_ZMQ_CHECK_WITH_FLAG([flags], [macro]) # dnl # Runs a normal autoconf check with compiler flags # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_CHECK_WITH_FLAG], [{ - ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS" - ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" +AC_DEFUN([LIBZMQ_CHECK_WITH_FLAG], [{ + libzmq_check_with_flag_save_CFLAGS="$CFLAGS" + libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS $1" CPPFLAGS="$CPPFLAGS $1" @@ -331,43 +373,43 @@ AC_DEFUN([AC_ZMQ_CHECK_WITH_FLAG], [{ # Execute the macro $2 - CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS" - CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS" + CFLAGS="$libzmq_check_with_flag_save_CFLAGS" + CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" }]) dnl ############################################################################## -dnl # AC_ZMQ_LANG_WALL([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_LANG_WALL([action-if-found], [action-if-not-found]) # dnl # How to define -Wall for the current compiler # -dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # +dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # dnl ############################################################################## -AC_DEFUN([AC_ZMQ_LANG_WALL], [{ +AC_DEFUN([LIBZMQ_LANG_WALL], [{ AC_MSG_CHECKING([how to enable additional warnings for _AC_LANG compiler]) - ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="" + libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" fi ;; *) @@ -375,8 +417,8 @@ AC_DEFUN([AC_ZMQ_LANG_WALL], [{ esac # Call the action - if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then - AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag]) + if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then + AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag]) $1 else AC_MSG_RESULT([not found]) @@ -385,36 +427,36 @@ AC_DEFUN([AC_ZMQ_LANG_WALL], [{ }]) dnl #################################################################### -dnl # AC_ZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) # dnl # Check how to turn on strict standards compliance # dnl #################################################################### -AC_DEFUN([AC_ZMQ_LANG_STRICT], [{ +AC_DEFUN([LIBZMQ_LANG_STRICT], [{ AC_MSG_CHECKING([how to enable strict standards compliance in _AC_LANG compiler]) - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="" + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC - if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" + if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC - if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" + if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" fi ;; *) @@ -422,8 +464,8 @@ AC_DEFUN([AC_ZMQ_LANG_STRICT], [{ esac # Call the action - if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then - AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag]) + if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then + AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag]) $1 else AC_MSG_RESULT([not found]) @@ -432,32 +474,32 @@ AC_DEFUN([AC_ZMQ_LANG_STRICT], [{ }]) dnl ######################################################################## -dnl # AC_ZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) # dnl # Check how to turn warnings to errors # dnl ######################################################################## -AC_DEFUN([AC_ZMQ_LANG_WERROR], [{ +AC_DEFUN([LIBZMQ_LANG_WERROR], [{ AC_MSG_CHECKING([how to turn warnings to errors in _AC_LANG compiler]) - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="" + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC - if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" + if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC - if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" + if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; *) @@ -465,8 +507,8 @@ AC_DEFUN([AC_ZMQ_LANG_WERROR], [{ esac # Call the action - if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then - AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag]) + if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then + AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag]) $1 else AC_MSG_RESULT([not found]) @@ -475,66 +517,66 @@ AC_DEFUN([AC_ZMQ_LANG_WERROR], [{ }]) dnl ################################################################################ -dnl # AC_ZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given pragma # dnl ################################################################################ -AC_DEFUN([AC_ZMQ_CHECK_LANG_PRAGMA], [{ +AC_DEFUN([LIBZMQ_CHECK_LANG_PRAGMA], [{ # Need to know how to enable all warnings - AC_ZMQ_LANG_WALL + LIBZMQ_LANG_WALL AC_MSG_CHECKING([whether _AC_LANG compiler supports pragma $1]) # Save flags - ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag + libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" if test "x[]_AC_LANG_ABBREV" = "xc"; then - ac_zmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" + libzmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then - ac_zmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" + libzmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" else AC_MSG_WARN([testing compiler characteristic on an unknown language]) fi AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#pragma $1]])], - [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)], - [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)]) + [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)], + [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)]) if test "x[]_AC_LANG_ABBREV" = "xc"; then - CFLAGS="$ac_zmq_cv_check_lang_pragma_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_pragma_save_CFLAGS" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then - CPPFLAGS="$ac_zmq_cv_check_lang_pragma_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_pragma_save_CPPFLAGS" fi - ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save + ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored - AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], [$2], [$3]) }]) dnl ################################################################################ -dnl # AC_ZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # +dnl # LIBZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports dso visibility # dnl ################################################################################ -AC_DEFUN([AC_ZMQ_CHECK_LANG_VISIBILITY], [{ - - ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="" - - if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \ - "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then - AC_ZMQ_CHECK_LANG_FLAG([-fvisibility=hidden], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"]) - elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - AC_ZMQ_CHECK_LANG_FLAG([-xldscope=hidden], - [ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"]) +AC_DEFUN([LIBZMQ_CHECK_LANG_VISIBILITY], [{ + + libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="" + + if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \ + "x$libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then + LIBZMQ_CHECK_LANG_FLAG([-fvisibility=hidden], + [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"]) + elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + LIBZMQ_CHECK_LANG_FLAG([-xldscope=hidden], + [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"]) fi AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility) - AS_IF([test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], + AS_IF([test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) diff --git a/aclocal.m4 b/aclocal.m4 index a9cf856..bd741d2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -19,6 +19,164 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/builds/msvc/Makefile.in b/builds/msvc/Makefile.in index a841118..20d9e1d 100644 --- a/builds/msvc/Makefile.in +++ b/builds/msvc/Makefile.in @@ -114,6 +114,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -122,6 +124,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -136,8 +141,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -166,6 +169,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ diff --git a/builds/msvc/msvc.sln b/builds/msvc/msvc.sln index c47f3ac..a79ec65 100644 --- a/builds/msvc/msvc.sln +++ b/builds/msvc/msvc.sln @@ -23,6 +23,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_thr", "c_remote_thr\ {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_lat", "inproc_lat\inproc_lat.vcproj", "{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}" + ProjectSection(ProjectDependencies) = postProject + {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_thr", "inproc_thr\inproc_thr.vcproj", "{1077E977-95DD-4E73-A692-74647DD0CC1E}" + ProjectSection(ProjectDependencies) = postProject + {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -60,24 +70,18 @@ Global {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Debug|Win32.Build.0 = Debug|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Release|Win32.ActiveCfg = Release|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Release|Win32.Build.0 = Release|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 - {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.WithOpenPGM|Win32.Build.0 = Release|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.Debug|Win32.Build.0 = Debug|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.Release|Win32.ActiveCfg = Release|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.Release|Win32.Build.0 = Release|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 - {DF2CED64-4156-48EA-8AA3-38CF86060D59}.WithOpenPGM|Win32.Build.0 = Release|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Debug|Win32.ActiveCfg = Debug|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Debug|Win32.Build.0 = Debug|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.ActiveCfg = Release|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.Build.0 = Release|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 - {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.WithOpenPGM|Win32.Build.0 = Release|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.Build.0 = Debug|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.ActiveCfg = Release|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.Build.0 = Debug|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.ActiveCfg = Release|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/builds/redhat/zeromq.spec.in b/builds/redhat/zeromq.spec.in new file mode 100644 index 0000000..d0e7a8c --- /dev/null +++ b/builds/redhat/zeromq.spec.in @@ -0,0 +1,139 @@ +Name: zeromq +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} +Summary: The ZeroMQ messaging library +Group: Applications/Internet +License: LGPLv3+ +URL: http://www.zeromq.org/ +Source: http://download.zeromq.org/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRequires: gcc, make, gcc-c++, libstdc++-devel +Requires: libstdc++ + +%if %{?rhel}%{!?rhel:0} >= 6 +BuildRequires: libuuid-devel +Requires: libuuid +%elseif %{?rhel}%{!?rhel:0} >= 5 +BuildRequires: e2fsprogs-devel +Requires: e2fsprogs +%else +BuildRequires: uuid-devel +Requires: uuid +%endif + +# Build pgm only on supported archs +%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 +BuildRequires: glib2-devel +Requires: glib2 +%endif + +%description +The 0MQ lightweight messaging kernel is a library which extends the +standard socket interfaces with features traditionally provided by +specialised messaging middleware products. 0MQ sockets provide an +abstraction of asynchronous message queues, multiple messaging +patterns, message filtering (subscriptions), seamless access to +multiple transport protocols and more. + +This package contains the ZeroMQ shared library. + +%package devel +Summary: Development files and static library for the ZeroMQ library +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, pkgconfig + +%description devel +The 0MQ lightweight messaging kernel is a library which extends the +standard socket interfaces with features traditionally provided by +specialised messaging middleware products. 0MQ sockets provide an +abstraction of asynchronous message queues, multiple messaging +patterns, message filtering (subscriptions), seamless access to +multiple transport protocols and more. + +This package contains ZeroMQ related development libraries and header files. + +%prep +%setup -q + +%build +%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 + %configure --with-pgm +%else + %configure +%endif + +%{__make} %{?_smp_mflags} + +%install +[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} + +# Install the package to build area +%{__make} check +%makeinstall + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%clean +[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) + +# docs in the main package +%doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README + +# libraries +%{_libdir}/libzmq.so.1 +%{_libdir}/libzmq.so.1.0.0 + +%{_mandir}/man7/zmq.7.gz + +%files devel +%defattr(-,root,root,-) +%{_includedir}/zmq.h +%{_includedir}/zmq.hpp +%{_includedir}/zmq_utils.h + +%{_libdir}/libzmq.la +%{_libdir}/libzmq.a +%{_libdir}/pkgconfig/libzmq.pc +%{_libdir}/libzmq.so + +%{_mandir}/man3/zmq_bind.3.gz +%{_mandir}/man3/zmq_close.3.gz +%{_mandir}/man3/zmq_connect.3.gz +%{_mandir}/man3/zmq_errno.3.gz +%{_mandir}/man3/zmq_device.3.gz +%{_mandir}/man3/zmq_getsockopt.3.gz +%{_mandir}/man3/zmq_init.3.gz +%{_mandir}/man3/zmq_msg_close.3.gz +%{_mandir}/man3/zmq_msg_copy.3.gz +%{_mandir}/man3/zmq_msg_data.3.gz +%{_mandir}/man3/zmq_msg_init.3.gz +%{_mandir}/man3/zmq_msg_init_data.3.gz +%{_mandir}/man3/zmq_msg_init_size.3.gz +%{_mandir}/man3/zmq_msg_move.3.gz +%{_mandir}/man3/zmq_msg_size.3.gz +%{_mandir}/man3/zmq_poll.3.gz +%{_mandir}/man3/zmq_recv.3.gz +%{_mandir}/man3/zmq_send.3.gz +%{_mandir}/man3/zmq_setsockopt.3.gz +%{_mandir}/man3/zmq_socket.3.gz +%{_mandir}/man3/zmq_strerror.3.gz +%{_mandir}/man3/zmq_term.3.gz +%{_mandir}/man3/zmq_version.3.gz +%{_mandir}/man7/zmq_cpp.7.gz +%{_mandir}/man7/zmq_epgm.7.gz +%{_mandir}/man7/zmq_inproc.7.gz +%{_mandir}/man7/zmq_ipc.7.gz +%{_mandir}/man7/zmq_pgm.7.gz +%{_mandir}/man7/zmq_tcp.7.gz + +%changelog +* Sat Apr 10 2010 Mikko Koppanen 2.0.7-1 +- Initial packaging diff --git a/configure b/configure index 9bfd5f4..8453dc1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for zeromq 2.1.4. +# Generated by GNU Autoconf 2.67 for zeromq 2.1.6. # # Report bugs to . # @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='zeromq' PACKAGE_TARNAME='zeromq' -PACKAGE_VERSION='2.1.4' -PACKAGE_STRING='zeromq 2.1.4' +PACKAGE_VERSION='2.1.6' +PACKAGE_STRING='zeromq 2.1.6' PACKAGE_BUGREPORT='zeromq-dev@lists.zeromq.org' PACKAGE_URL='' @@ -755,6 +755,11 @@ ON_MINGW_TRUE BUILD_PGM_FALSE BUILD_PGM_TRUE pgm_basename +OpenPGM_LIBS +OpenPGM_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG subdirs pgm_srcdir pgm_subdir @@ -762,8 +767,8 @@ INSTALL_MAN_FALSE INSTALL_MAN_TRUE BUILD_DOC_FALSE BUILD_DOC_TRUE -ac_zmq_have_xmlto -ac_zmq_have_asciidoc +libzmq_have_xmlto +libzmq_have_asciidoc CXXCPP CPP OTOOL64 @@ -895,8 +900,10 @@ enable_fast_install with_gnu_ld enable_libtool_lock enable_debug +with_gcov with_documentation with_pgm +with_system_pgm ' ac_precious_vars='build_alias host_alias @@ -912,7 +919,12 @@ CCC XMLTO ASCIIDOC CPP -CXXCPP' +CXXCPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +OpenPGM_CFLAGS +OpenPGM_LIBS' ac_subdirs_all='foreign/openpgm/build-staging/openpgm/pgm/' # Initialize some variables set by options. @@ -1455,7 +1467,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures zeromq 2.1.4 to adapt to many kinds of systems. +\`configure' configures zeromq 2.1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1525,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of zeromq 2.1.4:";; + short | recursive ) echo "Configuration of zeromq 2.1.6:";; esac cat <<\_ACEOF @@ -1550,9 +1562,12 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-gcov=yes/no With GCC Code Coverage reporting. --without-documentation disable documentation build even if asciidoc and xmlto are present [default=no] --with-pgm build libzmq with PGM extension [default=no] + --with-system-pgm build libzmq with PGM extension. Requires pkg-config + [default=no] Some influential environment variables: CC C compiler command @@ -1568,6 +1583,15 @@ Some influential environment variables: ASCIIDOC Path to asciidoc command CPP C preprocessor CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + OpenPGM_CFLAGS + C compiler flags for OpenPGM, overriding pkg-config + OpenPGM_LIBS + linker flags for OpenPGM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1635,7 +1659,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -zeromq configure 2.1.4 +zeromq configure 2.1.6 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2390,7 +2414,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by zeromq $as_me 2.1.4, which was +It was created by zeromq $as_me 2.1.6, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -3209,7 +3233,7 @@ fi # Define the identity of the package. PACKAGE='zeromq' - VERSION='2.1.4' + VERSION='2.1.6' cat >>confdefs.h <<_ACEOF @@ -5227,8 +5251,6 @@ $as_echo "no" >&6; } fi - -# Libtool configuration for different targets. See acinclude.m4 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -6284,13 +6306,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6287: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6309: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6290: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6312: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6293: output\"" >&5) + (eval echo "\"\$as_me:6315: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7493,7 +7515,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7496 "configure"' > conftest.$ac_ext + echo '#line 7518 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9517,11 +9539,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9520: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9542: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9524: \$? = $ac_status" >&5 + echo "$as_me:9546: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9856,11 +9878,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9859: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9881: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9863: \$? = $ac_status" >&5 + echo "$as_me:9885: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9961,11 +9983,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9964: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9986: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9968: \$? = $ac_status" >&5 + echo "$as_me:9990: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10016,11 +10038,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10019: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10041: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10023: \$? = $ac_status" >&5 + echo "$as_me:10045: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12400,7 +12422,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12403 "configure" +#line 12425 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12496,7 +12518,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12499 "configure" +#line 12521 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14452,11 +14474,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14455: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14477: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14459: \$? = $ac_status" >&5 + echo "$as_me:14481: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14551,11 +14573,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14554: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14576: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14558: \$? = $ac_status" >&5 + echo "$as_me:14580: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14603,11 +14625,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14606: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14628: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14610: \$? = $ac_status" >&5 + echo "$as_me:14632: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15584,7 +15606,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } -if test "${ac_zmq_cv_c_compiler_works+set}" = set; then : +if test "${libzmq_cv_c_compiler_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15599,25 +15621,25 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_zmq_cv_c_compiler_works="yes" ; + libzmq_cv_c_compiler_works="yes" ; else - ac_zmq_cv_c_compiler_works="no" ; + libzmq_cv_c_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_compiler_works" >&5 -$as_echo "$ac_zmq_cv_c_compiler_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_compiler_works" >&5 +$as_echo "$libzmq_cv_c_compiler_works" >&6; } - if test "x$ac_zmq_cv_c_compiler_works" != "xyes"; then + if test "x$libzmq_cv_c_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler" >&5 $as_echo_n "checking whether we are using Intel C compiler... " >&6; } -if test "${ac_zmq_cv_c_intel_compiler+set}" = set; then : +if test "${libzmq_cv_c_intel_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15635,18 +15657,18 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_zmq_cv_c_intel_compiler="yes" ; + libzmq_cv_c_intel_compiler="yes" ; else - ac_zmq_cv_c_intel_compiler="no" ; + libzmq_cv_c_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_intel_compiler" >&5 -$as_echo "$ac_zmq_cv_c_intel_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_intel_compiler" >&5 +$as_echo "$libzmq_cv_c_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C compiler... " >&6; } -if test "${ac_zmq_cv_c_sun_studio_compiler+set}" = set; then : +if test "${libzmq_cv_c_sun_studio_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15664,18 +15686,18 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_zmq_cv_c_sun_studio_compiler="yes" ; + libzmq_cv_c_sun_studio_compiler="yes" ; else - ac_zmq_cv_c_sun_studio_compiler="no" ; + libzmq_cv_c_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_sun_studio_compiler" >&5 -$as_echo "$ac_zmq_cv_c_sun_studio_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_sun_studio_compiler" >&5 +$as_echo "$libzmq_cv_c_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C compiler" >&5 $as_echo_n "checking whether we are using clang C compiler... " >&6; } -if test "${ac_zmq_cv_c_clang_compiler+set}" = set; then : +if test "${libzmq_cv_c_clang_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15693,18 +15715,18 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_zmq_cv_c_clang_compiler="yes" ; + libzmq_cv_c_clang_compiler="yes" ; else - ac_zmq_cv_c_clang_compiler="no" ; + libzmq_cv_c_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_clang_compiler" >&5 -$as_echo "$ac_zmq_cv_c_clang_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_clang_compiler" >&5 +$as_echo "$libzmq_cv_c_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C compiler... " >&6; } -if test "${ac_zmq_cv_c_gcc4_compiler+set}" = set; then : +if test "${libzmq_cv_c_gcc4_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15722,15 +15744,15 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_zmq_cv_c_gcc4_compiler="yes" ; + libzmq_cv_c_gcc4_compiler="yes" ; else - ac_zmq_cv_c_gcc4_compiler="no" ; + libzmq_cv_c_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_gcc4_compiler" >&5 -$as_echo "$ac_zmq_cv_c_gcc4_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_gcc4_compiler" >&5 +$as_echo "$libzmq_cv_c_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -15748,7 +15770,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } -if test "${ac_zmq_cv_cxx_compiler_works+set}" = set; then : +if test "${libzmq_cv_cxx_compiler_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15763,25 +15785,25 @@ main () } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_zmq_cv_cxx_compiler_works="yes" ; + libzmq_cv_cxx_compiler_works="yes" ; else - ac_zmq_cv_cxx_compiler_works="no" ; + libzmq_cv_cxx_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_compiler_works" >&5 -$as_echo "$ac_zmq_cv_cxx_compiler_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_compiler_works" >&5 +$as_echo "$libzmq_cv_cxx_compiler_works" >&6; } - if test "x$ac_zmq_cv_cxx_compiler_works" != "xyes"; then + if test "x$libzmq_cv_cxx_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C++ compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler" >&5 $as_echo_n "checking whether we are using Intel C++ compiler... " >&6; } -if test "${ac_zmq_cv_cxx_intel_compiler+set}" = set; then : +if test "${libzmq_cv_cxx_intel_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15799,18 +15821,18 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - ac_zmq_cv_cxx_intel_compiler="yes" ; + libzmq_cv_cxx_intel_compiler="yes" ; else - ac_zmq_cv_cxx_intel_compiler="no" ; + libzmq_cv_cxx_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_intel_compiler" >&5 -$as_echo "$ac_zmq_cv_cxx_intel_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_intel_compiler" >&5 +$as_echo "$libzmq_cv_cxx_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C++ compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C++ compiler... " >&6; } -if test "${ac_zmq_cv_cxx_sun_studio_compiler+set}" = set; then : +if test "${libzmq_cv_cxx_sun_studio_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15828,18 +15850,18 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - ac_zmq_cv_cxx_sun_studio_compiler="yes" ; + libzmq_cv_cxx_sun_studio_compiler="yes" ; else - ac_zmq_cv_cxx_sun_studio_compiler="no" ; + libzmq_cv_cxx_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_sun_studio_compiler" >&5 -$as_echo "$ac_zmq_cv_cxx_sun_studio_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_sun_studio_compiler" >&5 +$as_echo "$libzmq_cv_cxx_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C++ compiler" >&5 $as_echo_n "checking whether we are using clang C++ compiler... " >&6; } -if test "${ac_zmq_cv_cxx_clang_compiler+set}" = set; then : +if test "${libzmq_cv_cxx_clang_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15857,18 +15879,18 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - ac_zmq_cv_cxx_clang_compiler="yes" ; + libzmq_cv_cxx_clang_compiler="yes" ; else - ac_zmq_cv_cxx_clang_compiler="no" ; + libzmq_cv_cxx_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_clang_compiler" >&5 -$as_echo "$ac_zmq_cv_cxx_clang_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_clang_compiler" >&5 +$as_echo "$libzmq_cv_cxx_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C++ compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C++ compiler... " >&6; } -if test "${ac_zmq_cv_cxx_gcc4_compiler+set}" = set; then : +if test "${libzmq_cv_cxx_gcc4_compiler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15886,15 +15908,15 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - ac_zmq_cv_cxx_gcc4_compiler="yes" ; + libzmq_cv_cxx_gcc4_compiler="yes" ; else - ac_zmq_cv_cxx_gcc4_compiler="no" ; + libzmq_cv_cxx_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_gcc4_compiler" >&5 -$as_echo "$ac_zmq_cv_cxx_gcc4_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_gcc4_compiler" >&5 +$as_echo "$libzmq_cv_cxx_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -15904,13 +15926,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then - if test "xyes" = "x$ac_zmq_cv_c_intel_compiler"; then + if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then - if test "xyes" = "x$ac_zmq_cv_cxx_intel_compiler"; then + if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi @@ -15934,21 +15956,21 @@ $as_echo_n "checking whether to enable debugging information... " >&6; } # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ - "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_c_clang_compiler" = "xyes"; then + "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " - elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then + elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then + "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi @@ -15970,6 +15992,54 @@ $as_echo "no" >&6; } fi } +# Check wheter to enable code coverage +{ + # Require compiler specifics + + + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; ZMQ_GCOV="$withval" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable code coverage" >&5 +$as_echo_n "checking whether to enable code coverage... " >&6; } + + if test "x$ZMQ_GCOV" = "xyes"; then + + if test "x$GXX" != "xyes"; then + as_fn_error $? "--with-gcov=yes works only with GCC" "$LINENO" 5 + fi + + CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" + if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then + CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" + fi + + CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" + if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then + CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" + fi + + CXXFLAGS="-fprofile-arcs" + if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then + CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" + fi + + LIBS="-lgcov ${LIBS}" + fi + + if test "x$ZMQ_GCOV" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; +fi +} + # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } @@ -16018,16 +16088,16 @@ fi # Set pedantic -ac_zmq_pedantic="yes" +libzmq_pedantic="yes" # By default compiling with -Werror except OSX. -ac_zmq_werror="yes" +libzmq_werror="yes" # By default use DSO visibility -ac_zmq_dso_visibility="yes" +libzmq_dso_visibility="yes" # Whether we are on mingw or not. -ac_zmq_on_mingw32="no" +libzmq_on_mingw32="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" @@ -16366,8 +16436,8 @@ $as_echo "#define ZMQ_HAVE_FREEBSD 1" >>confdefs.h *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" - ac_zmq_pedantic="no" - ac_zmq_werror="no" + libzmq_pedantic="no" + libzmq_werror="no" $as_echo "#define ZMQ_HAVE_OSX 1" >>confdefs.h @@ -16385,16 +16455,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-uninitialized" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-uninitialized... " >&6; } - ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag + libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-uninitialized" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-uninitialized" ;; *) @@ -16419,21 +16489,21 @@ if ac_fn_cxx_try_compile "$LINENO"; then : # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="no" + eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" else - eval ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="yes" + eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="yes" fi else - eval ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="no" + eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -16441,10 +16511,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # Restore the werror flag - ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save + ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else @@ -16455,12 +16525,12 @@ fi } case "xcxx" in xc) - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CFLAGS="-Wno-uninitialized $CFLAGS"; fi ;; xcxx) - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CPPFLAGS="-Wno-uninitialized $CPPFLAGS"; fi ;; @@ -16482,7 +16552,7 @@ $as_echo "#define ZMQ_HAVE_NETBSD 1" >>confdefs.h # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. - ac_zmq_netbsd_has_atomic=no + libzmq_netbsd_has_atomic=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5 $as_echo_n "checking whether atomic operations can be used... " >&6; } ac_ext=cpp @@ -16505,9 +16575,9 @@ uint32_t value; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_zmq_netbsd_has_atomic=yes + libzmq_netbsd_has_atomic=yes else - ac_zmq_netbsd_has_atomic=no + libzmq_netbsd_has_atomic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -16517,9 +16587,9 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_netbsd_has_atomic" >&5 -$as_echo "$ac_zmq_netbsd_has_atomic" >&6; } - if test "x$ac_zmq_netbsd_has_atomic" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_netbsd_has_atomic" >&5 +$as_echo "$libzmq_netbsd_has_atomic" >&6; } + if test "x$libzmq_netbsd_has_atomic" = "xno"; then $as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h @@ -16533,7 +16603,7 @@ $as_echo "#define ZMQ_HAVE_OPENBSD 1" >>confdefs.h ;; *nto-qnx*) - ac_zmq_pedantic="no" + libzmq_pedantic="no" $as_echo "#define ZMQ_HAVE_QNXNTO 1" >>confdefs.h @@ -16932,16 +17002,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-long-long" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-long-long... " >&6; } - ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag + libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-long-long" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *) @@ -16966,21 +17036,21 @@ if ac_fn_cxx_try_compile "$LINENO"; then : # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval ac_zmq_cv_cxx_supports_flag__Wno_long_long="no" + eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" else - eval ac_zmq_cv_cxx_supports_flag__Wno_long_long="yes" + eval libzmq_cv_cxx_supports_flag__Wno_long_long="yes" fi else - eval ac_zmq_cv_cxx_supports_flag__Wno_long_long="no" + eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -16988,10 +17058,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # Restore the werror flag - ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save + ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else @@ -17002,12 +17072,12 @@ fi } case "xcxx" in xc) - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CFLAGS="-Wno-long-long $CFLAGS"; fi ;; xcxx) - if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : + if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CPPFLAGS="-Wno-long-long $CPPFLAGS"; fi ;; @@ -17019,8 +17089,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_zmq_on_mingw32="yes" - ac_zmq_dso_visibility="no" + libzmq_on_mingw32="yes" + libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then as_fn_error $? "Building static libraries is not supported under MinGW32" "$LINENO" 5 @@ -17095,191 +17165,7 @@ esac # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # -if test "x$ac_zmq_dso_visibility" = "xyes"; then - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { - - ac_zmq_cv_c_visibility_flag="" - - if test "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_c_clang_compiler" = "xyes" -o \ - "x$ac_zmq_cv_c_gcc4_compiler" = "xyes"; then - { - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fvisibility=hidden" >&5 -$as_echo_n "checking whether C compiler supports -fvisibility=hidden... " >&6; } - - ac_zmq_cv_c_werror_flag_save=$ac_c_werror_flag - ac_c_werror_flag="yes" - - case "xc" in - xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - ;; - xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -fvisibility=hidden" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 -$as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} - ;; - esac - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # This hack exist for ICC, which outputs unknown options as remarks - # Remarks are not turned into errors even with -Werror on - if ($GREP 'ignoring unknown' conftest.err || - $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" - else - eval `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" - fi -else - eval `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - case "xc" in - xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" - ;; - xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" - ;; - *) - # nothing to restore - ;; - esac - - # Restore the werror flag - ac_c_werror_flag=$ac_zmq_cv_c_werror_flag_save - - # Call the action as the flags are restored - if eval test x$`$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; ac_zmq_cv_c_visibility_flag="-fvisibility=hidden" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; -fi - -} - elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then - { - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -xldscope=hidden" >&5 -$as_echo_n "checking whether C compiler supports -xldscope=hidden... " >&6; } - - ac_zmq_cv_c_werror_flag_save=$ac_c_werror_flag - ac_c_werror_flag="yes" - - case "xc" in - xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -xldscope=hidden" - ;; - xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -xldscope=hidden" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 -$as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} - ;; - esac - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # This hack exist for ICC, which outputs unknown options as remarks - # Remarks are not turned into errors even with -Werror on - if ($GREP 'ignoring unknown' conftest.err || - $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" - else - eval `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" - fi -else - eval `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - case "xc" in - xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" - ;; - xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" - ;; - *) - # nothing to restore - ;; - esac - - # Restore the werror flag - ac_c_werror_flag=$ac_zmq_cv_c_werror_flag_save - - # Call the action as the flags are restored - if eval test x$`$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; ac_zmq_cv_c_visibility_flag="-xldscope=hidden" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; -fi - -} - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports dso visibility" >&5 -$as_echo_n "checking whether C compiler supports dso visibility... " >&6; } - - if test "x$ac_zmq_cv_c_visibility_flag" != "x"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_c_visibility_flag ${LIBZMQ_EXTRA_CFLAGS}" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; -fi -} - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - +if test "x$libzmq_dso_visibility" = "xyes"; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -17288,11 +17174,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { - ac_zmq_cv_cxx_visibility_flag="" + libzmq_cv_cxx_visibility_flag="" - if test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_clang_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_gcc4_compiler" = "xyes"; then + if test "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_clang_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_gcc4_compiler" = "xyes"; then { @@ -17300,16 +17186,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -fvisibility=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -fvisibility=hidden... " >&6; } - ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag + libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -fvisibility=hidden" ;; *) @@ -17334,21 +17220,21 @@ if ac_fn_cxx_try_compile "$LINENO"; then : # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" fi else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -17356,19 +17242,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # Restore the werror flag - ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save + ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored - if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : + if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; ac_zmq_cv_cxx_visibility_flag="-fvisibility=hidden" +$as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-fvisibility=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then { @@ -17376,16 +17262,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -xldscope=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -xldscope=hidden... " >&6; } - ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag + libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -xldscope=hidden" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -xldscope=hidden" ;; *) @@ -17410,21 +17296,21 @@ if ac_fn_cxx_try_compile "$LINENO"; then : # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" fi else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -17432,12 +17318,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # Restore the werror flag - ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save + ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored - if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : + if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; ac_zmq_cv_cxx_visibility_flag="-xldscope=hidden" +$as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-xldscope=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; @@ -17449,9 +17335,9 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports dso visibility" >&5 $as_echo_n "checking whether C++ compiler supports dso visibility... " >&6; } - if test "x$ac_zmq_cv_cxx_visibility_flag" != "x"; then : + if test "x$libzmq_cv_cxx_visibility_flag" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_cxx_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}" +$as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_cxx_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; @@ -17482,16 +17368,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -mcpu=v9" >&5 $as_echo_n "checking whether C++ compiler supports -mcpu=v9... " >&6; } - ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag + libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) - ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mcpu=v9" ;; xcxx) - ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -mcpu=v9" ;; *) @@ -17516,21 +17402,21 @@ if ac_fn_cxx_try_compile "$LINENO"; then : # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="yes" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="yes" fi else - eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" + eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) - CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -17538,10 +17424,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac # Restore the werror flag - ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save + ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored - if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : + if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else @@ -17552,12 +17438,12 @@ fi } case "xcxx" in xc) - if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : + if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CFLAGS="-mcpu=v9 $CFLAGS"; fi ;; xcxx) - if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : + if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CPPFLAGS="-mcpu=v9 $CPPFLAGS"; fi ;; @@ -17585,22 +17471,22 @@ fi if test "x$with_documentation" = "xno"; then - ac_zmq_build_doc="no" - ac_zmq_install_man="no" + libzmq_build_doc="no" + libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. - ac_zmq_build_doc="yes" - ac_zmq_install_man="yes" + libzmq_build_doc="yes" + libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. # Extract the first word of "asciidoc", so it can be a program name with args. set dummy asciidoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_zmq_have_asciidoc+set}" = set; then : +if test "${ac_cv_prog_libzmq_have_asciidoc+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_zmq_have_asciidoc"; then - ac_cv_prog_ac_zmq_have_asciidoc="$ac_zmq_have_asciidoc" # Let the user override the test. + if test -n "$libzmq_have_asciidoc"; then + ac_cv_prog_libzmq_have_asciidoc="$libzmq_have_asciidoc" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -17609,7 +17495,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_zmq_have_asciidoc="yes" + ac_cv_prog_libzmq_have_asciidoc="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -17617,13 +17503,13 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_zmq_have_asciidoc" && ac_cv_prog_ac_zmq_have_asciidoc="no" + test -z "$ac_cv_prog_libzmq_have_asciidoc" && ac_cv_prog_libzmq_have_asciidoc="no" fi fi -ac_zmq_have_asciidoc=$ac_cv_prog_ac_zmq_have_asciidoc -if test -n "$ac_zmq_have_asciidoc"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_have_asciidoc" >&5 -$as_echo "$ac_zmq_have_asciidoc" >&6; } +libzmq_have_asciidoc=$ac_cv_prog_libzmq_have_asciidoc +if test -n "$libzmq_have_asciidoc"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_asciidoc" >&5 +$as_echo "$libzmq_have_asciidoc" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -17634,11 +17520,11 @@ fi set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_zmq_have_xmlto+set}" = set; then : +if test "${ac_cv_prog_libzmq_have_xmlto+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_zmq_have_xmlto"; then - ac_cv_prog_ac_zmq_have_xmlto="$ac_zmq_have_xmlto" # Let the user override the test. + if test -n "$libzmq_have_xmlto"; then + ac_cv_prog_libzmq_have_xmlto="$libzmq_have_xmlto" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -17647,7 +17533,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_zmq_have_xmlto="yes" + ac_cv_prog_libzmq_have_xmlto="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -17655,24 +17541,24 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_zmq_have_xmlto" && ac_cv_prog_ac_zmq_have_xmlto="no" + test -z "$ac_cv_prog_libzmq_have_xmlto" && ac_cv_prog_libzmq_have_xmlto="no" fi fi -ac_zmq_have_xmlto=$ac_cv_prog_ac_zmq_have_xmlto -if test -n "$ac_zmq_have_xmlto"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_have_xmlto" >&5 -$as_echo "$ac_zmq_have_xmlto" >&6; } +libzmq_have_xmlto=$ac_cv_prog_libzmq_have_xmlto +if test -n "$libzmq_have_xmlto"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_xmlto" >&5 +$as_echo "$libzmq_have_xmlto" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_zmq_have_asciidoc" = "xno" -o "x$ac_zmq_have_xmlto" = "xno"; then - ac_zmq_build_doc="no" + if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then + libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then - ac_zmq_install_man="no" + libzmq_install_man="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&5 $as_echo "$as_me: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation will not be built and manual pages will not be installed." >&5 @@ -17681,22 +17567,22 @@ $as_echo "$as_me: WARNING: Documentation will not be built and manual pages will fi # Do not install man pages if on mingw - if test "x$ac_zmq_on_mingw32" = "xyes"; then - ac_zmq_install_man="no" + if test "x$libzmq_on_mingw32" = "xyes"; then + libzmq_install_man="no" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 $as_echo_n "checking whether to build documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_build_doc" >&5 -$as_echo "$ac_zmq_build_doc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_build_doc" >&5 +$as_echo "$libzmq_build_doc" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install manpages" >&5 $as_echo_n "checking whether to install manpages... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_install_man" >&5 -$as_echo "$ac_zmq_install_man" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_install_man" >&5 +$as_echo "$libzmq_install_man" >&6; } - if test "x$ac_zmq_build_doc" = "xyes"; then + if test "x$libzmq_build_doc" = "xyes"; then BUILD_DOC_TRUE= BUILD_DOC_FALSE='#' else @@ -17704,7 +17590,7 @@ else BUILD_DOC_FALSE= fi - if test "x$ac_zmq_install_man" = "xyes"; then + if test "x$libzmq_install_man" = "xyes"; then INSTALL_MAN_TRUE= INSTALL_MAN_FALSE='#' else @@ -18099,10 +17985,10 @@ _ACEOF esac # Checks for typedefs, structures, and compiler characteristics. -if test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then +if test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then { - ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS" - ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_check_with_flag_save_CFLAGS="$CFLAGS" + libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" @@ -18120,12 +18006,12 @@ _ACEOF fi - CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS" - CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS" + CFLAGS="$libzmq_check_with_flag_save_CFLAGS" + CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } { - ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS" - ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" + libzmq_check_with_flag_save_CFLAGS="$CFLAGS" + libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" @@ -18143,8 +18029,8 @@ _ACEOF fi - CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS" - CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS" + CFLAGS="$libzmq_check_with_flag_save_CFLAGS" + CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } else ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" @@ -18255,7 +18141,7 @@ fi # PGM extension -ac_zmq_pgm_ext="no" +libzmq_pgm_ext="no" pgm_basename="libpgm-5.1.115~dfsg" @@ -18268,6 +18154,20 @@ else fi +# build using system pgm + +# Check whether --with-system-pgm was given. +if test "${with_system_pgm+set}" = set; then : + withval=$with_system_pgm; with_system_pgm_ext=yes +else + with_system_pgm_ext=no +fi + + +if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then + as_fn_error $? "--with-pgm and --with-system-pgm cannot be specified together" "$LINENO" 5 +fi + if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm @@ -18279,14 +18179,14 @@ if test "x$with_pgm_ext" != "xno"; then # Unpack libpgm { $as_echo "$as_me:${as_lineno-$LINENO}: Unpacking ${pgm_basename}.tar.gz" >&5 $as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;} - ac_zmq_pwd=`pwd` + libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then as_fn_error $? "cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file" "$LINENO" 5 fi - cd "${ac_zmq_pwd}" + cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging @@ -18299,6 +18199,191 @@ $as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;} mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi + # DSO symbol visibility for openpgm + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { + + libzmq_cv_c_visibility_flag="" + + if test "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_c_clang_compiler" = "xyes" -o \ + "x$libzmq_cv_c_gcc4_compiler" = "xyes"; then + { + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fvisibility=hidden" >&5 +$as_echo_n "checking whether C compiler supports -fvisibility=hidden... " >&6; } + + libzmq_cv_c_werror_flag_save=$ac_c_werror_flag + ac_c_werror_flag="yes" + + case "xc" in + xc) + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + ;; + xcxx) + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -fvisibility=hidden" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 +$as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} + ;; + esac + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # This hack exist for ICC, which outputs unknown options as remarks + # Remarks are not turned into errors even with -Werror on + if ($GREP 'ignoring unknown' conftest.err || + $GREP 'not supported' conftest.err) >/dev/null 2>&1; then + eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" + else + eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" + fi +else + eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + case "xc" in + xc) + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" + ;; + xcxx) + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" + ;; + *) + # nothing to restore + ;; + esac + + # Restore the werror flag + ac_c_werror_flag=$libzmq_cv_c_werror_flag_save + + # Call the action as the flags are restored + if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-fvisibility=hidden" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; +fi + +} + elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then + { + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -xldscope=hidden" >&5 +$as_echo_n "checking whether C compiler supports -xldscope=hidden... " >&6; } + + libzmq_cv_c_werror_flag_save=$ac_c_werror_flag + ac_c_werror_flag="yes" + + case "xc" in + xc) + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -xldscope=hidden" + ;; + xcxx) + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -xldscope=hidden" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 +$as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} + ;; + esac + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # This hack exist for ICC, which outputs unknown options as remarks + # Remarks are not turned into errors even with -Werror on + if ($GREP 'ignoring unknown' conftest.err || + $GREP 'not supported' conftest.err) >/dev/null 2>&1; then + eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" + else + eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" + fi +else + eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + case "xc" in + xc) + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" + ;; + xcxx) + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" + ;; + *) + # nothing to restore + ;; + esac + + # Restore the werror flag + ac_c_werror_flag=$libzmq_cv_c_werror_flag_save + + # Call the action as the flags are restored + if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-xldscope=hidden" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; +fi + +} + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports dso visibility" >&5 +$as_echo_n "checking whether C compiler supports dso visibility... " >&6; } + + if test "x$libzmq_cv_c_visibility_flag" != "x"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; ac_configure_args="CFLAGS='$libzmq_cv_c_visibility_flag' ${ac_configure_args}" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; +fi +} + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + pgm_subdir=build-staging/openpgm/pgm @@ -18312,7 +18397,226 @@ subdirs="$subdirs foreign/openpgm/build-staging/openpgm/pgm/" $as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h - ac_zmq_pgm_ext="yes" + libzmq_pgm_ext="yes" +fi + +# Build with system openpgm +if test "x$with_system_pgm_ext" != "xno"; then + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenPGM" >&5 +$as_echo_n "checking for OpenPGM... " >&6; } + +if test -n "$OpenPGM_CFLAGS"; then + pkg_cv_OpenPGM_CFLAGS="$OpenPGM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OpenPGM_CFLAGS=`$PKG_CONFIG --cflags "openpgm-5.1 >= 5.1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$OpenPGM_LIBS"; then + pkg_cv_OpenPGM_LIBS="$OpenPGM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OpenPGM_LIBS=`$PKG_CONFIG --libs "openpgm-5.1 >= 5.1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + OpenPGM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openpgm-5.1 >= 5.1" 2>&1` + else + OpenPGM_PKG_ERRORS=`$PKG_CONFIG --print-errors "openpgm-5.1 >= 5.1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$OpenPGM_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (openpgm-5.1 >= 5.1) were not met: + +$OpenPGM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables OpenPGM_CFLAGS +and OpenPGM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables OpenPGM_CFLAGS +and OpenPGM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5 ; } +else + OpenPGM_CFLAGS=$pkg_cv_OpenPGM_CFLAGS + OpenPGM_LIBS=$pkg_cv_OpenPGM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +$as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h + + LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" + LIBS="$OpenPGM_LIBS $LIBS" + fi @@ -18331,30 +18635,30 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable additional warnings for C++ compiler" >&5 $as_echo_n "checking how to enable additional warnings for C++ compiler... " >&6; } - ac_zmq_cv_cxx_wall_flag="" + libzmq_cv_cxx_wall_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ - "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then - ac_zmq_cv_cxx_wall_flag="-Wall" + "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then + libzmq_cv_cxx_wall_flag="-Wall" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_wall_flag="-v" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then - ac_zmq_cv_cxx_wall_flag="-Wall" + "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then + libzmq_cv_cxx_wall_flag="-Wall" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_wall_flag="+w" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_wall_flag="+w" fi ;; *) @@ -18362,10 +18666,10 @@ $as_echo_n "checking how to enable additional warnings for C++ compiler... " >&6 esac # Call the action - if test "x$ac_zmq_cv_cxx_wall_flag" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_wall_flag" >&5 -$as_echo "$ac_zmq_cv_cxx_wall_flag" >&6; } - CPPFLAGS="$ac_zmq_cv_cxx_wall_flag $CPPFLAGS" + if test "x$libzmq_cv_cxx_wall_flag" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_wall_flag" >&5 +$as_echo "$libzmq_cv_cxx_wall_flag" >&6; } + CPPFLAGS="$libzmq_cv_cxx_wall_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } @@ -18373,31 +18677,31 @@ $as_echo "not found" >&6; } fi } -if test "x$ac_zmq_werror" = "xyes" -a "x$ac_zmq_cv_cxx_sun_studio_compiler" != "xyes"; then +if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_cxx_sun_studio_compiler" != "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to turn warnings to errors in C++ compiler" >&5 $as_echo_n "checking how to turn warnings to errors in C++ compiler... " >&6; } - ac_zmq_cv_cxx_werror_flag="" + libzmq_cv_cxx_werror_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC - if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then - ac_zmq_cv_cxx_werror_flag="-Werror" + if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then + libzmq_cv_cxx_werror_flag="-Werror" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_werror_flag="-errwarn=%all" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC - if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then - ac_zmq_cv_cxx_werror_flag="-Werror" + if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then + libzmq_cv_cxx_werror_flag="-Werror" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_werror_flag="-errwarn=%all" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; *) @@ -18405,10 +18709,10 @@ $as_echo_n "checking how to turn warnings to errors in C++ compiler... " >&6; } esac # Call the action - if test "x$ac_zmq_cv_cxx_werror_flag" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_werror_flag" >&5 -$as_echo "$ac_zmq_cv_cxx_werror_flag" >&6; } - CPPFLAGS="$ac_zmq_cv_cxx_werror_flag $CPPFLAGS" + if test "x$libzmq_cv_cxx_werror_flag" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_werror_flag" >&5 +$as_echo "$libzmq_cv_cxx_werror_flag" >&6; } + CPPFLAGS="$libzmq_cv_cxx_werror_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } @@ -18417,35 +18721,35 @@ $as_echo "not found" >&6; } } fi -if test "x$ac_zmq_pedantic" = "xyes"; then +if test "x$libzmq_pedantic" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable strict standards compliance in C++ compiler" >&5 $as_echo_n "checking how to enable strict standards compliance in C++ compiler... " >&6; } - ac_zmq_cv_cxx_strict_flag="" + libzmq_cv_cxx_strict_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC - if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-pedantic" - elif test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-strict-ansi" + if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-pedantic" + elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-Xc" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC - if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-pedantic" - elif test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-strict-ansi" + if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-pedantic" + elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio - elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then - ac_zmq_cv_cxx_strict_flag="-compat=5" + elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + libzmq_cv_cxx_strict_flag="-compat=5" fi ;; *) @@ -18453,10 +18757,10 @@ $as_echo_n "checking how to enable strict standards compliance in C++ compiler.. esac # Call the action - if test "x$ac_zmq_cv_cxx_strict_flag" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_strict_flag" >&5 -$as_echo "$ac_zmq_cv_cxx_strict_flag" >&6; } - CPPFLAGS="$ac_zmq_cv_cxx_strict_flag $CPPFLAGS" + if test "x$libzmq_cv_cxx_strict_flag" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_strict_flag" >&5 +$as_echo "$libzmq_cv_cxx_strict_flag" >&6; } + CPPFLAGS="$libzmq_cv_cxx_strict_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } @@ -18471,7 +18775,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$ac_zmq_pgm_ext" = "xyes"; then + if test "x$libzmq_pgm_ext" = "xyes"; then BUILD_PGM_TRUE= BUILD_PGM_FALSE='#' else @@ -18479,7 +18783,7 @@ else BUILD_PGM_FALSE= fi - if test "x$ac_zmq_on_mingw32" = "xyes"; then + if test "x$libzmq_on_mingw32" = "xyes"; then ON_MINGW_TRUE= ON_MINGW_FALSE='#' else @@ -18553,7 +18857,7 @@ done -ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc builds/msvc/Makefile tests/Makefile foreign/openpgm/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc builds/msvc/Makefile tests/Makefile foreign/openpgm/Makefile builds/redhat/zeromq.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19101,7 +19405,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by zeromq $as_me 2.1.4, which was +This file was extended by zeromq $as_me 2.1.6, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19167,7 +19471,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -zeromq config.status 2.1.4 +zeromq config.status 2.1.6 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" @@ -19659,6 +19963,7 @@ do "builds/msvc/Makefile") CONFIG_FILES="$CONFIG_FILES builds/msvc/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "foreign/openpgm/Makefile") CONFIG_FILES="$CONFIG_FILES foreign/openpgm/Makefile" ;; + "builds/redhat/zeromq.spec") CONFIG_FILES="$CONFIG_FILES builds/redhat/zeromq.spec" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac diff --git a/configure.in b/configure.in index 8679c90..25d3c93 100644 --- a/configure.in +++ b/configure.in @@ -49,29 +49,30 @@ AC_ARG_VAR([XMLTO], [Path to xmlto command]) AC_PATH_PROG([XMLTO], [xmlto]) AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) AC_PATH_PROG([ASCIIDOC], [asciidoc]) - -# Libtool configuration for different targets. See acinclude.m4 -AC_ZMQ_CONFIG_LIBTOOL +LIBZMQ_CONFIG_LIBTOOL AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # Check whether to build a with debug symbols -AC_ZMQ_CHECK_ENABLE_DEBUG +LIBZMQ_CHECK_ENABLE_DEBUG + +# Check wheter to enable code coverage +LIBZMQ_WITH_GCOV # Checks for libraries. AC_CHECK_LIB([pthread], [pthread_create]) # Set pedantic -ac_zmq_pedantic="yes" +libzmq_pedantic="yes" # By default compiling with -Werror except OSX. -ac_zmq_werror="yes" +libzmq_werror="yes" # By default use DSO visibility -ac_zmq_dso_visibility="yes" +libzmq_dso_visibility="yes" # Whether we are on mingw or not. -ac_zmq_on_mingw32="no" +libzmq_on_mingw32="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" @@ -122,11 +123,11 @@ case "${host_os}" in *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" - ac_zmq_pedantic="no" - ac_zmq_werror="no" + libzmq_pedantic="no" + libzmq_werror="no" AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS]) AC_LANG_PUSH([C++]) - AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) + LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) AC_LANG_POP([C++]) ;; *netbsd*) @@ -136,7 +137,7 @@ case "${host_os}" in # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. - ac_zmq_netbsd_has_atomic=no + libzmq_netbsd_has_atomic=no AC_MSG_CHECKING([whether atomic operations can be used]) AC_LANG_PUSH([C++]) AC_LINK_IFELSE([AC_LANG_PROGRAM( @@ -144,11 +145,11 @@ case "${host_os}" in [[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])], - [ac_zmq_netbsd_has_atomic=yes], - [ac_zmq_netbsd_has_atomic=no]) + [libzmq_netbsd_has_atomic=yes], + [libzmq_netbsd_has_atomic=no]) AC_LANG_POP([C++]) - AC_MSG_RESULT([$ac_zmq_netbsd_has_atomic]) - if test "x$ac_zmq_netbsd_has_atomic" = "xno"; then + AC_MSG_RESULT([$libzmq_netbsd_has_atomic]) + if test "x$libzmq_netbsd_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi ;; @@ -158,7 +159,7 @@ case "${host_os}" in AC_DEFINE(ZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS]) ;; *nto-qnx*) - ac_zmq_pedantic="no" + libzmq_pedantic="no" AC_DEFINE(ZMQ_HAVE_QNXNTO, 1, [Have QNX Neutrino OS]) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(crypto, RAND_bytes) @@ -186,10 +187,10 @@ case "${host_os}" in [AC_MSG_ERROR([cannot link with iphlpapi.dll.])]) # mingw32 defines __int64_t as long long AC_LANG_PUSH([C++]) - AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long]) + LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long]) AC_LANG_POP([C++]) - ac_zmq_on_mingw32="yes" - ac_zmq_dso_visibility="no" + libzmq_on_mingw32="yes" + libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) @@ -217,13 +218,9 @@ esac # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # -if test "x$ac_zmq_dso_visibility" = "xyes"; then - AC_LANG_PUSH([C]) - AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CFLAGS}"]) - AC_LANG_POP([C]) - +if test "x$libzmq_dso_visibility" = "xyes"; then AC_LANG_PUSH([C++]) - AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"]) + LIBZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"]) AC_LANG_POP([C++]) fi @@ -231,7 +228,7 @@ fi case "${host_cpu}" in *sparc*) AC_LANG_PUSH([C++]) - AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-mcpu=v9]) + LIBZMQ_CHECK_LANG_FLAG_PREPEND([-mcpu=v9]) AC_LANG_POP([C++]) ;; *) @@ -239,7 +236,7 @@ case "${host_cpu}" in esac # Check whether to build docs / install man pages -AC_ZMQ_CHECK_DOC_BUILD +LIBZMQ_CHECK_DOC_BUILD # Checks for header files. AC_HEADER_STDC @@ -256,11 +253,11 @@ AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE # Checks for typedefs, structures, and compiler characteristics. -if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then +if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then dnl 279: controlling expression is constant dnl Fixes build with ICC 12.x - AC_ZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SIZE_T]) - AC_ZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SSIZE_T]) + LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SIZE_T]) + LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SSIZE_T]) else AC_TYPE_SIZE_T AC_TYPE_SSIZE_T @@ -270,7 +267,7 @@ AC_TYPE_UINT32_T AC_C_VOLATILE # PGM extension -ac_zmq_pgm_ext="no" +libzmq_pgm_ext="no" pgm_basename="libpgm-5.1.115~dfsg" @@ -278,6 +275,15 @@ AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], [build libzmq with PGM extension [default=no]])], [with_pgm_ext=$withval], [with_pgm_ext=no]) +# build using system pgm +AC_ARG_WITH([system-pgm], [AS_HELP_STRING([--with-system-pgm], + [build libzmq with PGM extension. Requires pkg-config [default=no]])], + [with_system_pgm_ext=yes], [with_system_pgm_ext=no]) + +if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then + AC_MSG_ERROR([--with-pgm and --with-system-pgm cannot be specified together]) +fi + if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm @@ -288,14 +294,14 @@ if test "x$with_pgm_ext" != "xno"; then # Unpack libpgm AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz]) - ac_zmq_pwd=`pwd` + libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file]) fi - cd "${ac_zmq_pwd}" + cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging @@ -308,6 +314,11 @@ if test "x$with_pgm_ext" != "xno"; then mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi + # DSO symbol visibility for openpgm + AC_LANG_PUSH([C]) + LIBZMQ_CHECK_LANG_VISIBILITY([ac_configure_args="CFLAGS='$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag' ${ac_configure_args}"]) + AC_LANG_POP([C]) + pgm_subdir=build-staging/openpgm/pgm AC_SUBST(pgm_subdir) @@ -316,7 +327,18 @@ if test "x$with_pgm_ext" != "xno"; then # Success! AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) - ac_zmq_pgm_ext="yes" + libzmq_pgm_ext="yes" +fi + +# Build with system openpgm +if test "x$with_system_pgm_ext" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1]) + AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) + LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" + LIBS="$OpenPGM_LIBS $LIBS" + ], + [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])]) fi AC_SUBST(pgm_basename) @@ -325,19 +347,19 @@ AC_SUBST(pgm_basename) AC_LANG_PUSH([C++]) # Check how to enable -Wall -AC_ZMQ_LANG_WALL([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag $CPPFLAGS"]) +LIBZMQ_LANG_WALL([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag $CPPFLAGS"]) -if test "x$ac_zmq_werror" = "xyes" -a "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" != "xyes"; then - AC_ZMQ_LANG_WERROR([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag $CPPFLAGS"]) +if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" != "xyes"; then + LIBZMQ_LANG_WERROR([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag $CPPFLAGS"]) fi -if test "x$ac_zmq_pedantic" = "xyes"; then - AC_ZMQ_LANG_STRICT([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $CPPFLAGS"]) +if test "x$libzmq_pedantic" = "xyes"; then + LIBZMQ_LANG_STRICT([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $CPPFLAGS"]) fi AC_LANG_POP([C++]) -AM_CONDITIONAL(BUILD_PGM, test "x$ac_zmq_pgm_ext" = "xyes") -AM_CONDITIONAL(ON_MINGW, test "x$ac_zmq_on_mingw32" = "xyes") +AM_CONDITIONAL(BUILD_PGM, test "x$libzmq_pgm_ext" = "xyes") +AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw32" = "xyes") # Checks for library functions. AC_TYPE_SIGNAL @@ -352,6 +374,7 @@ AC_SUBST(LIBZMQ_EXTRA_LDFLAGS) AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc \ builds/msvc/Makefile tests/Makefile \ - foreign/openpgm/Makefile]) + foreign/openpgm/Makefile \ + builds/redhat/zeromq.spec]) AC_OUTPUT diff --git a/doc/Makefile.in b/doc/Makefile.in index 35bf698..2db8cb3 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -142,6 +142,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -150,6 +152,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -164,8 +169,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -194,6 +197,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ diff --git a/doc/zmq.7 b/doc/zmq.7 index d7fa3be..b5f0d27 100644 --- a/doc/zmq.7 +++ b/doc/zmq.7 @@ -2,12 +2,12 @@ .\" Title: zmq .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_bind.3 b/doc/zmq_bind.3 index 9ff1109..8412806 100644 --- a/doc/zmq_bind.3 +++ b/doc/zmq_bind.3 @@ -2,12 +2,12 @@ .\" Title: zmq_bind .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_BIND" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_BIND" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_close.3 b/doc/zmq_close.3 index 520f0ac..43f47b3 100644 --- a/doc/zmq_close.3 +++ b/doc/zmq_close.3 @@ -2,12 +2,12 @@ .\" Title: zmq_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_CLOSE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_CLOSE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_connect.3 b/doc/zmq_connect.3 index 06435e8..534abb4 100644 --- a/doc/zmq_connect.3 +++ b/doc/zmq_connect.3 @@ -2,12 +2,12 @@ .\" Title: zmq_connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_CONNECT" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_CONNECT" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_cpp.7 b/doc/zmq_cpp.7 index c61797e..b5fb80a 100644 --- a/doc/zmq_cpp.7 +++ b/doc/zmq_cpp.7 @@ -2,12 +2,12 @@ .\" Title: zmq_cpp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_CPP" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_CPP" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_device.3 b/doc/zmq_device.3 index 329360d..67ab7bb 100644 --- a/doc/zmq_device.3 +++ b/doc/zmq_device.3 @@ -2,12 +2,12 @@ .\" Title: zmq_device .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_DEVICE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_DEVICE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_epgm.7 b/doc/zmq_epgm.7 index 1559950..3c4c7d1 100644 --- a/doc/zmq_epgm.7 +++ b/doc/zmq_epgm.7 @@ -2,12 +2,12 @@ .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_PGM" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_PGM" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -124,6 +124,8 @@ data = *OCTET .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp +Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. +.sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ diff --git a/doc/zmq_epgm.html b/doc/zmq_epgm.html index 5506fa1..9383d71 100644 --- a/doc/zmq_epgm.html +++ b/doc/zmq_epgm.html @@ -672,6 +672,10 @@ each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

+

Note that offset specifies where the first message begins rather than the first +message part. Thus, if there are trailing message parts at the beginning of +the packet the offset ignores them and points to first initial message part +in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

@@ -737,8 +741,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_epgm.txt b/doc/zmq_epgm.txt index 72ae24f..9a48afd 100644 --- a/doc/zmq_epgm.txt +++ b/doc/zmq_epgm.txt @@ -93,6 +93,11 @@ order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. +Note that offset specifies where the first message begins rather than the first +message part. Thus, if there are trailing message parts at the beginning of +the packet the offset ignores them and points to first initial message part +in the packet. + The following diagram illustrates the layout of a single PGM datagram payload: .... diff --git a/doc/zmq_errno.3 b/doc/zmq_errno.3 index 407ca79..9ebec08 100644 --- a/doc/zmq_errno.3 +++ b/doc/zmq_errno.3 @@ -2,12 +2,12 @@ .\" Title: zmq_errno .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_ERRNO" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_ERRNO" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_getsockopt.3 b/doc/zmq_getsockopt.3 index 774dca8..1760fa2 100644 --- a/doc/zmq_getsockopt.3 +++ b/doc/zmq_getsockopt.3 @@ -2,12 +2,12 @@ .\" Title: zmq_getsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_GETSOCKOPT" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_GETSOCKOPT" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_init.3 b/doc/zmq_init.3 index d52d393..dd0bed5 100644 --- a/doc/zmq_init.3 +++ b/doc/zmq_init.3 @@ -2,12 +2,12 @@ .\" Title: zmq_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_INIT" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_INIT" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_inproc.7 b/doc/zmq_inproc.7 index 830d1fa..0f0ea78 100644 --- a/doc/zmq_inproc.7 +++ b/doc/zmq_inproc.7 @@ -2,12 +2,12 @@ .\" Title: zmq_inproc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_INPROC" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_INPROC" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_ipc.7 b/doc/zmq_ipc.7 index a0ef8bd..e3b0652 100644 --- a/doc/zmq_ipc.7 +++ b/doc/zmq_ipc.7 @@ -2,12 +2,12 @@ .\" Title: zmq_ipc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_IPC" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_IPC" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_msg_close.3 b/doc/zmq_msg_close.3 index 76d5cb8..3201edb 100644 --- a/doc/zmq_msg_close.3 +++ b/doc/zmq_msg_close.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_CLOSE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_CLOSE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -57,8 +57,11 @@ Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg .sp The \fIzmq_msg_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" -.sp -No errors are defined\&. +.PP +\fBEFAULT\fR +.RS 4 +Invalid message\&. +.RE .SH "SEE ALSO" .sp \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) diff --git a/doc/zmq_msg_close.html b/doc/zmq_msg_close.html index 7942587..caa7741 100644 --- a/doc/zmq_msg_close.html +++ b/doc/zmq_msg_close.html @@ -610,7 +610,16 @@ it shall return -1 and set errno to one of the values defined

ERRORS

-

No errors are defined.

+
+
+EFAULT +
+
+

+Invalid message. +

+
+

SEE ALSO

@@ -630,8 +639,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_msg_close.txt b/doc/zmq_msg_close.txt index f72251a..025302b 100644 --- a/doc/zmq_msg_close.txt +++ b/doc/zmq_msg_close.txt @@ -35,7 +35,8 @@ it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ -No errors are defined. +*EFAULT*:: +Invalid message. SEE ALSO diff --git a/doc/zmq_msg_copy.3 b/doc/zmq_msg_copy.3 index 2471cdc..3c19ef3 100644 --- a/doc/zmq_msg_copy.3 +++ b/doc/zmq_msg_copy.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_copy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_COPY" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_COPY" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -71,8 +71,11 @@ Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg .sp The \fIzmq_msg_copy()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" -.sp -No errors are defined\&. +.PP +\fBEFAULT\fR +.RS 4 +Invalid message\&. +.RE .SH "SEE ALSO" .sp \fBzmq_msg_move\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) diff --git a/doc/zmq_msg_copy.html b/doc/zmq_msg_copy.html index 5017c3c..d492905 100644 --- a/doc/zmq_msg_copy.html +++ b/doc/zmq_msg_copy.html @@ -619,7 +619,16 @@ shall return -1 and set errno to one of the values defined bel

ERRORS

-

No errors are defined.

+
+
+EFAULT +
+
+

+Invalid message. +

+
+

SEE ALSO

@@ -639,8 +648,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_msg_copy.txt b/doc/zmq_msg_copy.txt index d23dcdb..d6ce1b9 100644 --- a/doc/zmq_msg_copy.txt +++ b/doc/zmq_msg_copy.txt @@ -37,7 +37,8 @@ shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ -No errors are defined. +*EFAULT*:: +Invalid message. SEE ALSO diff --git a/doc/zmq_msg_data.3 b/doc/zmq_msg_data.3 index 6470f6b..e619197 100644 --- a/doc/zmq_msg_data.3 +++ b/doc/zmq_msg_data.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_DATA" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_DATA" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_msg_init.3 b/doc/zmq_msg_init.3 index f4cc7c7..8fe45bf 100644 --- a/doc/zmq_msg_init.3 +++ b/doc/zmq_msg_init.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_INIT" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_INIT" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_msg_init_data.3 b/doc/zmq_msg_init_data.3 index b89821f..c042a87 100644 --- a/doc/zmq_msg_init_data.3 +++ b/doc/zmq_msg_init_data.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_INIT_DATA" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_INIT_DATA" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -68,6 +68,22 @@ Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg .ps -1 .br .sp +The deallocation function \fIffn\fR needs to be thread\-safe, since it will be called from an arbitrary thread\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE diff --git a/doc/zmq_msg_init_data.html b/doc/zmq_msg_init_data.html index efc259f..aebd2a7 100644 --- a/doc/zmq_msg_init_data.html +++ b/doc/zmq_msg_init_data.html @@ -608,6 +608,15 @@ supplied to zmq_msg_init_data().

Caution
+The deallocation function ffn needs to be thread-safe, since it +will be called from an arbitrary thread. + +
+
+ + @@ -661,8 +670,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_msg_init_data.txt b/doc/zmq_msg_init_data.txt index 50f05c5..2842c10 100644 --- a/doc/zmq_msg_init_data.txt +++ b/doc/zmq_msg_init_data.txt @@ -28,6 +28,9 @@ supplied to _zmq_msg_init_data()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. +CAUTION: The deallocation function 'ffn' needs to be thread-safe, since it +will be called from an arbitrary thread. + CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. diff --git a/doc/zmq_msg_init_size.3 b/doc/zmq_msg_init_size.3 index 324f751..a0d174d 100644 --- a/doc/zmq_msg_init_size.3 +++ b/doc/zmq_msg_init_size.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_INIT_SIZE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_INIT_SIZE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_msg_move.3 b/doc/zmq_msg_move.3 index 1899c63..e5625f5 100644 --- a/doc/zmq_msg_move.3 +++ b/doc/zmq_msg_move.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_move .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_MOVE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_MOVE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -55,8 +55,11 @@ Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg .sp The \fIzmq_msg_move()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" -.sp -No errors are defined\&. +.PP +\fBEFAULT\fR +.RS 4 +Invalid message\&. +.RE .SH "SEE ALSO" .sp \fBzmq_msg_copy\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) diff --git a/doc/zmq_msg_move.html b/doc/zmq_msg_move.html index 78f09a8..ed36938 100644 --- a/doc/zmq_msg_move.html +++ b/doc/zmq_msg_move.html @@ -608,7 +608,16 @@ shall return -1 and set errno to one of the values defined bel

ERRORS

-

No errors are defined.

+
+
+EFAULT +
+
+

+Invalid message. +

+
+

SEE ALSO

@@ -628,8 +637,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_msg_move.txt b/doc/zmq_msg_move.txt index 5e4081b..6ab6eab 100644 --- a/doc/zmq_msg_move.txt +++ b/doc/zmq_msg_move.txt @@ -32,7 +32,8 @@ shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ -No errors are defined. +*EFAULT*:: +Invalid message. SEE ALSO diff --git a/doc/zmq_msg_size.3 b/doc/zmq_msg_size.3 index 4cead02..114d7af 100644 --- a/doc/zmq_msg_size.3 +++ b/doc/zmq_msg_size.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_MSG_SIZE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_MSG_SIZE" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_pgm.7 b/doc/zmq_pgm.7 index 1559950..3c4c7d1 100644 --- a/doc/zmq_pgm.7 +++ b/doc/zmq_pgm.7 @@ -2,12 +2,12 @@ .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_PGM" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_PGM" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -124,6 +124,8 @@ data = *OCTET .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp +Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. +.sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ diff --git a/doc/zmq_pgm.html b/doc/zmq_pgm.html index 5506fa1..9383d71 100644 --- a/doc/zmq_pgm.html +++ b/doc/zmq_pgm.html @@ -672,6 +672,10 @@ each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

+

Note that offset specifies where the first message begins rather than the first +message part. Thus, if there are trailing message parts at the beginning of +the packet the offset ignores them and points to first initial message part +in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

@@ -737,8 +741,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_pgm.txt b/doc/zmq_pgm.txt index 72ae24f..9a48afd 100644 --- a/doc/zmq_pgm.txt +++ b/doc/zmq_pgm.txt @@ -93,6 +93,11 @@ order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. +Note that offset specifies where the first message begins rather than the first +message part. Thus, if there are trailing message parts at the beginning of +the packet the offset ignores them and points to first initial message part +in the packet. + The following diagram illustrates the layout of a single PGM datagram payload: .... diff --git a/doc/zmq_poll.3 b/doc/zmq_poll.3 index a3cc9fc..0c6731b 100644 --- a/doc/zmq_poll.3 +++ b/doc/zmq_poll.3 @@ -2,12 +2,12 @@ .\" Title: zmq_poll .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_POLL" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_POLL" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_recv.3 b/doc/zmq_recv.3 index 0103c7f..7a7608e 100644 --- a/doc/zmq_recv.3 +++ b/doc/zmq_recv.3 @@ -2,12 +2,12 @@ .\" Title: zmq_recv .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_RECV" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_RECV" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -100,6 +100,11 @@ was not valid (NULL)\&. .RS 4 The operation was interrupted by delivery of a signal before a message was available\&. .RE +.PP +\fBEFAULT\fR +.RS 4 +The message passed to the function was invalid\&. +.RE .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. diff --git a/doc/zmq_recv.html b/doc/zmq_recv.html index 9ee3454..830f249 100644 --- a/doc/zmq_recv.html +++ b/doc/zmq_recv.html @@ -677,6 +677,14 @@ The operation was interrupted by delivery of a signal before a message was available.

+
+EFAULT +
+
+

+The message passed to the function was invalid. +

+

EXAMPLE

@@ -730,8 +738,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt index 1e6e65d..f33af29 100644 --- a/doc/zmq_recv.txt +++ b/doc/zmq_recv.txt @@ -68,6 +68,8 @@ The provided 'socket' was not valid (NULL). *EINTR*:: The operation was interrupted by delivery of a signal before a message was available. +*EFAULT*:: +The message passed to the function was invalid. EXAMPLE diff --git a/doc/zmq_send.3 b/doc/zmq_send.3 index b6ebcd5..20de946 100644 --- a/doc/zmq_send.3 +++ b/doc/zmq_send.3 @@ -2,12 +2,12 @@ .\" Title: zmq_send .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_SEND" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_SEND" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -50,6 +50,8 @@ set to EAGAIN\&. .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE +.sp +The \fIzmq_msg_t\fR structure passed to \fIzmq_send()\fR is nullified during the call\&. If you want to send the same message to multiple sockets you have to copy it using (e\&.g\&. using \fIzmq_msg_copy()\fR)\&. .if n \{\ .sp .\} @@ -121,6 +123,11 @@ was not valid (NULL)\&. .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE +.PP +\fBEFAULT\fR +.RS 4 +Invalid message\&. +.RE .SH "EXAMPLE" .PP \fBFilling in a message and sending it to a socket\fR. diff --git a/doc/zmq_send.html b/doc/zmq_send.html index eeb4654..70c1ebe 100644 --- a/doc/zmq_send.html +++ b/doc/zmq_send.html @@ -611,6 +611,9 @@ below for a detailed description.

+

The zmq_msg_t structure passed to zmq_send() is nullified during the call. +If you want to send the same message to multiple sockets you have to copy it +using (e.g. using zmq_msg_copy()).

+
Caution
+
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.
@@ -694,6 +697,14 @@ The operation was interrupted by delivery of a signal before the message was sent.

+
+EFAULT +
+
+

+Invalid message. +

+

EXAMPLE

@@ -736,8 +747,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_send.txt b/doc/zmq_send.txt index 87b3a3f..d61ae75 100644 --- a/doc/zmq_send.txt +++ b/doc/zmq_send.txt @@ -28,6 +28,10 @@ Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. +The _zmq_msg_t_ structure passed to _zmq_send()_ is nullified during the call. +If you want to send the same message to multiple sockets you have to copy it +using (e.g. using _zmq_msg_copy()_). + NOTE: A successful invocation of _zmq_send()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. @@ -74,6 +78,8 @@ The provided 'socket' was not valid (NULL). *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. +*EFAULT*:: +Invalid message. EXAMPLE diff --git a/doc/zmq_setsockopt.3 b/doc/zmq_setsockopt.3 index 029a2de..00da7e2 100644 --- a/doc/zmq_setsockopt.3 +++ b/doc/zmq_setsockopt.3 @@ -2,12 +2,12 @@ .\" Title: zmq_setsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_SETSOCKOPT" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_SETSOCKOPT" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_socket.3 b/doc/zmq_socket.3 index fc86d6d..a6b9ebe 100644 --- a/doc/zmq_socket.3 +++ b/doc/zmq_socket.3 @@ -2,12 +2,12 @@ .\" Title: zmq_socket .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_SOCKET" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_SOCKET" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -748,7 +748,12 @@ is invalid\&. .RS 4 The provided \fIcontext\fR -was not valid (NULL)\&. +is invalid\&. +.RE +.PP +\fBEMFILE\fR +.RS 4 +The limit on the total number of open 0MQ sockets has been reached\&. .RE .PP \fBETERM\fR diff --git a/doc/zmq_socket.html b/doc/zmq_socket.html index 3815b04..a5ec995 100644 --- a/doc/zmq_socket.html +++ b/doc/zmq_socket.html @@ -1375,7 +1375,15 @@ The requested socket type is invalid.

-The provided context was not valid (NULL). +The provided context is invalid. +

+
+
+EMFILE +
+
+

+The limit on the total number of open ØMQ sockets has been reached.

@@ -1408,8 +1416,8 @@ Martin Lucina <mato@kotelna.sk>.

<

diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt index 6250b38..7428a91 100644 --- a/doc/zmq_socket.txt +++ b/doc/zmq_socket.txt @@ -318,7 +318,9 @@ ERRORS *EINVAL*:: The requested socket 'type' is invalid. *EFAULT*:: -The provided 'context' was not valid (NULL). +The provided 'context' is invalid. +*EMFILE*:: +The limit on the total number of open 0MQ sockets has been reached. *ETERM*:: The context specified was terminated. diff --git a/doc/zmq_strerror.3 b/doc/zmq_strerror.3 index e334d86..6bf0d5c 100644 --- a/doc/zmq_strerror.3 +++ b/doc/zmq_strerror.3 @@ -2,12 +2,12 @@ .\" Title: zmq_strerror .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_STRERROR" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_STRERROR" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_tcp.7 b/doc/zmq_tcp.7 index cee6c1b..58e6360 100644 --- a/doc/zmq_tcp.7 +++ b/doc/zmq_tcp.7 @@ -2,12 +2,12 @@ .\" Title: zmq_tcp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_TCP" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_TCP" "7" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_term.3 b/doc/zmq_term.3 index f45add6..5c94bea 100644 --- a/doc/zmq_term.3 +++ b/doc/zmq_term.3 @@ -2,12 +2,12 @@ .\" Title: zmq_term .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_TERM" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_TERM" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_version.3 b/doc/zmq_version.3 index c8fcd6e..10e27d4 100644 --- a/doc/zmq_version.3 +++ b/doc/zmq_version.3 @@ -2,12 +2,12 @@ .\" Title: zmq_version .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/30/2011 +.\" Date: 04/20/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.4 +.\" Source: 0MQ 2.1.5 .\" Language: English .\" -.TH "ZMQ_VERSION" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" +.TH "ZMQ_VERSION" "3" "04/20/2011" "0MQ 2\&.1\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/foreign/openpgm/Makefile.in b/foreign/openpgm/Makefile.in index 5d5fe7b..2171fac 100644 --- a/foreign/openpgm/Makefile.in +++ b/foreign/openpgm/Makefile.in @@ -153,6 +153,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -161,6 +163,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -175,8 +180,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -205,6 +208,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ diff --git a/include/zmq.h b/include/zmq.h index 6cb61b1..a7b20b3 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -55,7 +55,7 @@ extern "C" { /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 2 #define ZMQ_VERSION_MINOR 1 -#define ZMQ_VERSION_PATCH 4 +#define ZMQ_VERSION_PATCH 6 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) @@ -134,6 +134,7 @@ ZMQ_EXPORT const char *zmq_strerror (int errnum); /* allows us to pack the stucture tigher and thus improve performance. */ #define ZMQ_MSG_MORE 1 #define ZMQ_MSG_SHARED 128 +#define ZMQ_MSG_MASK 129 /* Merges all the flags */ /* A message. Note that 'content' is not a pointer to the raw data. */ /* Rather it is pointer to zmq::msg_content_t structure */ diff --git a/include/zmq.hpp b/include/zmq.hpp index d73c672..e147b0e 100644 --- a/include/zmq.hpp +++ b/include/zmq.hpp @@ -197,7 +197,7 @@ namespace zmq { return ptr; } - + private: void *ptr; diff --git a/perf/Makefile.am b/perf/Makefile.am index bf3dde9..0f5e78e 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = -I$(top_builddir)/include -noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr +noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr inproc_lat inproc_thr local_lat_LDADD = $(top_builddir)/src/libzmq.la local_lat_SOURCES = local_lat.cpp @@ -13,3 +13,9 @@ local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp + +inproc_lat_LDADD = $(top_builddir)/src/libzmq.la +inproc_lat_SOURCES = inproc_lat.cpp + +inproc_thr_LDADD = $(top_builddir)/src/libzmq.la +inproc_thr_SOURCES = inproc_thr.cpp diff --git a/perf/Makefile.in b/perf/Makefile.in index 6467714..8635487 100644 --- a/perf/Makefile.in +++ b/perf/Makefile.in @@ -35,7 +35,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = local_lat$(EXEEXT) remote_lat$(EXEEXT) \ - local_thr$(EXEEXT) remote_thr$(EXEEXT) + local_thr$(EXEEXT) remote_thr$(EXEEXT) inproc_lat$(EXEEXT) \ + inproc_thr$(EXEEXT) subdir = perf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -52,12 +53,18 @@ CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) -am_local_lat_OBJECTS = local_lat.$(OBJEXT) -local_lat_OBJECTS = $(am_local_lat_OBJECTS) -local_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la +am_inproc_lat_OBJECTS = inproc_lat.$(OBJEXT) +inproc_lat_OBJECTS = $(am_inproc_lat_OBJECTS) +inproc_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent +am_inproc_thr_OBJECTS = inproc_thr.$(OBJEXT) +inproc_thr_OBJECTS = $(am_inproc_thr_OBJECTS) +inproc_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la +am_local_lat_OBJECTS = local_lat.$(OBJEXT) +local_lat_OBJECTS = $(am_local_lat_OBJECTS) +local_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_local_thr_OBJECTS = local_thr.$(OBJEXT) local_thr_OBJECTS = $(am_local_thr_OBJECTS) local_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la @@ -93,9 +100,11 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(local_lat_SOURCES) $(local_thr_SOURCES) \ +SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ + $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) -DIST_SOURCES = $(local_lat_SOURCES) $(local_thr_SOURCES) \ +DIST_SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ + $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) ETAGS = etags CTAGS = ctags @@ -157,6 +166,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -165,6 +176,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -179,8 +193,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -209,6 +221,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ @@ -240,6 +254,10 @@ local_thr_LDADD = $(top_builddir)/src/libzmq.la local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp +inproc_lat_LDADD = $(top_builddir)/src/libzmq.la +inproc_lat_SOURCES = inproc_lat.cpp +inproc_thr_LDADD = $(top_builddir)/src/libzmq.la +inproc_thr_SOURCES = inproc_thr.cpp all: all-am .SUFFIXES: @@ -283,6 +301,12 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +inproc_lat$(EXEEXT): $(inproc_lat_OBJECTS) $(inproc_lat_DEPENDENCIES) + @rm -f inproc_lat$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(inproc_lat_OBJECTS) $(inproc_lat_LDADD) $(LIBS) +inproc_thr$(EXEEXT): $(inproc_thr_OBJECTS) $(inproc_thr_DEPENDENCIES) + @rm -f inproc_thr$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(inproc_thr_OBJECTS) $(inproc_thr_LDADD) $(LIBS) local_lat$(EXEEXT): $(local_lat_OBJECTS) $(local_lat_DEPENDENCIES) @rm -f local_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(local_lat_OBJECTS) $(local_lat_LDADD) $(LIBS) @@ -302,6 +326,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_lat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_lat.Po@am__quote@ diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp new file mode 100644 index 0000000..512fa94 --- /dev/null +++ b/perf/inproc_lat.cpp @@ -0,0 +1,232 @@ +/* + Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "../include/zmq.h" +#include "../include/zmq_utils.h" + +#include +#include +#include + +#include "../src/platform.hpp" + +#if defined ZMQ_HAVE_WINDOWS +#include +#include +#else +#include +#endif + +static size_t message_size; +static int roundtrip_count; + +#if defined ZMQ_HAVE_WINDOWS +static unsigned int __stdcall worker (void *ctx_) +#else +static void *worker (void *ctx_) +#endif +{ + void *s; + int rc; + int i; + zmq_msg_t msg; + + s = zmq_socket (ctx_, ZMQ_REP); + if (!s) { + printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); + exit (1); + } + + rc = zmq_connect (s, "inproc://lat_test"); + if (rc != 0) { + printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); + exit (1); + } + + rc = zmq_msg_init (&msg); + if (rc != 0) { + printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); + exit (1); + } + + for (i = 0; i != roundtrip_count; i++) { + rc = zmq_recv (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + exit (1); + } + rc = zmq_send (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + exit (1); + } + } + + rc = zmq_msg_close (&msg); + if (rc != 0) { + printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); + exit (1); + } + + rc = zmq_close (s); + if (rc != 0) { + printf ("error in zmq_close: %s\n", zmq_strerror (errno)); + exit (1); + } + +#if defined ZMQ_HAVE_WINDOWS + return 0; +#else + return NULL; +#endif +} + +int main (int argc, char *argv []) +{ +#if defined ZMQ_HAVE_WINDOWS + HANDLE local_thread; +#else + pthread_t local_thread; +#endif + void *ctx; + void *s; + int rc; + int i; + zmq_msg_t msg; + void *watch; + unsigned long elapsed; + double latency; + + if (argc != 3) { + printf ("usage: inproc_lat \n"); + return 1; + } + + message_size = atoi (argv [1]); + roundtrip_count = atoi (argv [2]); + + ctx = zmq_init (1); + if (!ctx) { + printf ("error in zmq_init: %s\n", zmq_strerror (errno)); + return -1; + } + + s = zmq_socket (ctx, ZMQ_REQ); + if (!s) { + printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); + return -1; + } + + rc = zmq_bind (s, "inproc://lat_test"); + if (rc != 0) { + printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); + return -1; + } + +#if defined ZMQ_HAVE_WINDOWS + local_thread = (HANDLE) _beginthreadex (NULL, 0, + worker, ctx, 0 , NULL); + if (local_thread == 0) { + printf ("error in _beginthreadex\n"); + return -1; + } +#else + rc = pthread_create (&local_thread, NULL, worker, ctx); + if (rc != 0) { + printf ("error in pthread_create: %s\n", zmq_strerror (rc)); + return -1; + } +#endif + + rc = zmq_msg_init_size (&msg, message_size); + if (rc != 0) { + printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); + return -1; + } + memset (zmq_msg_data (&msg), 0, message_size); + + printf ("message size: %d [B]\n", (int) message_size); + printf ("roundtrip count: %d\n", (int) roundtrip_count); + + watch = zmq_stopwatch_start (); + + for (i = 0; i != roundtrip_count; i++) { + rc = zmq_send (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + return -1; + } + rc = zmq_recv (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + return -1; + } + if (zmq_msg_size (&msg) != message_size) { + printf ("message of incorrect size received\n"); + return -1; + } + } + + elapsed = zmq_stopwatch_stop (watch); + + rc = zmq_msg_close (&msg); + if (rc != 0) { + printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); + return -1; + } + + latency = (double) elapsed / (roundtrip_count * 2); + +#if defined ZMQ_HAVE_WINDOWS + DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); + if (rc2 == WAIT_FAILED) { + printf ("error in WaitForSingleObject\n"); + return -1; + } + BOOL rc3 = CloseHandle (local_thread); + if (rc3 == 0) { + printf ("error in CloseHandle\n"); + return -1; + } +#else + rc = pthread_join (local_thread, NULL); + if (rc != 0) { + printf ("error in pthread_join: %s\n", zmq_strerror (rc)); + return -1; + } +#endif + + printf ("average latency: %.3f [us]\n", (double) latency); + + rc = zmq_close (s); + if (rc != 0) { + printf ("error in zmq_close: %s\n", zmq_strerror (errno)); + return -1; + } + + rc = zmq_term (ctx); + if (rc != 0) { + printf ("error in zmq_term: %s\n", zmq_strerror (errno)); + return -1; + } + + return 0; +} + diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp new file mode 100644 index 0000000..018324a --- /dev/null +++ b/perf/inproc_thr.cpp @@ -0,0 +1,246 @@ +/* + Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "../include/zmq.h" +#include "../include/zmq_utils.h" + +#include +#include +#include + +#include "../src/platform.hpp" + +#if defined ZMQ_HAVE_WINDOWS +#include +#include +#else +#include +#endif + +static int message_count; +static size_t message_size; + +#if defined ZMQ_HAVE_WINDOWS +static unsigned int __stdcall worker (void *ctx_) +#else +static void *worker (void *ctx_) +#endif +{ + void *s; + int rc; + int i; + zmq_msg_t msg; + + s = zmq_socket (ctx_, ZMQ_PUB); + if (!s) { + printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); + exit (1); + } + + rc = zmq_connect (s, "inproc://thr_test"); + if (rc != 0) { + printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); + exit (1); + } + + for (i = 0; i != message_count; i++) { + + rc = zmq_msg_init_size (&msg, message_size); + if (rc != 0) { + printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); + exit (1); + } +#if defined ZMQ_MAKE_VALGRIND_HAPPY + memset (zmq_msg_data (&msg), 0, message_size); +#endif + + rc = zmq_send (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + exit (1); + } + rc = zmq_msg_close (&msg); + if (rc != 0) { + printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); + exit (1); + } + } + + rc = zmq_close (s); + if (rc != 0) { + printf ("error in zmq_close: %s\n", zmq_strerror (errno)); + exit (1); + } + +#if defined ZMQ_HAVE_WINDOWS + return 0; +#else + return NULL; +#endif +} + +int main (int argc, char *argv []) +{ +#if defined ZMQ_HAVE_WINDOWS + HANDLE local_thread; +#else + pthread_t local_thread; +#endif + void *ctx; + void *s; + int rc; + int i; + zmq_msg_t msg; + void *watch; + unsigned long elapsed; + unsigned long throughput; + double megabits; + + if (argc != 3) { + printf ("usage: thread_thr \n"); + return 1; + } + + message_size = atoi (argv [1]); + message_count = atoi (argv [2]); + + ctx = zmq_init (1); + if (!ctx) { + printf ("error in zmq_init: %s\n", zmq_strerror (errno)); + return -1; + } + + s = zmq_socket (ctx, ZMQ_SUB); + if (!s) { + printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); + return -1; + } + + rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "", 0); + if (rc != 0) { + printf ("error in zmq_setsockopt: %s\n", zmq_strerror (errno)); + return -1; + } + + rc = zmq_bind (s, "inproc://thr_test"); + if (rc != 0) { + printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); + return -1; + } + +#if defined ZMQ_HAVE_WINDOWS + local_thread = (HANDLE) _beginthreadex (NULL, 0, + worker, ctx, 0 , NULL); + if (local_thread == 0) { + printf ("error in _beginthreadex\n"); + return -1; + } +#else + rc = pthread_create (&local_thread, NULL, worker, ctx); + if (rc != 0) { + printf ("error in pthread_create: %s\n", zmq_strerror (rc)); + return -1; + } +#endif + + rc = zmq_msg_init (&msg); + if (rc != 0) { + printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); + return -1; + } + + printf ("message size: %d [B]\n", (int) message_size); + printf ("message count: %d\n", (int) message_count); + + rc = zmq_recv (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + return -1; + } + if (zmq_msg_size (&msg) != message_size) { + printf ("message of incorrect size received\n"); + return -1; + } + + watch = zmq_stopwatch_start (); + + for (i = 0; i != message_count - 1; i++) { + rc = zmq_recv (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + return -1; + } + if (zmq_msg_size (&msg) != message_size) { + printf ("message of incorrect size received\n"); + return -1; + } + } + + elapsed = zmq_stopwatch_stop (watch); + if (elapsed == 0) + elapsed = 1; + + rc = zmq_msg_close (&msg); + if (rc != 0) { + printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); + return -1; + } + +#if defined ZMQ_HAVE_WINDOWS + DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); + if (rc2 == WAIT_FAILED) { + printf ("error in WaitForSingleObject\n"); + return -1; + } + BOOL rc3 = CloseHandle (local_thread); + if (rc3 == 0) { + printf ("error in CloseHandle\n"); + return -1; + } +#else + rc = pthread_join (local_thread, NULL); + if (rc != 0) { + printf ("error in pthread_join: %s\n", zmq_strerror (rc)); + return -1; + } +#endif + + rc = zmq_close (s); + if (rc != 0) { + printf ("error in zmq_close: %s\n", zmq_strerror (errno)); + return -1; + } + + rc = zmq_term (ctx); + if (rc != 0) { + printf ("error in zmq_term: %s\n", zmq_strerror (errno)); + return -1; + } + + throughput = (unsigned long) + ((double) message_count / (double) elapsed * 1000000); + megabits = (double) (throughput * message_size * 8) / 1000000; + + printf ("mean throughput: %d [msg/s]\n", (int) throughput); + printf ("mean throughput: %.3f [Mb/s]\n", (double) megabits); + + return 0; +} + diff --git a/src/Makefile.in b/src/Makefile.in index a052a08..78e3379 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -214,6 +214,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -222,6 +224,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -236,8 +241,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -266,6 +269,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ diff --git a/src/fq.cpp b/src/fq.cpp index 36fd435..a1952d8 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -56,10 +56,9 @@ void zmq::fq_t::attach (reader_t *pipe_) void zmq::fq_t::terminated (reader_t *pipe_) { - // TODO: This is a problem with session-initiated termination. It breaks - // message atomicity. However, for socket initiated termination it's - // just fine. - zmq_assert (!more || pipes [current] != pipe_); + // Make sure that we are not closing current pipe while + // message is half-read. + zmq_assert (terminating || (!more || pipes [current] != pipe_)); // Remove the pipe from the list; adjust number of active pipes // accordingly. diff --git a/src/req.cpp b/src/req.cpp index f495492..503f221 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -49,7 +49,7 @@ int zmq::req_t::xsend (zmq_msg_t *msg_, int flags_) zmq_msg_t prefix; int rc = zmq_msg_init (&prefix); zmq_assert (rc == 0); - prefix.flags = ZMQ_MSG_MORE; + prefix.flags |= ZMQ_MSG_MORE; rc = xreq_t::xsend (&prefix, flags_); if (rc != 0) return rc; diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 4cefb6f..4317bb0 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -87,7 +87,7 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, break; case ZMQ_XREP: s = new (std::nothrow) xrep_t (parent_, tid_); - break; + break; case ZMQ_PULL: s = new (std::nothrow) pull_t (parent_, tid_); break; @@ -99,7 +99,7 @@ zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, break; case ZMQ_XSUB: s = new (std::nothrow) xsub_t (parent_, tid_); - break; + break; default: errno = EINVAL; return NULL; @@ -334,7 +334,7 @@ int zmq::socket_base_t::bind (const char *addr_) // For convenience's sake, bind can be used interchageable with // connect for PGM and EPGM transports. - return connect (addr_); + return connect (addr_); } zmq_assert (false); @@ -458,11 +458,18 @@ int zmq::socket_base_t::connect (const char *addr_) int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_) { + // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } + // Check whether message passed to the function is valid. + if (unlikely ((msg_->flags | ZMQ_MSG_MASK) != 0xff)) { + errno = EFAULT; + return -1; + } + // Process pending commands, if any. int rc = process_commands (false, true); if (unlikely (rc != 0)) @@ -496,11 +503,18 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_) int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) { + // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } + // Check whether message passed to the function is valid. + if (unlikely ((msg_->flags | ZMQ_MSG_MASK) != 0xff)) { + errno = EFAULT; + return -1; + } + // Get the message. int rc = xrecv (msg_, flags_); int err = errno; @@ -622,7 +636,7 @@ zmq::session_t *zmq::socket_base_t::find_session (const blob_t &name_) session->inc_seqnum (); sessions_sync.unlock (); - return session; + return session; } void zmq::socket_base_t::start_reaping (poller_t *poller_) diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp index 205ddc1..8de564f 100644 --- a/src/tcp_listener.cpp +++ b/src/tcp_listener.cpp @@ -310,7 +310,8 @@ zmq::fd_t zmq::tcp_listener_t::accept () #if (defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD || \ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_OSX || \ - defined ZMQ_HAVE_OPENVMS || defined ZMQ_HAVE_NETBSD) + defined ZMQ_HAVE_OPENVMS || defined ZMQ_HAVE_NETBSD || \ + defined ZMQ_HAVE_CYGWIN) if (sock == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED)) diff --git a/src/thread.cpp b/src/thread.cpp index 12a72e2..7bf9df0 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -47,6 +47,8 @@ void zmq::thread_t::stop () { DWORD rc = WaitForSingleObject (descriptor, INFINITE); win_assert (rc != WAIT_FAILED); + BOOL rc2 = CloseHandle (descriptor); + win_assert (rc2 != 0); } #else diff --git a/src/xrep.cpp b/src/xrep.cpp index 7f0da4d..75dc30e 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -269,7 +269,7 @@ int zmq::xrep_t::xrecv (zmq_msg_t *msg_, int flags_) zmq_assert (rc == 0); memcpy (zmq_msg_data (msg_), inpipes [current_in].identity.data (), zmq_msg_size (msg_)); - msg_->flags = ZMQ_MSG_MORE; + msg_->flags |= ZMQ_MSG_MORE; return 0; } diff --git a/src/zmq.cpp b/src/zmq.cpp index 929e51c..61f942d 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -81,7 +81,7 @@ const char *zmq_strerror (int errnum_) int zmq_msg_init (zmq_msg_t *msg_) { msg_->content = (zmq::msg_content_t*) ZMQ_VSM; - msg_->flags = 0; + msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; msg_->vsm_size = 0; return 0; } @@ -90,7 +90,7 @@ int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_) { if (size_ <= ZMQ_MAX_VSM_SIZE) { msg_->content = (zmq::msg_content_t*) ZMQ_VSM; - msg_->flags = 0; + msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; msg_->vsm_size = (uint8_t) size_; } else { @@ -100,8 +100,8 @@ int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_) errno = ENOMEM; return -1; } - msg_->flags = 0; - + msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; + zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; content->data = (void*) (content + 1); content->size = size_; @@ -117,7 +117,7 @@ int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, { msg_->content = (zmq::msg_content_t*) malloc (sizeof (zmq::msg_content_t)); alloc_assert (msg_->content); - msg_->flags = 0; + msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; content->data = data_; content->size = size_; @@ -129,6 +129,12 @@ int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, int zmq_msg_close (zmq_msg_t *msg_) { + // Check the validity tag. + if (unlikely (msg_->flags | ZMQ_MSG_MASK) != 0xff) { + errno = EFAULT; + return -1; + } + // For VSMs and delimiters there are no resources to free. if (msg_->content != (zmq::msg_content_t*) ZMQ_DELIMITER && msg_->content != (zmq::msg_content_t*) ZMQ_VSM) { @@ -148,17 +154,22 @@ int zmq_msg_close (zmq_msg_t *msg_) } } - // As a safety measure, let's make the deallocated message look like - // an empty message. - msg_->content = (zmq::msg_content_t*) ZMQ_VSM; + // Remove the validity tag from the message. msg_->flags = 0; - msg_->vsm_size = 0; return 0; } int zmq_msg_move (zmq_msg_t *dest_, zmq_msg_t *src_) { +#if 0 + // Check the validity tags. + if (unlikely ((dest_->flags | ZMQ_MSG_MASK) != 0xff || + (src_->flags | ZMQ_MSG_MASK) != 0xff)) { + errno = EFAULT; + return -1; + } +#endif zmq_msg_close (dest_); *dest_ = *src_; zmq_msg_init (src_); @@ -167,6 +178,13 @@ int zmq_msg_move (zmq_msg_t *dest_, zmq_msg_t *src_) int zmq_msg_copy (zmq_msg_t *dest_, zmq_msg_t *src_) { + // Check the validity tags. + if (unlikely ((dest_->flags | ZMQ_MSG_MASK) != 0xff || + (src_->flags | ZMQ_MSG_MASK) != 0xff)) { + errno = EFAULT; + return -1; + } + zmq_msg_close (dest_); // VSMs and delimiters require no special handling. @@ -190,6 +208,8 @@ int zmq_msg_copy (zmq_msg_t *dest_, zmq_msg_t *src_) void *zmq_msg_data (zmq_msg_t *msg_) { + zmq_assert ((msg_->flags | ZMQ_MSG_MASK) == 0xff); + if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) return msg_->vsm_data; if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) @@ -200,6 +220,8 @@ void *zmq_msg_data (zmq_msg_t *msg_) size_t zmq_msg_size (zmq_msg_t *msg_) { + zmq_assert ((msg_->flags | ZMQ_MSG_MASK) == 0xff); + if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) return msg_->vsm_size; if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) diff --git a/tests/Makefile.in b/tests/Makefile.in index 6f62264..0963727 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -213,6 +213,8 @@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ +OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ +OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -221,6 +223,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -235,8 +240,6 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@ -ac_zmq_have_xmlto = @ac_zmq_have_xmlto@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -265,6 +268,8 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libzmq_have_asciidoc = @libzmq_have_asciidoc@ +libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp index e902f7f..e4e8f28 100644 --- a/tests/test_pair_tcp.cpp +++ b/tests/test_pair_tcp.cpp @@ -25,7 +25,7 @@ using namespace zmqtestutil; int main (int argc, char *argv []) { - const char *transport = "tcp://127.0.0.1:5555" ; + const char *transport = "tcp://127.0.0.1:5560"; basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR); return 0 ; } diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index 9f1f3e6..b225195 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -25,7 +25,7 @@ using namespace zmqtestutil; int main (int argc, char *argv []) { - const char *transport = "tcp://127.0.0.1:5555" ; + const char *transport = "tcp://127.0.0.1:5560" ; basic_tests (transport, ZMQ_REQ, ZMQ_REP); return 0 ; } diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index 85ba912..dccf91f 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -23,7 +23,7 @@ #include #include -#define THREAD_COUNT 100 +#define THREAD_COUNT 10 extern "C" { @@ -31,7 +31,7 @@ extern "C" { int rc; - rc = zmq_connect (s, "tcp://127.0.0.1:5555"); + rc = zmq_connect (s, "tcp://127.0.0.1:5560"); assert (rc == 0); // Start closing the socket while the connecting process is underway. @@ -61,7 +61,7 @@ int main (int argc, char *argv []) s1 = zmq_socket (ctx, ZMQ_REP); assert (s1); - rc = zmq_bind (s1, "tcp://127.0.0.1:5555"); + rc = zmq_bind (s1, "tcp://127.0.0.1:5560"); assert (rc == 0); for (i = 0; i != THREAD_COUNT; i++) { diff --git a/zeromq.spec b/zeromq.spec index 303a524..dbef594 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -1,11 +1,11 @@ Name: zeromq -Version: 2.1.4 +Version: 2.1.6 Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet License: LGPLv3+ URL: http://www.zeromq.org/ -Source: http://www.zeromq.org/local--files/area:download/%{name}-%{version}.tar.gz +Source: http://download.zeromq.org/%{name}-%{version}.tar.gz Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc, make, gcc-c++, libstdc++-devel @@ -108,7 +108,7 @@ This package contains ZeroMQ related development libraries and header files. %{_mandir}/man3/zmq_close.3.gz %{_mandir}/man3/zmq_connect.3.gz %{_mandir}/man3/zmq_errno.3.gz -%{_mandir}/man7/zmq_device.3.gz +%{_mandir}/man3/zmq_device.3.gz %{_mandir}/man3/zmq_getsockopt.3.gz %{_mandir}/man3/zmq_init.3.gz %{_mandir}/man3/zmq_msg_close.3.gz -- cgit v1.2.3