--- rxvt-unicode/autoconf/configure.in 2005/10/25 20:16:41 1.55 +++ rxvt-unicode/autoconf/configure.in 2005/12/23 14:46:34 1.56 @@ -1118,6 +1118,39 @@ AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) fi +AC_CACHE_CHECK(for unix-compliant filehandle passing ability, rxvt_can_pass_fds, +[AC_TRY_LINK([ +#include +#include +],[ +{ + msghdr msg; + iovec iov; + char buf [100]; + char data = 0; + + iov.iov_base = &data; + iov.iov_len = 1; + + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = buf; + msg.msg_controllen = sizeof buf; + + cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = 100; + + *(int *)CMSG_DATA (cmsg) = 5; + + return sendmsg (3, &msg, 0); +} +],[rxvt_can_pass_fds=yes],[rxvt_can_pass_fds=no])]) +if test x$rxvt_can_pass_fds = xyes; then + AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) +fi + AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, [AC_COMPILE_IFELSE([ #include