Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_sys_dev_poll.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_SYS_DEV_POLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro tests for the presence of /dev/poll support in the build
  12. # environment. It checks that the needed structure (dvpoll) is available,
  13. # with the standard fields. /dev/poll is most often seen under Solaris.
  14. #
  15. # Note that it does not attempt to actually open /dev/poll -- you should
  16. # test for errors when you open it and then fall back to poll() if it is
  17. # unavailable.
  18. #
  19. # LICENSE
  20. #
  21. # Copyright (c) 2008 Dave Benson <daveb@ffem.org>
  22. #
  23. # Copying and distribution of this file, with or without modification, are
  24. # permitted in any medium without royalty provided the copyright notice
  25. # and this notice are preserved. This file is offered as-is, without any
  26. # warranty.
  27. #serial 6
  28. AU_ALIAS([AC_SYS_DEV_POLL], [AX_SYS_DEV_POLL])
  29. AC_DEFUN([AX_SYS_DEV_POLL], [AC_CACHE_CHECK(for /dev/poll support, ac_cv_dev_poll,
  30. AC_TRY_COMPILE([#include <sys/ioctl.h>
  31. #include <sys/stat.h>
  32. #include <sys/types.h>
  33. #include <sys/poll.h>
  34. #include <sys/devpoll.h>],
  35. [
  36. struct dvpoll p;
  37. p.dp_timeout = 0;
  38. p.dp_nfds = 0;
  39. p.dp_fds = (struct pollfd *) 0;
  40. return 0;
  41. ],
  42. ac_cv_dev_poll=yes
  43. [$1],
  44. ac_cv_dev_poll=no
  45. [$2]
  46. )
  47. )
  48. ])