2 # AX_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found])
7 AC_DEFUN([AX_CHECK_SOCK_CLOEXEC], [
8 AC_CACHE_CHECK([whether SOCK_CLOEXEC is supported], [ax_cv_sock_cloexec], [
13 /* SOCK_CLOEXEC test */
14 #include <sys/types.h>
15 #include <sys/socket.h>
18 int s= socket(PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
21 [ax_cv_sock_cloexec=yes],
22 [ax_cv_sock_cloexec=no])
25 AS_IF([test x"ax_cv_sock_cloexec" = xyes], [AC_MSG_RESULT([yes]) ; $1], AC_MSG_RESULT([no]) ; $2)