diff m4/poll.m4 @ 4242:eec6ba9ed532

New module poll, from Paolo Bonzini <bonzini@gnu.org>.
author Bruno Haible <bruno@clisp.org>
date Thu, 20 Feb 2003 13:10:05 +0000
parents
children 4bf5f9b5190a
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/m4/poll.m4
@@ -0,0 +1,27 @@
+# poll.m4 serial 1
+dnl Copyright (c) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of the program.
+
+AC_DEFUN([gl_FUNC_POLL],
+[
+  AC_CHECK_HEADERS(poll.h)
+  if test x$ac_cv_header_poll_h = xno; then
+    AC_CONFIG_LINKS([lib/poll.h:lib/poll_.h])
+  fi
+
+  AC_REPLACE_FUNCS(poll)
+  if test $ac_cv_func_poll = no; then
+    gl_PREREQ_POLL
+  fi
+])
+
+# Prerequisites of lib/poll.c.
+AC_DEFUN([gl_PREREQ_POLL],
+[
+  AC_REQUIRE([AC_HEADER_TIME])
+  AC_CHECK_HEADERS_ONCE(sys/time.h)
+])