| 3 |
|
|
| 4 |
|
AC_REVISION([$Id$]) |
| 5 |
|
|
| 6 |
< |
AC_PREREQ(2.63) |
| 7 |
< |
AC_INIT([ircd-hybrid], [7.2.4]) |
| 8 |
< |
AM_INIT_AUTOMAKE(1.11) |
| 6 |
> |
AC_PREREQ(2.68) |
| 7 |
> |
AC_INIT([ircd-hybrid], [7.3-rc1], [bugs@ircd-hybrid.org]) |
| 8 |
> |
AM_INIT_AUTOMAKE(1.11.1) |
| 9 |
|
AM_MAINTAINER_MODE |
| 10 |
|
AC_CONFIG_HEADER(config.h) |
| 11 |
|
AC_CONFIG_SRCDIR(src/ircd.c) |
| 12 |
|
|
| 13 |
– |
|
| 13 |
|
# Checks for programs. |
| 14 |
< |
AC_PROG_CC |
| 14 |
> |
AC_PROG_CC_C99 |
| 15 |
> |
AS_IF([test "$ac_cv_prog_cc_c99" = "no"], |
| 16 |
> |
[AC_MSG_ERROR([no C99 compiler found. Aborting.])]) |
| 17 |
|
AC_PROG_YACC |
| 18 |
|
AM_PROG_LEX |
| 19 |
|
AC_PROG_INSTALL |
| 20 |
|
|
| 21 |
< |
|
| 22 |
< |
#ltdl stuff |
| 23 |
< |
LT_INIT([dlopen]) |
| 24 |
< |
LTDL_INIT |
| 21 |
> |
# Initializing libtool. |
| 22 |
> |
LT_CONFIG_LTDL_DIR([libltdl]) |
| 23 |
> |
LT_INIT([dlopen disable-static]) |
| 24 |
> |
LTDL_INIT([recursive convenience]) |
| 25 |
|
LIBTOOL="$LIBTOOL --silent" |
| 26 |
|
|
| 26 |
– |
|
| 27 |
|
# Checks for libraries. |
| 28 |
|
AX_CHECK_LIB_IPV4 |
| 29 |
|
AX_CHECK_LIB_IPV6 |
| 30 |
|
|
| 31 |
– |
|
| 31 |
|
# Checks for typedefs, structures, and compiler characteristics. |
| 33 |
– |
AC_C_CONST |
| 34 |
– |
AC_C_INLINE |
| 32 |
|
AC_C_BIGENDIAN |
| 33 |
|
|
| 37 |
– |
AC_CHECK_SIZEOF(int64_t) |
| 38 |
– |
AC_CHECK_SIZEOF(long long) |
| 39 |
– |
|
| 40 |
– |
if test "$ac_cv_sizeof_int64_t" = 8; then |
| 41 |
– |
AC_CHECK_TYPE(uint64_t) |
| 42 |
– |
AC_CHECK_TYPE(int64_t) |
| 43 |
– |
elif test "$ac_cv_sizeof_long_long" = 8; then |
| 44 |
– |
AC_CHECK_TYPE(uint64_t, unsigned long long) |
| 45 |
– |
AC_CHECK_TYPE(int64_t, long long) |
| 46 |
– |
else |
| 47 |
– |
AC_MSG_ERROR([Your system doesn't appear to have 64 bit integers. Aborting.]) |
| 48 |
– |
fi |
| 49 |
– |
|
| 50 |
– |
|
| 34 |
|
# Checks for library functions. |
| 35 |
< |
AC_CHECK_FUNCS_ONCE(snprintf \ |
| 36 |
< |
vsnprintf \ |
| 37 |
< |
lrand48 \ |
| 38 |
< |
srand48 \ |
| 39 |
< |
mmap \ |
| 40 |
< |
strtok_r \ |
| 58 |
< |
usleep \ |
| 59 |
< |
strlcat \ |
| 60 |
< |
strlcpy \ |
| 61 |
< |
basename) |
| 35 |
> |
AC_CHECK_FUNCS_ONCE(mmap \ |
| 36 |
> |
strtok_r \ |
| 37 |
> |
usleep \ |
| 38 |
> |
strlcat \ |
| 39 |
> |
strlcpy \ |
| 40 |
> |
socketpair) |
| 41 |
|
|
| 42 |
|
# Checks for header files. |
| 43 |
|
AC_CHECK_HEADERS_ONCE(crypt.h \ |
| 47 |
|
sys/param.h \ |
| 48 |
|
errno.h \ |
| 49 |
|
sys/syslog.h \ |
| 71 |
– |
stddef.h \ |
| 72 |
– |
libgen.h \ |
| 50 |
|
types.h \ |
| 51 |
|
socket.h \ |
| 52 |
|
sys/wait.h \ |
| 53 |
|
wait.h \ |
| 54 |
|
link.h) |
| 55 |
|
|
| 56 |
< |
dnl check for /dev/null so we can use it to hold evil fd's |
| 56 |
> |
# check for /dev/null so we can use it to hold evil fd's |
| 57 |
|
AC_MSG_CHECKING([for /dev/null]) |
| 58 |
< |
if test -c /dev/null ; then |
| 59 |
< |
AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null]) |
| 60 |
< |
AC_MSG_RESULT(yes) |
| 84 |
< |
else |
| 58 |
> |
AS_IF([test -c /dev/null], [ |
| 59 |
> |
AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null]) |
| 60 |
> |
AC_MSG_RESULT([yes])], [ |
| 61 |
|
AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null]) |
| 62 |
< |
AC_MSG_RESULT(no - using devnull.log) |
| 87 |
< |
fi |
| 62 |
> |
AC_MSG_RESULT([no - using devnull.log])]) |
| 63 |
|
|
| 64 |
|
|
| 65 |
< |
AC_SEARCH_LIBS(crypt, [crypt descrypt],,) |
| 91 |
< |
AM_CONDITIONAL([HAVE_CRYPT], [test "$ac_cv_search_crypt" = "none required"]) |
| 65 |
> |
AC_SEARCH_LIBS(crypt, crypt) |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
AC_ARG_WITH(zlib-path, |
| 72 |
|
AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib],[Disable ziplinks support]), |
| 73 |
|
[zlib=$enableval],[zlib=yes]) |
| 74 |
|
|
| 75 |
< |
if test "$zlib" = yes; then |
| 75 |
> |
AS_IF([test "$zlib" = "yes"], [ |
| 76 |
|
AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion, |
| 77 |
|
[ |
| 78 |
|
LIBS="-lz $LIBS" |
| 79 |
|
AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.]) |
| 80 |
|
], zlib=no) |
| 81 |
|
], zlib=no) |
| 82 |
< |
fi |
| 82 |
> |
]) |
| 83 |
> |
|
| 84 |
> |
AC_ARG_WITH(libpcre-path, |
| 85 |
> |
AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]), |
| 86 |
> |
[LDFLAGS="-L$withval $LDFLAGS"],) |
| 87 |
> |
|
| 88 |
> |
AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]), |
| 89 |
> |
[libpcre=$enableval],[libpcre=yes]) |
| 90 |
> |
|
| 91 |
> |
AS_IF([test "$libpcre" = "yes"], [ |
| 92 |
> |
AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study, |
| 93 |
> |
[ |
| 94 |
> |
LIBS="-lpcre $LIBS" |
| 95 |
> |
AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.]) |
| 96 |
> |
], libpcre=no) |
| 97 |
> |
], libpcre=no) |
| 98 |
> |
]) |
| 99 |
> |
AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes]) |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
dnl Openssl checks |
| 105 |
|
--disable-openssl Disable OpenSSL support. ], |
| 106 |
|
[ cf_enable_openssl=$enableval ], |
| 107 |
|
[ cf_enable_openssl="auto" ]) |
| 108 |
< |
AC_MSG_CHECKING(for OpenSSL) |
| 108 |
> |
AC_MSG_CHECKING([for OpenSSL]) |
| 109 |
|
if test "$cf_enable_openssl" != "no"; then |
| 110 |
|
cf_openssl_basedir="" |
| 111 |
|
if test "$cf_enable_openssl" != "auto" && |
| 150 |
|
dnl we have a problem. |
| 151 |
|
if test ! -z "$cf_openssl_basedir"; then |
| 152 |
|
LIBS="-lcrypto -lssl $LIBS" |
| 153 |
< |
AC_MSG_RESULT($cf_openssl_basedir) |
| 153 |
> |
AC_MSG_RESULT([$cf_openssl_basedir]) |
| 154 |
|
cf_enable_openssl="yes" |
| 155 |
|
AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl]) |
| 156 |
|
else |
| 157 |
< |
AC_MSG_RESULT(not found. Please check your path.) |
| 157 |
> |
AC_MSG_RESULT([not found. Please check your path.]) |
| 158 |
|
cf_enable_openssl="no" |
| 159 |
|
fi |
| 160 |
|
unset cf_openssl_basedir |
| 161 |
|
else |
| 162 |
|
dnl If --disable-openssl was specified |
| 163 |
< |
AC_MSG_RESULT(disabled) |
| 163 |
> |
AC_MSG_RESULT([disabled]) |
| 164 |
|
fi |
| 165 |
+ |
|
| 166 |
+ |
AS_IF([test "$cf_enable_openssl" != "no"], |
| 167 |
+ |
[AC_MSG_CHECKING(for OpenSSL 0.9.7 or above) |
| 168 |
+ |
AC_RUN_IFELSE([ |
| 169 |
+ |
AC_LANG_PROGRAM([ |
| 170 |
+ |
#include <openssl/opensslv.h> |
| 171 |
+ |
#include <stdlib.h>], |
| 172 |
+ |
[[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00907000)); ]])], |
| 173 |
+ |
[cf_openssl_version_ok=yes], |
| 174 |
+ |
[cf_openssl_version_ok=no], |
| 175 |
+ |
[cf_openssl_version_ok=no]) |
| 176 |
+ |
|
| 177 |
+ |
AS_IF([test "$cf_openssl_version_ok" = "yes"], |
| 178 |
+ |
[AC_MSG_RESULT(found) |
| 179 |
+ |
|
| 180 |
+ |
AC_CHECK_LIB(crypto, RSA_free) |
| 181 |
+ |
AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"], |
| 182 |
+ |
[AC_CHECK_FUNCS(EVP_bf_cfb \ |
| 183 |
+ |
EVP_cast5_cfb \ |
| 184 |
+ |
EVP_idea_cfb \ |
| 185 |
+ |
EVP_rc5_32_12_16_cfb \ |
| 186 |
+ |
EVP_des_ede3_cfb \ |
| 187 |
+ |
EVP_des_cfb)]) |
| 188 |
+ |
],[AC_MSG_RESULT(no - OpenSSL support disabled) |
| 189 |
+ |
cf_enable_openssl="no"])]) |
| 190 |
+ |
|
| 191 |
|
AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes]) |
| 192 |
|
|
| 193 |
|
|
| 194 |
|
AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert], |
| 195 |
|
[Enable assert() statements]), |
| 196 |
|
[assert=$enableval], [assert=no]) |
| 197 |
< |
if test "$assert" = no; then |
| 198 |
< |
AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.]) |
| 199 |
< |
fi |
| 197 |
> |
|
| 198 |
> |
AS_IF([test "$assert" = "no"], |
| 199 |
> |
[AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])]) |
| 200 |
|
|
| 201 |
|
|
| 202 |
|
AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net], |
| 203 |
|
[Enable small network support.]), |
| 204 |
|
[small_net=$enableval], [small_net=no]) |
| 205 |
|
|
| 206 |
< |
if test "$small_net" = yes; then |
| 206 |
> |
AS_IF([test "$small_net" = "yes"], [ |
| 207 |
|
AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.]) |
| 208 |
|
AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.]) |
| 209 |
|
AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.]) |
| 212 |
|
AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.]) |
| 213 |
|
AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.]) |
| 214 |
|
AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.]) |
| 215 |
< |
else |
| 215 |
> |
AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.]) |
| 216 |
> |
AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [ |
| 217 |
> |
|
| 218 |
|
AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.]) |
| 219 |
|
AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.]) |
| 220 |
|
AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.]) |
| 223 |
|
AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.]) |
| 224 |
|
AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.]) |
| 225 |
|
AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.]) |
| 226 |
< |
fi |
| 226 |
> |
AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.]) |
| 227 |
> |
AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])]) |
| 228 |
|
|
| 229 |
|
|
| 230 |
|
# Argument processing. |
| 247 |
|
AC_CONFIG_FILES( \ |
| 248 |
|
Makefile \ |
| 249 |
|
etc/Makefile \ |
| 230 |
– |
etc/example.conf \ |
| 231 |
– |
etc/example.conf.quick \ |
| 232 |
– |
etc/example.efnet.conf \ |
| 250 |
|
servlink/Makefile \ |
| 251 |
|
contrib/Makefile \ |
| 252 |
|
contrib/help/Makefile \ |
| 253 |
|
src/Makefile \ |
| 254 |
+ |
libltdl/Makefile \ |
| 255 |
|
messages/Makefile \ |
| 256 |
|
modules/Makefile \ |
| 257 |
< |
modules/core/Makefile \ |
| 257 |
> |
modules/core/Makefile \ |
| 258 |
|
doc/Makefile \ |
| 259 |
|
help/Makefile \ |
| 260 |
< |
help/opers/Makefile \ |
| 261 |
< |
help/users/Makefile \ |
| 262 |
< |
lib/Makefile \ |
| 245 |
< |
lib/pcre/Makefile \ |
| 246 |
< |
tools/Makefile |
| 247 |
< |
) |
| 260 |
> |
help/opers/Makefile \ |
| 261 |
> |
help/users/Makefile \ |
| 262 |
> |
tools/Makefile) |
| 263 |
|
|
| 264 |
|
AC_OUTPUT |