| 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"]) |
| 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.]) |
| 164 |
– |
else |
| 165 |
– |
use_efnet="no" |
| 166 |
– |
fi |
| 167 |
– |
AM_CONDITIONAL([EFNET],[test "$use_efnet" = "yes"]) |
| 168 |
– |
])dnl }}} |
| 158 |
|
dnl {{{ ax_arg_enable_halfops |
| 159 |
|
AC_DEFUN([AX_ARG_ENABLE_HALFOPS],[ |
| 160 |
< |
AC_ARG_ENABLE([halfops],[AC_HELP_STRING([--enable-halfops],[Enable halfops support.])],[halfops="$enableval"],[halfops="no"]) |
| 160 |
> |
AC_ARG_ENABLE([halfops],[AS_HELP_STRING([--enable-halfops],[Enable halfops support.])],[halfops="$enableval"],[halfops="no"]) |
| 161 |
|
if test "$halfops" = "yes" ; then |
| 162 |
|
AC_DEFINE([HALFOPS],[1],[Define to 1 if you want halfops support.]) |
| 163 |
|
fi |
| 164 |
|
])dnl }}} |
| 165 |
|
dnl {{{ ax_arg_enable_debugging |
| 166 |
|
AC_DEFUN([AX_ARG_ENABLE_DEBUGGING],[ |
| 167 |
< |
AC_ARG_ENABLE([debugging],[AC_HELP_STRING([--enable-debugging],[Enable debugging.])],[debugging="$enableval"],[debugging="no"]) |
| 167 |
> |
AC_ARG_ENABLE([debugging],[AS_HELP_STRING([--enable-debugging],[Enable debugging.])],[debugging="$enableval"],[debugging="no"]) |
| 168 |
|
if test "$debugging" = "yes" ; then |
| 169 |
|
AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging.]) |
| 170 |
|
CFLAGS="-Wall -g -O0" |
| 174 |
|
])dnl }}} |
| 175 |
|
dnl {{{ ax_arg_enable_warnings |
| 176 |
|
AC_DEFUN([AX_ARG_ENABLE_WARNINGS],[ |
| 177 |
< |
AC_ARG_ENABLE([warnings],[AC_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 177 |
> |
AC_ARG_ENABLE([warnings],[AS_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 178 |
|
if test "$warnings" = "yes" ; then |
| 179 |
|
CFLAGS="-Wall -Wextra -Wno-unused -Wcast-qual -Wcast-align -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -Wundef" |
| 180 |
|
fi |
| 181 |
|
])dnl }}} |
| 193 |
– |
dnl {{{ ax_arg_enable_syslog |
| 194 |
– |
AC_DEFUN([AX_ARG_ENABLE_SYSLOG],[ |
| 195 |
– |
AC_CHECK_HEADERS([syslog.h sys/syslog.h]) |
| 196 |
– |
AC_ARG_ENABLE([syslog],[AC_HELP_STRING([--enable-syslog="EVENTS"],[Enable syslog for events: users oper (space separated in quotes; default: disabled).])],[syslog="$enableval"],[syslog="no"]) |
| 197 |
– |
if test "$enableval" != "no" ; then |
| 198 |
– |
for option in $enableval ; do |
| 199 |
– |
case "$option" in |
| 200 |
– |
users) AC_DEFINE([SYSLOG_USERS],[1],[Send user log stuff to syslog.]) ;; |
| 201 |
– |
oper) AC_DEFINE([SYSLOG_OPER],[1],[Send oper log stuff to syslog.]) ;; |
| 202 |
– |
yes) : ;; |
| 203 |
– |
*) AC_MSG_ERROR([invalid value for --enable-syslog: $option]) ;; |
| 204 |
– |
esac |
| 205 |
– |
done |
| 206 |
– |
AC_DEFINE([USE_SYSLOG],[1],[Define to 1 if you want to use syslog.]) |
| 207 |
– |
fi |
| 208 |
– |
])dnl }}} |
| 209 |
– |
dnl {{{ ax_arg_with_syslog_facility |
| 210 |
– |
AC_DEFUN([AX_ARG_WITH_SYSLOG],[ |
| 211 |
– |
AC_ARG_WITH([syslog-facility],[AC_HELP_STRING([--with-syslog-facility=LOG],[Define the syslog facility to use (default: LOG_LOCAL4)])],[syslog_facility="$withval"],[syslog_facility="LOG_LOCAL4"]) |
| 212 |
– |
AC_DEFINE_UNQUOTED([LOG_FACILITY],[$syslog_facility],[Set to syslog facility to use.]) |
| 213 |
– |
])dnl }}} |
| 182 |
|
dnl {{{ ac_define_dir |
| 183 |
|
dnl http://autoconf-archive.cryp.to/ac_define_dir.html |
| 184 |
|
AC_DEFUN([AC_DEFINE_DIR], [ |