diff options
author | Martin Lucina <martin@lucina.net> | 2012-01-23 09:00:29 +0100 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 09:00:29 +0100 |
commit | ba0336b4d129a9e261c95276f89640b3459176bf (patch) | |
tree | a488f7efb61a6950a462815062c3b0f007f40ff5 /acinclude.m4 | |
parent | c3363afa881b46f3df8a6b72ed15cfbac18f4713 (diff) | |
parent | 4016b657973bba87caf75168ba70aaa85d556487 (diff) |
Merge commit 'upstream/2.1.11'
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 bfafc7c..597252d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -580,3 +580,25 @@ AC_DEFUN([LIBZMQ_CHECK_LANG_VISIBILITY], [{ AS_IF([test "x$libzmq_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 # 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"] + ) +}]) |