diff options
author | Yang Tse <yangsita@gmail.com> | 2006-07-28 14:19:03 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-07-28 14:19:03 +0000 |
commit | b05a63758cd945d6022d373933f78b726832d581 (patch) | |
tree | 905a1f39a8e0f00d425631fd03fb847cf3b63334 /acinclude.m4 | |
parent | bed83eaf820e08b4fcbcf34aa8639ccb115d079f (diff) | |
download | c-ares-b05a63758cd945d6022d373933f78b726832d581.tar.gz c-ares-b05a63758cd945d6022d373933f78b726832d581.tar.bz2 c-ares-b05a63758cd945d6022d373933f78b726832d581.zip |
First step trying to avoid the multiple header inclusion and recursion nightmare.
Reintroduce checking for HAVE_MSG_NOSIGNAL in configure script, so that we don't depend on header inclusion order for a valid check.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a282bb0..aa87cba 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -904,6 +904,39 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ ]) # AC_DEFUN +dnl CURL_CHECK_MSG_NOSIGNAL +dnl ------------------------------------------------- +dnl Check for MSG_NOSIGNAL + +AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ + AC_CHECK_HEADERS(sys/types.h sys/socket.h) + AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + ],[ + int flag=MSG_NOSIGNAL; + ]) + ],[ + ac_cv_msg_nosignal="yes" + ],[ + ac_cv_msg_nosignal="no" + ]) + ]) + case "$ac_cv_msg_nosignal" in + yes) + AC_DEFINE_UNQUOTED(HAVE_MSG_NOSIGNAL, 1, + [Define to 1 if you have the MSG_NOSIGNAL flag.]) + ;; + esac +]) # AC_DEFUN + + dnl CURL_CHECK_NONBLOCKING_SOCKET dnl ------------------------------------------------- dnl Check for how to set a socket to non-blocking state. There seems to exist |