# (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information.
#
-# $Id: configure.in,v 1.108 2005/03/21 22:15:15 alex Exp $
+# $Id: configure.in,v 1.112 2005/07/07 18:49:58 fw Exp $
#
# -- Initialisation --
AC_MSG_CHECKING(whether socklen_t exists)
AC_TRY_COMPILE([
-#include <sys/socket.h>
#include <sys/types.h>
+#include <sys/socket.h>
],[
socklen_t a, b;
a = 2; b = 4; a += b;
memset realloc setsid setsockopt socket strcasecmp strchr strerror \
strstr waitpid],,AC_MSG_ERROR([required function missing!]))
-AC_CHECK_FUNCS(inet_aton isdigit sigaction snprintf vsnprintf strlcpy strlcat)
+AC_CHECK_FUNCS(inet_aton isdigit sigaction snprintf vsnprintf strdup strlcpy strlcat)
AC_CHECK_FUNCS(select,[AC_CHECK_HEADERS(sys/select.h)],
AC_MSG_ERROR([required function select() is missing!])
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],
# -- Result --
echo
-echo "ngIRCd has been configured with the following options:"
+echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
echo
# Someone please show me a better way :) [borrowed by OpenSSH]
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