X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fsocket_send_flags.m4;h=7b739928bc65f0308f49132836c2c4b49a690102;hb=1899ec2a3d1f4f180b0109879a966fd6603ece86;hp=8b569eef50f903817816d725da989fd52cd299ef;hpb=2ec5c18ff3cf16293ba0f53f91ad0f3a9d800b91;p=awesomized%2Flibmemcached diff --git a/m4/socket_send_flags.m4 b/m4/socket_send_flags.m4 index 8b569eef..7b739928 100644 --- a/m4/socket_send_flags.m4 +++ b/m4/socket_send_flags.m4 @@ -1,46 +1,47 @@ -dnl Copyright (C) 2012 Data Differential LLC -dnl Copyright (C) 2011 Trond Norbye -dnl This file is free software; Trond Norbye -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl --------------------------------------------------------------------------- -dnl Macro: SOCKET_SEND_FLAGS -dnl --------------------------------------------------------------------------- +# Copyright (C) 2012-2013 Data Differential LLC +# Copyright (C) 2011 Trond Norbye +# This file is free software; Trond Norbye and Data Differential +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# --------------------------------------------------------------------------- +# Macro: SOCKET_SEND_FLAGS +# --------------------------------------------------------------------------- +# + +#serial 2 AC_DEFUN([SOCKET_SEND_FLAGS], -[ - AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [ - AC_LANG_PUSH([C]) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -I${srcdir}" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_NOSIGNAL ])], [ac_cv_msg_nosignal="yes"]) - AC_LANG_POP + [AC_CACHE_CHECK([for MSG_NOSIGNAL],[ac_cv_msg_nosignal], + [AC_LANG_PUSH([C]) + AX_SAVE_FLAGS + CFLAGS="$CFLAGS -I${srcdir}" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [int flags= MSG_NOSIGNAL])], [ac_cv_msg_nosignal="yes"]) + AC_LANG_POP + AX_RESTORE_FLAGS]) + + AC_CACHE_CHECK([for MSG_DONTWAIT],[ac_cv_msg_dontwait], + [AC_LANG_PUSH([C]) + AX_SAVE_FLAGS + CFLAGS="$CFLAGS -I${srcdir}" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ],[int flags= MSG_DONTWAIT])],[ac_cv_msg_dontwait="yes"]) + AC_LANG_POP + AX_RESTORE_FLAGS]) + + AC_CACHE_CHECK([for MSG_MORE],[ac_cv_msg_more], + [AC_LANG_PUSH([C]) + AX_SAVE_FLAGS + CFLAGS="$CFLAGS -I${srcdir}" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [int flags= MSG_MORE])], [ac_cv_msg_more="yes"]) + AC_LANG_POP + AX_RESTORE_FLAGS]) + + AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[AC_DEFINE([HAVE_MSG_NOSIGNAL],[1],[Define to 1 if you have a MSG_NOSIGNAL])]) + AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[AC_DEFINE([HAVE_MSG_DONTWAIT],[1],[Define to 1 if you have a MSG_DONTWAIT])]) + AS_IF([test "x$ac_cv_msg_more" = "xyes"],[AC_DEFINE([HAVE_MSG_MORE],[1],[Define to 1 if you have a MSG_MORE])]) ]) - AC_CACHE_CHECK([for MSG_DONTWAIT], [ac_cv_msg_dontwait], [ - AC_LANG_PUSH([C]) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -I${srcdir}" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_DONTWAIT ])], [ac_cv_msg_dontwait="yes"]) - AC_LANG_POP - ]) - - AC_CACHE_CHECK([for MSG_MORE], [ac_cv_msg_more], [ - AC_LANG_PUSH([C]) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -I${srcdir}" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_MORE ])], [ac_cv_msg_more="yes"]) - AC_LANG_POP - ]) - - AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define to 1 if you have a MSG_NOSIGNAL])]) - AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[ AC_DEFINE(HAVE_MSG_DONTWAIT, 1, [Define to 1 if you have a MSG_DONTWAIT])]) - AS_IF([test "x$ac_cv_msg_more" = "xyes"],[ AC_DEFINE(HAVE_MSG_MORE, 1, [Define to 1 if you have a MSG_MORE])]) -]) - -dnl --------------------------------------------------------------------------- -dnl End Macro: SOCKET_SEND_FLAGS -dnl --------------------------------------------------------------------------- +# --------------------------------------------------------------------------- +# End Macro: SOCKET_SEND_FLAGS +# ---------------------------------------------------------------------------