ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/configure.ac
Revision: 1107
Committed: Tue Nov 2 15:19:41 2010 UTC (13 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.3/configure.ac
File size: 8870 byte(s)
Log Message:
- thou shall not forget the half while being on crack

File Contents

# Content
1 # Inspired by work Copyright (C) 2006 Luca Filipozzi
2 # vim: set fdm=marker ts=2 sw=2 et:
3
4 AC_REVISION([$Id$])
5
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 # Checks for programs.
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 # Initializing libtool.
22 LT_CONFIG_LTDL_DIR([libltdl])
23 LT_INIT([dlopen disable-static])
24 LTDL_INIT([recursive convenience])
25 LIBTOOL="$LIBTOOL --silent"
26
27 # Checks for libraries.
28 AX_CHECK_LIB_IPV4
29 AX_CHECK_LIB_IPV6
30
31 # Checks for typedefs, structures, and compiler characteristics.
32 AC_C_BIGENDIAN
33
34 # Checks for library functions.
35 AC_CHECK_FUNCS_ONCE(mmap \
36 strtok_r \
37 usleep \
38 strlcat \
39 strlcpy)
40
41 # Checks for header files.
42 AC_CHECK_HEADERS_ONCE(crypt.h \
43 inttypes.h \
44 stdint.h \
45 sys/resource.h \
46 sys/param.h \
47 errno.h \
48 sys/syslog.h \
49 types.h \
50 socket.h \
51 sys/wait.h \
52 wait.h \
53 link.h)
54
55 # check for /dev/null so we can use it to hold evil fd's
56 AC_MSG_CHECKING([for /dev/null])
57 AS_IF([test -c /dev/null], [
58 AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
59 AC_MSG_RESULT([yes])], [
60 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
61 AC_MSG_RESULT([no - using devnull.log])])
62
63
64 AC_SEARCH_LIBS(crypt, crypt)
65
66
67 AC_ARG_WITH(zlib-path,
68 AS_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
69 [LDFLAGS="-L$withval $LDFLAGS"],)
70
71 AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
72 [zlib=$enableval],[zlib=yes])
73
74 AS_IF([test "$zlib" = "yes"], [
75 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion,
76 [
77 LIBS="-lz $LIBS"
78 AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.])
79 ], zlib=no)
80 ], zlib=no)
81 ])
82
83 AC_ARG_WITH(libpcre-path,
84 AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]),
85 [LDFLAGS="-L$withval $LDFLAGS"],)
86
87 AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]),
88 [libpcre=$enableval],[libpcre=yes])
89
90 AS_IF([test "$libpcre" = "yes"], [
91 AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study,
92 [
93 LIBS="-lpcre $LIBS"
94 AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.])
95 ], libpcre=no)
96 ], libpcre=no)
97 ])
98 AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes])
99
100
101 dnl Openssl checks
102 AC_ARG_ENABLE(openssl,
103 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
104 --disable-openssl Disable OpenSSL support. ],
105 [ cf_enable_openssl=$enableval ],
106 [ cf_enable_openssl="auto" ])
107 AC_MSG_CHECKING([for OpenSSL])
108 if test "$cf_enable_openssl" != "no"; then
109 cf_openssl_basedir=""
110 if test "$cf_enable_openssl" != "auto" &&
111 test "$cf_enable_openssl" != "yes"; then
112 dnl Support for --enable-openssl=/some/place
113 cf_openssl_basedir="${cf_enable_openssl}"
114 else
115 dnl Do the auto-probe here. Check some common directory paths.
116 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
117 /opt /opt/openssl /usr/local/openssl; do
118 if test -f "${dirs}/include/openssl/opensslv.h"; then
119 cf_openssl_basedir="${dirs}"
120 break
121 fi
122 done
123 unset dirs
124 fi
125
126 dnl Now check cf_openssl_found to see if we found anything.
127 if test ! -z "$cf_openssl_basedir"; then
128 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
129 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
130 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
131 else
132 dnl OpenSSL wasn't found in the directory specified. Naughty
133 dnl administrator...
134 cf_openssl_basedir=""
135 fi
136 else
137 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
138 dnl are in /usr/include and /usr/lib. In this case, we don't want to
139 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
140 dnl We can't do this check above, because some people want two versions
141 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
142 dnl and they want /usr/local/ssl to have preference.
143 if test -f "/usr/include/openssl/opensslv.h"; then
144 cf_openssl_basedir="/usr"
145 fi
146 fi
147
148 dnl If we have a basedir defined, then everything is okay. Otherwise,
149 dnl we have a problem.
150 if test ! -z "$cf_openssl_basedir"; then
151 LIBS="-lcrypto -lssl $LIBS"
152 AC_MSG_RESULT([$cf_openssl_basedir])
153 cf_enable_openssl="yes"
154 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
155 else
156 AC_MSG_RESULT([not found. Please check your path.])
157 cf_enable_openssl="no"
158 fi
159 unset cf_openssl_basedir
160 else
161 dnl If --disable-openssl was specified
162 AC_MSG_RESULT([disabled])
163 fi
164
165 AS_IF([test "$cf_enable_openssl" != "no"],
166 [AC_MSG_CHECKING(for OpenSSL 0.9.7 or above)
167 AC_RUN_IFELSE([
168 AC_LANG_PROGRAM([
169 #include <openssl/opensslv.h>
170 #include <stdlib.h>],
171 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00907000)); ]])],
172 [cf_openssl_version_ok=yes],
173 [cf_openssl_version_ok=no],
174 [cf_openssl_version_ok=no])
175
176 AS_IF([test "$cf_openssl_version_ok" = "yes"],
177 [AC_MSG_RESULT(found)
178
179 AC_CHECK_LIB(crypto, RSA_free)
180 AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"],
181 [AC_CHECK_FUNCS(EVP_bf_cfb \
182 EVP_cast5_cfb \
183 EVP_idea_cfb \
184 EVP_rc5_32_12_16_cfb \
185 EVP_des_ede3_cfb \
186 EVP_des_cfb)])
187 ],[AC_MSG_RESULT(no - OpenSSL support disabled)
188 cf_enable_openssl="no"])])
189
190 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
191
192
193 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
194 [Enable assert() statements]),
195 [assert=$enableval], [assert=no])
196
197 AS_IF([test "$assert" = "no"],
198 [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
199
200
201 AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net],
202 [Enable small network support.]),
203 [small_net=$enableval], [small_net=no])
204
205 AS_IF([test "$small_net" = "yes"], [
206 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
207 AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
208 AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
209 AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
210 AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
211 AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
212 AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
213 AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
214 AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
215 AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [
216
217 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
218 AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
219 AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
220 AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
221 AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
222 AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
223 AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
224 AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
225 AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.])
226 AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])])
227
228
229 # Argument processing.
230 AX_ARG_ENABLE_IOLOOP_MECHANISM
231 AX_ARG_WITH_NICKLEN
232 AX_ARG_WITH_TOPICLEN
233 AX_ARG_WITH_SYSLOG
234 AX_ARG_ENABLE_EFNET
235 AX_ARG_ENABLE_HALFOPS
236 AX_ARG_ENABLE_DEBUGGING
237 AX_ARG_ENABLE_WARNINGS
238 AX_ARG_ENABLE_SYSLOG
239
240 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
241 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
242 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
243 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
244 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
245
246 AC_CONFIG_FILES( \
247 Makefile \
248 etc/Makefile \
249 servlink/Makefile \
250 contrib/Makefile \
251 contrib/help/Makefile \
252 src/Makefile \
253 libltdl/Makefile \
254 messages/Makefile \
255 modules/Makefile \
256 modules/core/Makefile \
257 doc/Makefile \
258 help/Makefile \
259 help/opers/Makefile \
260 help/users/Makefile \
261 tools/Makefile)
262
263 AC_OUTPUT

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision