mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
Merge pull request #1809 from hintjens/master
Number of fixes for gyp builds
This commit is contained in:
commit
7200f473ad
7
.gitignore
vendored
7
.gitignore
vendored
@ -22,9 +22,11 @@ autom4te.cache
|
||||
*.html
|
||||
*.pdf
|
||||
*.ps
|
||||
.*
|
||||
*~
|
||||
.*~
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
curve_keygen
|
||||
test_heartbeats
|
||||
test_msg_ffn
|
||||
@ -170,6 +172,3 @@ zeromq-*.zip
|
||||
core
|
||||
build
|
||||
test-suite.log
|
||||
project.Makefile
|
||||
libzmq.target.mk
|
||||
out/
|
||||
|
@ -368,8 +368,8 @@ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
# platform specifics
|
||||
|
||||
if (WIN32)
|
||||
# Socket limit is 4K (can be raised arbitrarily)
|
||||
add_definitions (-DFD_SETSIZE=4096)
|
||||
# Socket limit is 16K (can be raised arbitrarily)
|
||||
add_definitions (-DFD_SETSIZE=16384)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif ()
|
||||
|
||||
|
5
builds/gyp/.gitignore
vendored
Normal file
5
builds/gyp/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
project.Makefile
|
||||
*.mk
|
||||
out/
|
||||
Makefile
|
||||
|
@ -33,6 +33,11 @@
|
||||
// This file provides the configuration for Linux, Windows, and OS/X
|
||||
// as determined by ZMQ_HAVE_XXX macros passed from project.gyp
|
||||
|
||||
// Check that we're being called from our gyp makefile
|
||||
#ifndef ZMQ_GYP_BUILD
|
||||
# error "foreign platform.hpp detected, please re-configure"
|
||||
#endif
|
||||
|
||||
// Set for all platforms
|
||||
#define ZMQ_HAVE_CURVE 1
|
||||
#define ZMQ_USE_TWEETNACL 1
|
||||
|
@ -5,7 +5,6 @@
|
||||
#
|
||||
# gyp --depth=. --format=make
|
||||
# make
|
||||
#
|
||||
{
|
||||
'includes': [
|
||||
'project-tests.gypi',
|
||||
@ -16,13 +15,18 @@
|
||||
'.'
|
||||
],
|
||||
'defines': [
|
||||
'ZMQ_CUSTOM_PLATFORM_HPP'
|
||||
'_REENTRANT',
|
||||
'_THREAD_SAFE',
|
||||
'ZMQ_CUSTOM_PLATFORM_HPP',
|
||||
'ZMQ_GYP_BUILD'
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="win"', {
|
||||
'defines': [
|
||||
'ZMQ_HAVE_WINDOWS=1',
|
||||
'ZMQ_STATIC'
|
||||
'ZMQ_HAVE_WINDOWS',
|
||||
'ZMQ_STATIC',
|
||||
'FD_SETSIZE=16384',
|
||||
'_CRT_SECURE_NO_WARNINGS'
|
||||
],
|
||||
'libraries': [
|
||||
'ws2_32',
|
||||
@ -32,12 +36,18 @@
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
'defines': [
|
||||
'ZMQ_HAVE_OSX=1'
|
||||
]
|
||||
'ZMQ_HAVE_OSX'
|
||||
],
|
||||
'xcode_settings': {
|
||||
'GCC_ENABLE_CPP_RTTI': 'YES'
|
||||
}
|
||||
}],
|
||||
[ 'OS=="linux"', {
|
||||
'defines': [
|
||||
'ZMQ_HAVE_LINUX=1'
|
||||
'ZMQ_HAVE_LINUX'
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-fno-rtti'
|
||||
],
|
||||
'libraries': [
|
||||
'-lpthread'
|
||||
@ -263,6 +273,14 @@
|
||||
'../../src/yqueue.hpp',
|
||||
'../../src/zmq.cpp',
|
||||
'../../src/zmq_utils.cpp'
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '../../src',
|
||||
'files': [
|
||||
'platform.hpp'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
24
configure.ac
24
configure.ac
@ -101,17 +101,9 @@ AC_RUN_IFELSE(
|
||||
|
||||
AC_MSG_RESULT([$libzmq_tipc_support])
|
||||
|
||||
AC_ARG_WITH([relaxed],
|
||||
[AS_HELP_STRING([--with-relaxed],
|
||||
[switch off pedantic compiler])],
|
||||
[zmq_relaxed="yes"],
|
||||
[])
|
||||
|
||||
if test "x$zmq_relaxed" = "xyes"; then
|
||||
libzmq_pedantic="no"
|
||||
else
|
||||
libzmq_pedantic="yes"
|
||||
fi
|
||||
AC_ARG_ENABLE([pedantic],
|
||||
[AS_HELP_STRING([--disable-pedantic], [disable pedantic compiler checks [default=enabled]])],
|
||||
[libzmq_pedantic=$enableval], [libzmq_pedantic=yes])
|
||||
|
||||
AC_ARG_WITH([militant],
|
||||
[AS_HELP_STRING([--with-militant],
|
||||
@ -137,8 +129,8 @@ libzmq_on_android="no"
|
||||
libzmq_on_linux="no"
|
||||
libzmq_on_gnu="no"
|
||||
|
||||
# Set some default features required by 0MQ code.
|
||||
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
|
||||
# Set some default features required by ZeroMQ code
|
||||
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -Wno-long-long $CPPFLAGS"
|
||||
|
||||
# For host type checks
|
||||
AC_CANONICAL_HOST
|
||||
@ -255,10 +247,6 @@ case "${host_os}" in
|
||||
[AC_MSG_ERROR([cannot link with rpcrt4.dll.])])
|
||||
AC_CHECK_LIB(iphlpapi, main, ,
|
||||
[AC_MSG_ERROR([cannot link with iphlpapi.dll.])])
|
||||
# mingw defines __int64_t as long long
|
||||
AC_LANG_PUSH([C++])
|
||||
LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long])
|
||||
AC_LANG_POP([C++])
|
||||
libzmq_on_mingw="yes"
|
||||
libzmq_dso_visibility="no"
|
||||
|
||||
@ -450,7 +438,6 @@ elif test "x$with_libsodium" == "xyes"; then
|
||||
case "${host_os}" in
|
||||
*solaris*)
|
||||
LDFLAGS="-lssp $LDFLAGS"
|
||||
CPPFLAGS="-Wno-long-long $CPPFLAGS"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@ -458,7 +445,6 @@ else
|
||||
AC_DEFINE(ZMQ_HAVE_CURVE, [1], [Using curve encryption])
|
||||
AC_DEFINE(ZMQ_USE_TWEETNACL, [1], [Using tweetnacl for curve encryption])
|
||||
curve_library="tweetnacl"
|
||||
libzmq_pedantic="no" # Disable pedantic warnings
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_LIBSODIUM, test "$curve_library" == "libsodium")
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "platform.hpp"
|
||||
#if defined (ZMQ_USE_TWEETNACL)
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
|
||||
#include "tweetnacl.h"
|
||||
|
||||
#define FOR(i,n) for (i = 0;i < n;++i)
|
||||
|
@ -31,6 +31,7 @@
|
||||
#define TWEETNACL_H
|
||||
|
||||
#include "platform.hpp"
|
||||
|
||||
#if defined (ZMQ_USE_TWEETNACL)
|
||||
|
||||
#define crypto_box_SECRETKEYBYTES 32
|
||||
|
Loading…
Reference in New Issue
Block a user