/[svn]/branches/newio/configure.ac
ViewVC logotype

Diff of /branches/newio/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2382 by michael, Sat Jul 6 16:22:05 2013 UTC revision 2383 by michael, Sat Jul 6 17:05:28 2013 UTC
# Line 74  AC_C_BIGENDIAN Line 74  AC_C_BIGENDIAN
74  AC_CHECK_FUNCS_ONCE(strtok_r \  AC_CHECK_FUNCS_ONCE(strtok_r \
75                      usleep   \                      usleep   \
76                      strlcat  \                      strlcat  \
77                      strlcpy)                      strlcpy  \
78                        kqueue   \
79                        poll)
80    
81  # Checks for header files.  # Checks for header files.
82  AC_CHECK_HEADERS_ONCE(crypt.h        \  AC_CHECK_HEADERS_ONCE(crypt.h        \
83                        sys/resource.h \                        sys/resource.h \
84                        sys/param.h    \                        sys/param.h    \
85                          poll.h         \
86                          sys/devpoll.h  \
87                          sys/event.h    \
88                          sys/epoll.h    \
89                        types.h        \                        types.h        \
90                        socket.h       \                        socket.h       \
91                        sys/wait.h     \                        sys/wait.h     \
# Line 178  AS_IF([test "$cf_enable_openssl" != "no" Line 184  AS_IF([test "$cf_enable_openssl" != "no"
184  AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_ssl_SSL_connect" = yes])  AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_ssl_SSL_connect" = yes])
185    
186    
187    dnl Check user configuration options
188    dnl Start with --disable-poll
189    AC_MSG_CHECKING([whether to enable the poll() event engine])
190    AC_ARG_ENABLE([poll],
191    [  --disable-poll           Disable the poll-based engine],
192    [hyb_cv_enable_poll=$enable_poll],
193    [AC_CACHE_VAL(hyb_cv_enable_poll,
194    [hyb_cv_enable_poll=yes])])
195    
196    if test "$ac_cv_func_poll" = no; then
197        hyb_cv_enable_poll=no
198    fi
199    
200    AC_MSG_RESULT([$hyb_cv_enable_poll])
201    
202    if test "$hyb_cv_enable_poll" = yes; then
203        ircd_event_engine="poll()"
204        AC_DEFINE([USE_POLL], , [Specify whether or not to use poll()])
205    fi
206    AM_CONDITIONAL(ENGINE_POLL, [test "$hyb_cv_enable_poll" = yes])
207    
208    dnl --disable-devpoll check...
209    AC_MSG_CHECKING([whether to enable the /dev/poll event engine])
210    AC_ARG_ENABLE([devpoll],
211    [  --disable-devpoll        Disable the /dev/poll-based engine],
212    [hyb_cv_enable_devpoll=$enable_devpoll],
213    [AC_CACHE_VAL(hyb_cv_enable_devpoll,
214    [hyb_cv_enable_devpoll=yes])])
215    
216    if test "$ac_cv_header_sys_devpoll_h" = no; then
217        hyb_cv_enable_devpoll=no
218    fi
219    
220    AC_MSG_RESULT([$hyb_cv_enable_devpoll])
221    
222    if test "$hyb_cv_enable_devpoll" != no; then
223        ircd_event_engine="/dev/poll/ $ircd_event_engine"
224        AC_DEFINE([USE_DEVPOLL], , [Define to enable the /dev/poll engine])
225    fi
226    
227    AM_CONDITIONAL(ENGINE_DEVPOLL, [test "$hyb_cv_enable_devpoll" = yes])
228    
229    
230    dnl --disable-kqueue check...
231    AC_MSG_CHECKING([whether to enable the kqueue event engine])
232    AC_ARG_ENABLE([kqueue],
233    [  --disable-kqueue         Disable the kqueue-based engine],
234    [hyb_cv_enable_kqueue=$enable_kqueue],
235    [AC_CACHE_VAL(hyb_cv_enable_kqueue,
236    [hyb_cv_enable_kqueue=yes])])
237    
238    if test "$ac_cv_header_sys_event_h" = no -o "$ac_cv_func_kqueue" = no; then
239        hyb_cv_enable_kqueue=no
240    fi
241    
242    AC_MSG_RESULT([$hyb_cv_enable_kqueue])
243    
244    if test "$hyb_cv_enable_kqueue" != no; then
245        ircd_event_engine="kqueue() $ircd_event_engine"
246        AC_DEFINE([USE_KQUEUE], , [Define to enable the kqueue engine])
247    fi
248    
249    AM_CONDITIONAL(ENGINE_KQUEUE, [test "$hyb_cv_enable_kqueue" = yes])
250    
251    dnl --disable-epoll check
252    AC_MSG_CHECKING([whether to enable the epoll event engine])
253    AC_ARG_ENABLE([epoll],
254    [  --disable-epoll          Disable the epoll-based engine],
255    [hyb_cv_enable_epoll=$enable_epoll],
256    [AC_CACHE_VAL(hyb_cv_enable_epoll,
257    [hyb_cv_enable_epoll=yes])])
258    
259    if test "$ac_cv_header_sys_epoll_h" = no -o "$ac_cv_func_epoll" = no; then
260        hyb_cv_enable_epoll=no
261    fi
262    
263    AC_MSG_RESULT([$hyb_cv_enable_epoll])
264    
265    # Set up the conditionals
266    if test x"$hyb_cv_enable_epoll" = xyes; then
267        ircd_event_engine="epoll() $ircd_event_engine"
268        AC_DEFINE([USE_EPOLL], 1, [Define to enable the epoll engine])
269    
270        # Must also check to see if we need to provide the function bodies
271    dnl XXX Should rework this check
272        AC_MSG_CHECKING([whether epoll functions are properly defined])
273        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/epoll.h>],
274                                        [epoll_create(10);])],
275            [AC_MSG_RESULT([yes])],
276            [AC_MSG_RESULT([no])
277             AC_DEFINE([EPOLL_NEED_BODY], 1,
278                    [Define to implement epoll system calls])])
279    fi
280    
281    AM_CONDITIONAL(ENGINE_EPOLL, [test "$hyb_cv_enable_epoll" = yes])
282    
283    
284  AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],  AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
285                                       [Enable assert() statements]),                                       [Enable assert() statements]),
286    [assert=$enableval], [assert=no])    [assert=$enableval], [assert=no])
# Line 201  AC_DEFINE([MP_CHUNK_SIZE_USERHOST], 128* Line 304  AC_DEFINE([MP_CHUNK_SIZE_USERHOST], 128*
304  AC_DEFINE([MP_CHUNK_SIZE_IP_ENTRY], 128*1024, [Size of the ip_entry mempool chunk.])  AC_DEFINE([MP_CHUNK_SIZE_IP_ENTRY], 128*1024, [Size of the ip_entry mempool chunk.])
305    
306  # Argument processing.  # Argument processing.
 AX_ARG_ENABLE_IOLOOP_MECHANISM  
307  AX_ARG_ENABLE_HALFOPS  AX_ARG_ENABLE_HALFOPS
308  AX_ARG_ENABLE_DEBUGGING  AX_ARG_ENABLE_DEBUGGING
309  AX_ARG_ENABLE_WARNINGS  AX_ARG_ENABLE_WARNINGS

Legend:
Removed from v.2382  
changed lines
  Added in v.2383

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28