AC_PREREQ(2.60)
-AC_INIT([charybdis], [4-rc5])
+AC_INIT([charybdis], [4.1.3-dev])
AC_LANG(C)
AC_USE_SYSTEM_EXTENSIONS
AC_SEARCH_LIBS(inet_ntoa, nsl,, [AC_MSG_ERROR([libnsl not found! Aborting.])])
fi
-AC_ARG_ENABLE(ipv6,
-AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),[ipv6=$enableval],[ipv6=no])
-
AC_SEARCH_LIBS(crypt, [crypt descrypt],,)
CRYPT_LIB=$ac_cv_search_crypt
dnl Specialized functions and libraries
dnl ===================================
+AC_ARG_ENABLE(hyperscan,
+AC_HELP_STRING([--disable-hyperscan],[Disable hyperscan support]),
+[hyperscan=$enableval],[hyperscan=yes])
+
+AS_IF([test "$hyperscan" = yes], [
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ PKG_CHECK_MODULES([HS], [libhs >= 4], [], [hyperscan=no])
+ CPPFLAGS="$CPPFLAGS $HS_CFLAGS"
+ LIBS="$LIBS $HS_LIBS"
+ AC_CHECK_HEADER([hs_common.h], [], [hyperscan=no])
+ AC_CHECK_FUNC([hs_scan], [], [hyperscan=no])
+])
+
+AS_IF([test "$hyperscan" = no], [
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+])
+
+AM_CONDITIONAL([HAVE_HYPERSCAN], [test "$hyperscan" = "yes"])
+
+
AC_ARG_WITH(zlib-path,
AC_HELP_STRING([--with-zlib-path=DIR],[Path to libz.so for ziplinks support.]),
[LIBS="$LIBS -L$withval"],)
fi
+AC_ARG_WITH(sctp-path,
+AC_HELP_STRING([--with-sctp-path=DIR],[Path to libsctp.so for SCTP support.]),
+[LIBS="$LIBS -L$withval"],)
+
+AC_ARG_ENABLE(sctp,
+AC_HELP_STRING([--disable-sctp],[Disable SCTP support]),
+[sctp=$enableval],[sctp=yes])
+
+if test "$sctp" = yes; then
+
+AC_CHECK_HEADER(netinet/sctp.h, [
+ AC_CHECK_LIB(sctp, sctp_bindx,
+ [
+ AC_SUBST(LIBSCTP_LD, -lsctp)
+ AC_DEFINE(HAVE_LIBSCTP, 1, [Define to 1 if libsctp (-lsctp) is available.])
+ ], sctp=no)
+], sctp=no)
+
+fi
+
dnl Check for shared sqlite
dnl ======================
AC_ARG_WITH(shared-sqlite,
AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)])
AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
+
+AC_ARG_WITH(asan,
+AC_HELP_STRING([--with-asan],[Build with Address Sanitizer]),
+[
+ CFLAGS="$CFLAGS -fsanitize=address"
+ LDFLAGS="$LDFLAGS -fsanitize=address"
+])
+
# rpath, for finding librb.so at run time
hold_ldflags=$LDFLAGS
AC_MSG_CHECKING(for the ld -rpath flag)
Ziplinks : $zlib
OpenSSL : $openssl
+ SCTP : $sctp
Nickname length : $NICKLEN
Topic length : $TOPICLEN