| 3 |
|
dnl {{{ ax_check_lib_ipv4 |
| 4 |
|
AC_DEFUN([AX_CHECK_LIB_IPV4],[ |
| 5 |
|
AC_SEARCH_LIBS([socket],[socket],,[AC_MSG_ERROR([socket library not found])]) |
| 6 |
+ |
AC_SEARCH_LIBS([inet_ntoa], [nsl]) |
| 7 |
+ |
AC_SEARCH_LIBS([inet_aton], [resolv]) |
| 8 |
|
AC_CHECK_FUNCS([inet_aton inet_ntop inet_pton]) |
| 9 |
< |
AC_CHECK_TYPES([struct sockaddr_in, struct sockaddr_storage, struct addrinfo],,,[#include <netdb.h>]) |
| 10 |
< |
AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,,[#include <netdb.h>]) |
| 9 |
> |
AC_CHECK_TYPES([struct sockaddr_in, struct sockaddr_storage, struct addrinfo],,,[#include <sys/types.h> |
| 10 |
> |
#include <sys/socket.h> |
| 11 |
> |
#include <netdb.h> |
| 12 |
> |
]) |
| 13 |
> |
AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,,[#include <sys/types.h> |
| 14 |
> |
<sys/socket.h>]) |
| 15 |
|
])dnl }}} |
| 16 |
|
dnl {{{ ax_check_lib_ipv6 |
| 17 |
|
AC_DEFUN([AX_CHECK_LIB_IPV6],[ |
| 18 |
< |
AC_CHECK_TYPES([struct sockaddr_in6],,[AC_DEFINE([IPV6],[1],[Define to 1 if you have IPv6 support.])],,[#include <netdb.h>]) |
| 13 |
< |
])dnl }}} |
| 14 |
< |
dnl {{{ ax_check_crypt |
| 15 |
< |
AC_DEFUN([AX_CHECK_LIB_CRYPT],[ |
| 16 |
< |
AC_SEARCH_LIBS(crypt, [crypt descrypt],,) |
| 17 |
< |
AM_CONDITIONAL([HAVE_CRYPT],[test "$ac_cv_search_crypt" = "none required"]) |
| 18 |
< |
])dnl }}} |
| 19 |
< |
dnl {{{ ax_check_lib_openssl |
| 20 |
< |
AC_DEFUN([AX_CHECK_LIB_OPENSSL],[ |
| 21 |
< |
AC_CHECK_HEADER([openssl/sha.h],,[AC_MSG_ERROR([openssl header files not found])]) |
| 22 |
< |
AC_CHECK_LIB([ssl],[SHA_Init],,[AC_MSG_ERROR([openssl library not found])]) |
| 23 |
< |
AC_CHECK_LIB([crypto],[EVP_MD_CTX_init],,[AC_MSG_ERROR([openssl library not found])]) |
| 18 |
> |
AC_CHECK_TYPE([struct sockaddr_in6],[AC_DEFINE([IPV6],[1],[Define to 1 if you have IPv6 support.])],,[#include <netinet/in.h>]) |
| 19 |
|
])dnl }}} |
| 20 |
|
dnl {{{ ax_arg_enable_ioloop_mechanism (FIXME) |
| 21 |
|
AC_DEFUN([AX_ARG_ENABLE_IOLOOP_MECHANISM],[ |
| 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]) |
| 42 |
|
dnl {{{ check for epoll oechanism support |
| 43 |
|
iopoll_mechanism_epoll=2 |
| 44 |
|
AC_DEFINE_UNQUOTED([__IOPOLL_MECHANISM_EPOLL],[$iopoll_mechanism_epoll],[epoll mechanism]) |
| 45 |
< |
AC_RUN_IFELSE([ |
| 45 |
> |
AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
| 46 |
|
#include <sys/epoll.h> |
| 47 |
|
#include <sys/syscall.h> |
| 48 |
|
#if defined(__stub_epoll_create) || defined(__stub___epoll_create) || defined(EPOLL_NEED_BODY) |
| 71 |
|
#endif |
| 72 |
|
_syscall1(int, epoll_create, int, size) |
| 73 |
|
#endif |
| 74 |
< |
main() { return epoll_create(256) == -1 ? 1 : 0; } |
| 75 |
< |
],[is_epoll_mechanism_available="yes"],[is_epoll_mechanism_available="no"]) |
| 74 |
> |
]], [[ return epoll_create(256) == -1 ? 1 : 0 ]])], |
| 75 |
> |
[is_epoll_mechanism_available="yes"],[is_epoll_mechanism_available="no"]) |
| 76 |
|
dnl }}} |
| 77 |
|
dnl {{{ check for devpoll mechanism support |
| 78 |
|
iopoll_mechanism_devpoll=3 |
| 89 |
|
dnl {{{ check for rtsigio mechanism support |
| 90 |
|
iopoll_mechanism_rtsigio=4 |
| 91 |
|
AC_DEFINE_UNQUOTED([__IOPOLL_MECHANISM_RTSIGIO],[$iopoll_mechanism_rtsigio],[rtsigio mechanism]) |
| 92 |
< |
AC_RUN_IFELSE([AC_LANG_PROGRAM([ |
| 92 |
> |
AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
| 93 |
> |
#define _GNU_SOURCE |
| 94 |
|
#include <fcntl.h> |
| 95 |
+ |
static unsigned int have_f_setsig = 0; |
| 96 |
+ |
]], [[ |
| 97 |
|
#ifdef F_SETSIG |
| 98 |
< |
main () { return 0; } /* F_SETSIG defined */ |
| 101 |
< |
#else |
| 102 |
< |
main () { return 1; } /* F_SETSIG not defined */ |
| 98 |
> |
have_f_setsig = 1; |
| 99 |
|
#endif |
| 100 |
< |
])],[is_rtsigio_mechanism_available="yes"],[is_rtsigio_mechanism_available="no"]) |
| 100 |
> |
return have_f_setsig == 0; |
| 101 |
> |
]])], [is_rtsigio_mechanism_available="yes"],[is_rtsigio_mechanism_available="no"]) |
| 102 |
|
dnl }}} |
| 103 |
|
dnl {{{ check for poll mechanism support |
| 104 |
|
iopoll_mechanism_poll=5 |
| 145 |
|
AC_DEFINE_UNQUOTED([USE_IOPOLL_MECHANISM],[$use_iopoll_mechanism],[use this iopoll mechanism]) |
| 146 |
|
dnl }}} |
| 147 |
|
])dnl }}} |
| 151 |
– |
dnl {{{ ax_arg_disable_block_alloc |
| 152 |
– |
AC_DEFUN([AX_ARG_DISABLE_BLOCK_ALLOC],[ |
| 153 |
– |
AC_ARG_ENABLE([block-alloc],[AC_HELP_STRING([--disable-block-alloc],[Disable block alloc.])],[block_alloc="$enableval"],[block_alloc="yes"]) |
| 154 |
– |
if test "$block_alloc" = "no" ; then |
| 155 |
– |
use_block_alloc=0 |
| 156 |
– |
else |
| 157 |
– |
use_block_alloc=1 |
| 158 |
– |
fi |
| 159 |
– |
AC_DEFINE_UNQUOTED([USE_BLOCK_ALLOC],[$use_block_alloc],[use block alloc]) |
| 160 |
– |
])dnl }}} |
| 161 |
– |
dnl {{{ ax_arg_disable_shared_modules (FIXME) |
| 162 |
– |
AC_DEFUN([AX_ARG_DISABLE_SHARED_MODULES],[ |
| 163 |
– |
AC_ARG_ENABLE([shared-modules],[AC_HELP_STRING([--disable-shared-modules],[Disable shared modules.])],[shared_modules="$enableval"],[shared_modules="yes"]) |
| 164 |
– |
AC_CHECK_HEADERS([dlfcn.h link.h]) |
| 165 |
– |
AC_CHECK_FUNCS([dlopen dlinfo]) |
| 166 |
– |
if test "$shared_modules" = "yes" ; then |
| 167 |
– |
use_shared_modules="yes" |
| 168 |
– |
AC_CHECK_LIB([dl],[dlopen],,[AC_MSG_ERROR([dl library not found])]) |
| 169 |
– |
AC_DEFINE([USE_SHARED_MODULES],[1],[Define to 1 if you want to use shared modules.]) |
| 170 |
– |
else |
| 171 |
– |
use_shared_modules="no" |
| 172 |
– |
AC_MSG_WARN([shared module support has been disabled per supplied configure option]) |
| 173 |
– |
fi |
| 174 |
– |
AM_CONDITIONAL([USE_SHARED_MODULES],[test "$shared_modules" = "yes"]) |
| 175 |
– |
])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"]) |
| 151 |
< |
AC_DEFINE_UNQUOTED([TOPICLEN],[($topiclen+1)],[Length of topics.]) |
| 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"]) |
| 156 |
< |
AC_DEFINE_UNQUOTED([NICKLEN],[($nicklen+1)],[Length of nicknames.]) |
| 185 |
< |
])dnl }}} |
| 186 |
< |
dnl {{{ ax_arg_with_userlen |
| 187 |
< |
AC_DEFUN([AX_ARG_WITH_USERLEN],[ |
| 188 |
< |
AC_ARG_WITH([userlen],[AC_HELP_STRING([--with-userlen=<value>],[Set username length (default 9).])],[userlen="$withval"],[userlen="9"]) |
| 189 |
< |
AC_DEFINE_UNQUOTED([USERLEN],[($userlen+1)],[Length of nicknames.]) |
| 190 |
< |
])dnl }}} |
| 191 |
< |
dnl {{{ ax_arg_with_hostlen |
| 192 |
< |
AC_DEFUN([AX_ARG_WITH_HOSTLEN],[ |
| 193 |
< |
AC_ARG_WITH([hostlen],[AC_HELP_STRING([--with-hostlen=<value>],[Set username length (default 62).])],[hostlen="$withval"],[hostlen="62"]) |
| 194 |
< |
AC_DEFINE_UNQUOTED([HOSTLEN],[($hostlen+1)],[Length of nicknames.]) |
| 195 |
< |
])dnl }}} |
| 196 |
< |
dnl {{{ ax_arg_with_lclient_heap_size |
| 197 |
< |
AC_DEFUN([AX_ARG_WITH_LCLIENT_HEAP_SIZE],[ |
| 198 |
< |
AC_ARG_WITH([lclient-heap-size],[AC_HELP_STRING([--lclient-heap-size=<value>],[Set local client heap size (default 256).])],[lclient_heap_size="$withval"],[lclient_heap_size="256"]) |
| 199 |
< |
AC_DEFINE_UNQUOTED([LCLIENT_HEAP_SIZE],[$lclient_heap_size],[Size of the local client heap.]) |
| 200 |
< |
])dnl }}} |
| 201 |
< |
dnl {{{ ax_arg_with_nickname_history_length |
| 202 |
< |
AC_DEFUN([AX_ARG_WITH_NICKNAME_HISTORY_LENGTH],[ |
| 203 |
< |
AC_ARG_WITH([nickname-history-length],[AC_HELP_STRING([--nickname-history-length=<value>],[Set length of nickname history list (default 1500).])],[nickname_history_length="$withval"],[nickname_history_length="1500"]) |
| 204 |
< |
AC_DEFINE_UNQUOTED([NICKNAMEHISTORYLENGTH],[$nickname_history_length],[Size of the nickname history list.]) |
| 205 |
< |
])dnl }}} |
| 206 |
< |
dnl {{{ ax_arg_with_client_heap_size |
| 207 |
< |
AC_DEFUN([AX_ARG_WITH_CLIENT_HEAP_SIZE],[ |
| 208 |
< |
AC_ARG_WITH([client-heap-size],[AC_HELP_STRING([--client-heap-size=<value>],[Set client heap size (default 256).])],[client_heap_size="$withval"],[client_heap_size="256"]) |
| 209 |
< |
AC_DEFINE_UNQUOTED([CLIENT_HEAP_SIZE],[$client_heap_size],[Size of the client heap.]) |
| 210 |
< |
])dnl }}} |
| 211 |
< |
dnl {{{ ax_arg_with_channel_heap_size |
| 212 |
< |
AC_DEFUN([AX_ARG_WITH_CHANNEL_HEAP_SIZE],[ |
| 213 |
< |
AC_ARG_WITH([channel-heap-size],[AC_HELP_STRING([--channel-heap-size=<value>],[Set channel heap size (default 256).])],[channel_heap_size="$withval"],[channel_heap_size="256"]) |
| 214 |
< |
AC_DEFINE_UNQUOTED([CHANNEL_HEAP_SIZE],[$channel_heap_size],[Size of the channel heap.]) |
| 215 |
< |
])dnl }}} |
| 216 |
< |
dnl {{{ ax_arg_with_dbuf_heap_size |
| 217 |
< |
AC_DEFUN([AX_ARG_WITH_DBUF_HEAP_SIZE],[ |
| 218 |
< |
AC_ARG_WITH([dbuf-heap-size],[AC_HELP_STRING([--dbuf-heap-size=<value>],[Set dbuf heap size (default 64).])],[dbuf_heap_size="$withval"],[dbuf_heap_size="64"]) |
| 219 |
< |
AC_DEFINE_UNQUOTED([DBUF_HEAP_SIZE],[$dbuf_heap_size],[Size of the dbuf heap.]) |
| 220 |
< |
])dnl }}} |
| 221 |
< |
dnl {{{ ax_arg_with_dnode_heap_size |
| 222 |
< |
AC_DEFUN([AX_ARG_WITH_DNODE_HEAP_SIZE],[ |
| 223 |
< |
AC_ARG_WITH([dnode-heap-size],[AC_HELP_STRING([--dnode-heap-size=<value>],[Set dnode heap size (default 256).])],[dnode_heap_size="$withval"],[dnode_heap_size="256"]) |
| 224 |
< |
AC_DEFINE_UNQUOTED([DNODE_HEAP_SIZE],[$dnode_heap_size],[Size of the dlink_node heap.]) |
| 225 |
< |
])dnl }}} |
| 226 |
< |
dnl {{{ ax_arg_with_ban_heap_size |
| 227 |
< |
AC_DEFUN([AX_ARG_WITH_BAN_HEAP_SIZE],[ |
| 228 |
< |
AC_ARG_WITH([ban-heap-size],[AC_HELP_STRING([--ban-heap-size=<value>],[Set ban heap size (default 128).])],[ban_heap_size="$withval"],[ban_heap_size="128"]) |
| 229 |
< |
AC_DEFINE_UNQUOTED([BAN_HEAP_SIZE],[$ban_heap_size],[Size of the ban heap.]) |
| 230 |
< |
])dnl }}} |
| 231 |
< |
dnl {{{ ax_arg_with_topic_heap_size |
| 232 |
< |
AC_DEFUN([AX_ARG_WITH_TOPIC_HEAP_SIZE],[ |
| 233 |
< |
AC_ARG_WITH([topic-heap-size],[AC_HELP_STRING([--topic-heap-size=<value>],[Set topic heap size (default 256).])],[topic_heap_size="$withval"],[topic_heap_size="256"]) |
| 234 |
< |
AC_DEFINE_UNQUOTED([TOPIC_HEAP_SIZE],[$topic_heap_size],[Size of the topic heap.]) |
| 235 |
< |
])dnl }}} |
| 236 |
< |
dnl {{{ ax_arg_with_ircd_heap_size |
| 237 |
< |
AC_DEFUN([AX_ARG_WITH_IRCD_HEAP_SIZE],[ |
| 238 |
< |
AC_ARG_WITH([ircd-heap-size],[AC_HELP_STRING([--ircd-heap-size=<value>],[Set ircd heap size (default 8).])],[ircd_heap_size="$withval"],[ircd_heap_size="8"]) |
| 239 |
< |
AC_DEFINE_UNQUOTED([IRCD_HEAP_SIZE],[$ircd_heap_size],[Size of the ircd heap.]) |
| 240 |
< |
])dnl }}} |
| 241 |
< |
dnl {{{ ax_arg_with_mqueue_heap_size |
| 242 |
< |
AC_DEFUN([AX_ARG_WITH_MQUEUE_HEAP_SIZE],[ |
| 243 |
< |
AC_ARG_WITH([mqueue-heap-size],[AC_HELP_STRING([--mqueue-size=<value>],[Set mqueue heap size (default 256).])],[mqueue_heap_size="$withval"],[mqueue_heap_size="256"]) |
| 244 |
< |
AC_DEFINE_UNQUOTED([MQUEUE_HEAP_SIZE],[$mqueue_heap_size],[Size of the floodserv mqueue heap.]) |
| 245 |
< |
])dnl }}} |
| 246 |
< |
dnl {{{ ax_arg_with_fmsg_heap_size |
| 247 |
< |
AC_DEFUN([AX_ARG_WITH_FMSG_HEAP_SIZE],[ |
| 248 |
< |
AC_ARG_WITH([fmsg-heap-size],[AC_HELP_STRING([--fmsg-size=<value>],[Set fmsg heap size (default 256).])],[fmsg_heap_size="$withval"],[fmsg_heap_size="256"]) |
| 249 |
< |
AC_DEFINE_UNQUOTED([FMSG_HEAP_SIZE],[$fmsg_heap_size],[Size of the floodserv fmsg heap.]) |
| 250 |
< |
])dnl }}} |
| 251 |
< |
dnl {{{ ax_arg_enable_efnet |
| 252 |
< |
AC_DEFUN([AX_ARG_ENABLE_EFNET],[ |
| 253 |
< |
AC_ARG_ENABLE([efnet],[AC_HELP_STRING([--enable-efnet],[For IRCDs running on EFnet.])],[efnet="$enableval"],[efnet="no"]) |
| 254 |
< |
if test "$efnet" = "yes" ; then |
| 255 |
< |
use_efnet="yes" |
| 256 |
< |
AC_DEFINE([EFNET],[1],[Define to 1 if this server will be an EFnet server.]) |
| 257 |
< |
AC_DEFINE([TS5_ONLY],[1],[If Defined to 1 server links to your network must have a minimum of TS5.]) |
| 258 |
< |
else |
| 259 |
< |
AC_DEFINE([INVARIANTS],[1],[Miscellaneous sanity checks for the IRCd. Makes it slightly slower]) |
| 260 |
< |
use_efnet="no" |
| 261 |
< |
fi |
| 262 |
< |
AM_CONDITIONAL([EFNET],[test "$use_efnet" = "yes"]) |
| 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)],[Length of nicknames.]) |
| 157 |
|
])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.]) |
| 276 |
< |
CFLAGS="$CFLAGS -Wall -Werror -g -O0" |
| 277 |
< |
else |
| 278 |
< |
AC_DEFINE([NDEBUG],[1],[Define to 1 to disable debugging.]) |
| 169 |
> |
CFLAGS="-Wall -g -O0" |
| 170 |
|
fi |
| 171 |
|
])dnl }}} |
| 172 |
|
dnl {{{ ax_arg_enable_warnings |
| 173 |
|
AC_DEFUN([AX_ARG_ENABLE_WARNINGS],[ |
| 174 |
< |
AC_ARG_ENABLE([warnings],[AC_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 174 |
> |
AC_ARG_ENABLE([warnings],[AS_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"]) |
| 175 |
|
if test "$warnings" = "yes" ; then |
| 176 |
< |
CFLAGS="-Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -Wno-unused" |
| 286 |
< |
fi |
| 287 |
< |
])dnl }}} |
| 288 |
< |
dnl {{{ ax_arg_enable_efence |
| 289 |
< |
AC_DEFUN([AX_ARG_ENABLE_EFENCE],[ |
| 290 |
< |
AC_ARG_ENABLE([efence],[AC_HELP_STRING([--enable-efence],[Enable compilation with ElectricFence.])],[efence="$enableval"],[efence="no"]) |
| 291 |
< |
if test "$efence" = "yes" ; then |
| 292 |
< |
AC_SEARCH_LIBS([malloc],[efence],,[AC_MSG_ERROR([efence library not found])]) |
| 176 |
> |
CFLAGS="-Wall -Wextra -Wno-unused -Wcast-qual -Wcast-align -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -Wundef" |
| 177 |
|
fi |
| 178 |
|
])dnl }}} |
| 295 |
– |
dnl {{{ ax_arg_enable_syslog |
| 296 |
– |
AC_DEFUN([AX_ARG_ENABLE_SYSLOG],[ |
| 297 |
– |
AC_CHECK_HEADERS([syslog.h sys/syslog.h]) |
| 298 |
– |
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"]) |
| 299 |
– |
if test "$enableval" != "no" ; then |
| 300 |
– |
for option in $enableval ; do |
| 301 |
– |
case "$option" in |
| 302 |
– |
users) AC_DEFINE([SYSLOG_USERS],[1],[Send user log stuff to syslog.]) ;; |
| 303 |
– |
oper) AC_DEFINE([SYSLOG_OPER],[1],[Send oper log stuff to syslog.]) ;; |
| 304 |
– |
yes) : ;; |
| 305 |
– |
*) AC_MSG_ERROR([invalid value for --enable-syslog: $option]) ;; |
| 306 |
– |
esac |
| 307 |
– |
done |
| 308 |
– |
AC_DEFINE([USE_SYSLOG],[1],[Define to 1 if you want to use syslog.]) |
| 309 |
– |
fi |
| 310 |
– |
])dnl }}} |
| 311 |
– |
dnl {{{ ax_arg_with_syslog_facility |
| 312 |
– |
AC_DEFUN([AX_ARG_WITH_SYSLOG],[ |
| 313 |
– |
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"]) |
| 314 |
– |
AC_DEFINE_UNQUOTED([LOG_FACILITY],[$syslog_facility],[Set to syslog facility to use.]) |
| 315 |
– |
])dnl }}} |
| 179 |
|
dnl {{{ ac_define_dir |
| 180 |
|
dnl http://autoconf-archive.cryp.to/ac_define_dir.html |
| 181 |
|
AC_DEFUN([AC_DEFINE_DIR], [ |