- 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
- AC_LIBOBJ(poll)
- AC_DEFINE(poll, rpl_poll,
- [Define to poll if the replacement function should be used.])
+ 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
+ AC_LIBOBJ([poll])