| 1 |
# Autoconf macros for xdvik. |
| 2 |
# Copyright (C) 1999 - 2009 Paul Vojta <[email protected]> |
| 3 |
# |
| 4 |
# This file is free software; the copyright holder |
| 5 |
# gives unlimited permission to copy and/or distribute it, |
| 6 |
# with or without modifications, as long as this notice is preserved. |
| 7 |
|
| 8 |
# XDVI_FUNC_POLL |
| 9 |
# -------------- |
| 10 |
# Check for poll(). |
| 11 |
AC_DEFUN([XDVI_FUNC_POLL], |
| 12 |
[AC_CACHE_CHECK([for poll.h and poll()], |
| 13 |
[xdvi_cv_func_poll], |
| 14 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <poll.h>]], |
| 15 |
[[poll((struct pollfd *) 0, 0, 0);]])], |
| 16 |
[xdvi_cv_func_poll=yes], |
| 17 |
[xdvi_cv_func_poll=no])]) |
| 18 |
if test "x$xdvi_cv_func_poll" = xyes; then |
| 19 |
AC_DEFINE([HAVE_POLL], 1, [Define if your system has <poll.h> and poll().]) |
| 20 |
else |
| 21 |
AC_CHECK_HEADERS([sys/select.h select.h]) |
| 22 |
fi |
| 23 |
]) # XDVI_FUNC_POLL |