| 22 |
|
dnl {{{ allow the user to specify desired mechanism |
| 23 |
|
desired_iopoll_mechanism="none" |
| 24 |
|
dnl FIXME need to handle arguments a bit better (see ac_arg_disable_block_alloc) |
| 25 |
< |
AC_ARG_ENABLE([kqueue], [AC_HELP_STRING([--enable-kqueue], [Force kqueue usage.])], [desired_iopoll_mechanism="kqueue"]) |
| 26 |
< |
AC_ARG_ENABLE([epoll], [AC_HELP_STRING([--enable-epoll], [Force epoll usage.])], [desired_iopoll_mechanism="epoll"]) |
| 27 |
< |
AC_ARG_ENABLE([devpoll],[AC_HELP_STRING([--enable-devpoll],[Force devpoll usage.])],[desired_iopoll_mechanism="devpoll"]) |
| 28 |
< |
AC_ARG_ENABLE([rtsigio],[AC_HELP_STRING([--enable-rtsigio],[Force rtsigio usage.])],[desired_iopoll_mechanism="rtsigio"]) |
| 29 |
< |
AC_ARG_ENABLE([poll], [AC_HELP_STRING([--enable-poll], [Force poll usage.])], [desired_iopoll_mechanism="poll"]) |
| 30 |
< |
AC_ARG_ENABLE([select], [AC_HELP_STRING([--enable-select], [Force select usage.])], [desired_iopoll_mechanism="select"]) |
| 25 |
> |
AC_ARG_ENABLE([kqueue], [AS_HELP_STRING([--enable-kqueue], [Force kqueue usage.])], [desired_iopoll_mechanism="kqueue"]) |
| 26 |
> |
AC_ARG_ENABLE([epoll], [AS_HELP_STRING([--enable-epoll], [Force epoll usage.])], [desired_iopoll_mechanism="epoll"]) |
| 27 |
> |
AC_ARG_ENABLE([devpoll],[AS_HELP_STRING([--enable-devpoll],[Force devpoll usage.])],[desired_iopoll_mechanism="devpoll"]) |
| 28 |
> |
AC_ARG_ENABLE([rtsigio],[AS_HELP_STRING([--enable-rtsigio],[Force rtsigio usage.])],[desired_iopoll_mechanism="rtsigio"]) |
| 29 |
> |
AC_ARG_ENABLE([poll], [AS_HELP_STRING([--enable-poll], [Force poll usage.])], [desired_iopoll_mechanism="poll"]) |
| 30 |
> |
AC_ARG_ENABLE([select], [AS_HELP_STRING([--enable-select], [Force select usage.])], [desired_iopoll_mechanism="select"]) |
| 31 |
|
dnl }}} |
| 32 |
|
dnl {{{ preamble |
| 33 |
|
AC_MSG_CHECKING([for optimal/desired iopoll mechanism]) |
| 147 |
|
])dnl }}} |
| 148 |
|
dnl {{{ ax_arg_with_topiclen |
| 149 |
|
AC_DEFUN([AX_ARG_WITH_TOPICLEN],[ |
| 150 |
< |
AC_ARG_WITH([topiclen],[AC_HELP_STRING([--with-topiclen=<value>],[Set topic length (default 160).])],[topiclen="$withval"],[topiclen="160"]) |
| 150 |
> |
AC_ARG_WITH([topiclen],[AS_HELP_STRING([--with-topiclen=<value>],[Set topic length (default 160).])],[topiclen="$withval"],[topiclen="160"]) |
| 151 |
|
AC_DEFINE_UNQUOTED([TOPICLEN],[($topiclen)],[Length of topics.]) |
| 152 |
|
])dnl }}} |
| 153 |
|
dnl {{{ ax_arg_with_nicklen |
| 154 |
|
AC_DEFUN([AX_ARG_WITH_NICKLEN],[ |
| 155 |
< |
AC_ARG_WITH([nicklen],[AC_HELP_STRING([--with-nicklen=<value>],[Set nickname length (default 9).])],[nicklen="$withval"],[nicklen="9"]) |
| 155 |
> |
AC_ARG_WITH([nicklen],[AS_HELP_STRING([--with-nicklen=<value>],[Set nickname length (default 9).])],[nicklen="$withval"],[nicklen="9"]) |
| 156 |
|
AC_DEFINE_UNQUOTED([NICKLEN],[($nicklen+1)],[Length of nicknames.]) |
| 157 |
|
])dnl }}} |
| 158 |
|
dnl {{{ ax_arg_enable_efnet |
| 159 |
|
AC_DEFUN([AX_ARG_ENABLE_EFNET],[ |
| 160 |
< |
AC_ARG_ENABLE([efnet],[AC_HELP_STRING([--enable-efnet],[For IRCDs running on EFnet.])],[efnet="$enableval"],[efnet="no"]) |
| 160 |
> |
AC_ARG_ENABLE([efnet],[AS_HELP_STRING([--enable-efnet],[For IRCDs running on EFnet.])],[efnet="$enableval"],[efnet="no"]) |
| 161 |
|
if test "$efnet" = "yes" ; then |
| 162 |
|
use_efnet="yes" |
| 163 |
|
AC_DEFINE([EFNET],[1],[Define to 1 if this server will be an EFnet server.]) |
| 168 |
|
])dnl }}} |
| 169 |
|
dnl {{{ ax_arg_enable_halfops |
| 170 |
|
AC_DEFUN([AX_ARG_ENABLE_HALFOPS],[ |
| 171 |
< |
AC_ARG_ENABLE([halfops],[AC_HELP_STRING([--enable-halfops],[Enable halfops support.])],[halfops="$enableval"],[halfops="no"]) |
| 171 |
> |
AC_ARG_ENABLE([halfops],[AS_HELP_STRING([--enable-halfops],[Enable halfops support.])],[halfops="$enableval"],[halfops="no"]) |
| 172 |
|
if test "$halfops" = "yes" ; then |
| 173 |
|
AC_DEFINE([HALFOPS],[1],[Define to 1 if you want halfops support.]) |
| 174 |
|
fi |
| 175 |
|
])dnl }}} |
| 176 |
|
dnl {{{ ax_arg_enable_debugging |
| 177 |
|
AC_DEFUN([AX_ARG_ENABLE_DEBUGGING],[ |
| 178 |
< |
AC_ARG_ENABLE([debugging],[AC_HELP_STRING([--enable-debugging],[Enable debugging.])],[debugging="$enableval"],[debugging="no"]) |
| 178 |
> |
AC_ARG_ENABLE([debugging],[AS_HELP_STRING([--enable-debugging],[Enable debugging.])],[debugging="$enableval"],[debugging="no"]) |
| 179 |
|
if test "$debugging" = "yes" ; then |
| 180 |
|
AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging.]) |
| 181 |
|
CFLAGS="-Wall -g -O0" |
| 185 |
|
])dnl }}} |
| 186 |
|
dnl {{{ ax_arg_enable_warnings |
| 187 |
|
AC_DEFUN([AX_ARG_ENABLE_WARNINGS],[ |
| 188 |
< |
AC_ARG_ENABLE([warnings],[AC_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 188 |
> |
AC_ARG_ENABLE([warnings],[AS_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 189 |
|
if test "$warnings" = "yes" ; then |
| 190 |
|
CFLAGS="-Wall -Wextra -Wno-unused -Wcast-qual -Wcast-align -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -Wundef" |
| 191 |
|
fi |