X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=configure.ac;fp=configure.ac;h=85f4b2b49976b0329fe4b9b3ce4a6a8f66f20851;hp=8b051b8866b8ebd518566620ec3e88637476cf99;hb=8c542453218985efa9c2904fb1ed6c1ca9b56a6a;hpb=a04cd800c9e5f03507986f425e65c4dc1fdd3437 diff --git a/configure.ac b/configure.ac index 8b051b88..85f4b2b4 100644 --- a/configure.ac +++ b/configure.ac @@ -225,6 +225,20 @@ AM_CONDITIONAL([NEED_RPC], [test "x$sr_cv_have_rpc" = xyes]) # Check for compiler support of 128 bit integers AC_CHECK_TYPES([__int128_t, __uint128_t], [], [], []) +AC_CACHE_CHECK([for poll], [sr_cv_have_poll], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[(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 ]], + [[(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 ##