ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/7.3.x/configure.ac
Revision: 982
Committed: Thu Aug 13 22:15:08 2009 UTC (14 years, 8 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.2/configure.ac
File size: 7650 byte(s)
Log Message:
- added a mersenne twister basedn prng

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

Properties

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