ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/branches/newio/configure.ac
Revision: 955
Committed: Mon Jul 27 00:27:20 2009 UTC (14 years, 8 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.2/configure.ac
File size: 7822 byte(s)
Log Message:
- configure.ac: replaced obsolete AC_HELP_STRING with AS_HELP_STRING

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

Properties

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