+AC_CACHE_CHECK([for poll], [sr_cv_have_poll],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <poll.h>]],
+ [[(void) poll(0, 0, -1);]])],
+ [sr_cv_have_poll=yes], [sr_cv_have_poll=no])])
+AS_IF([test "x$sr_cv_have_poll" = xyes],
+ [AC_DEFINE([HAVE_POLL], [1],
+ [Specifies whether we have the poll(2) function.])])
+AC_CACHE_CHECK([for select], [sr_cv_have_select],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
+ [[(void) select(0, 0, 0, 0, 0);]])],
+ [sr_cv_have_select=yes], [sr_cv_have_select=no])])
+AS_IF([test "x$sr_cv_have_select" = xyes],
+ [AC_DEFINE([HAVE_SELECT], [1],
+ [Specifies whether we have the select(2) function.])])
+
+#######################
+## miniLZO related ##
+#######################
+# These were taken from the README.LZO file in the miniLZO archive.
+
+AC_CHECK_TYPE(ptrdiff_t,long)
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(__int64)
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(ptrdiff_t)
+
+AC_C_CONST
+
+AC_CHECK_FUNCS(memcmp memcpy memmove memset)
+