0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

198 Commits

Author SHA1 Message Date
Jeremie Courreges-Anglas
386fa6e013 Problem: unused Debian/kFreeBSD-specific code
Solution: delete it
2018-12-07 20:31:25 +01:00
Luca Boccassi
fbf37bb668 Problem: 4.3.0 is released, need to update ABI/version
Solution: bump to 5.2.1 and 4.3.1 respectively
2018-11-28 20:06:23 +00:00
Luca Boccassi
eff190d503 Problem: ABI is not correct for 4.3.0
Solution: bump it to 5.2.0 as new stable APIs have been added
2018-11-28 20:02:27 +00:00
Luca Boccassi
d411831302 Finalise changelog for 4.3.0 2018-11-28 19:53:33 +00:00
Luca Boccassi
6ec1a6f2af Problem: whitespace issues introduced by last 2 PRs
Solution: fix them
2018-11-28 19:35:04 +00:00
brubakerjeff
cad2423d82 Consolidation of libatomic checks (#3314)
Problem: compiler might not support atomic warning flag

Solution: check before using it
2018-11-27 09:51:31 +00:00
brubakerjeff
d98325160f Android Things 1.06 with Termux changes (#3312)
* include atomic when needed

* update for tipc

* moved check under android

* added license
2018-11-23 19:27:57 +00:00
Luca Boccassi
6253591655 Problem: radix tree never used in autotools builds
Solution: add a switch and a default to autoconf
2018-11-13 13:17:12 +00:00
Luca Boccassi
1402f7727e Problem: no automated way to enforce C++98 compatibility
Solution: if the compiler supports it, pass C++98-compat flags.
Currently Clang supports this flag but GCC does not.

Add a new flag to enable it, as building with C++98-compat but also
with -std=gnu++11 will cause a lot of warnings due to the backward
compat ifdefs.

Add a CI job to run it and ensure we don't break compatibility.
2018-11-09 20:51:20 +00:00
Luca Boccassi
f215e13a71 Problem: compiler flags passed to preprocessor in autoconf
Solution: use CXXFLAGS for compiler flags and CPPFLAGS for preprocessor
flags.
2018-11-09 18:54:08 +00:00
Luca Boccassi
b6f55eac14 Problem: unity build broken with Sun Studio
Solution: define UNITY_WEAK_PRAGMA when building with the Sun compiler
as it does not support the weak attribute.
2018-11-05 10:59:12 +00:00
Luca Boccassi
54295cb342 Problem: passing tests on debian/kfreebsd marked as XFAIL
Solution: use a different system variable for debian/hurd and
debian/kfreebsd so that the tests are skipped only on hurd.
2018-11-04 18:12:55 +00:00
Luca Boccassi
681e53f369 Problem: libstdc++ symbols exported on Debian/[Hurd|kFreeBSD]
Solution: use the --version-script map on those systems as well, as it
is supported
2018-06-23 17:16:10 +01:00
KIU Shueng Chuan
2336e1f170 Problem: not able to use wepoll in configure script
Solution: add wepoll as a polling system
2018-06-03 11:55:26 +08:00
Luca Boccassi
06eaf20571 Problem: autoconf checks tautological compiler flag only for C++
Solution: check for C as well and set the flags separately
2018-05-30 21:21:59 +01:00
Luca Boccassi
58d13395ec Problem: clang 6 warns about comparisons on 64 bit
Solution: ignore tautological-constant-compare warnings, as they
might be useless on 64 bit but they are not on 32 bit where sizeof
size_t != sizeof uint64_t
2018-05-28 14:06:41 +01:00
Simon Giesecke
b6d36c92a2 Problem: autotools build broken
Solution: fix directory reference
2018-05-24 09:09:39 +02:00
Luca Boccassi
7ba074fa28 Problem: Sun Studio build errors
Solution: add compiler flags to support extensions like anonymous
structs in unions, fix casting of const, and check for suncc rather
than solaris
2018-05-13 18:24:50 +01:00
Asaf Kahlon
ce2f87970d configure.ac: serach for dladdr only on libunwind
The original configure.ac tries to check for dladdr, but it actually needs
it only in case we have libunwind (which has a another section and checks for it
too).
This can fail the build on systems without dynamic linking support.
Therefore, the dladdr check has to be preformed only when checking libunwind.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2018-04-14 22:29:49 +03:00
Luca Boccassi
6f26a33359 Problem: 4.2.5 is out, we need to restore API changes and 4.3.x
Solution: revert the revert!

Revert "Problem: regression in 4.2.3 went unnoticed, want to release 4.2.5"

This reverts commit 5f17e26fa4c60c3de0282d1b6ad1e8b7037ed57a.
2018-03-23 19:31:42 +00:00
Luca Boccassi
5f17e26fa4 Problem: regression in 4.2.3 went unnoticed, want to release 4.2.5
Solution: revert DRAFT -> STABLE API transition so that we can do a
bugfix-only 4.2.5 release.
Will be re-reverted once tagged.

Revert "Problem: ZMQ_BINDTODEVICE has met STABLE conditions"

This reverts commit 3cb79f5042cf32cdb7b1b58d4acf17eba85ec9f7.

Revert "Problem: ZMQ_MSG_GSSAPI_* have met STABLE conditions"

This reverts commit 374da4207b8034b0fcd67a2cc2165d50e09b9387.

Revert "Problem: ZMQ_MSG_T_SIZE has met STABLE conditions"

This reverts commit 6411c4a247c08ead50919d16b30eb030eaf44a7e.

Revert "Problem: docs say STABLE API still in DRAFT"

This reverts commit 9f2f30b7ffa09acc51d3b87251a47e83b435d5d4.
2018-03-23 11:22:10 +00:00
Luca Boccassi
6411c4a247 Problem: ZMQ_MSG_T_SIZE has met STABLE conditions
Solution: move it from DRAFT to STABLE since it's been in a public
release, committed for 6+ months and has not changed.
Given a new STABLE symbol has been added, bump minor version number.
2018-03-21 16:45:41 +00:00
Luca Boccassi
f0378bfbf7 Problem: 4.2.4 is out, version is out of date
Solution: bump to 4.2.5
2018-03-21 16:03:49 +00:00
Luca Boccassi
19060345e4 Problem: TIPC availability check is too strict (#2977)
* Problem: TIPC availability check is too strict

Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.

* Problem: no Travis tests for TIPC

Solution: mark one job with sudo: required and load the kernel module

* Problem: CMake fails when test returns 77 (skip)

Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
Luca Boccassi
1478fd0022 Problem: unittests not built with autotools
Solution: add them to Makefile.am, linking to the static libzmq.a
library and its dependencies
2018-02-11 17:33:13 +00:00
Luca Boccassi
d832267e23 Problem: make format-check not implemented with autotools
Solution: port implementation from zproject
2018-02-10 17:35:12 +00:00
Luca Boccassi
65a1e458ab Problem: 4.2.3 is out, version(s) are out of date
Solution: bump changelog, ABI revision, library and packaging version
2017-12-13 14:12:15 +00:00
Luca Boccassi
08289d8f33 Problem: cannot disable Werror with autoconf
Solution: add --disable-Werror flag like the existing
--disable-pedantic or CMake's -DLIBZMQ_WERROR=OFF
Fixes #2818
2017-11-20 15:55:35 +00:00
Luca Boccassi
ac552ba448 Problem: accept4 not available on all platforms
Solution: check for availability in CMake and autoconf before using it
2017-11-18 11:33:53 +00:00
Jerome Duval
23f89f4671 add Haiku support
* link against libnetwork.so for network functions.
2017-11-09 12:22:25 +01:00
youRFate
6df5e771bb added libiphlpapi to PKGCFG_LIBS_PRIVATE for static mingw builds 2017-10-17 14:30:09 +02:00
Luca Boccassi
78cdff3a3e Problem: autoconf does not use pkgconfig for NORM
Solution: use the pkgconfig macro as the first step and then fallback
to manual checks
2017-10-16 23:23:32 +01:00
f18m
bfbb4ff2e9 Background threads enhancements (#2778)
* Background thread scheduling 

- add ZMQ_THREAD_AFFINITY ctx option; set all thread scheduling options
from the context of the secondary thread instead of using the main
process thread context!
- change ZMQ_THREAD_PRIORITY to support setting NICE of the background
thread when using SCHED_OTHER
2017-10-16 12:29:03 +01:00
Luca Boccassi
b7346f8e00 Problem: gssapi search in autoconf does not use pkgconfig
Solution: use it before falling back to headers checks
2017-08-18 16:24:53 +01:00
Simon Giesecke
d5e4319edc [WIP, do not merge] Problem: insufficient tests for ZMTP-CURVE protocol errors (#2680)
* Extracted connect_vanilla_socket function

* Problem: no tests for ZMTP-CURVE protocol errors

Solution: added two test cases with erroneous HELLO commands

* Problem: insufficient tests for ZMTP-CURVE protocol errors

Solution: added two test cases with erroneous HELLO command version

* Problem: test HELLO message is invalid apart from deliberate errors

Solution: create cryptographically correct HELLO message
add tweetnacl.c to test_security_curve

* Problem: nonce is incorrect, build fails with GCC

Solution: use correct non prefix

* Problem: make builds are failing

Solution: transfer CMake changes to (auto)make files

* Problem: nonce is incorrect, build fails with GCC

Solution: use correct non prefix

* Problem: make builds are failing

Solution: transfer CMake changes to (auto)make files

* Problem: no test with INITIATE command with invalid length

Solution: added test case

* Problem: code duplication between test_security_curve.cpp and curve_client.cpp

Solution: extracted parts of zmq::curve_client_t::produce_hello into reusable function

* Problem: code duplication between test_security_curve.cpp and curve_client.cpp

Solution: extracted further parts of zmq::curve_client_t into reusable functions
added missing file

* Problem: mechanism_t::add_property can be declared static

Solution: declare mechanism_t::add_property static

* Problem: intermediate crypto data needs to be passed between static function calls to curve_client_tools_t

Solution: add non-static member functions

* Problem: msg_t instance may be closed twice

Solution: remove offending close

* Problem: prepare_hello uses static curve_client_tools_t::produce_hello

Solution: Use non-static curve_client_tools_t::produce_hello

* Problem: no test with invalid command name where INITIATE command is expected

Solution: added test case

* Problem: make builds are failing due to curve_client_tools.hpp not being found

Solution: add curve_client_tools.hpp to list of source files

* Problem: wrong initializer order in zmq::curve_client_t

Solution: reorder

* Problem: under non-Windows systems, test fails because random_open was not called

Solution: call random_open/random_close within test

* Problem: conflict between custom function htonll and macro definition on Darwin

Solution: define htonll function only if not defined as a macro

* Problem: nullptr not defined on all platforms

Solution: replace nullptr by NULL

* Problem: libsodium builds not working

Solution: adapt compile and link file sets for libsodium builds

* Problem: Makefile.am broken

Solution: Fix syntax

* Problem: no tests for garbage encrypted cookie or content in INITIATE

Solution: added test cases

* Problem: test cases accidentally excluded from build

Solution: remove #if/#endif

* Solution: some error cases are unreachable

Problem: for the time being, added some comments without changing the code

* Added comments on hard-to-test cases
2017-08-15 15:28:24 +01:00
Brian Russell
b963542e8f Add socket option BINDTODEVICE
Linux now supports Virtual Routing and Forwarding (VRF) as per:

https://www.kernel.org/doc/Documentation/networking/vrf.txt

In order for an application to bind or connect to a socket with an
address in a VRF, they need to first bind the socket to the VRF device:

    setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);

Note "dev" is the VRF device, eg. VRF "blue", rather than an interface
enslaved to the VRF.

Add a new socket option, ZMQ_BINDTODEVICE, to bind a socket to a device.
In general, if a socket is bound to a device, eg. an interface, only
packets received from that particular device are processed by the socket.

If device is a VRF device, then subsequent binds/connects to that socket
use addresses in the VRF routing table.
2017-07-31 15:31:47 +01:00
Luca Boccassi
fbb6bbdcb8 Problem: reading from /dev/urandom is clunky
Solution: if available use the getrandom function as it doesn't
require any synchronization, state or cleanup
2017-07-28 11:28:19 +01:00
Luca Boccassi
2626fdfa23 Problem: tweetnacl leaks file descriptor on fork+exec
Solution: open with O_CLOEXEC if available or set FD_CLOEXEC if not
2017-07-28 11:27:55 +01:00
Sergei Trofimovich
88487e7da3 configure.ac: allow user to disable libunwind discovery via --disable-libunwind
on ia64 architecture libunwind comes with gcc. Unfortunately
libunwind is not directly usable as-is and fails at link time:

```
    ia64-unknown-linux-gnu-g++ -o perf/.libs/local_lat perf/local_lat.o src/.libs/libzmq.so -lsodium -lrt -lpthread -ldl
    src/.libs/libzmq.so: undefined reference to `_ULia64_step'
```

The change adds --{enable,disable}-libunwind flag to control
automatic dependency. The default is unchanged: use if available.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-07-14 21:44:30 +01:00
Luca Boccassi
11e2e5f6b5 Problem: address sanitizer support in CI is hacky
Solution: import better solution from zproject and add a new autoconf
option
2017-05-01 22:57:05 +01:00
Jim Garlick
edd6b0ad01 gssapi: add a basic test for GSSAPI security
Problem: there is no test coverage for GSSAPI.

Solution: add a test structured like the CURVE test.

The test is not built if libzmq is not configured with
--with-libgssapi_krb5. It will report SKIPPED status
if the required environment is missing (see below).

Environment:  KRB5_KTNAME and KRB5_CLIENT_KTNAME
environment variables must point to a keytab file
containing creds for a host-based test principal
(see comment at top of source for details).
Kerberos must be configured and a KDC containing the
test principal must be running, otherwise the test
will fail/hang.

N.B. For now, the test must use the same principal for
both client and server roles because it seems impossible
to set them to different principals when they are
threads in the same process.  Once one principal is
cached in credential cache, attempts to acquire creds
for a different "desired name" seem to be ignored and
the cached principal is used instead.
2017-04-26 09:31:21 -07:00
Jim Garlick
43f4c28660 gssapi: define HAVE_LIBGSSAPI_KRB5 in configure.ac
Problem: configure.ac is not setting HAVE_LIBGSSAPI_KRB5
in src/platform.hpp when --with-libgssapi_krb5 is specified

Commit 09e868b74379f9c4b0e3a487b246a41d44606d96
switched the libgssapi_krb5 check from AC_CHECK_LIB
to AC_SEARCH_LIBS, but neglected to add an AC_DEFINE
for HAVE_LIBGSSAPI_KRB5, thus the GSSAPI code is
never compiled.

Solution: Add missing AC_DEFINE of HAVE_LIBGSSAPI_KRB5.
2017-04-20 09:41:27 -07:00
chuggafan
7913e96271 I have added msys building, license stuff (#2387)
(msys building is buggy, please be aware, it fails to compile on my
machine) also I modified the buildall.bat/buildbase.bat to use correct
MSVC versions instead of "visual studio 2017"
2017-03-19 22:38:43 +00:00
Luca Boccassi
3ab4796c5a Problem: ZMQ background threads are unnamed
Solution: use pthread API to set the name. For now call every thread
"ZMQ b/g thread". Would be nice to number the I/O threads and name
explicitly the reaper thread, but in reality a bit of internal API
churn would be necessary, so perhaps it's not worth it.
This is useful when debugging a process with many threads.
2017-03-12 00:46:15 +00:00
Luca Boccassi
ac5c75cea1 Problem: 4.2.2 is out, version(s) are out of date
Solution: bump changelog, ABI revision, library and packaging version
2017-02-18 17:56:55 +00:00
Luca Boccassi
7c0ded93af Problem: 4.2.1 is out, time to bump versions
Solution: add new changelog entry, bump library version in zmq.h and
bump ABI version in configure.ac and CMakeLists.txt
2016-12-31 16:26:41 +01:00
Luca Boccassi
7005f22726 Bugfix release 4.2.1
Finalize changelog and bump ABI revision
2016-12-31 15:55:48 +01:00
Luca Boccassi
f287c7a2aa Problem: eventfd leaks socket on fork+exec
Solution: if available, use eventfd with EFD_CLOEXEC flag to make
the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Luca Boccassi
1b3fcbd3ee Problem: linker fails looking for dladdr
Solution: search and add it via AC_CHECK_LIB when building with
libunwind, as the backtrace function uses dladdr. This problem
only appears on some distributions and with some compiler/toolchain
versions.
2016-11-10 23:10:01 +00:00
Michal Vyskocil
cab901c0a6 Problem: linking fails on glibc 2.24 with dladdr missing
Solution: try to find dladdr function on Linux - glibc systems provides
dlopen/dladdr in libdl and not in libc itseld.
2016-11-06 11:18:55 +01:00
Luca Boccassi
6585aeaba2 Merge pull request #2195 from vyskocilm/master
Problem: curve_keygen not build unless --enable-curve is passed
2016-11-05 17:13:00 +01:00
Michal Vyskocil
213a7efe86 Problem: curve_keygen not build unless --enable-curve is passed
Solution: test ENABLE_CURVE_KEYGEN and enable it only if
zmq_enable_curve_keygen=yes nad enable_curve=yes. Additionally set
enable_curve=yes for libsodium and tweetnacl, so it is enabled
implicitly and fixes the problem.
2016-11-05 10:51:10 +01:00
Luca Boccassi
6da8385b2a Problem: new public symbols added
Solution: bump ABI version fromo 5:0:0 to 6:0:1 since 4.2 is backward
compatible with 4.1, but new symbols are there
2016-11-01 13:18:21 +00:00
Luca Boccassi
06d810b4c9 Problem: pkg-config Requires.private is broken
Solution: use only Libs.private to avoid breaking application builds.
Even though Requires.private are supposed to be parsed only if
pkg-config is called with --static, the --cflags parameter is enough
to trigger the parsing, causing build failures for applications that
do not (and should not) depend on libzmq's dependencies.
2016-09-27 23:34:35 +01:00
Luca Boccassi
6d9411607d Problem: pkgconfig file does not support static link
Solution: add dependencies, if necessary, to the .private Libs and
Requires field of the pkgconfig file at build time.
This way pkg-config --static --libs libzmq will correctly print
dependencies if they were used to build the static libzmq.a library.
2016-09-27 18:39:07 +01:00
Luca Boccassi
0372e5ce22 Problem: spec file needs version before build on OBS
Solution: stop autogenerating it and hard code version so that the
OBS build service can extract it and use it to build packages
automatically
2016-07-31 17:10:33 +01:00
camachat
5e684172d6 Fix build with NORM enabled on FreeBSD. (#2066) 2016-07-27 19:42:35 +01:00
Sam Lishak
d49e43bbc8 Problem: FD_SETSIZE not set to 16k for all build definitions
Solution: Set FD_SETSIZE to 16k for all other build definitions.
2016-06-13 09:42:54 +01:00
Waldemar Brodkorb
492a035706 allow to build sparc (v8,leon)
Only set sparcv9 optimization for sparc64 systems.
This allows to run for example application using zeromq
on sparc32 systems.

Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-06-04 13:40:14 +02:00
David Millard
9e6745c12e Fix autotools for static MinGW builds 2016-05-10 13:53:53 -07:00
hitstergtd
8fc985a9b0 Problem: style/typo issue
Solution:
Fix it.
2016-05-09 14:24:12 +01:00
Luca Boccassi
bb5037e855 Problem: leftover commented out line in configure
Solution: clean up and remove it
2016-05-06 21:34:43 +01:00
Luca Boccassi
8045e9ae24 Problem: no backtrace is printed on assert
Solution: add an optional dependency on libunwind, and if present
use it to print the backtrace when zmq_abort is called.
2016-05-06 21:34:25 +01:00
Luca Boccassi
064cd1fbfb Problem: no support for DRAFT API in build systems
Solution: add support for --enable-drafts/ENABLE_DRAFTS=ON in
Autools and CMake.
2016-05-02 21:47:05 +01:00
Luca Boccassi
b1232a0fd8 Problem: Solaris build fails with libsodium
Solution: disable pedantic and Werror, as libsodium headers use
pragma diagnostic which are not available in gcc 3.4.
2016-04-13 00:32:19 +01:00
Luca Boccassi
abe44500de Problem: tweetnacl does not build on Solaris 10
Solution: add Wnosign-compare to CPPFLAGS. GCC version is too old on
Solaris 10 to use pragma diagnostic (min 4.2 needed, but 3.4 is
available)
2016-04-13 00:31:58 +01:00
Luca Boccassi
f18463f323 Problem: mkdtemp not available on all platforms
Solution: check for availability in autoconf and cmake, and if not
available fall back to random file name rather than random directory.
2016-04-11 00:18:51 +01:00
Pieter Hintjens
6a78b3ec19 Problem: HAVE_LIBSODIUM macro is inconsistent
Solution: use ZMQ_USE_LIBSODIUM to match ZMQ_USE_TWEETNACL
2016-03-30 14:19:20 +02:00
Luca Boccassi
2b2f9046d4 Problem: no Makefile target for Valgrind
Solution: import ax_valgrind_check.m4 macro file to provide a
conveniente automake hook to run Valgrind on all tests.
Add --enable-valgrind to ./configure call and then run make
check-valgrind to run memcheck, helgrind, drd and sgcheck on all
tests. Run check-valgrind-memcheck to run only memcheck.
2016-03-19 21:54:29 +00:00
Luca Boccassi
6df753c55a Problem: no code coverage integration
Solution: import ax_code_coverage.m4 from autoconf-archive and use it
in configure.ac and Makefile.am in order to provide a make
check-code-coverage target behind a --enable-code-coverage configure
flag, that can be used to generate a gcov/lcov code coverage report.
Depends on having gcov and lcov installed.
2016-03-13 19:28:23 +00:00
Luca Boccassi
693d6384b6 Merge pull request #1837 from obache/neatsrc/fix-test-portability
Problem: Fix unportable `==` operator for `test`
2016-03-04 09:41:15 +00:00
OBATA Akio
55dad06cce Problem: Fix unportable == operator for test 2016-03-04 17:17:04 +09:00
OBATA Akio
09e868b743 Problem: Fix build with Heimdal krb5
Solution:
* Check gssapi/gssapi_generic.h header file, it is not in Heimdal.
* Check libgssapi too, libgssapi_krb5 is not separated in Heimdal.
2016-03-04 16:38:57 +09:00
Jim Garlick
54389fefb5 Problem: AS_HELP_STRING improperly quoted
Brackets around defaults in configure --help strings for
--with-libsodium and --disable-curve were not displayed.

Solution:  Add m4 quotes.
2016-03-02 12:11:08 -08:00
Jim Garlick
9d75a9c27d Problem: AM_CONDITIONAL is used incorrectly
Move AM_CONDITIONAL for --disable-curve outside of shell
conditional (per sec 20.1 of automake manual) and fix its
second argument to be a test rather than a literal zero.
2016-03-02 11:28:42 -08:00
Luca Boccassi
7dfbab3f97 Problem: it's 2016 and we are building with C++98
Solution: bump to C++11 and C11 in autoconf
2016-02-19 21:49:38 +00:00
Luca Boccassi
b9f1e3ed61 Problem: writing autoconf macros is boring
Solution: import macros to check for compiler options from
autoconf-archive into the m4 subdir.
2016-02-19 21:41:24 +00:00
Pieter Hintjens
94c7087e36 Problem: piece of garbage ended up in configure.ac
Solution: remove it
2016-02-17 12:40:44 +01:00
Pieter Hintjens
7129187f87 Problem: getting various warnings in tweetnacl
libzmq used to switch off pedantic checks when using tweetnacl. As
this is now the default, that means pedantic checks are always off.
This is not good.

Solution: in tweetnacl.c alone, use a GCC pragma to disable sign
comparison warnings. We could also clean the code up yet this is
simpler. In other code, we still want those warnings, hence I've
used a pragma rather than global compile option.

Second, use -Wno-long-long all the time, as this warning does not
work with a pragma.

I removed code that set -wno-long-long, for MinGW and Solaris.

Related problem 2: --with-relaxed is badly named

This option switches off pedantic checks, so should be called
--disable-pedantic. 'with' is for optional packages.
2016-02-17 12:06:45 +01:00
Luca Boccassi
f777ad8b91 Problem: typo in configure.ac, can't use libsodium
Solution: set the curve_library variable to the expected value if
libsodium is selected
2016-02-11 20:30:07 +00:00
Pieter Hintjens
f8ed793f76 Problem: tweetnacl sources are a mess
- they have no copyright / license statement
- they are in some randomish directory structure
- they are a mix of postable and non-portable files
- they do not conform to conditional compile environment

Overall, it makes it rather more work than needed, in build scripts.

Solution: clean up tweetnacl sauce.

- merged code into single tweetnacl.c and .h
- standard copyright header, DJB to AUTHORS
- moved into src/ along with all other source files
- all system and conditional compilation hidden in these files
- thus, they can be compiled and packaged in all cases
- ZMQ_USE_TWEETNACL is set when we're using built-in tweetnacl
- HAVE_LIBSODIUM is set when we're using external libsodium
2016-02-11 18:06:07 +01:00
Pieter Hintjens
e65367ea2d Problem: some configure options are confusing
It's especially annoying to see this:

  --enable-perf           Build performance measurement tools [default=yes].
  --disable-eventfd       disable eventfd [default=no]
  --enable-curve-keygen   Build curve key-generation tool [default=yes].

Solution: all options should explain the non-default case. Also
the language should be enable/disable, with/without, rather than
yes/no. E.g. '--without-docs'.
2016-02-11 16:52:41 +01:00
Pieter Hintjens
9f8ced3f65 Problem: autotools platform.hpp is not compatible with CMake
Specifically, the poller detection code does not set macros in
platform.hpp. The configure script passed them as -D on the command
line.

Solution: rewrite the poller detection code.
2016-02-11 16:14:12 +01:00
Pieter Hintjens
b49a60410a Problem: use of libsodium vs. tweetnacl is confused
It's unclear which we need and in the source code, conditional code
treats tweetnacl as a subclass of libsodium, which is inaccurate.

Solution: redesign the configure/cmake API for this:

* tweetnacl is present by default and cannot be enabled
* libsodium can be enabled using --with-libsodium, which replaces
  the built-in tweetnacl
* CURVE encryption can be disabled entirely using --enable-curve=no

The macros we define in platform.hpp are:

    ZMQ_HAVE_CURVE    1        //  When CURVE is enabled
    HAVE_LIBSODIUM    1        //  When we are using libsodium
    HAVE_TWEETNACL    1        //  When we're using tweetnacl (default)

As of this patch, the default build of libzmq always has CURVE
security, and always uses tweetnacl.
2016-02-11 13:32:01 +01:00
Luca Boccassi
6681bcf08c Problem: tweetnacl/contrib/randombytes need C++0x
Solution: disable -pedantic when building with tweetnacl to avoid
warning about "long long" not existing in ISO C++ 98
2016-02-08 12:31:05 +00:00
Min RK
e86650794f fallback on tweetnacl if libsodium is not found and not explicitly requested 2016-02-08 11:58:30 +01:00
Min RK
2902fd60b9 add --with-tweetnacl to configure
allows building with tweetnacl without cmake
2016-02-08 11:40:50 +01:00
Michael
0463926db8 change references from mingw32 to mingw
conformity update for mingw32 variables to mingw
2016-02-03 23:51:52 +11:00
Laszlo Boszormenyi (GCS)
be387d5e56 Last bits of Hurd support 2016-01-20 07:18:22 +01:00
Laszlo Boszormenyi (GCS)
be5ab6d5c9 GNU/Hurd support 2016-01-16 02:26:20 +01:00
Pieter Hintjens
055995e535 Problem: builds directory contains packaging scripts
Specifically, the RedHat tools.

Solution: move this into packaging/
2016-01-15 10:25:38 +01:00
Ilya Kulakov
141de87085 Fix a typo in reference to with_norm_ext. 2015-12-09 15:45:15 +06:00
Luca Boccassi
64ce6ca772 Problem: build fails, vmci enabled by default
Solution: disable vmci by default
Fixes issue #1655
2015-12-08 17:58:31 +00:00
Ilya Kulakov
68b13fbddb Add the VMCI transport.
VMCI transport allows fast communication between the Host
and a virtual machine, between virtual machines on the same host,
and within a virtual machine (like IPC).

It requires VMware to be installed on the host and Guest Additions
to be installed on a guest.
2015-12-08 13:16:09 +06:00
Jeroen Ooms
9114d39577 enable static libraries on mingw 2015-10-20 13:10:38 +02:00
Anthony Scemama
aefc5d120b Default behavior is --with-libsodium=yes 2015-10-07 22:18:08 +02:00
Anthony Scemama
73a0eed75d Fixes issue #1556 2015-10-07 21:45:49 +02:00
Markus Pfeiffer
ee984b1fe6 Make DragonFly a first class citizen in terms of compilation 2015-09-03 09:00:12 +01:00
Pieter Hintjens
5d5cdac161 Problem: source packages lack makefiles for all systems except msvc
Solution: specify the necessary EXTRA_DIST

I added a Makefile.am in builds that covers all systems except msvc,
which already has a Makefile.am that does this.

Fixes #1505
2015-08-11 19:34:25 +02:00
Pieter Hintjens
6f1d1142d1 Problem: 4.1 broke the ABI yet did not bump ABI number
Solution: bump to ABI version 5
2015-06-11 23:53:23 +02:00