1 |
< |
# Inspired by work Copyright (C) 2006 Luca Filipozzi |
2 |
< |
# vim: set fdm=marker ts=2 sw=2 et: |
1 |
> |
dnl Process this file with autoconf to produce a configure script. |
2 |
|
|
3 |
< |
AC_PREREQ(2.63) |
4 |
< |
AC_INIT([ircd-hybrid], [7.2.4]) |
5 |
< |
AM_INIT_AUTOMAKE |
3 |
> |
AC_REVISION([$Id$]) |
4 |
> |
|
5 |
> |
AC_PREREQ(2.69) |
6 |
> |
AC_INIT([ircd-hybrid], [TRUNK], [bugs@ircd-hybrid.org]) |
7 |
> |
AM_INIT_AUTOMAKE(1.15 subdir-objects) |
8 |
|
AM_MAINTAINER_MODE |
9 |
+ |
AC_CONFIG_MACRO_DIR([m4]) |
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 suitable 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 |
|
|
24 |
– |
|
27 |
|
# Checks for libraries. |
28 |
< |
AX_CHECK_LIB_IPV4 |
29 |
< |
AX_CHECK_LIB_IPV6 |
28 |
> |
GCC_STACK_PROTECT_CC |
29 |
> |
GCC_STACK_PROTECT_LIB |
30 |
|
|
31 |
+ |
AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing]) |
32 |
+ |
AX_LIBRARY_NET |
33 |
|
|
34 |
|
# Checks for typedefs, structures, and compiler characteristics. |
31 |
– |
AC_C_CONST |
32 |
– |
AC_C_INLINE |
35 |
|
AC_C_BIGENDIAN |
36 |
|
|
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 |
– |
|
37 |
|
# Checks for library functions. |
38 |
< |
AC_CHECK_FUNCS_ONCE(snprintf \ |
39 |
< |
vsnprintf \ |
40 |
< |
lrand48 \ |
41 |
< |
srand48 \ |
54 |
< |
mmap \ |
55 |
< |
strtok_r \ |
56 |
< |
usleep \ |
57 |
< |
strlcat \ |
58 |
< |
strlcpy \ |
59 |
< |
basename) |
38 |
> |
AC_CHECK_FUNCS_ONCE(strtok_r \ |
39 |
> |
usleep \ |
40 |
> |
strlcat \ |
41 |
> |
strlcpy) |
42 |
|
|
43 |
|
# Checks for header files. |
44 |
|
AC_CHECK_HEADERS_ONCE(crypt.h \ |
63 |
– |
inttypes.h \ |
64 |
– |
stdint.h \ |
45 |
|
sys/resource.h \ |
46 |
|
sys/param.h \ |
67 |
– |
errno.h \ |
68 |
– |
sys/syslog.h \ |
69 |
– |
stddef.h \ |
70 |
– |
libgen.h \ |
47 |
|
types.h \ |
48 |
|
socket.h \ |
49 |
|
sys/wait.h \ |
50 |
< |
wait.h \ |
75 |
< |
link.h) |
50 |
> |
wait.h) |
51 |
|
|
52 |
< |
dnl check for /dev/null so we can use it to hold evil fd's |
78 |
< |
AC_MSG_CHECKING([for /dev/null]) |
79 |
< |
if test -c /dev/null ; then |
80 |
< |
AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null]) |
81 |
< |
AC_MSG_RESULT(yes) |
82 |
< |
else |
83 |
< |
AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null]) |
84 |
< |
AC_MSG_RESULT(no - using devnull.log) |
85 |
< |
fi |
86 |
< |
|
87 |
< |
|
88 |
< |
AC_SEARCH_LIBS(crypt, [crypt descrypt],,) |
89 |
< |
AM_CONDITIONAL([HAVE_CRYPT], [test "$ac_cv_search_crypt" = "none required"]) |
90 |
< |
|
91 |
< |
|
92 |
< |
AC_ARG_WITH(zlib-path, |
93 |
< |
AC_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]), |
94 |
< |
[LDFLAGS="-L$withval $LDFLAGS"],) |
95 |
< |
|
96 |
< |
AC_ARG_ENABLE(zlib, AC_HELP_STRING([--disable-zlib],[Disable ziplinks support]), |
97 |
< |
[zlib=$enableval],[zlib=yes]) |
98 |
< |
|
99 |
< |
if test "$zlib" = yes; then |
100 |
< |
AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion, |
101 |
< |
[ |
102 |
< |
LIBS="-lz $LIBS" |
103 |
< |
AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.]) |
104 |
< |
], zlib=no) |
105 |
< |
], zlib=no) |
106 |
< |
fi |
107 |
< |
|
108 |
< |
|
109 |
< |
dnl Openssl checks |
110 |
< |
AC_ARG_ENABLE(openssl, |
111 |
< |
[ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional). |
112 |
< |
--disable-openssl Disable OpenSSL support. ], |
113 |
< |
[ cf_enable_openssl=$enableval ], |
114 |
< |
[ cf_enable_openssl="auto" ]) |
115 |
< |
AC_MSG_CHECKING(for OpenSSL) |
116 |
< |
if test "$cf_enable_openssl" != "no"; then |
117 |
< |
cf_openssl_basedir="" |
118 |
< |
if test "$cf_enable_openssl" != "auto" && |
119 |
< |
test "$cf_enable_openssl" != "yes"; then |
120 |
< |
dnl Support for --enable-openssl=/some/place |
121 |
< |
cf_openssl_basedir="${cf_enable_openssl}" |
122 |
< |
else |
123 |
< |
dnl Do the auto-probe here. Check some common directory paths. |
124 |
< |
for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\ |
125 |
< |
/opt /opt/openssl /usr/local/openssl; do |
126 |
< |
if test -f "${dirs}/include/openssl/opensslv.h"; then |
127 |
< |
cf_openssl_basedir="${dirs}" |
128 |
< |
break |
129 |
< |
fi |
130 |
< |
done |
131 |
< |
unset dirs |
132 |
< |
fi |
133 |
< |
|
134 |
< |
dnl Now check cf_openssl_found to see if we found anything. |
135 |
< |
if test ! -z "$cf_openssl_basedir"; then |
136 |
< |
if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then |
137 |
< |
CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS" |
138 |
< |
LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS" |
139 |
< |
else |
140 |
< |
dnl OpenSSL wasn't found in the directory specified. Naughty |
141 |
< |
dnl administrator... |
142 |
< |
cf_openssl_basedir="" |
143 |
< |
fi |
144 |
< |
else |
145 |
< |
dnl Check for stock FreeBSD 4.x and 5.x systems, since their files |
146 |
< |
dnl are in /usr/include and /usr/lib. In this case, we don't want to |
147 |
< |
dnl change INCLUDES or LIBS, but still want to enable OpenSSL. |
148 |
< |
dnl We can't do this check above, because some people want two versions |
149 |
< |
dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl) |
150 |
< |
dnl and they want /usr/local/ssl to have preference. |
151 |
< |
if test -f "/usr/include/openssl/opensslv.h"; then |
152 |
< |
cf_openssl_basedir="/usr" |
153 |
< |
fi |
154 |
< |
fi |
155 |
< |
|
156 |
< |
dnl If we have a basedir defined, then everything is okay. Otherwise, |
157 |
< |
dnl we have a problem. |
158 |
< |
if test ! -z "$cf_openssl_basedir"; then |
159 |
< |
LIBS="-lcrypto -lssl $LIBS" |
160 |
< |
AC_MSG_RESULT($cf_openssl_basedir) |
161 |
< |
cf_enable_openssl="yes" |
162 |
< |
AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl]) |
163 |
< |
else |
164 |
< |
AC_MSG_RESULT(not found. Please check your path.) |
165 |
< |
cf_enable_openssl="no" |
166 |
< |
fi |
167 |
< |
unset cf_openssl_basedir |
168 |
< |
else |
169 |
< |
dnl If --disable-openssl was specified |
170 |
< |
AC_MSG_RESULT(disabled) |
171 |
< |
fi |
172 |
< |
AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes]) |
173 |
< |
|
174 |
< |
|
175 |
< |
AC_ARG_ENABLE(assert, AC_HELP_STRING([--enable-assert], [Enable assert() statements]), |
176 |
< |
[assert=$enableval], [assert=no]) |
177 |
< |
if test "$assert" = no; then |
178 |
< |
AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.]) |
179 |
< |
fi |
180 |
< |
|
181 |
< |
|
182 |
< |
AC_ARG_ENABLE(small-net, |
183 |
< |
AC_HELP_STRING([--enable-small-net],[Enable small network support.]), |
184 |
< |
[small_net=$enableval], [small_net=no]) |
185 |
< |
|
186 |
< |
if test "$small_net" = yes; then |
187 |
< |
AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.]) |
188 |
< |
AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.]) |
189 |
< |
AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.]) |
190 |
< |
AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.]) |
191 |
< |
AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.]) |
192 |
< |
AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.]) |
193 |
< |
AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.]) |
194 |
< |
AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.]) |
195 |
< |
else |
196 |
< |
AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.]) |
197 |
< |
AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.]) |
198 |
< |
AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.]) |
199 |
< |
AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.]) |
200 |
< |
AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.]) |
201 |
< |
AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.]) |
202 |
< |
AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.]) |
203 |
< |
AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.]) |
204 |
< |
fi |
52 |
> |
AC_SEARCH_LIBS(crypt, crypt) |
53 |
|
|
54 |
+ |
AC_DEFINE([NICKNAMEHISTORYLENGTH], 32768, [Size of the WHOWAS array.]) |
55 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_CHANNEL], 1024*1024, [Size of the channel mempool chunk.]) |
56 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_MEMBER], 2048*1024, [Size of the channel-member mempool chunk.]) |
57 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_BAN], 1024*1024, [Size of the ban mempool chunk.]) |
58 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_CLIENT], 1024*1024, [Size of the client mempool chunk.]) |
59 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_CONNECTION], 512*1024, [Size of the connection mempool chunk.]) |
60 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_DNODE], 32*1024, [Size of the dlink_node mempool chunk.]) |
61 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_DBUF], 512*1024, [Size of the dbuf mempool chunk.]) |
62 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_AUTH], 128*1024, [Size of the auth mempool chunk.]) |
63 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_DNS], 64*1024, [Size of the dns mempool chunk.]) |
64 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_WATCH], 8*1024, [Size of the watch mempool chunk.]) |
65 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_NAMEHOST], 64*1024, [Size of the namehost mempool chunk.]) |
66 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_USERHOST], 128*1024, [Size of the userhost mempool chunk.]) |
67 |
+ |
AC_DEFINE([MP_CHUNK_SIZE_IP_ENTRY], 128*1024, [Size of the ip_entry mempool chunk.]) |
68 |
|
|
69 |
|
# Argument processing. |
70 |
< |
AX_ARG_ENABLE_IOLOOP_MECHANISM |
71 |
< |
AX_ARG_WITH_NICKLEN |
210 |
< |
AX_ARG_WITH_TOPICLEN |
211 |
< |
AX_ARG_WITH_SYSLOG |
212 |
< |
AX_ARG_ENABLE_EFNET |
213 |
< |
AX_ARG_ENABLE_HALFOPS |
70 |
> |
AX_ARG_IOLOOP_MECHANISM |
71 |
> |
AX_ARG_ENABLE_ASSERT |
72 |
|
AX_ARG_ENABLE_DEBUGGING |
73 |
|
AX_ARG_ENABLE_WARNINGS |
74 |
< |
AX_ARG_ENABLE_SYSLOG |
74 |
> |
AX_ARG_OPENSSL |
75 |
> |
AX_ARG_LIBGEOIP |
76 |
|
|
77 |
|
AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.]) |
78 |
|
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.]) |
82 |
|
|
83 |
|
AC_CONFIG_FILES( \ |
84 |
|
Makefile \ |
226 |
– |
etc/Makefile \ |
227 |
– |
etc/example.conf \ |
228 |
– |
etc/example.conf.quick \ |
229 |
– |
etc/example.efnet.conf \ |
230 |
– |
servlink/Makefile \ |
231 |
– |
contrib/Makefile \ |
232 |
– |
contrib/help/Makefile \ |
85 |
|
src/Makefile \ |
86 |
< |
messages/Makefile \ |
86 |
> |
libltdl/Makefile \ |
87 |
|
modules/Makefile \ |
88 |
< |
modules/core/Makefile \ |
88 |
> |
modules/core/Makefile \ |
89 |
> |
modules/extra/Makefile \ |
90 |
|
doc/Makefile \ |
91 |
|
help/Makefile \ |
92 |
< |
help/opers/Makefile \ |
240 |
< |
help/users/Makefile \ |
241 |
< |
lib/Makefile \ |
242 |
< |
lib/pcre/Makefile \ |
243 |
< |
tools/Makefile |
244 |
< |
) |
92 |
> |
tools/Makefile) |
93 |
|
|
94 |
|
AC_OUTPUT |
95 |
+ |
|
96 |
+ |
echo "###############################################################################" |
97 |
+ |
echo "Configuration complete. Type make (or gmake on some *BSD machines) to compile." |
98 |
+ |
echo |
99 |
+ |
echo "ircd-hybrid will be installed in ${prefix}. To change this, run:" |
100 |
+ |
echo " ./configure --prefix=DIRECTORY" |
101 |
+ |
echo "###############################################################################" |