ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/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
Original Path: ircd-hybrid/trunk/configure.ac
File size: 7689 byte(s)
Log Message:
- Stole ircu's outbound message queue implementation for later use

File Contents

# User Rev Content
1 stu 908 # Inspired by work Copyright (C) 2006 Luca Filipozzi
2     # vim: set fdm=marker ts=2 sw=2 et:
3 adx 30
4 michael 953 AC_REVISION([$Id$])
5    
6 michael 1373 AC_PREREQ(2.69)
7 michael 1680 AC_INIT([ircd-hybrid], [TRUNK], [bugs@ircd-hybrid.org])
8 michael 1751 AM_INIT_AUTOMAKE(1.13.1)
9 stu 908 AM_MAINTAINER_MODE
10 michael 912 AC_CONFIG_HEADER(config.h)
11     AC_CONFIG_SRCDIR(src/ircd.c)
12 adx 30
13 stu 908 # Checks for programs.
14 michael 1010 AC_PROG_CC_C99
15     AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
16 michael 1348 [AC_MSG_ERROR([no suitable C99 compiler found. Aborting.])])
17 michael 912 AC_PROG_YACC
18     AM_PROG_LEX
19 stu 908 AC_PROG_INSTALL
20 michael 945
21 michael 1015 # Initializing libtool.
22 michael 1084 LT_CONFIG_LTDL_DIR([libltdl])
23 michael 977 LT_INIT([dlopen disable-static])
24 michael 1092 LTDL_INIT([recursive convenience])
25 michael 1053 LIBTOOL="$LIBTOOL --silent"
26 adx 30
27 michael 2318 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 stu 908 # Checks for libraries.
67     AX_CHECK_LIB_IPV4
68     AX_CHECK_LIB_IPV6
69 adx 30
70 stu 908 # Checks for typedefs, structures, and compiler characteristics.
71 adx 30 AC_C_BIGENDIAN
72    
73 stu 908 # Checks for library functions.
74 michael 1664 AC_CHECK_FUNCS_ONCE(strtok_r \
75 michael 1010 usleep \
76     strlcat \
77 michael 1329 strlcpy)
78 adx 30
79 michael 923 # Checks for header files.
80 michael 912 AC_CHECK_HEADERS_ONCE(crypt.h \
81     sys/resource.h \
82     sys/param.h \
83 db 941 types.h \
84     socket.h \
85 michael 912 sys/wait.h \
86 michael 1348 wait.h)
87 michael 912
88 michael 977 AC_SEARCH_LIBS(crypt, crypt)
89 michael 923
90 michael 1856 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 michael 912 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 michael 1010 AC_MSG_CHECKING([for OpenSSL])
103 michael 912 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 michael 1010 AC_MSG_RESULT([$cf_openssl_basedir])
147 michael 912 cf_enable_openssl="yes"
148     else
149 michael 1010 AC_MSG_RESULT([not found. Please check your path.])
150 michael 912 cf_enable_openssl="no"
151     fi
152     unset cf_openssl_basedir
153     else
154     dnl If --disable-openssl was specified
155 michael 1010 AC_MSG_RESULT([disabled])
156 michael 912 fi
157 michael 1015
158     AS_IF([test "$cf_enable_openssl" != "no"],
159 michael 2228 [AC_MSG_CHECKING(for OpenSSL 0.9.8 or above)
160 michael 1106 AC_RUN_IFELSE([
161 michael 1015 AC_LANG_PROGRAM([
162     #include <openssl/opensslv.h>
163     #include <stdlib.h>],
164 michael 2228 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); ]])],
165 michael 1015 [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 michael 1106
172 michael 1456 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 michael 1015 ],[AC_MSG_RESULT(no - OpenSSL support disabled)
176     cf_enable_openssl="no"])])
177    
178 michael 1456 AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_ssl_SSL_connect" = yes])
179 michael 912
180    
181 michael 955 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
182     [Enable assert() statements]),
183 michael 924 [assert=$enableval], [assert=no])
184    
185 michael 1010 AS_IF([test "$assert" = "no"],
186     [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
187 michael 924
188 michael 1908 AC_DEFINE([NICKNAMEHISTORYLENGTH], 32768, [Size of the WHOWAS array.])
189 michael 1964 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 michael 1654 AC_DEFINE([MP_CHUNK_SIZE_DBUF], 512*1024, [Size of the dbuf mempool chunk.])
196 michael 1964 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 michael 925
203 stu 908 # Argument processing.
204     AX_ARG_ENABLE_IOLOOP_MECHANISM
205     AX_ARG_ENABLE_HALFOPS
206     AX_ARG_ENABLE_DEBUGGING
207     AX_ARG_ENABLE_WARNINGS
208 adx 30
209 stu 908 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 adx 30
215 michael 922 AC_CONFIG_FILES( \
216     Makefile \
217     src/Makefile \
218 michael 1092 libltdl/Makefile \
219 michael 922 modules/Makefile \
220 michael 1053 modules/core/Makefile \
221 michael 922 doc/Makefile \
222     help/Makefile \
223 michael 1015 tools/Makefile)
224 adx 30
225     AC_OUTPUT

Properties

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