diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-10-27 10:37:31 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-10-27 10:37:31 +0200 |
commit | a70bea01cc9c81a59d0b7067e8854fc9777f5757 (patch) | |
tree | b32ae6f9fcda0e7ae508995949b6882f55aed718 /acinclude.m4 | |
parent | 81da391e7e6ee12a2607289a1aae16c400e7025e (diff) | |
parent | b3cda2ad6091096264f777a95907050edfdd3ffe (diff) |
Merge branch 'master' of github.com:zeromq/libzmq
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 7e96921..537be18 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -582,6 +582,28 @@ AC_DEFUN([LIBZMQ_CHECK_LANG_VISIBILITY], [{ }]) dnl ################################################################################ +dnl # LIBZMQ_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_MSG_CHECKING(whether SOCK_CLOEXEC is supported) + AC_TRY_RUN([/* SOCK_CLOEXEC test */ +#include <sys/types.h> +#include <sys/socket.h> + +int main (int argc, char *argv []) +{ + int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); + 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"] + ) +}]) + +dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # dnl # Checks kqueue polling system # dnl ################################################################################ |