/[svn]/ircd-hybrid-7.2/configure.ac
ViewVC logotype

Contents of /ircd-hybrid-7.2/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 941 - (show annotations)
Sat May 2 02:02:59 2009 UTC (11 years, 3 months ago) by db
File size: 7933 byte(s)
- Update autools versions.
- Fix acinclude.m4 to work on FreeBSD at least.


1 # Inspired by work Copyright (C) 2006 Luca Filipozzi
2 # vim: set fdm=marker ts=2 sw=2 et:
3
4 AC_PREREQ(2.62)
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 types.h \
77 socket.h \
78 sys/wait.h \
79 wait.h \
80 link.h)
81
82 dnl check for /dev/null so we can use it to hold evil fd's
83 AC_MSG_CHECKING([for /dev/null])
84 if test -c /dev/null ; then
85 AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
86 AC_MSG_RESULT(yes)
87 else
88 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
89 AC_MSG_RESULT(no - using devnull.log)
90 fi
91
92
93 AC_SEARCH_LIBS(crypt, [crypt descrypt],,)
94 AM_CONDITIONAL([HAVE_CRYPT], [test "$ac_cv_search_crypt" = "none required"])
95
96
97 AC_ARG_WITH(zlib-path,
98 AC_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
99 [LDFLAGS="-L$withval $LDFLAGS"],)
100
101 AC_ARG_ENABLE(zlib, AC_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
102 [zlib=$enableval],[zlib=yes])
103
104 if test "$zlib" = yes; then
105 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion,
106 [
107 LIBS="-lz $LIBS"
108 AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.])
109 ], zlib=no)
110 ], zlib=no)
111 fi
112
113
114 dnl Openssl checks
115 AC_ARG_ENABLE(openssl,
116 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
117 --disable-openssl Disable OpenSSL support. ],
118 [ cf_enable_openssl=$enableval ],
119 [ cf_enable_openssl="auto" ])
120 AC_MSG_CHECKING(for OpenSSL)
121 if test "$cf_enable_openssl" != "no"; then
122 cf_openssl_basedir=""
123 if test "$cf_enable_openssl" != "auto" &&
124 test "$cf_enable_openssl" != "yes"; then
125 dnl Support for --enable-openssl=/some/place
126 cf_openssl_basedir="${cf_enable_openssl}"
127 else
128 dnl Do the auto-probe here. Check some common directory paths.
129 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
130 /opt /opt/openssl /usr/local/openssl; do
131 if test -f "${dirs}/include/openssl/opensslv.h"; then
132 cf_openssl_basedir="${dirs}"
133 break
134 fi
135 done
136 unset dirs
137 fi
138
139 dnl Now check cf_openssl_found to see if we found anything.
140 if test ! -z "$cf_openssl_basedir"; then
141 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
142 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
143 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
144 else
145 dnl OpenSSL wasn't found in the directory specified. Naughty
146 dnl administrator...
147 cf_openssl_basedir=""
148 fi
149 else
150 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
151 dnl are in /usr/include and /usr/lib. In this case, we don't want to
152 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
153 dnl We can't do this check above, because some people want two versions
154 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
155 dnl and they want /usr/local/ssl to have preference.
156 if test -f "/usr/include/openssl/opensslv.h"; then
157 cf_openssl_basedir="/usr"
158 fi
159 fi
160
161 dnl If we have a basedir defined, then everything is okay. Otherwise,
162 dnl we have a problem.
163 if test ! -z "$cf_openssl_basedir"; then
164 LIBS="-lcrypto -lssl $LIBS"
165 AC_MSG_RESULT($cf_openssl_basedir)
166 cf_enable_openssl="yes"
167 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
168 else
169 AC_MSG_RESULT(not found. Please check your path.)
170 cf_enable_openssl="no"
171 fi
172 unset cf_openssl_basedir
173 else
174 dnl If --disable-openssl was specified
175 AC_MSG_RESULT(disabled)
176 fi
177 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
178
179
180 AC_ARG_ENABLE(assert, AC_HELP_STRING([--enable-assert], [Enable assert() statements]),
181 [assert=$enableval], [assert=no])
182 if test "$assert" = no; then
183 AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])
184 fi
185
186
187 AC_ARG_ENABLE(small-net,
188 AC_HELP_STRING([--enable-small-net],[Enable small network support.]),
189 [small_net=$enableval], [small_net=no])
190
191 if test "$small_net" = yes; then
192 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
193 AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
194 AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
195 AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
196 AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
197 AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
198 AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
199 AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
200 else
201 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
202 AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
203 AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
204 AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
205 AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
206 AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
207 AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
208 AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
209 fi
210 AC_DEFINE([HAVE_BASENAME], 1, [Define to 1 if you have the basename() function.])
211
212 # Argument processing.
213 AX_ARG_ENABLE_IOLOOP_MECHANISM
214 AX_ARG_WITH_NICKLEN
215 AX_ARG_WITH_TOPICLEN
216 AX_ARG_WITH_SYSLOG
217 AX_ARG_ENABLE_EFNET
218 AX_ARG_ENABLE_HALFOPS
219 AX_ARG_ENABLE_DEBUGGING
220 AX_ARG_ENABLE_WARNINGS
221 AX_ARG_ENABLE_SYSLOG
222
223 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
224 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
225 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
226 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
227 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
228 AC_CONFIG_SUBDIRS(libltdl)
229
230 AC_CONFIG_FILES( \
231 Makefile \
232 etc/Makefile \
233 etc/example.conf \
234 etc/example.conf.quick \
235 etc/example.efnet.conf \
236 servlink/Makefile \
237 contrib/Makefile \
238 contrib/help/Makefile \
239 src/Makefile \
240 messages/Makefile \
241 modules/Makefile \
242 modules/core/Makefile \
243 doc/Makefile \
244 help/Makefile \
245 help/opers/Makefile \
246 help/users/Makefile \
247 lib/Makefile \
248 lib/pcre/Makefile \
249 tools/Makefile
250 )
251
252 AC_OUTPUT

Properties

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

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28