ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/configure.ac
Revision: 925
Committed: Mon Nov 12 20:59:02 2007 UTC (16 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.2/configure.ac
File size: 7774 byte(s)
Log Message:
- add back --enable-small-net

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_PREREQ(2.59)
5 AC_INIT([ircd-hybrid], [7.2.4])
6 AM_INIT_AUTOMAKE
7 AM_MAINTAINER_MODE
8 AC_CONFIG_HEADER(config.h)
9 AC_CONFIG_SRCDIR(src/ircd.c)
10
11
12 #ltdl stuff
13 AC_LIBLTDL_CONVENIENCE
14 AC_SUBST(INCLTDL)
15 AC_SUBST(LIBLTDL)
16 AC_LIBTOOL_DLOPEN
17 AM_DISABLE_STATIC
18 AM_ENABLE_SHARED
19
20
21 # Checks for programs.
22 AC_PROG_CC
23 AC_PROG_YACC
24 AM_PROG_LEX
25 AC_PROG_INSTALL
26 AC_PROG_LIBTOOL
27 LIBTOOL="$LIBTOOL --silent"
28
29
30 # Checks for libraries.
31 AX_CHECK_LIB_IPV4
32 AX_CHECK_LIB_IPV6
33
34
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_CONST
37 AC_C_INLINE
38 AC_C_BIGENDIAN
39
40 AC_CHECK_SIZEOF(int64_t)
41 AC_CHECK_SIZEOF(long long)
42
43 if test "$ac_cv_sizeof_int64_t" = 8; then
44 AC_CHECK_TYPE(uint64_t)
45 AC_CHECK_TYPE(int64_t)
46 elif test "$ac_cv_sizeof_long_long" = 8; then
47 AC_CHECK_TYPE(uint64_t, unsigned long long)
48 AC_CHECK_TYPE(int64_t, long long)
49 else
50 AC_MSG_ERROR([Your system doesn't appear to have 64 bit integers. Aborting.])
51 fi
52
53
54 # Checks for library functions.
55 AC_CHECK_FUNCS_ONCE(snprintf, \
56 vsnprintf, \
57 lrand48, \
58 srand48, \
59 mmap, \
60 strtok_r, \
61 usleep, \
62 strlcat, \
63 strlcpy, \
64 basename)
65
66 # Checks for header files.
67 AC_CHECK_HEADERS_ONCE(crypt.h \
68 inttypes.h \
69 stdint.h \
70 sys/resource.h \
71 sys/param.h \
72 errno.h \
73 sys/syslog.h \
74 stddef.h \
75 libgen.h \
76 sys/wait.h \
77 wait.h \
78 link.h)
79
80
81 dnl check for /dev/null so we can use it to hold evil fd's
82 AC_MSG_CHECKING([for /dev/null])
83 if test -c /dev/null ; then
84 AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
85 AC_MSG_RESULT(yes)
86 else
87 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
88 AC_MSG_RESULT(no - using devnull.log)
89 fi
90
91
92 AC_SEARCH_LIBS(crypt, [crypt descrypt],,)
93 AM_CONDITIONAL([HAVE_CRYPT], [test "$ac_cv_search_crypt" = "none required"])
94
95
96 AC_ARG_WITH(zlib-path,
97 AC_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
98 [LDFLAGS="-L$withval $LDFLAGS"],)
99
100 AC_ARG_ENABLE(zlib, AC_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
101 [zlib=$enableval],[zlib=yes])
102
103 if test "$zlib" = yes; then
104 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion,
105 [
106 LIBS="-lz $LIBS"
107 AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.])
108 ], zlib=no)
109 ], zlib=no)
110 fi
111
112
113 dnl Openssl checks
114 AC_ARG_ENABLE(openssl,
115 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
116 --disable-openssl Disable OpenSSL support. ],
117 [ cf_enable_openssl=$enableval ],
118 [ cf_enable_openssl="auto" ])
119 AC_MSG_CHECKING(for OpenSSL)
120 if test "$cf_enable_openssl" != "no"; then
121 cf_openssl_basedir=""
122 if test "$cf_enable_openssl" != "auto" &&
123 test "$cf_enable_openssl" != "yes"; then
124 dnl Support for --enable-openssl=/some/place
125 cf_openssl_basedir="${cf_enable_openssl}"
126 else
127 dnl Do the auto-probe here. Check some common directory paths.
128 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
129 /opt /opt/openssl /usr/local/openssl; do
130 if test -f "${dirs}/include/openssl/opensslv.h"; then
131 cf_openssl_basedir="${dirs}"
132 break
133 fi
134 done
135 unset dirs
136 fi
137
138 dnl Now check cf_openssl_found to see if we found anything.
139 if test ! -z "$cf_openssl_basedir"; then
140 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
141 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
142 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
143 else
144 dnl OpenSSL wasn't found in the directory specified. Naughty
145 dnl administrator...
146 cf_openssl_basedir=""
147 fi
148 else
149 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
150 dnl are in /usr/include and /usr/lib. In this case, we don't want to
151 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
152 dnl We can't do this check above, because some people want two versions
153 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
154 dnl and they want /usr/local/ssl to have preference.
155 if test -f "/usr/include/openssl/opensslv.h"; then
156 cf_openssl_basedir="/usr"
157 fi
158 fi
159
160 dnl If we have a basedir defined, then everything is okay. Otherwise,
161 dnl we have a problem.
162 if test ! -z "$cf_openssl_basedir"; then
163 LIBS="-lcrypto -lssl $LIBS"
164 AC_MSG_RESULT($cf_openssl_basedir)
165 cf_enable_openssl="yes"
166 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
167 else
168 AC_MSG_RESULT(not found. Please check your path.)
169 cf_enable_openssl="no"
170 fi
171 unset cf_openssl_basedir
172 else
173 dnl If --disable-openssl was specified
174 AC_MSG_RESULT(disabled)
175 fi
176 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
177
178
179 AC_ARG_ENABLE(assert, AC_HELP_STRING([--enable-assert], [Enable assert() statements]),
180 [assert=$enableval], [assert=no])
181 if test "$assert" = no; then
182 AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])
183 fi
184
185
186 AC_ARG_ENABLE(small-net,
187 AC_HELP_STRING([--enable-small-net],[Enable small network support.]),
188 [small_net=$enableval], [small_net=no])
189
190 if test "$small_net" = yes; then
191 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
192 AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
193 AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
194 AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
195 AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
196 AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
197 AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
198 AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
199 else
200 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
201 AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
202 AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
203 AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
204 AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
205 AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
206 AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
207 AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
208 fi
209
210 # Argument processing.
211 AX_ARG_ENABLE_IOLOOP_MECHANISM
212 AX_ARG_WITH_NICKLEN
213 AX_ARG_WITH_TOPICLEN
214 AX_ARG_WITH_SYSLOG
215 AX_ARG_ENABLE_EFNET
216 AX_ARG_ENABLE_HALFOPS
217 AX_ARG_ENABLE_DEBUGGING
218 AX_ARG_ENABLE_WARNINGS
219 AX_ARG_ENABLE_SYSLOG
220
221 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
222 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
223 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
224 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
225 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
226 AC_CONFIG_SUBDIRS(libltdl)
227
228 AC_CONFIG_FILES( \
229 Makefile \
230 etc/Makefile \
231 etc/example.conf \
232 etc/example.conf.quick \
233 etc/example.efnet.conf \
234 servlink/Makefile \
235 contrib/Makefile \
236 contrib/help/Makefile \
237 src/Makefile \
238 messages/Makefile \
239 modules/Makefile \
240 modules/core/Makefile \
241 doc/Makefile \
242 help/Makefile \
243 help/opers/Makefile \
244 help/users/Makefile \
245 lib/Makefile \
246 lib/pcre/Makefile \
247 tools/Makefile
248 )
249
250 AC_OUTPUT

Properties

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