projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix include
[awesomized/libmemcached]
/
m4
/
setsockopt.m4
diff --git
a/m4/setsockopt.m4
b/m4/setsockopt.m4
index e37fe2ae7c0e9b0df3e3d2081af6dc1bea628ca7..58c61c0ab9fa4c6a0e63989a14b8229988be6786 100644
(file)
--- a/
m4/setsockopt.m4
+++ b/
m4/setsockopt.m4
@@
-2,6
+2,7
@@
dnl ---------------------------------------------------------------------------
dnl Macro: SETSOCKOPT_SANITY
dnl ---------------------------------------------------------------------------
AC_DEFUN([SETSOCKOPT_SANITY],[
dnl Macro: SETSOCKOPT_SANITY
dnl ---------------------------------------------------------------------------
AC_DEFUN([SETSOCKOPT_SANITY],[
+ AC_CACHE_CHECK([for working SO_SNDTIMEO], [ac_cv_have_so_sndtimeo],
AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
@@
-25,8
+26,17
@@
AC_DEFUN([SETSOCKOPT_SANITY],[
}
return 0;
]])],
}
return 0;
]])],
- [AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])])
+ [ac_cv_have_so_sndtimeo=yes],
+ [ac_cv_have_so_sndtimeo=no],
+ [ac_cv_have_so_sndtimeo=yes])
+ AS_IF([test "x$ac_cv_have_so_sndtimeo" = "xyes"], [
+ AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])])
+ AC_LANG_POP
+ )
+
+ AC_CACHE_CHECK([for working SO_RCVTIMEO], [ac_cv_have_so_rcvtimeo],
+ AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
@@
-34,7
+44,7
@@
AC_DEFUN([SETSOCKOPT_SANITY],[
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
-
]],[[
+ ]],[[
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
@@
-48,9
+58,15
@@
AC_DEFUN([SETSOCKOPT_SANITY],[
}
}
return 0;
}
}
return 0;
- ]])], [AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO])])
+ ]])],
+ [ac_cv_have_so_rcvtimeo=yes],
+ [ac_cv_have_so_rcvtimeo=no],
+ [ac_cv_have_so_rcvtimeo=yes])
- AC_LANG_POP
+ AS_IF([test "x$ac_cv_have_so_rcvtimeo" = "xyes"], [
+ AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO])])
+ AC_LANG_POP
+ )
])
dnl ---------------------------------------------------------------------------
dnl End Macro: SETSOCKOPT_SANITY
])
dnl ---------------------------------------------------------------------------
dnl End Macro: SETSOCKOPT_SANITY