- if test $gl_cv_func_poll = yes; then
- AC_DEFINE([HAVE_POLL], [1],
- [Define to 1 if you have the 'poll' function and it works.])
- POLL_H=
- else
+ if test $gl_cv_func_poll != yes; then
+ AC_CHECK_FUNC([poll], [ac_cv_func_poll=yes], [ac_cv_func_poll=no])
+ if test $ac_cv_func_poll = no; then
+ HAVE_POLL=0
+ else
+ REPLACE_POLL=1
+ fi
+ fi
+ if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then