1 dnl Copyright (C) 2011 Trond Norbye
2 dnl This file is free software; Trond Norbye
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl ---------------------------------------------------------------------------
6 dnl Macro: SOCKET_SEND_FLAGS
7 dnl ---------------------------------------------------------------------------
9 AC_DEFUN([SOCKET_SEND_FLAGS],
11 AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [
14 CFLAGS="$CFLAGS -I${srcdir}"
16 #include <sys/socket.h>
18 int flags= MSG_NOSIGNAL;
20 [ ac_cv_msg_nosignal=yes ],
21 [ ac_cv_msg_nosignal=no ])
26 AC_CACHE_CHECK([for MSG_DONTWAIT], [ac_cv_msg_dontwait], [
29 CFLAGS="$CFLAGS -I${srcdir}"
31 #include <sys/socket.h>
33 int flags= MSG_DONTWAIT;
35 [ ac_cv_msg_dontwait=yes ],
36 [ ac_cv_msg_dontwait=no ])
41 AC_CACHE_CHECK([for MSG_MORE], [ac_cv_msg_more], [
44 CFLAGS="$CFLAGS -I${srcdir}"
46 #include <sys/socket.h>
50 [ ac_cv_msg_more=yes ],
51 [ ac_cv_msg_more=no ])
56 AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[
57 AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define to 1 if you have a MSG_NOSIGNAL])])
58 AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[
59 AC_DEFINE(HAVE_MSG_DONTWAIT, 1, [Define to 1 if you have a MSG_DONTWAIT])])
60 AS_IF([test "x$ac_cv_msg_more" = "xyes"],[
61 AC_DEFINE(HAVE_MSG_MORE, 1, [Define to 1 if you have a HAVE_MSG_MORE])])
64 dnl ---------------------------------------------------------------------------
65 dnl End Macro: SOCKET_SEND_FLAGS
66 dnl ---------------------------------------------------------------------------