ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/configure.ac
Revision: 1053
Committed: Thu Jan 28 08:49:16 2010 UTC (14 years, 2 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.3/configure.ac
File size: 8878 byte(s)
Log Message:
- Add back --silent switch to LIBTOOL flags for releases

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

Properties

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