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