X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fsocket_send_flags.m4;h=2501f03ee2f2e110bba5ee6b166047e827636c28;hb=728ae479bcecf3530430c4a2e62479ba7586484e;hp=290bc4a2b97311280da54f83fb054a772a602b58;hpb=c4dbc7e56b01545e25bc95ba122c79d4a2631a99;p=awesomized%2Flibmemcached diff --git a/m4/socket_send_flags.m4 b/m4/socket_send_flags.m4 index 290bc4a2..2501f03e 100644 --- a/m4/socket_send_flags.m4 +++ b/m4/socket_send_flags.m4 @@ -1,3 +1,4 @@ +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, @@ -12,53 +13,35 @@ AC_DEFUN([SOCKET_SEND_FLAGS], AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir}" - AC_TRY_LINK([ -#include - ], [ -int flags= MSG_NOSIGNAL; - ], - [ ac_cv_msg_nosignal=yes ], - [ ac_cv_msg_nosignal=no ]) - CFLAGS="$save_CFLAGS" - AC_LANG_POP + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_NOSIGNAL ])], [ac_cv_msg_nosignal="yes"]) + AC_LANG_POP + CFLAGS="$save_CFLAGS" ]) AC_CACHE_CHECK([for MSG_DONTWAIT], [ac_cv_msg_dontwait], [ AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir}" - AC_TRY_LINK([ -#include - ], [ -int flags= MSG_DONTWAIT; - ], - [ ac_cv_msg_dontwait=yes ], - [ ac_cv_msg_dontwait=no ]) - CFLAGS="$save_CFLAGS" - AC_LANG_POP + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_DONTWAIT ])], [ac_cv_msg_dontwait="yes"]) + AC_LANG_POP + CFLAGS="$save_CFLAGS" ]) AC_CACHE_CHECK([for MSG_MORE], [ac_cv_msg_more], [ AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir}" - AC_TRY_LINK([ -#include - ], [ -int flags= MSG_MORE; - ], - [ ac_cv_msg_more=yes ], - [ ac_cv_msg_more=no ]) - CFLAGS="$save_CFLAGS" - AC_LANG_POP + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [ int flags= MSG_MORE ])], [ac_cv_msg_more="yes"]) + AC_LANG_POP + CFLAGS="$save_CFLAGS" ]) - 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 HAVE_MSG_MORE])]) + 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 ---------------------------------------------------------------------------