From: Florian Westphal Date: Thu, 7 Jul 2005 18:49:58 +0000 (+0000) Subject: test for epoll and kqueue support X-Git-Tag: rel-0-10-0-pre1~177 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=6093af49d568d942ebd68fef539ed14748bf8d95 test for epoll and kqueue support --- diff --git a/configure.in b/configure.in index 698fd4fe..ef22dab5 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ # (at your option) any later version. # Please read the file COPYING, README and AUTHORS for more information. # -# $Id: configure.in,v 1.111 2005/06/26 13:42:11 alex Exp $ +# $Id: configure.in,v 1.112 2005/07/07 18:49:58 fw Exp $ # # -- Initialisation -- @@ -178,6 +178,45 @@ if test "$x_zlib_on" = "yes"; then AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!])) fi + +x_io_backend=select +AC_ARG_WITH(epoll, + [ --without-epoll disable epoll support (autodetected by default)], + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(epoll_create, x_io_backend=epoll, + AC_MSG_ERROR([Can't enable epoll support!]) + ) + fi + ], + [ + AC_CHECK_FUNCS(epoll_create, x_io_backend=epoll) + ] +) + +AC_ARG_WITH(kqueue, + [ --without-kqueue disable kqueue support (autodetected by default)], + [ if test "$withval" != "no"; then + if test "$withval" != "yes"; then + CFLAGS="-I$withval/include $CFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue, + AC_MSG_ERROR([Can't enable kqueue support!]) + ) + fi + ], + [ + AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue) + ] +) + + x_tcpwrap_on=no AC_ARG_WITH(tcp-wrappers, [ --with-tcp-wrappers enable TCP wrappers support], @@ -412,6 +451,8 @@ echo $ECHO_N " IDENT support: $ECHO_C" test "$x_identauth_on" = "yes" \ && echo $ECHO_N "yes $ECHO_C" \ || echo $ECHO_N "no $ECHO_C" +echo $ECHO_N " I/O backend: $ECHO_C" + echo "$x_io_backend" echo; echo