/[hydra]/hydra/poll_or_select.m4
ViewVC logotype

Diff of /hydra/poll_or_select.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by nmav, Mon Oct 21 18:46:25 2002 UTC revision 1.2 by nmav, Sun Oct 27 10:46:19 2002 UTC
# Line 2  dnl Exports one of ac_cv_func_poll or ac Line 2  dnl Exports one of ac_cv_func_poll or ac
2  AC_DEFUN([POLL_OR_SELECT],  AC_DEFUN([POLL_OR_SELECT],
3    [    [
4      AC_MSG_CHECKING(whether to use poll or select)      AC_MSG_CHECKING(whether to use poll or select)
5      AC_ARG_WITH(poll,      AC_ARG_WITH(select,
6      [  --with-poll             Use poll],      [  --with-select           Use select instead of poll],
7      [      [
8        if test "$withval" = "yes" ; then        if test "$withval" = "yes" ; then
9          AC_MSG_RESULT(trying poll)          AC_MSG_RESULT(trying select)
10          ac_x=1          ac_x=1
11        else        else
12          AC_MSG_RESULT(trying select)          AC_MSG_RESULT(trying poll)
13          ac_x=0          ac_x=0
14        fi        fi
15      ],      ],
16      [      [
17        AC_MSG_RESULT(trying select)        AC_MSG_RESULT(trying poll)
18        ac_x=0        ac_x=0
19      ])      ])
20    
21      if test $ac_x = 1; then      if test $ac_x = 0; then
22        AC_CHECK_HEADERS(sys/poll.h)        AC_CHECK_HEADERS(sys/poll.h)
23        AC_CHECK_FUNCS(poll)        AC_CHECK_FUNCS(poll)
24        if test "x$ac_cv_func_poll" = "x"; then        if test "x$ac_cv_func_poll" = "x"; then
25          AC_MSG_ERROR(We attempted to find poll but could not. Please try again with --without-poll)          AC_MSG_ERROR(We attempted to find poll but could not. Please try again with --with-select)
26        fi        fi
27        BOA_ASYNC_IO="poll"        BOA_ASYNC_IO="poll"
28      else      else
29        AC_CHECK_HEADERS(sys/select.h)        AC_CHECK_HEADERS(sys/select.h)
30        AC_CHECK_FUNCS(select)        AC_CHECK_FUNCS(select)
31        if test "x$ac_cv_func_select" = "x"; then        if test "x$ac_cv_func_select" = "x"; then
32          AC_MSG_ERROR(We attempted to find select but could not. Please try again with --with-poll)          AC_MSG_ERROR(We attempted to find select but could not. Please try again with --without-select)
33        fi        fi
34        BOA_ASYNC_IO="select"        BOA_ASYNC_IO="select"
35      fi      fi

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26