ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/configure.ac
Revision: 2318
Committed: Fri Jun 21 17:47:52 2013 UTC (12 years, 2 months ago) by michael
Content type: application/pkix-attr-cert
File size: 7689 byte(s)
Log Message:
- Stole ircu's outbound message queue implementation for later use

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.69)
7 AC_INIT([ircd-hybrid], [TRUNK], [bugs@ircd-hybrid.org])
8 AM_INIT_AUTOMAKE(1.13.1)
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 suitable 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 AC_CHECK_SIZEOF(short)
28 AC_CHECK_SIZEOF(int)
29 AC_CHECK_SIZEOF(long)
30 AC_CHECK_SIZEOF(void *)
31 AC_CHECK_SIZEOF(int64_t)
32 AC_CHECK_SIZEOF(long long)
33
34 if test "$ac_cv_sizeof_int" = 2 ; then
35 AC_CHECK_TYPE(int16_t, int)
36 AC_CHECK_TYPE(uint16_t, unsigned int)
37 elif test "$ac_cv_sizeof_short" = 2 ; then
38 AC_CHECK_TYPE(int16_t, short)
39 AC_CHECK_TYPE(uint16_t, unsigned short)
40 else
41 AC_MSG_ERROR([Cannot find a type with size of 16 bits])
42 fi
43 if test "$ac_cv_sizeof_int" = 4 ; then
44 AC_CHECK_TYPE(int32_t, int)
45 AC_CHECK_TYPE(uint32_t, unsigned int)
46 elif test "$ac_cv_sizeof_short" = 4 ; then
47 AC_CHECK_TYPE(int32_t, short)
48 AC_CHECK_TYPE(uint32_t, unsigned short)
49 elif test "$ac_cv_sizeof_long" = 4 ; then
50 AC_CHECK_TYPE(int32_t, long)
51 AC_CHECK_TYPE(uint32_t, unsigned long)
52 else
53 AC_MSG_ERROR([Cannot find a type with size of 32 bits])
54 fi
55 if test "$ac_cv_sizeof_int64_t" = 8 ; then
56 AC_CHECK_TYPE(int64_t)
57 AC_CHECK_TYPE(uint64_t)
58 elif test "$ac_cv_sizeof_long_long" = 8 ; then
59 AC_CHECK_TYPE(int64_t, long long)
60 AC_CHECK_TYPE(uint64_t, unsigned long long)
61 else
62 AC_MSG_ERROR([Cannot find a type with size of 64 bits])
63 fi
64
65
66 # Checks for libraries.
67 AX_CHECK_LIB_IPV4
68 AX_CHECK_LIB_IPV6
69
70 # Checks for typedefs, structures, and compiler characteristics.
71 AC_C_BIGENDIAN
72
73 # Checks for library functions.
74 AC_CHECK_FUNCS_ONCE(strtok_r \
75 usleep \
76 strlcat \
77 strlcpy)
78
79 # Checks for header files.
80 AC_CHECK_HEADERS_ONCE(crypt.h \
81 sys/resource.h \
82 sys/param.h \
83 types.h \
84 socket.h \
85 sys/wait.h \
86 wait.h)
87
88 AC_SEARCH_LIBS(crypt, crypt)
89
90 AC_ARG_ENABLE(libGeoIP,
91 [AS_HELP_STRING([--disable-libgeoip],[Disable GeoIP support])], [],
92 [AC_CHECK_HEADER(GeoIP.h,
93 [AC_SEARCH_LIBS(GeoIP_id_by_ipnum_v6_gl, GeoIP,
94 [AC_DEFINE(HAVE_LIBGEOIP, 1, [Define to 1 if libGeoIP (-lGeoIP) is available.])])])], [])
95
96 dnl Openssl checks
97 AC_ARG_ENABLE(openssl,
98 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
99 --disable-openssl Disable OpenSSL support. ],
100 [ cf_enable_openssl=$enableval ],
101 [ cf_enable_openssl="auto" ])
102 AC_MSG_CHECKING([for OpenSSL])
103 if test "$cf_enable_openssl" != "no"; then
104 cf_openssl_basedir=""
105 if test "$cf_enable_openssl" != "auto" &&
106 test "$cf_enable_openssl" != "yes"; then
107 dnl Support for --enable-openssl=/some/place
108 cf_openssl_basedir="${cf_enable_openssl}"
109 else
110 dnl Do the auto-probe here. Check some common directory paths.
111 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
112 /opt /opt/openssl /usr/local/openssl; do
113 if test -f "${dirs}/include/openssl/opensslv.h"; then
114 cf_openssl_basedir="${dirs}"
115 break
116 fi
117 done
118 unset dirs
119 fi
120
121 dnl Now check cf_openssl_found to see if we found anything.
122 if test ! -z "$cf_openssl_basedir"; then
123 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
124 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
125 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
126 else
127 dnl OpenSSL wasn't found in the directory specified. Naughty
128 dnl administrator...
129 cf_openssl_basedir=""
130 fi
131 else
132 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
133 dnl are in /usr/include and /usr/lib. In this case, we don't want to
134 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
135 dnl We can't do this check above, because some people want two versions
136 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
137 dnl and they want /usr/local/ssl to have preference.
138 if test -f "/usr/include/openssl/opensslv.h"; then
139 cf_openssl_basedir="/usr"
140 fi
141 fi
142
143 dnl If we have a basedir defined, then everything is okay. Otherwise,
144 dnl we have a problem.
145 if test ! -z "$cf_openssl_basedir"; then
146 AC_MSG_RESULT([$cf_openssl_basedir])
147 cf_enable_openssl="yes"
148 else
149 AC_MSG_RESULT([not found. Please check your path.])
150 cf_enable_openssl="no"
151 fi
152 unset cf_openssl_basedir
153 else
154 dnl If --disable-openssl was specified
155 AC_MSG_RESULT([disabled])
156 fi
157
158 AS_IF([test "$cf_enable_openssl" != "no"],
159 [AC_MSG_CHECKING(for OpenSSL 0.9.8 or above)
160 AC_RUN_IFELSE([
161 AC_LANG_PROGRAM([
162 #include <openssl/opensslv.h>
163 #include <stdlib.h>],
164 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); ]])],
165 [cf_openssl_version_ok=yes],
166 [cf_openssl_version_ok=no],
167 [cf_openssl_version_ok=no])
168
169 AS_IF([test "$cf_openssl_version_ok" = "yes"],
170 [AC_MSG_RESULT(found)
171
172 AC_CHECK_LIB(crypto, RSA_free)
173 AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"],
174 [AC_CHECK_LIB(ssl, SSL_connect)])
175 ],[AC_MSG_RESULT(no - OpenSSL support disabled)
176 cf_enable_openssl="no"])])
177
178 AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_ssl_SSL_connect" = yes])
179
180
181 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
182 [Enable assert() statements]),
183 [assert=$enableval], [assert=no])
184
185 AS_IF([test "$assert" = "no"],
186 [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
187
188 AC_DEFINE([NICKNAMEHISTORYLENGTH], 32768, [Size of the WHOWAS array.])
189 AC_DEFINE([MP_CHUNK_SIZE_CHANNEL], 1024*1024, [Size of the channel mempool chunk.])
190 AC_DEFINE([MP_CHUNK_SIZE_MEMBER], 2048*1024, [Size of the channel-member mempool chunk.])
191 AC_DEFINE([MP_CHUNK_SIZE_BAN], 1024*1024, [Size of the ban mempool chunk.])
192 AC_DEFINE([MP_CHUNK_SIZE_CLIENT], 1024*1024, [Size of the client mempool chunk.])
193 AC_DEFINE([MP_CHUNK_SIZE_LCLIENT], 512*1024, [Size of the local client mempool chunk.])
194 AC_DEFINE([MP_CHUNK_SIZE_DNODE], 32*1024, [Size of the dlink_node mempool chunk.])
195 AC_DEFINE([MP_CHUNK_SIZE_DBUF], 512*1024, [Size of the dbuf mempool chunk.])
196 AC_DEFINE([MP_CHUNK_SIZE_AUTH], 128*1024, [Size of the auth mempool chunk.])
197 AC_DEFINE([MP_CHUNK_SIZE_DNS], 64*1024, [Size of the dns mempool chunk.])
198 AC_DEFINE([MP_CHUNK_SIZE_WATCH], 8*1024, [Size of the watch mempool chunk.])
199 AC_DEFINE([MP_CHUNK_SIZE_NAMEHOST], 64*1024, [Size of the namehost mempool chunk.])
200 AC_DEFINE([MP_CHUNK_SIZE_USERHOST], 128*1024, [Size of the userhost mempool chunk.])
201 AC_DEFINE([MP_CHUNK_SIZE_IP_ENTRY], 128*1024, [Size of the ip_entry mempool chunk.])
202
203 # Argument processing.
204 AX_ARG_ENABLE_IOLOOP_MECHANISM
205 AX_ARG_ENABLE_HALFOPS
206 AX_ARG_ENABLE_DEBUGGING
207 AX_ARG_ENABLE_WARNINGS
208
209 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
210 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
211 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
212 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
213 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
214
215 AC_CONFIG_FILES( \
216 Makefile \
217 src/Makefile \
218 libltdl/Makefile \
219 modules/Makefile \
220 modules/core/Makefile \
221 doc/Makefile \
222 help/Makefile \
223 tools/Makefile)
224
225 AC_OUTPUT

Properties

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