ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/configure.ac
Revision: 1338
Committed: Thu Apr 5 11:05:48 2012 UTC (11 years, 11 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-8/configure.ac
File size: 7518 byte(s)
Log Message:
- automake 1.11.4

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], [8beta1], [bugs@ircd-hybrid.org])
8 AM_INIT_AUTOMAKE(1.11.4)
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 sys/resource.h \
44 sys/param.h \
45 types.h \
46 socket.h \
47 sys/wait.h \
48 wait.h \
49 link.h)
50
51 AC_SEARCH_LIBS(crypt, crypt)
52
53
54 AC_ARG_WITH(libpcre-path,
55 AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]),
56 [LDFLAGS="-L$withval $LDFLAGS"],)
57
58 AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]),
59 [libpcre=$enableval],[libpcre=yes])
60
61 AS_IF([test "$libpcre" = "yes"], [
62 AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study,
63 [
64 LIBS="-lpcre $LIBS"
65 AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.])
66 ], libpcre=no)
67 ], libpcre=no)
68 ])
69 AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes])
70
71
72 dnl Openssl checks
73 AC_ARG_ENABLE(openssl,
74 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
75 --disable-openssl Disable OpenSSL support. ],
76 [ cf_enable_openssl=$enableval ],
77 [ cf_enable_openssl="auto" ])
78 AC_MSG_CHECKING([for OpenSSL])
79 if test "$cf_enable_openssl" != "no"; then
80 cf_openssl_basedir=""
81 if test "$cf_enable_openssl" != "auto" &&
82 test "$cf_enable_openssl" != "yes"; then
83 dnl Support for --enable-openssl=/some/place
84 cf_openssl_basedir="${cf_enable_openssl}"
85 else
86 dnl Do the auto-probe here. Check some common directory paths.
87 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
88 /opt /opt/openssl /usr/local/openssl; do
89 if test -f "${dirs}/include/openssl/opensslv.h"; then
90 cf_openssl_basedir="${dirs}"
91 break
92 fi
93 done
94 unset dirs
95 fi
96
97 dnl Now check cf_openssl_found to see if we found anything.
98 if test ! -z "$cf_openssl_basedir"; then
99 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
100 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
101 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
102 else
103 dnl OpenSSL wasn't found in the directory specified. Naughty
104 dnl administrator...
105 cf_openssl_basedir=""
106 fi
107 else
108 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
109 dnl are in /usr/include and /usr/lib. In this case, we don't want to
110 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
111 dnl We can't do this check above, because some people want two versions
112 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
113 dnl and they want /usr/local/ssl to have preference.
114 if test -f "/usr/include/openssl/opensslv.h"; then
115 cf_openssl_basedir="/usr"
116 fi
117 fi
118
119 dnl If we have a basedir defined, then everything is okay. Otherwise,
120 dnl we have a problem.
121 if test ! -z "$cf_openssl_basedir"; then
122 AC_MSG_RESULT([$cf_openssl_basedir])
123 cf_enable_openssl="yes"
124 else
125 AC_MSG_RESULT([not found. Please check your path.])
126 cf_enable_openssl="no"
127 fi
128 unset cf_openssl_basedir
129 else
130 dnl If --disable-openssl was specified
131 AC_MSG_RESULT([disabled])
132 fi
133
134 AS_IF([test "$cf_enable_openssl" != "no"],
135 [AC_MSG_CHECKING(for OpenSSL 0.9.8 or above)
136 AC_RUN_IFELSE([
137 AC_LANG_PROGRAM([
138 #include <openssl/opensslv.h>
139 #include <stdlib.h>],
140 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); ]])],
141 [cf_openssl_version_ok=yes],
142 [cf_openssl_version_ok=no],
143 [cf_openssl_version_ok=no])
144
145 AS_IF([test "$cf_openssl_version_ok" = "yes"],
146 [AC_MSG_RESULT(found)
147
148 AC_CHECK_LIB(ssl, SSL_connect)
149 AS_IF([test "$ac_cv_lib_ssl_SSL_connect" = "yes"],
150 [AC_CHECK_LIB(crypto, RSA_free)])
151 ],[AC_MSG_RESULT(no - OpenSSL support disabled)
152 cf_enable_openssl="no"])])
153
154 AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_crypto_RSA_free" = yes])
155
156
157 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
158 [Enable assert() statements]),
159 [assert=$enableval], [assert=no])
160
161 AS_IF([test "$assert" = "no"],
162 [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
163
164
165 AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net],
166 [Enable small network support.]),
167 [small_net=$enableval], [small_net=no])
168
169 AS_IF([test "$small_net" = "yes"], [
170 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
171 AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
172 AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
173 AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
174 AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
175 AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
176 AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
177 AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
178 AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
179 AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [
180
181 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
182 AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
183 AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
184 AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
185 AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
186 AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
187 AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
188 AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
189 AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.])
190 AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])])
191
192
193 # Argument processing.
194 AX_ARG_ENABLE_IOLOOP_MECHANISM
195 AX_ARG_WITH_NICKLEN
196 AX_ARG_WITH_TOPICLEN
197 AX_ARG_ENABLE_EFNET
198 AX_ARG_ENABLE_HALFOPS
199 AX_ARG_ENABLE_DEBUGGING
200 AX_ARG_ENABLE_WARNINGS
201
202 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
203 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
204 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
205 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
206 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
207
208 AC_CONFIG_FILES( \
209 Makefile \
210 contrib/Makefile \
211 contrib/help/Makefile \
212 src/Makefile \
213 libltdl/Makefile \
214 messages/Makefile \
215 modules/Makefile \
216 modules/core/Makefile \
217 doc/Makefile \
218 help/Makefile \
219 help/opers/Makefile \
220 help/users/Makefile \
221 tools/Makefile)
222
223 AC_OUTPUT

Properties

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