X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/a34ec229bf3241eff9622b28bdc61aad468fa40b..a5497589929c9482cf26b39ceab0b1a45e8462a3:/configure.ac diff --git a/configure.ac b/configure.ac index 9956522..6d9b2ef 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl $Id: configure.ac 3323 2007-03-30 23:33:43Z jilles $ +dnl $Id: configure.ac 3516 2007-06-10 16:14:03Z jilles $ dnl Process this file with autoconf to produce a configure script. dnl TODO: clean up all the OpenSSL and shared module checking stuff; @@ -8,9 +8,9 @@ dnl said functions need to be just about as complex as they already are. AC_PREREQ(2.57) dnl Sneaky way to get an Id tag into the configure script -AC_COPYRIGHT([$Id: configure.ac 3323 2007-03-30 23:33:43Z jilles $]) +AC_COPYRIGHT([$Id: configure.ac 3516 2007-06-10 16:14:03Z jilles $]) -AC_INIT([charybdis],[2.2.0]) +AC_INIT([charybdis],[2.3.0]) AC_CONFIG_HEADER(include/setup.h) @@ -26,6 +26,8 @@ AC_LANG(C) dnl Make sure autoconf doesn't interfere with cflags -jmallett CFLAGS="$OLD_CFLAGS" +AC_CONFIG_SUBDIRS(libratbox) + dnl Check for various compilers. -jmallett dnl But if $CC turns out to be gcc, sure as hell it's, well, gcc. -joshk @@ -631,6 +633,14 @@ fi dnl IO Loop Selection dnl ================= +AC_ARG_ENABLE(ports, AC_HELP_STRING([--enable-ports],[Force solaris I/O ports subsystem usage.]), +[ if test $enableval = yes; then + SELECT_TYPE_EXPLICIT="ports" + else + use_ports=no + fi +],) + AC_ARG_ENABLE(poll, AC_HELP_STRING([--enable-poll],[Force poll() usage.]), [ if test $enableval = yes; then SELECT_TYPE_EXPLICIT="poll" @@ -655,16 +665,6 @@ AC_ARG_ENABLE(kqueue, AC_HELP_STRING([--enable-kqueue],[Force kqueue() usage.]), fi ],) -AC_ARG_ENABLE(devpoll,AC_HELP_STRING([--enable-devpoll],[Force usage of /dev/poll.]), -[ if test $enableval = yes; then - SELECT_TYPE_EXPLICIT="devpoll" - dnl These need to be defined or not defined - AC_CHECK_HEADERS([sys/devpoll.h devpoll.h]) - else - use_devpoll=no; - fi -],) - AC_ARG_ENABLE(epoll, AC_HELP_STRING([--enable-epoll],[Force sys_epoll usage (Linux only).]), [ if test $enableval = yes; then SELECT_TYPE_EXPLICIT="epoll" @@ -751,6 +751,13 @@ if test ! -z "$SELECT_TYPE_EXPLICIT"; then echo "Forcing $SELECT_TYPE to be enabled" else +if test ! "x$use_ports" = "xno"; then + AC_CHECK_FUNCS(port_getn, [haveports=yes], [haveports=no]) + if test "x$haveports" = "xyes" ; then + SELECT_TYPE="ports" + fi +fi + if test ! "x$use_select" = "xno"; then AC_CHECK_FUNCS(select, [haveselect=yes], [haveselect=no]) if test "x$haveselect" = "xyes" ; then @@ -765,17 +772,6 @@ if test ! "x$use_poll" = "xno"; then fi fi -if test ! "x$use_devpoll" = "xno"; then - AC_MSG_CHECKING(for /dev/poll) - if test -c "/dev/poll"; then - AC_MSG_RESULT(yes) - AC_CHECK_HEADERS([devpoll.h sys/devpoll.h]) - SELECT_TYPE="devpoll" - else - AC_MSG_RESULT(no) - fi -fi - if test ! "x$use_kqueue" = "xno"; then AC_CHECK_FUNCS(kevent, [havekqueue=yes], [havekqueue=no]) if test "x$havekqueue" = "xyes" ; then @@ -802,7 +798,7 @@ main(int argc, char **argv) int epfd; epfd = epoll_create(256); - exit (epfd == -1 ? 1 : 0); + return (epfd == -1 ? 1 : 0); }, [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_EPOLL, 1, [Define if your system supports the epoll system calls]) @@ -913,19 +909,6 @@ if test "$balloc" = no; then AC_DEFINE([NOBALLOC], 1, [Define to 1 if you wish to disable the block allocator.]) fi -AC_ARG_ENABLE(ricer-hashing, -AC_HELP_STRING([--enable-ricer-hashing],[Enable assembly-based hashing routines.]), -[ricer_hashing=$enableval], [ricer_hashing=no]) - -FNVHASH_S="" - -if test "$ricer_hashing" = "yes"; then - AC_DEFINE([RICER_HASHING], 1, [Define to 1 if you are using the assembly-based hashing routines.]) - FNVHASH_S="fnvhash.s" -fi - -AC_SUBST(FNVHASH_S) - AC_ARG_ENABLE(small-net, AC_HELP_STRING([--enable-small-net],[Enable small network support.]), [small_net=$enableval], [small_net=no]) @@ -946,6 +929,8 @@ dnl AC_DEFINE([HASHSIZE], 4096, [Max number of buckets in hash tables.]) AC_DEFINE([ND_HEAP_SIZE], 128, [Size of the nick delay heap.]) AC_DEFINE([CONFITEM_HEAP_SIZE], 128, [Size of the confitem heap.]) AC_DEFINE([MONITOR_HEAP_SIZE], 128, [Size of the monitor heap.]) + AC_DEFINE([FD_HEAP_SIZE], 128, [Size of fd heap.]) + AC_DEFINE([AWAY_HEAP_SIZE], 128, [Size of away heap.]) else dnl These settings are for a large network like efnet..they will use lots of memory dnl so enable small net unless you really need this much support @@ -963,6 +948,8 @@ dnl so enable small net unless you really need this much support AC_DEFINE([ND_HEAP_SIZE], 512, [Size of the nick delay heap.]) AC_DEFINE([CONFITEM_HEAP_SIZE], 256, [Size of the confitem heap.]) AC_DEFINE([MONITOR_HEAP_SIZE], 1024, [Size of the monitor heap.]) + AC_DEFINE([FD_HEAP_SIZE], 1024, [Size of fd heap.]) + AC_DEFINE([AWAY_HEAP_SIZE], 512, [Size of away heap.]) fi AC_ARG_WITH(nicklen, @@ -987,28 +974,10 @@ AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (def fi ], [TOPICLEN=390]) -AC_ARG_WITH(maxclients, -AC_HELP_STRING([--with-maxclients=NUMBER],[Maximum number of connections the ircd can handle]), - MAX_CLIENTS="$withval", MAX_CLIENTS=3000) - - -if test "$MAX_CLIENTS" = yes; then - MAX_CLIENTS=3000 -fi - -if test $MAX_CLIENTS -gt 65536; then - MAX_CLIENTS=65536 - AC_MSG_WARN([Max connections cannot be larger than 65536!]) -fi - AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)]) AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length]) -AC_DEFINE_UNQUOTED(MAX_CLIENTS, ${MAX_CLIENTS}, [Maximum number of network connections]) - -AC_ARG_ENABLE(shared-modules, -AC_HELP_STRING([--disable-shared-modules],[ Disable shared modules.]), -[shared_modules=$enableval], [shared_modules="yes"]) +shared_modules="yes" dnl Some first-stage sanity checks. if test "$shared_modules" = yes; then @@ -1268,7 +1237,6 @@ fi AC_CONFIG_FILES( \ Makefile \ - libcharybdis/Makefile \ servlink/Makefile \ extensions/Makefile \ unsupported/Makefile \ @@ -1299,12 +1267,10 @@ Configuration: Ziplinks : $zlib OpenSSL : $openssl - Modules : $modules IPv6 support : $have_v6 Socket Engine : $SELECT_TYPE Small network : $small_net Block allocator : $balloc - ASM hashing code : $ricer_hashing Nickname length : $NICKLEN Topic length : $TOPICLEN