-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
33 lines (23 loc) · 946 Bytes
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
AC_INIT([event], [0.0], [[email protected]], [event])
AC_CONFIG_SRCDIR([src/System/Event.hs])
AC_CONFIG_HEADERS([include/EventConfig.h])
AC_CANONICAL_HOST
AC_ARG_WITH([compiler],
[Haskell compiler],
[HSC=$withval])
AC_ARG_WITH([cc],
[C compiler],
[CC=$withval])
AC_PROG_CC()
AC_CHECK_HEADERS([poll.h signal.h sys/epoll.h sys/event.h sys/eventfd.h])
AC_CHECK_FUNCS([epoll_create1 epoll_ctl eventfd kevent kevent64 kqueue poll])
if test "$ac_cv_header_sys_epoll_h" = yes -a "$ac_cv_func_epoll_ctl" = yes; then
AC_DEFINE([HAVE_EPOLL], [1], [Define if you have epoll support.])
fi
if test "$ac_cv_header_sys_event_h" = yes -a "$ac_cv_func_kqueue" = yes; then
AC_DEFINE([HAVE_KQUEUE], [1], [Define if you have kqueue support.])
fi
if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then
AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.])
fi
AC_OUTPUT