From 4a7aad06d95701cf232198093ce396dcdbb53e5b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:01:47 +0900 Subject: ZeroMQ renamed to Crossroads Signed-off-by: Martin Sustrik --- MAINTAINERS | 56 --- Makefile.am | 1 - NEWS | 153 ------- README | 25 +- acinclude.m4 | 452 +++++++++---------- autogen.sh | 22 +- builds/msvc/Makefile.am | 4 +- builds/msvc/libzmq/libzmq.vcproj | 2 +- builds/msvc/platform.hpp | 16 +- builds/msvc/properties/WithOpenPGM.props | 4 +- configure.in | 164 ++++--- doc/Makefile.am | 22 +- doc/asciidoc.conf | 18 +- doc/xs.txt | 187 ++++++++ doc/xs_bind.txt | 93 ++++ doc/xs_close.txt | 52 +++ doc/xs_connect.txt | 91 ++++ doc/xs_epgm.txt | 1 + doc/xs_errno.txt | 50 +++ doc/xs_getmsgopt.txt | 85 ++++ doc/xs_getsockopt.txt | 438 +++++++++++++++++++ doc/xs_init.txt | 51 +++ doc/xs_inproc.txt | 83 ++++ doc/xs_ipc.txt | 80 ++++ doc/xs_msg_close.txt | 55 +++ doc/xs_msg_copy.txt | 57 +++ doc/xs_msg_data.txt | 48 ++ doc/xs_msg_init.txt | 65 +++ doc/xs_msg_init_data.txt | 85 ++++ doc/xs_msg_init_size.txt | 58 +++ doc/xs_msg_move.txt | 52 +++ doc/xs_msg_size.txt | 48 ++ doc/xs_pgm.txt | 161 +++++++ doc/xs_poll.txt | 129 ++++++ doc/xs_recv.txt | 94 ++++ doc/xs_recvmsg.txt | 121 +++++ doc/xs_send.txt | 105 +++++ doc/xs_sendmsg.txt | 121 +++++ doc/xs_setsockopt.txt | 410 +++++++++++++++++ doc/xs_socket.txt | 347 +++++++++++++++ doc/xs_strerror.txt | 55 +++ doc/xs_tcp.txt | 162 +++++++ doc/xs_term.txt | 65 +++ doc/xs_version.txt | 53 +++ doc/zmq.txt | 217 --------- doc/zmq_bind.txt | 93 ---- doc/zmq_close.txt | 52 --- doc/zmq_connect.txt | 91 ---- doc/zmq_epgm.txt | 1 - doc/zmq_errno.txt | 50 --- doc/zmq_getmsgopt.txt | 85 ---- doc/zmq_getsockopt.txt | 438 ------------------- doc/zmq_init.txt | 51 --- doc/zmq_inproc.txt | 89 ---- doc/zmq_ipc.txt | 80 ---- doc/zmq_msg_close.txt | 55 --- doc/zmq_msg_copy.txt | 57 --- doc/zmq_msg_data.txt | 48 -- doc/zmq_msg_init.txt | 65 --- doc/zmq_msg_init_data.txt | 85 ---- doc/zmq_msg_init_size.txt | 58 --- doc/zmq_msg_move.txt | 52 --- doc/zmq_msg_size.txt | 48 -- doc/zmq_pgm.txt | 161 ------- doc/zmq_poll.txt | 129 ------ doc/zmq_recv.txt | 94 ---- doc/zmq_recvmsg.txt | 121 ----- doc/zmq_send.txt | 105 ----- doc/zmq_sendmsg.txt | 121 ----- doc/zmq_setsockopt.txt | 409 ----------------- doc/zmq_socket.txt | 347 --------------- doc/zmq_strerror.txt | 55 --- doc/zmq_tcp.txt | 162 ------- doc/zmq_term.txt | 65 --- doc/zmq_version.txt | 53 --- include/xs.h | 246 +++++++++++ include/xs_utils.h | 64 +++ include/zmq.h | 246 ----------- include/zmq_utils.h | 64 --- perf/Makefile.am | 12 +- perf/inproc_lat.cpp | 104 ++--- perf/inproc_thr.cpp | 104 ++--- perf/local_lat.cpp | 54 +-- perf/local_thr.cpp | 60 +-- perf/remote_lat.cpp | 58 +-- perf/remote_thr.cpp | 52 +-- src/Makefile.am | 22 +- src/array.hpp | 14 +- src/atomic_counter.hpp | 70 +-- src/atomic_ptr.hpp | 70 +-- src/blob.hpp | 14 +- src/clock.cpp | 22 +- src/clock.hpp | 14 +- src/command.hpp | 24 +- src/config.hpp | 14 +- src/ctx.cpp | 76 ++-- src/ctx.hpp | 38 +- src/decoder.cpp | 26 +- src/decoder.hpp | 23 +- src/devpoll.cpp | 40 +- src/devpoll.hpp | 20 +- src/dist.cpp | 36 +- src/dist.hpp | 32 +- src/encoder.cpp | 18 +- src/encoder.hpp | 21 +- src/epoll.cpp | 34 +- src/epoll.hpp | 20 +- src/err.cpp | 28 +- src/err.hpp | 50 +-- src/fd.hpp | 17 +- src/fq.cpp | 28 +- src/fq.hpp | 14 +- src/i_engine.hpp | 16 +- src/i_poll_events.hpp | 18 +- src/io_object.cpp | 50 +-- src/io_object.hpp | 18 +- src/io_thread.cpp | 36 +- src/io_thread.hpp | 16 +- src/ip.cpp | 42 +- src/ip.hpp | 14 +- src/ipc_address.cpp | 20 +- src/ipc_address.hpp | 16 +- src/ipc_connecter.cpp | 48 +- src/ipc_connecter.hpp | 18 +- src/ipc_listener.cpp | 32 +- src/ipc_listener.hpp | 22 +- src/kqueue.cpp | 40 +- src/kqueue.hpp | 20 +- src/lb.cpp | 28 +- src/lb.hpp | 14 +- src/libxs.pc.in | 10 + src/libzmq.pc.in | 10 - src/likely.hpp | 12 +- src/mailbox.cpp | 22 +- src/mailbox.hpp | 14 +- src/monitor.cpp | 24 +- src/monitor.hpp | 14 +- src/msg.cpp | 68 +-- src/msg.hpp | 18 +- src/mtrie.cpp | 40 +- src/mtrie.hpp | 30 +- src/mutex.hpp | 18 +- src/object.cpp | 166 +++---- src/object.hpp | 72 +-- src/options.cpp | 82 ++-- src/options.hpp | 12 +- src/own.cpp | 52 +-- src/own.hpp | 20 +- src/pair.cpp | 40 +- src/pair.hpp | 30 +- src/pgm_receiver.cpp | 50 +-- src/pgm_receiver.hpp | 26 +- src/pgm_sender.cpp | 44 +- src/pgm_sender.hpp | 24 +- src/pgm_socket.cpp | 146 +++---- src/pgm_socket.hpp | 16 +- src/pipe.cpp | 76 ++-- src/pipe.hpp | 28 +- src/poll.cpp | 36 +- src/poll.hpp | 20 +- src/poller.hpp | 80 ++-- src/poller_base.cpp | 26 +- src/poller_base.hpp | 20 +- src/precompiled.cpp | 8 +- src/precompiled.hpp | 16 +- src/pub.cpp | 20 +- src/pub.hpp | 20 +- src/pull.cpp | 28 +- src/pull.hpp | 24 +- src/push.cpp | 28 +- src/push.hpp | 24 +- src/random.cpp | 16 +- src/random.hpp | 14 +- src/reaper.cpp | 34 +- src/reaper.hpp | 18 +- src/rep.cpp | 26 +- src/rep.hpp | 22 +- src/req.cpp | 26 +- src/req.hpp | 22 +- src/select.cpp | 50 +-- src/select.hpp | 22 +- src/session_base.cpp | 124 +++--- src/session_base.hpp | 40 +- src/signaler.cpp | 120 ++--- src/signaler.hpp | 14 +- src/socket_base.cpp | 174 ++++---- src/socket_base.hpp | 30 +- src/stdint.hpp | 12 +- src/stream_engine.cpp | 62 +-- src/stream_engine.hpp | 22 +- src/sub.cpp | 28 +- src/sub.hpp | 20 +- src/tcp_address.cpp | 82 ++-- src/tcp_address.hpp | 18 +- src/tcp_connecter.cpp | 58 +-- src/tcp_connecter.hpp | 16 +- src/tcp_listener.cpp | 48 +- src/tcp_listener.hpp | 20 +- src/thread.cpp | 24 +- src/thread.hpp | 18 +- src/trie.cpp | 36 +- src/trie.hpp | 14 +- src/windows.hpp | 12 +- src/wire.hpp | 12 +- src/xpub.cpp | 44 +- src/xpub.hpp | 30 +- src/xrep.cpp | 56 +-- src/xrep.hpp | 28 +- src/xreq.cpp | 38 +- src/xreq.hpp | 30 +- src/xs.cpp | 727 +++++++++++++++++++++++++++++++ src/xs_utils.cpp | 61 +++ src/xsub.cpp | 62 +-- src/xsub.hpp | 28 +- src/ypipe.hpp | 22 +- src/yqueue.hpp | 14 +- src/zmq.cpp | 726 ------------------------------ src/zmq_utils.cpp | 61 --- tests/Makefile.am | 2 +- tests/test_hwm.cpp | 36 +- tests/test_invalid_rep.cpp | 48 +- tests/test_msg_flags.cpp | 44 +- tests/test_pair_inproc.cpp | 22 +- tests/test_pair_ipc.cpp | 24 +- tests/test_pair_tcp.cpp | 24 +- tests/test_reqrep_device.cpp | 82 ++-- tests/test_reqrep_inproc.cpp | 24 +- tests/test_reqrep_ipc.cpp | 24 +- tests/test_reqrep_tcp.cpp | 24 +- tests/test_shutdown_stress.cpp | 26 +- tests/test_sub_forward.cpp | 56 +-- tests/test_timeo.cpp | 70 +-- tests/testutil.hpp | 38 +- version.sh | 16 +- 234 files changed, 7643 insertions(+), 7907 deletions(-) delete mode 100644 MAINTAINERS create mode 100644 doc/xs.txt create mode 100644 doc/xs_bind.txt create mode 100644 doc/xs_close.txt create mode 100644 doc/xs_connect.txt create mode 120000 doc/xs_epgm.txt create mode 100644 doc/xs_errno.txt create mode 100644 doc/xs_getmsgopt.txt create mode 100644 doc/xs_getsockopt.txt create mode 100644 doc/xs_init.txt create mode 100644 doc/xs_inproc.txt create mode 100644 doc/xs_ipc.txt create mode 100644 doc/xs_msg_close.txt create mode 100644 doc/xs_msg_copy.txt create mode 100644 doc/xs_msg_data.txt create mode 100644 doc/xs_msg_init.txt create mode 100644 doc/xs_msg_init_data.txt create mode 100644 doc/xs_msg_init_size.txt create mode 100644 doc/xs_msg_move.txt create mode 100644 doc/xs_msg_size.txt create mode 100644 doc/xs_pgm.txt create mode 100644 doc/xs_poll.txt create mode 100644 doc/xs_recv.txt create mode 100644 doc/xs_recvmsg.txt create mode 100644 doc/xs_send.txt create mode 100644 doc/xs_sendmsg.txt create mode 100644 doc/xs_setsockopt.txt create mode 100644 doc/xs_socket.txt create mode 100644 doc/xs_strerror.txt create mode 100644 doc/xs_tcp.txt create mode 100644 doc/xs_term.txt create mode 100644 doc/xs_version.txt delete mode 100644 doc/zmq.txt delete mode 100644 doc/zmq_bind.txt delete mode 100644 doc/zmq_close.txt delete mode 100644 doc/zmq_connect.txt delete mode 120000 doc/zmq_epgm.txt delete mode 100644 doc/zmq_errno.txt delete mode 100644 doc/zmq_getmsgopt.txt delete mode 100644 doc/zmq_getsockopt.txt delete mode 100644 doc/zmq_init.txt delete mode 100644 doc/zmq_inproc.txt delete mode 100644 doc/zmq_ipc.txt delete mode 100644 doc/zmq_msg_close.txt delete mode 100644 doc/zmq_msg_copy.txt delete mode 100644 doc/zmq_msg_data.txt delete mode 100644 doc/zmq_msg_init.txt delete mode 100644 doc/zmq_msg_init_data.txt delete mode 100644 doc/zmq_msg_init_size.txt delete mode 100644 doc/zmq_msg_move.txt delete mode 100644 doc/zmq_msg_size.txt delete mode 100644 doc/zmq_pgm.txt delete mode 100644 doc/zmq_poll.txt delete mode 100644 doc/zmq_recv.txt delete mode 100644 doc/zmq_recvmsg.txt delete mode 100644 doc/zmq_send.txt delete mode 100644 doc/zmq_sendmsg.txt delete mode 100644 doc/zmq_setsockopt.txt delete mode 100644 doc/zmq_socket.txt delete mode 100644 doc/zmq_strerror.txt delete mode 100644 doc/zmq_tcp.txt delete mode 100644 doc/zmq_term.txt delete mode 100644 doc/zmq_version.txt create mode 100644 include/xs.h create mode 100644 include/xs_utils.h delete mode 100644 include/zmq.h delete mode 100644 include/zmq_utils.h create mode 100644 src/libxs.pc.in delete mode 100644 src/libzmq.pc.in create mode 100644 src/xs.cpp create mode 100644 src/xs_utils.cpp delete mode 100644 src/zmq.cpp delete mode 100644 src/zmq_utils.cpp diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 00f5030..0000000 --- a/MAINTAINERS +++ /dev/null @@ -1,56 +0,0 @@ -Component: Atomic Operations -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Lock-free Algorithms -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: TCP transport -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: IPC transport -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: PGM transport -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: In-process transport -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: I/O Threads -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Application Threads and Differnet Socket Types -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Multiplexing (zmq_poll) -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Generic Infrastructure (context, mailbox, command, pipe) -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Documentation -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Autotools build system -Maintainer: Mikko Koppanen -Contact: mikko.koppanen@gmail.com - -Component: MSVC build system -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - -Component: Performance tests -Maintainer: Martin Sustrik -Contact: sustrik@250bpm.com - diff --git a/Makefile.am b/Makefile.am index 962a53e..3de2ff8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,6 @@ DIST_SUBDIRS = foreign/openpgm src doc perf tests builds/msvc EXTRA_DIST = \ autogen.sh \ version.sh \ - MAINTAINERS \ foreign/openpgm/@pgm_basename@.tar.gz MAINTAINERCLEANFILES = \ $(srcdir)/aclocal.m4 \ diff --git a/NEWS b/NEWS index b17272f..e69de29 100644 --- a/NEWS +++ b/NEWS @@ -1,153 +0,0 @@ -OMQ version 3.1.0 (beta), released on 2011/12/18 -================================================ - -General information -------------------- - -Based on community consensus, the 0MQ 3.1.x release reverts a number of -features introduced in version 3.0. The major reason for these changes is -improving backward compatibility with 0MQ 2.1.x. - -Development of the 0MQ 3.0.x series will be discontinued, and users are -encouraged to upgrade to 3.1. - -The 0MQ 3.1.x releases use ABI version 3. - -Reverted functionality ----------------------- - -The following functionality present in 0MQ 3.0 has been reverted: - -* Wire format changes. The 0MQ 3.1 wire format is identical to that of 0MQ - 2.1. - -* LABELs and COMMANDs have been removed. - -* Explicit identies are re-introduced, however they can be used only for - explicit routing, not for durable sockets. - -* The ZMQ_ROUTER and ZMQ_DEALER socket types are once again aliases for - ZMQ_XREQ and ZMQ_XREP. - -New functionality ------------------ - -* The zmq_getmsgopt() function has been introduced. - -* Experimental IPv6 support has been introduced. This is disabled by - default, see the zmq_setsockopt() documentation for enabling it. - -Other changes -------------- - -* The default HWM for all socket types has been set to 1000. - -* Many bug fixes. - -Building --------- - -* The dependency on libuuid has been removed. - -* Support for building on Android, and with MSVC 10 has been added. - -0MQ version 3.0.0 (alpha), released on 2011/07/12 -================================================= - -New functionality ------------------ - -* POSIX-compliant zmq_send and zmq_recv introduced (uses raw buffer - instead of message object). - -* ZMQ_MULTICAST_HOPS socket option added. Sets the appropriate field in - IP headers of PGM packets. - -* Subscription forwarding. Instead of filtering on consumer, the - subscription is moved as far as possible towards the publisher and - filtering is done there. - -* ZMQ_XPUB, ZMQ_XSUB introduced. Allow to create subscription- - forwarding-friendly intermediate devices. - -* Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO. Allow to set timeout for - blocking send/recv calls. - -* A new LABEL flag was added to the wire format. The flag distinguishes - message parts used by 0MQ (labels) from user payload message parts. - -* There is a new wire format for the REQ/REP pattern. First, the empty - bottom-of-the-stack message part is not needed any more, the LABEL - flag is used instead. Secondly, peer IDs are 32-bit integers rather - than 17-byte UUIDs. - -* The REQ socket now drops duplicate replies. - -* Outstanding requests & replies associated with a client are dropped - when the clients dies. This is a performance optimisation. - -* Introduced ZMQ_ROUTER and ZMQ_DEALER sockets. These mimic the - functionality of ZMQ_ROUTER and ZMQ_DEALER in 0MQ/2.1.x. Guarantees - backward compatibility for exsiting code. - -* Removed dependency on OS socketpair buffer size. No more asserts in - mailbox.cpp because of low system limit of sockepair buffer size. - -API improvements ----------------- - -* Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed. Use - ZMQ_PUSH and ZMQ_PULL instead. - -* Timeout in zmq_poll is in milliseconds instead of microseconds. This - makes zmq_poll() compliant with POSIX poll() - -* ZMQ_MCAST_LOOP removed. There's no support for multicast over - loopback any more. Use IPC or TCP isntead. - -* zmq_send/zmq_recv was renamed zmq_sendmsg/zmq_recvmsg. - -* ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciled. The new option - is named ZMQ_RECOVERY_IVL and the unit is milliseconds. - -* Option types changed. Most of the numeric types are now represented - as 'int'. - -* ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM. This makes it possible - to control message flow separately for each direction. - -* ZMQ_NOBLOCK renamed ZMQ_DONTWAIT. That makes it POSIX-compliant. - -Less is More ------------- - -* Pre-built devices and zmq_device() removed. Should be made available - as a separate project(s). - -* ZMQ_SWAP removed. Writing data to disk should be done on top of 0MQ, - on inside it. - -* C++ binding removed from the core. Now it's a separate project, same - as any other binding. - -Bug fixes ---------- - -* Many. - -Building --------- - -* Make pkg-config dependency conditional. - -Distribution ------------- - -* Removed Debian packaging, which is now available at packages.debian.org - or via apt-get. - - -Older versions -============== - -* See NEWS in ZeroMQ 2.1.x repository at http://github.com/zeromq/zeromq2-1. diff --git a/README b/README index 58fe050..72af2bd 100644 --- a/README +++ b/README @@ -1,12 +1,11 @@ Welcome ------- -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. +libxs is a library which extends the standard socket interfaces with features +traditionally provided by specialised messaging middleware products. libxs +sockets provide an abstraction of asynchronous message queues, multiple +messaging patterns, message filtering (subscriptions), seamless access to +multiple transport protocols and more. Building and installation @@ -19,21 +18,11 @@ Resources --------- Extensive documentation is provided with the distribution. Refer to -doc/zmq.html, or "man zmq" after you have installed 0MQ on your system. - -Website: http://www.zeromq.org/ - -Development mailing list: zeromq-dev@lists.zeromq.org -Announcements mailing list: zeromq-announce@lists.zeromq.org - -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). +doc/xs.html, or "man xs" after you have installed libxs on your system. Copying ------- Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER` -included with the 0MQ distribution. +included with the libxs distribution. diff --git a/acinclude.m4 b/acinclude.m4 index 537be18..531568d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,8 +1,8 @@ dnl ############################################################################## -dnl # LIBZMQ_CONFIG_LIBTOOL # +dnl # LIBXS_CONFIG_LIBTOOL # dnl # Configure libtool. Requires AC_CANONICAL_HOST # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CONFIG_LIBTOOL], [{ +AC_DEFUN([LIBXS_CONFIG_LIBTOOL], [{ AC_REQUIRE([AC_CANONICAL_HOST]) # Libtool configuration for different targets @@ -19,192 +19,192 @@ AC_DEFUN([LIBZMQ_CONFIG_LIBTOOL], [{ }]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) # +dnl # LIBXS_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([LIBZMQ_CHECK_LANG_ICC], +AC_DEFUN([LIBXS_CHECK_LANG_ICC], [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler], - [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler], + [libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER error if not ICC #endif ]])], - [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], - [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) + [libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], + [libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) # +dnl # LIBXS_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([LIBZMQ_CHECK_LANG_SUN_STUDIO], +AC_DEFUN([LIBXS_CHECK_LANG_SUN_STUDIO], [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler], - [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler], + [libxs_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 ]])], - [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], - [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) + [libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], + [libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_LANG_CLANG], +AC_DEFUN([LIBXS_CHECK_LANG_CLANG], [AC_CACHE_CHECK([whether we are using clang _AC_LANG compiler], - [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler], + [libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __clang__ error if not clang #endif ]])], - [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], - [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) + [libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], + [libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_LANG_GCC4], +AC_DEFUN([LIBXS_CHECK_LANG_GCC4], [AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler], - [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], + [libxs_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ]])], - [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], - [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) + [libxs_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], + [libxs_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) ])]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_DOC_BUILD # +dnl # LIBXS_CHECK_DOC_BUILD # dnl # Check whether to build documentation and install man-pages # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_DOC_BUILD], [{ +AC_DEFUN([LIBXS_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 - libzmq_build_doc="no" - libzmq_install_man="no" + libxs_build_doc="no" + libxs_install_man="no" else # Determine whether or not documentation should be built and installed. - libzmq_build_doc="yes" - libzmq_install_man="yes" + libxs_build_doc="yes" + libxs_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. - 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" + AC_CHECK_PROG(libxs_have_asciidoc, asciidoc, yes, no) + AC_CHECK_PROG(libxs_have_xmlto, xmlto, yes, no) + if test "x$libxs_have_asciidoc" = "xno" -o "x$libxs_have_xmlto" = "xno"; then + libxs_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. - if ! test -f doc/zmq.7; then - libzmq_install_man="no" - AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.]) + if ! test -f doc/xs.7; then + libxs_install_man="no" + AC_MSG_WARN([You are building an unreleased version of Crossroads 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$libzmq_on_mingw32" = "xyes"; then - libzmq_install_man="no" + if test "x$libxs_on_mingw32" = "xyes"; then + libxs_install_man="no" fi fi AC_MSG_CHECKING([whether to build documentation]) - AC_MSG_RESULT([$libzmq_build_doc]) + AC_MSG_RESULT([$libxs_build_doc]) AC_MSG_CHECKING([whether to install manpages]) - AC_MSG_RESULT([$libzmq_install_man]) + AC_MSG_RESULT([$libxs_install_man]) - AM_CONDITIONAL(BUILD_DOC, test "x$libzmq_build_doc" = "xyes") - AM_CONDITIONAL(INSTALL_MAN, test "x$libzmq_install_man" = "xyes") + AM_CONDITIONAL(BUILD_DOC, test "x$libxs_build_doc" = "xyes") + AM_CONDITIONAL(INSTALL_MAN, test "x$libxs_install_man" = "xyes") }]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # dnl # Check that compiler for the current language actually works # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_LANG_COMPILER], [{ +AC_DEFUN([LIBXS_CHECK_LANG_COMPILER], [{ # Test that compiler for the current language actually works AC_CACHE_CHECK([whether the _AC_LANG compiler works], - [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works], + [libxs_cv_[]_AC_LANG_ABBREV[]_compiler_works], [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], - [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) + [libxs_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], + [libxs_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) ]) - if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then + if test "x$libxs_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then AC_MSG_ERROR([Unable to find a working _AC_LANG compiler]) fi }]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_COMPILERS # +dnl # LIBXS_CHECK_COMPILERS # dnl # Check compiler characteristics. This is so that we can AC_REQUIRE checks # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_COMPILERS], [{ +AC_DEFUN([LIBXS_CHECK_COMPILERS], [{ # For that the compiler works and try to come up with the type AC_LANG_PUSH([C]) - LIBZMQ_CHECK_LANG_COMPILER + LIBXS_CHECK_LANG_COMPILER - LIBZMQ_CHECK_LANG_ICC - LIBZMQ_CHECK_LANG_SUN_STUDIO - LIBZMQ_CHECK_LANG_CLANG - LIBZMQ_CHECK_LANG_GCC4 + LIBXS_CHECK_LANG_ICC + LIBXS_CHECK_LANG_SUN_STUDIO + LIBXS_CHECK_LANG_CLANG + LIBXS_CHECK_LANG_GCC4 AC_LANG_POP([C]) AC_LANG_PUSH(C++) - LIBZMQ_CHECK_LANG_COMPILER + LIBXS_CHECK_LANG_COMPILER - LIBZMQ_CHECK_LANG_ICC - LIBZMQ_CHECK_LANG_SUN_STUDIO - LIBZMQ_CHECK_LANG_CLANG - LIBZMQ_CHECK_LANG_GCC4 + LIBXS_CHECK_LANG_ICC + LIBXS_CHECK_LANG_SUN_STUDIO + LIBXS_CHECK_LANG_CLANG + LIBXS_CHECK_LANG_GCC4 AC_LANG_POP([C++]) # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then - if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then + if test "xyes" = "x$libxs_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then - if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then + if test "xyes" = "x$libxs_cv_cxx_intel_compiler"; then GXX="no" fi fi }]) dnl ############################################################################ -dnl # LIBZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) # +dnl # LIBXS_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 libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # +dnl # Sets libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl ############################################################################ -AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG], [{ +AC_DEFUN([LIBXS_CHECK_LANG_FLAG], [{ AC_REQUIRE([AC_PROG_GREP]) AC_MSG_CHECKING([whether _AC_LANG compiler supports $1]) - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag + libxs_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) - libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + libxs_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" ;; xcxx) - libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + libxs_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" ;; *) @@ -217,18 +217,18 @@ AC_DEFUN([LIBZMQ_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(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" + eval AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" else - eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" + eval AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" fi], - [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) + [eval AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) case "x[]_AC_LANG_ABBREV" in xc) - CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" + CFLAGS="$libxs_cv_check_lang_flag_save_CFLAGS" ;; xcxx) - CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" + CPPFLAGS="$libxs_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore @@ -236,42 +236,42 @@ AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG], [{ esac # Restore the werror flag - ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save + ac_[]_AC_LANG_ABBREV[]_werror_flag=$libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored - AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [AC_MSG_RESULT(yes) ; $2], [AC_MSG_RESULT(no) ; $3]) }]) dnl #################################################################################### -dnl # LIBZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) # +dnl # LIBXS_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 libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # +dnl # Sets libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl #################################################################################### -AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG_PREPEND], [{ - LIBZMQ_CHECK_LANG_FLAG([$1]) +AC_DEFUN([LIBXS_CHECK_LANG_FLAG_PREPEND], [{ + LIBXS_CHECK_LANG_FLAG([$1]) case "x[]_AC_LANG_ABBREV" in xc) - AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CFLAGS="$1 $CFLAGS"; $2], $3) ;; xcxx) - AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CPPFLAGS="$1 $CPPFLAGS"; $2], $3) ;; esac }]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) # +dnl # LIBXS_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([LIBZMQ_CHECK_ENABLE_DEBUG], [{ +AC_DEFUN([LIBXS_CHECK_ENABLE_DEBUG], [{ # Require compiler specifics - AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) + AC_REQUIRE([LIBXS_CHECK_COMPILERS]) # This flag is checked also in AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], @@ -283,33 +283,33 @@ AC_DEFUN([LIBZMQ_CHECK_ENABLE_DEBUG], [{ # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ - "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ - "x$libzmq_cv_c_clang_compiler" = "xyes"; then + "x$libxs_cv_c_intel_compiler" = "xyes" -o \ + "x$libxs_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " - elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then + elif test "x$libxs_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ - "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then + "x$libxs_cv_cxx_intel_compiler" = "xyes" -o \ + "x$libxs_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio - elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then + elif test "x$libxs_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi - if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then - CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" + if test "x$XS_ORIG_CFLAGS" != "xnone"; then + CFLAGS="${CFLAGS} ${XS_ORIG_CFLAGS}" fi - if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then - CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" + if test "x$XS_ORIG_CPPFLAGS" != "xnone"; then + CPPFLAGS="${CPPFLAGS} ${XS_ORIG_CPPFLAGS}" fi - if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then - CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" + if test "x$XS_ORIG_CXXFLAGS" != "xnone"; then + CXXFLAGS="${CXXFLAGS} ${XS_ORIG_CXXFLAGS}" fi AC_MSG_RESULT(yes) else @@ -318,54 +318,54 @@ AC_DEFUN([LIBZMQ_CHECK_ENABLE_DEBUG], [{ }]) dnl ############################################################################## -dnl # LIBZMQ_WITH_GCOV([action-if-found], [action-if-not-found]) # +dnl # LIBXS_WITH_GCOV([action-if-found], [action-if-not-found]) # dnl # Check whether to build with code coverage # dnl ############################################################################## -AC_DEFUN([LIBZMQ_WITH_GCOV], [{ +AC_DEFUN([LIBXS_WITH_GCOV], [{ # Require compiler specifics - AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) + AC_REQUIRE([LIBXS_CHECK_COMPILERS]) AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no], [With GCC Code Coverage reporting.])], - [ZMQ_GCOV="$withval"]) + [XS_GCOV="$withval"]) AC_MSG_CHECKING(whether to enable code coverage) - if test "x$ZMQ_GCOV" = "xyes"; then + if test "x$XS_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}" + if test "x${XS_ORIG_CPPFLAGS}" != "xnone"; then + CFLAGS="${CFLAGS} ${XS_ORIG_CFLAGS}" fi CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" - if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then - CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" + if test "x${XS_ORIG_CPPFLAGS}" != "xnone"; then + CPPFLAGS="${CPPFLAGS} ${XS_ORIG_CPPFLAGS}" fi CXXFLAGS="-fprofile-arcs" - if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then - CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" + if test "x${XS_ORIG_CXXFLAGS}" != "xnone"; then + CXXFLAGS="${CXXFLAGS} ${XS_ORIG_CXXFLAGS}" fi LIBS="-lgcov ${LIBS}" fi - AS_IF([test "x$ZMQ_GCOV" = "xyes"], + AS_IF([test "x$XS_GCOV" = "xyes"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ############################################################################## -dnl # LIBZMQ_CHECK_WITH_FLAG([flags], [macro]) # +dnl # LIBXS_CHECK_WITH_FLAG([flags], [macro]) # dnl # Runs a normal autoconf check with compiler flags # dnl ############################################################################## -AC_DEFUN([LIBZMQ_CHECK_WITH_FLAG], [{ - libzmq_check_with_flag_save_CFLAGS="$CFLAGS" - libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" +AC_DEFUN([LIBXS_CHECK_WITH_FLAG], [{ + libxs_check_with_flag_save_CFLAGS="$CFLAGS" + libxs_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS $1" CPPFLAGS="$CPPFLAGS $1" @@ -373,43 +373,43 @@ AC_DEFUN([LIBZMQ_CHECK_WITH_FLAG], [{ # Execute the macro $2 - CFLAGS="$libzmq_check_with_flag_save_CFLAGS" - CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" + CFLAGS="$libxs_check_with_flag_save_CFLAGS" + CPPFLAGS="$libxs_check_with_flag_save_CPPFLAGS" }]) dnl ############################################################################## -dnl # LIBZMQ_LANG_WALL([action-if-found], [action-if-not-found]) # +dnl # LIBXS_LANG_WALL([action-if-found], [action-if-not-found]) # dnl # How to define -Wall for the current compiler # -dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # +dnl # Sets libxs_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # dnl ############################################################################## -AC_DEFUN([LIBZMQ_LANG_WALL], [{ +AC_DEFUN([LIBXS_LANG_WALL], [{ AC_MSG_CHECKING([how to enable additional warnings for _AC_LANG compiler]) - libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="" + libxs_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$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" + "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ - "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" + "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" fi ;; *) @@ -417,8 +417,8 @@ AC_DEFUN([LIBZMQ_LANG_WALL], [{ esac # Call the action - if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then - AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag]) + if test "x$libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then + AC_MSG_RESULT([$libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag]) $1 else AC_MSG_RESULT([not found]) @@ -427,36 +427,36 @@ AC_DEFUN([LIBZMQ_LANG_WALL], [{ }]) dnl #################################################################### -dnl # LIBZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) # +dnl # LIBXS_LANG_STRICT([action-if-found], [action-if-not-found]) # dnl # Check how to turn on strict standards compliance # dnl #################################################################### -AC_DEFUN([LIBZMQ_LANG_STRICT], [{ +AC_DEFUN([LIBXS_LANG_STRICT], [{ AC_MSG_CHECKING([how to enable strict standards compliance in _AC_LANG compiler]) - libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="" + libxs_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$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" + if test "x$GCC" = "xyes" -o "x$libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC - 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" + if test "x$GXX" = "xyes" -o "x$libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" fi ;; *) @@ -464,8 +464,8 @@ AC_DEFUN([LIBZMQ_LANG_STRICT], [{ esac # Call the action - if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then - AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag]) + if test "x$libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then + AC_MSG_RESULT([$libxs_cv_[]_AC_LANG_ABBREV[]_strict_flag]) $1 else AC_MSG_RESULT([not found]) @@ -474,32 +474,32 @@ AC_DEFUN([LIBZMQ_LANG_STRICT], [{ }]) dnl ######################################################################## -dnl # LIBZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) # +dnl # LIBXS_LANG_WERROR([action-if-found], [action-if-not-found]) # dnl # Check how to turn warnings to errors # dnl ######################################################################## -AC_DEFUN([LIBZMQ_LANG_WERROR], [{ +AC_DEFUN([LIBXS_LANG_WERROR], [{ AC_MSG_CHECKING([how to turn warnings to errors in _AC_LANG compiler]) - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="" + libxs_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$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" + if test "x$GCC" = "xyes" -o "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC - if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" + if test "x$GXX" = "xyes" -o "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio - elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; *) @@ -507,8 +507,8 @@ AC_DEFUN([LIBZMQ_LANG_WERROR], [{ esac # Call the action - if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then - AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag]) + if test "x$libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then + AC_MSG_RESULT([$libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag]) $1 else AC_MSG_RESULT([not found]) @@ -517,75 +517,75 @@ AC_DEFUN([LIBZMQ_LANG_WERROR], [{ }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given pragma # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_LANG_PRAGMA], [{ +AC_DEFUN([LIBXS_CHECK_LANG_PRAGMA], [{ # Need to know how to enable all warnings - LIBZMQ_LANG_WALL + LIBXS_LANG_WALL AC_MSG_CHECKING([whether _AC_LANG compiler supports pragma $1]) # Save flags - libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag + libxs_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 - libzmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" + libxs_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $libxs_cv_[]_AC_LANG_ABBREV[]_wall_flag" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then - libzmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" + libxs_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $libxs_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(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)]) + [eval AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)], + [eval AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)]) if test "x[]_AC_LANG_ABBREV" = "xc"; then - CFLAGS="$libzmq_cv_check_lang_pragma_save_CFLAGS" + CFLAGS="$libxs_cv_check_lang_pragma_save_CFLAGS" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then - CPPFLAGS="$libzmq_cv_check_lang_pragma_save_CPPFLAGS" + CPPFLAGS="$libxs_cv_check_lang_pragma_save_CPPFLAGS" fi - ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save + ac_[]_AC_LANG_ABBREV[]_werror_flag=$libxs_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored - AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], + AS_IF([eval test x$]AS_TR_SH(libxs_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], [$2], [$3]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports dso visibility # dnl ################################################################################ -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"]) +AC_DEFUN([LIBXS_CHECK_LANG_VISIBILITY], [{ + + libxs_cv_[]_AC_LANG_ABBREV[]_visibility_flag="" + + if test "x$libxs_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ + "x$libxs_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \ + "x$libxs_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then + LIBXS_CHECK_LANG_FLAG([-fvisibility=hidden], + [libxs_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"]) + elif test "x$libxs_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then + LIBXS_CHECK_LANG_FLAG([-xldscope=hidden], + [libxs_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"]) fi AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility) - AS_IF([test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], + AS_IF([test "x$libxs_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) # dnl # Check if SOCK_CLOEXEC is supported # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_SOCK_CLOEXEC], [{ +AC_DEFUN([LIBXS_CHECK_SOCK_CLOEXEC], [{ AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported) AC_TRY_RUN([/* SOCK_CLOEXEC test */ #include @@ -597,17 +597,17 @@ int main (int argc, char *argv []) return (s == -1); } ], - [AC_MSG_RESULT(yes) ; libzmq_cv_sock_cloexec="yes" ; $1], - [AC_MSG_RESULT(no) ; libzmq_cv_sock_cloexec="no" ; $2], - [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"] + [AC_MSG_RESULT(yes) ; libxs_cv_sock_cloexec="yes" ; $1], + [AC_MSG_RESULT(no) ; libxs_cv_sock_cloexec="no" ; $2], + [AC_MSG_RESULT(not during cross-compile) ; libxs_cv_sock_cloexec="no"] ) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # dnl # Checks kqueue polling system # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_POLLER_KQUEUE], [{ +AC_DEFUN([LIBXS_CHECK_POLLER_KQUEUE], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ @@ -620,15 +620,15 @@ struct kevent t_kev; kqueue(); ]] )], - [libzmq_cv_have_poller_kqueue="yes" ; $1], - [libzmq_cv_have_poller_kqueue="no" ; $2]) + [libxs_cv_have_poller_kqueue="yes" ; $1], + [libxs_cv_have_poller_kqueue="no" ; $2]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_POLLER_EPOLL([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_POLLER_EPOLL([action-if-found], [action-if-not-found]) # dnl # Checks epoll polling system # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_POLLER_EPOLL], [{ +AC_DEFUN([LIBXS_CHECK_POLLER_EPOLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ @@ -639,15 +639,15 @@ struct epoll_event t_ev; epoll_create(10); ]] )], - [libzmq_cv_have_poller_epoll="yes" ; $1], - [libzmq_cv_have_poller_epoll="no" ; $2]) + [libxs_cv_have_poller_epoll="yes" ; $1], + [libxs_cv_have_poller_epoll="no" ; $2]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_POLLER_DEVPOLL([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_POLLER_DEVPOLL([action-if-found], [action-if-not-found]) # dnl # Checks devpoll polling system # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_POLLER_DEVPOLL], [{ +AC_DEFUN([LIBXS_CHECK_POLLER_DEVPOLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ @@ -658,15 +658,15 @@ struct pollfd t_devpoll; int fd = open("/dev/poll", O_RDWR); ]] )], - [libzmq_cv_have_poller_devpoll="yes" ; $1], - [libzmq_cv_have_poller_devpoll="no" ; $2]) + [libxs_cv_have_poller_devpoll="yes" ; $1], + [libxs_cv_have_poller_devpoll="no" ; $2]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) # dnl # Checks poll polling system # dnl ################################################################################ -AC_DEFUN([LIBZMQ_CHECK_POLLER_POLL], [{ +AC_DEFUN([LIBXS_CHECK_POLLER_POLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ @@ -677,21 +677,21 @@ struct pollfd t_poll; poll(&t_poll, 1, 1); ]] )], - [libzmq_cv_have_poller_poll="yes" ; $1], - [libzmq_cv_have_poller_poll="no" ; $2]) + [libxs_cv_have_poller_poll="yes" ; $1], + [libxs_cv_have_poller_poll="no" ; $2]) }]) dnl ################################################################################ -dnl # LIBZMQ_CHECK_POLLER_SELECT([action-if-found], [action-if-not-found]) # +dnl # LIBXS_CHECK_POLLER_SELECT([action-if-found], [action-if-not-found]) # dnl # Checks select polling system # dnl ######