ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/configure.ac
Revision: 1029
Committed: Sun Nov 8 13:10:50 2009 UTC (14 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.3/configure.ac
File size: 8810 byte(s)
Log Message:
- branch off trunk to create 7.3 branch

File Contents

# User Rev Content
1 stu 908 # Inspired by work Copyright (C) 2006 Luca Filipozzi
2     # vim: set fdm=marker ts=2 sw=2 et:
3 adx 30
4 michael 953 AC_REVISION([$Id$])
5    
6 michael 1010 AC_PREREQ(2.64)
7 michael 923 AC_INIT([ircd-hybrid], [7.2.4])
8 michael 955 AM_INIT_AUTOMAKE(1.11)
9 stu 908 AM_MAINTAINER_MODE
10 michael 912 AC_CONFIG_HEADER(config.h)
11     AC_CONFIG_SRCDIR(src/ircd.c)
12 adx 30
13 stu 908 # Checks for programs.
14 michael 1010 AC_PROG_CC_C99
15     AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
16     [AC_MSG_ERROR([no C99 compiler found. Aborting.])])
17 michael 912 AC_PROG_YACC
18     AM_PROG_LEX
19 stu 908 AC_PROG_INSTALL
20 michael 945
21 michael 1015 # Initializing libtool.
22 michael 977 LT_INIT([dlopen disable-static])
23 michael 945 LTDL_INIT
24 adx 30
25 stu 908 # Checks for libraries.
26     AX_CHECK_LIB_IPV4
27     AX_CHECK_LIB_IPV6
28 adx 30
29 stu 908 # Checks for typedefs, structures, and compiler characteristics.
30 adx 30 AC_C_BIGENDIAN
31    
32 stu 908 # Checks for library functions.
33 michael 1010 AC_CHECK_FUNCS_ONCE(mmap \
34     strtok_r \
35     usleep \
36     strlcat \
37 michael 978 strlcpy)
38 adx 30
39 michael 923 # Checks for header files.
40 michael 912 AC_CHECK_HEADERS_ONCE(crypt.h \
41     inttypes.h \
42     stdint.h \
43     sys/resource.h \
44     sys/param.h \
45     errno.h \
46     sys/syslog.h \
47 db 941 types.h \
48     socket.h \
49 michael 912 sys/wait.h \
50     wait.h \
51     link.h)
52    
53 michael 1015 # check for /dev/null so we can use it to hold evil fd's
54 michael 923 AC_MSG_CHECKING([for /dev/null])
55 michael 1010 AS_IF([test -c /dev/null], [
56     AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
57     AC_MSG_RESULT([yes])], [
58 michael 923 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
59 michael 1010 AC_MSG_RESULT([no - using devnull.log])])
60 michael 923
61    
62 michael 977 AC_SEARCH_LIBS(crypt, crypt)
63 michael 923
64    
65     AC_ARG_WITH(zlib-path,
66 michael 955 AS_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
67 michael 923 [LDFLAGS="-L$withval $LDFLAGS"],)
68    
69 michael 955 AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
70 michael 923 [zlib=$enableval],[zlib=yes])
71    
72 michael 1010 AS_IF([test "$zlib" = "yes"], [
73 michael 923 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 michael 1010 ])
80 michael 923
81 michael 1009 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 michael 923
85 michael 1009 AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]),
86     [libpcre=$enableval],[libpcre=yes])
87    
88 michael 1010 AS_IF([test "$libpcre" = "yes"], [
89 michael 1009 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 michael 1010 ])
96 michael 1009 AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes])
97    
98    
99 michael 912 dnl Openssl checks
100     AC_ARG_ENABLE(openssl,
101     [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
102     --disable-openssl Disable OpenSSL support. ],
103     [ cf_enable_openssl=$enableval ],
104     [ cf_enable_openssl="auto" ])
105 michael 1010 AC_MSG_CHECKING([for OpenSSL])
106 michael 912 if test "$cf_enable_openssl" != "no"; then
107     cf_openssl_basedir=""
108     if test "$cf_enable_openssl" != "auto" &&
109     test "$cf_enable_openssl" != "yes"; then
110     dnl Support for --enable-openssl=/some/place
111     cf_openssl_basedir="${cf_enable_openssl}"
112     else
113     dnl Do the auto-probe here. Check some common directory paths.
114     for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
115     /opt /opt/openssl /usr/local/openssl; do
116     if test -f "${dirs}/include/openssl/opensslv.h"; then
117     cf_openssl_basedir="${dirs}"
118     break
119     fi
120     done
121     unset dirs
122     fi
123    
124     dnl Now check cf_openssl_found to see if we found anything.
125     if test ! -z "$cf_openssl_basedir"; then
126     if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
127     CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
128     LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
129     else
130     dnl OpenSSL wasn't found in the directory specified. Naughty
131     dnl administrator...
132     cf_openssl_basedir=""
133     fi
134     else
135     dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
136     dnl are in /usr/include and /usr/lib. In this case, we don't want to
137     dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
138     dnl We can't do this check above, because some people want two versions
139     dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
140     dnl and they want /usr/local/ssl to have preference.
141     if test -f "/usr/include/openssl/opensslv.h"; then
142     cf_openssl_basedir="/usr"
143     fi
144     fi
145    
146     dnl If we have a basedir defined, then everything is okay. Otherwise,
147     dnl we have a problem.
148     if test ! -z "$cf_openssl_basedir"; then
149     LIBS="-lcrypto -lssl $LIBS"
150 michael 1010 AC_MSG_RESULT([$cf_openssl_basedir])
151 michael 912 cf_enable_openssl="yes"
152 michael 924 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
153 michael 912 else
154 michael 1010 AC_MSG_RESULT([not found. Please check your path.])
155 michael 912 cf_enable_openssl="no"
156     fi
157     unset cf_openssl_basedir
158     else
159     dnl If --disable-openssl was specified
160 michael 1010 AC_MSG_RESULT([disabled])
161 michael 912 fi
162 michael 1015
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 michael 924 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
189 michael 912
190    
191 michael 955 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
192     [Enable assert() statements]),
193 michael 924 [assert=$enableval], [assert=no])
194    
195 michael 1010 AS_IF([test "$assert" = "no"],
196     [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
197 michael 924
198 michael 1010
199 michael 955 AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net],
200     [Enable small network support.]),
201 michael 925 [small_net=$enableval], [small_net=no])
202    
203 michael 1015 AS_IF([test "$small_net" = "yes"], [
204 michael 925 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.])
207     AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
208     AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client 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 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
213 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [
214    
215 michael 925 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.])
218     AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
219     AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client 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 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.])
224 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])])
225 michael 925
226 michael 942
227 stu 908 # Argument processing.
228     AX_ARG_ENABLE_IOLOOP_MECHANISM
229     AX_ARG_WITH_NICKLEN
230     AX_ARG_WITH_TOPICLEN
231     AX_ARG_WITH_SYSLOG
232     AX_ARG_ENABLE_EFNET
233     AX_ARG_ENABLE_HALFOPS
234     AX_ARG_ENABLE_DEBUGGING
235     AX_ARG_ENABLE_WARNINGS
236     AX_ARG_ENABLE_SYSLOG
237 adx 30
238 stu 908 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
239     AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
240     AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
241     AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
242     AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
243 adx 30
244 michael 922 AC_CONFIG_FILES( \
245     Makefile \
246     etc/Makefile \
247     etc/example.conf \
248     etc/example.conf.quick \
249     etc/example.efnet.conf \
250     servlink/Makefile \
251     contrib/Makefile \
252     contrib/help/Makefile \
253     src/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 michael 1015 tools/Makefile)
262 adx 30
263     AC_OUTPUT

Properties

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