ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/configure.ac
Revision: 1106
Committed: Tue Nov 2 15:10:53 2010 UTC (13 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.3/configure.ac
File size: 8870 byte(s)
Log Message:
- Fixed broken configure test for sigio
- Update libtool to latest 2.4 release

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 1095 AC_PREREQ(2.67)
7 michael 1039 AC_INIT([ircd-hybrid], [7.3-rc1], [bugs@ircd-hybrid.org])
8 michael 1043 AM_INIT_AUTOMAKE(1.11.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     [AC_MSG_ERROR([no 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 stu 908 # Checks for libraries.
28     AX_CHECK_LIB_IPV4
29     AX_CHECK_LIB_IPV6
30 adx 30
31 stu 908 # Checks for typedefs, structures, and compiler characteristics.
32 adx 30 AC_C_BIGENDIAN
33    
34 stu 908 # Checks for library functions.
35 michael 1010 AC_CHECK_FUNCS_ONCE(mmap \
36     strtok_r \
37     usleep \
38     strlcat \
39 michael 978 strlcpy)
40 adx 30
41 michael 923 # Checks for header files.
42 michael 912 AC_CHECK_HEADERS_ONCE(crypt.h \
43     inttypes.h \
44     stdint.h \
45     sys/resource.h \
46     sys/param.h \
47     errno.h \
48     sys/syslog.h \
49 db 941 types.h \
50     socket.h \
51 michael 912 sys/wait.h \
52     wait.h \
53     link.h)
54    
55 michael 1015 # check for /dev/null so we can use it to hold evil fd's
56 michael 923 AC_MSG_CHECKING([for /dev/null])
57 michael 1010 AS_IF([test -c /dev/null], [
58     AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
59     AC_MSG_RESULT([yes])], [
60 michael 923 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
61 michael 1010 AC_MSG_RESULT([no - using devnull.log])])
62 michael 923
63    
64 michael 977 AC_SEARCH_LIBS(crypt, crypt)
65 michael 923
66    
67     AC_ARG_WITH(zlib-path,
68 michael 955 AS_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
69 michael 923 [LDFLAGS="-L$withval $LDFLAGS"],)
70    
71 michael 955 AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
72 michael 923 [zlib=$enableval],[zlib=yes])
73    
74 michael 1010 AS_IF([test "$zlib" = "yes"], [
75 michael 923 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion,
76     [
77     LIBS="-lz $LIBS"
78     AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.])
79     ], zlib=no)
80     ], zlib=no)
81 michael 1010 ])
82 michael 923
83 michael 1009 AC_ARG_WITH(libpcre-path,
84     AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]),
85     [LDFLAGS="-L$withval $LDFLAGS"],)
86 michael 923
87 michael 1009 AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]),
88     [libpcre=$enableval],[libpcre=yes])
89    
90 michael 1010 AS_IF([test "$libpcre" = "yes"], [
91 michael 1009 AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study,
92     [
93     LIBS="-lpcre $LIBS"
94     AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.])
95     ], libpcre=no)
96     ], libpcre=no)
97 michael 1010 ])
98 michael 1009 AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes])
99    
100    
101 michael 912 dnl Openssl checks
102     AC_ARG_ENABLE(openssl,
103     [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
104     --disable-openssl Disable OpenSSL support. ],
105     [ cf_enable_openssl=$enableval ],
106     [ cf_enable_openssl="auto" ])
107 michael 1010 AC_MSG_CHECKING([for OpenSSL])
108 michael 912 if test "$cf_enable_openssl" != "no"; then
109     cf_openssl_basedir=""
110     if test "$cf_enable_openssl" != "auto" &&
111     test "$cf_enable_openssl" != "yes"; then
112     dnl Support for --enable-openssl=/some/place
113     cf_openssl_basedir="${cf_enable_openssl}"
114     else
115     dnl Do the auto-probe here. Check some common directory paths.
116     for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
117     /opt /opt/openssl /usr/local/openssl; do
118     if test -f "${dirs}/include/openssl/opensslv.h"; then
119     cf_openssl_basedir="${dirs}"
120     break
121     fi
122     done
123     unset dirs
124     fi
125    
126     dnl Now check cf_openssl_found to see if we found anything.
127     if test ! -z "$cf_openssl_basedir"; then
128     if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
129     CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
130     LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
131     else
132     dnl OpenSSL wasn't found in the directory specified. Naughty
133     dnl administrator...
134     cf_openssl_basedir=""
135     fi
136     else
137     dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
138     dnl are in /usr/include and /usr/lib. In this case, we don't want to
139     dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
140     dnl We can't do this check above, because some people want two versions
141     dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
142     dnl and they want /usr/local/ssl to have preference.
143     if test -f "/usr/include/openssl/opensslv.h"; then
144     cf_openssl_basedir="/usr"
145     fi
146     fi
147    
148     dnl If we have a basedir defined, then everything is okay. Otherwise,
149     dnl we have a problem.
150     if test ! -z "$cf_openssl_basedir"; then
151     LIBS="-lcrypto -lssl $LIBS"
152 michael 1010 AC_MSG_RESULT([$cf_openssl_basedir])
153 michael 912 cf_enable_openssl="yes"
154 michael 924 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
155 michael 912 else
156 michael 1010 AC_MSG_RESULT([not found. Please check your path.])
157 michael 912 cf_enable_openssl="no"
158     fi
159     unset cf_openssl_basedir
160     else
161     dnl If --disable-openssl was specified
162 michael 1010 AC_MSG_RESULT([disabled])
163 michael 912 fi
164 michael 1015
165     AS_IF([test "$cf_enable_openssl" != "no"],
166     [AC_MSG_CHECKING(for OpenSSL 0.9.7 or above)
167 michael 1106 AC_RUN_IFELSE([
168 michael 1015 AC_LANG_PROGRAM([
169     #include <openssl/opensslv.h>
170     #include <stdlib.h>],
171 michael 1106 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00907000)); ]])],
172 michael 1015 [cf_openssl_version_ok=yes],
173     [cf_openssl_version_ok=no],
174     [cf_openssl_version_ok=no])
175    
176     AS_IF([test "$cf_openssl_version_ok" = "yes"],
177     [AC_MSG_RESULT(found)
178 michael 1106
179 michael 1015 AC_CHECK_LIB(crypto, RSA_free)
180     AS_IF([test "$ac_cv_lib_crypto_RSA_free" = "yes"],
181     [AC_CHECK_FUNCS(EVP_bf_cfb \
182     EVP_cast5_cfb \
183     EVP_idea_cfb \
184     EVP_rc5_32_12_16_cfb \
185     EVP_des_ede3_cfb \
186     EVP_des_cfb)])
187     ],[AC_MSG_RESULT(no - OpenSSL support disabled)
188     cf_enable_openssl="no"])])
189    
190 michael 924 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
191 michael 912
192    
193 michael 955 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
194     [Enable assert() statements]),
195 michael 924 [assert=$enableval], [assert=no])
196    
197 michael 1010 AS_IF([test "$assert" = "no"],
198     [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
199 michael 924
200 michael 1010
201 michael 955 AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net],
202     [Enable small network support.]),
203 michael 925 [small_net=$enableval], [small_net=no])
204    
205 michael 1015 AS_IF([test "$small_net" = "yes"], [
206 michael 925 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
207     AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
208     AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
209     AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
210     AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
211     AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
212     AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
213     AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
214 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
215 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [
216    
217 michael 925 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
218     AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
219     AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
220     AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
221     AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
222     AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
223     AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
224     AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
225 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.])
226 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])])
227 michael 925
228 michael 942
229 stu 908 # Argument processing.
230     AX_ARG_ENABLE_IOLOOP_MECHANISM
231     AX_ARG_WITH_NICKLEN
232     AX_ARG_WITH_TOPICLEN
233     AX_ARG_WITH_SYSLOG
234     AX_ARG_ENABLE_EFNET
235     AX_ARG_ENABLE_HALFOPS
236     AX_ARG_ENABLE_DEBUGGING
237     AX_ARG_ENABLE_WARNINGS
238     AX_ARG_ENABLE_SYSLOG
239 adx 30
240 stu 908 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
241     AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
242     AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
243     AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
244     AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
245 adx 30
246 michael 922 AC_CONFIG_FILES( \
247     Makefile \
248     etc/Makefile \
249     servlink/Makefile \
250     contrib/Makefile \
251     contrib/help/Makefile \
252     src/Makefile \
253 michael 1092 libltdl/Makefile \
254 michael 922 messages/Makefile \
255     modules/Makefile \
256 michael 1053 modules/core/Makefile \
257 michael 922 doc/Makefile \
258     help/Makefile \
259 michael 1053 help/opers/Makefile \
260     help/users/Makefile \
261 michael 1015 tools/Makefile)
262 adx 30
263     AC_OUTPUT

Properties

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