Commit 0f3703a3 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #781 from hashstat/master

Enable building IPC filtering with cmake and another small autoconf fix.
parents 4a4db83e 56b17100
...@@ -40,6 +40,7 @@ include(CheckCXXCompilerFlag) ...@@ -40,6 +40,7 @@ include(CheckCXXCompilerFlag)
include(CheckCSourceCompiles) include(CheckCSourceCompiles)
include(CheckCSourceRuns) include(CheckCSourceRuns)
include(CMakeDependentOption) include(CMakeDependentOption)
include(CheckCXXSymbolExists)
check_include_files(ifaddrs.h ZMQ_HAVE_IFADDRS) check_include_files(ifaddrs.h ZMQ_HAVE_IFADDRS)
check_include_files(windows.h ZMQ_HAVE_WINDOWS) check_include_files(windows.h ZMQ_HAVE_WINDOWS)
...@@ -51,6 +52,9 @@ check_library_exists(ws2 printf "" HAVE_WS2) ...@@ -51,6 +52,9 @@ check_library_exists(ws2 printf "" HAVE_WS2)
check_library_exists(rpcrt4 printf "" HAVE_RPCRT4) # UuidCreateSequential check_library_exists(rpcrt4 printf "" HAVE_RPCRT4) # UuidCreateSequential
check_library_exists(iphlpapi printf "" HAVE_IPHLAPI) # GetAdaptersAddresses check_library_exists(iphlpapi printf "" HAVE_IPHLAPI) # GetAdaptersAddresses
check_cxx_symbol_exists(SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED)
check_cxx_symbol_exists(LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED)
find_library(RT_LIBRARY rt) find_library(RT_LIBRARY rt)
find_package(Threads) find_package(Threads)
...@@ -630,6 +634,7 @@ list(APPEND tests ...@@ -630,6 +634,7 @@ list(APPEND tests
test_abstract_ipc test_abstract_ipc
test_fork test_fork
test_proxy test_proxy
test_filter_ipc
) )
endif() endif()
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
#cmakedefine ZMQ_HAVE_EVENTFD #cmakedefine ZMQ_HAVE_EVENTFD
#cmakedefine ZMQ_HAVE_IFADDRS #cmakedefine ZMQ_HAVE_IFADDRS
#cmakedefine ZMQ_HAVE_SO_PEERCRED
#cmakedefine ZMQ_HAVE_LOCAL_PEERCRED
#cmakedefine ZMQ_HAVE_SOCK_CLOEXEC #cmakedefine ZMQ_HAVE_SOCK_CLOEXEC
#cmakedefine ZMQ_HAVE_SO_KEEPALIVE #cmakedefine ZMQ_HAVE_SO_KEEPALIVE
#cmakedefine ZMQ_HAVE_TCP_KEEPCNT #cmakedefine ZMQ_HAVE_TCP_KEEPCNT
......
...@@ -349,12 +349,12 @@ if test "x$zmq_disable_eventfd" != "xyes"; then ...@@ -349,12 +349,12 @@ if test "x$zmq_disable_eventfd" != "xyes"; then
[AC_DEFINE(ZMQ_HAVE_EVENTFD, 1, [Have eventfd extension.])]) [AC_DEFINE(ZMQ_HAVE_EVENTFD, 1, [Have eventfd extension.])])
fi fi
AC_CHECK_DECLS([SO_PEERCRED], [AC_DEFINE(ZMQ_HAVE_SO_PEERCRED, 1, [Have SO_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_CHECK_DECLS([LOCAL_PEERCRED], [AC_DEFINE(ZMQ_HAVE_LOCAL_PEERCRED, 1, [Have LOCAL_PEERCRED socket option])], [], [#include <sys/socket.h>])
# Use c++ in subsequent tests # Use c++ in subsequent tests
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_CHECK_DECLS([SO_PEERCRED], [AC_DEFINE(ZMQ_HAVE_SO_PEERCRED, 1, [Have SO_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_CHECK_DECLS([LOCAL_PEERCRED], [AC_DEFINE(ZMQ_HAVE_LOCAL_PEERCRED, 1, [Have LOCAL_PEERCRED socket option])], [], [#include <sys/socket.h>])
AC_HEADER_STDBOOL AC_HEADER_STDBOOL
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment