ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/configure.ac
Revision: 1329
Committed: Sun Apr 1 12:02:12 2012 UTC (14 years, 3 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-8/configure.ac
File size: 7518 byte(s)
Log Message:
- Remove unused configure tests
- Fixed compile warning in conf_parser.c

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 1107 AC_PREREQ(2.68)
7 michael 1245 AC_INIT([ircd-hybrid], [8beta1], [bugs@ircd-hybrid.org])
8 michael 1292 AM_INIT_AUTOMAKE(1.11.3)
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 1329 strlcpy)
40 adx 30
41 michael 923 # Checks for header files.
42 michael 912 AC_CHECK_HEADERS_ONCE(crypt.h \
43     sys/resource.h \
44     sys/param.h \
45 db 941 types.h \
46     socket.h \
47 michael 912 sys/wait.h \
48     wait.h \
49     link.h)
50    
51 michael 977 AC_SEARCH_LIBS(crypt, crypt)
52 michael 923
53    
54 michael 1009 AC_ARG_WITH(libpcre-path,
55     AS_HELP_STRING([--with-libpcre-path=DIR], [Path to libpcre.so for PCRE support.]),
56     [LDFLAGS="-L$withval $LDFLAGS"],)
57 michael 923
58 michael 1009 AC_ARG_ENABLE(libpcre, AS_HELP_STRING([--disable-libpcre],[Disable PCRE support]),
59     [libpcre=$enableval],[libpcre=yes])
60    
61 michael 1010 AS_IF([test "$libpcre" = "yes"], [
62 michael 1009 AC_CHECK_HEADER(pcre.h, [AC_CHECK_LIB(pcre, pcre_study,
63     [
64     LIBS="-lpcre $LIBS"
65     AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if libpcre (-lpcre) is available.])
66     ], libpcre=no)
67     ], libpcre=no)
68 michael 1010 ])
69 michael 1009 AM_CONDITIONAL(ENABLE_PCRE, [test "$libpcre" = yes])
70    
71    
72 michael 912 dnl Openssl checks
73     AC_ARG_ENABLE(openssl,
74     [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
75     --disable-openssl Disable OpenSSL support. ],
76     [ cf_enable_openssl=$enableval ],
77     [ cf_enable_openssl="auto" ])
78 michael 1010 AC_MSG_CHECKING([for OpenSSL])
79 michael 912 if test "$cf_enable_openssl" != "no"; then
80     cf_openssl_basedir=""
81     if test "$cf_enable_openssl" != "auto" &&
82     test "$cf_enable_openssl" != "yes"; then
83     dnl Support for --enable-openssl=/some/place
84     cf_openssl_basedir="${cf_enable_openssl}"
85     else
86     dnl Do the auto-probe here. Check some common directory paths.
87     for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
88     /opt /opt/openssl /usr/local/openssl; do
89     if test -f "${dirs}/include/openssl/opensslv.h"; then
90     cf_openssl_basedir="${dirs}"
91     break
92     fi
93     done
94     unset dirs
95     fi
96    
97     dnl Now check cf_openssl_found to see if we found anything.
98     if test ! -z "$cf_openssl_basedir"; then
99     if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
100     CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
101     LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
102     else
103     dnl OpenSSL wasn't found in the directory specified. Naughty
104     dnl administrator...
105     cf_openssl_basedir=""
106     fi
107     else
108     dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
109     dnl are in /usr/include and /usr/lib. In this case, we don't want to
110     dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
111     dnl We can't do this check above, because some people want two versions
112     dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
113     dnl and they want /usr/local/ssl to have preference.
114     if test -f "/usr/include/openssl/opensslv.h"; then
115     cf_openssl_basedir="/usr"
116     fi
117     fi
118    
119     dnl If we have a basedir defined, then everything is okay. Otherwise,
120     dnl we have a problem.
121     if test ! -z "$cf_openssl_basedir"; then
122 michael 1010 AC_MSG_RESULT([$cf_openssl_basedir])
123 michael 912 cf_enable_openssl="yes"
124     else
125 michael 1010 AC_MSG_RESULT([not found. Please check your path.])
126 michael 912 cf_enable_openssl="no"
127     fi
128     unset cf_openssl_basedir
129     else
130     dnl If --disable-openssl was specified
131 michael 1010 AC_MSG_RESULT([disabled])
132 michael 912 fi
133 michael 1015
134     AS_IF([test "$cf_enable_openssl" != "no"],
135 michael 1304 [AC_MSG_CHECKING(for OpenSSL 0.9.8 or above)
136 michael 1106 AC_RUN_IFELSE([
137 michael 1015 AC_LANG_PROGRAM([
138     #include <openssl/opensslv.h>
139     #include <stdlib.h>],
140 michael 1304 [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); ]])],
141 michael 1015 [cf_openssl_version_ok=yes],
142     [cf_openssl_version_ok=no],
143     [cf_openssl_version_ok=no])
144    
145     AS_IF([test "$cf_openssl_version_ok" = "yes"],
146     [AC_MSG_RESULT(found)
147 michael 1106
148 michael 1304 AC_CHECK_LIB(ssl, SSL_connect)
149     AS_IF([test "$ac_cv_lib_ssl_SSL_connect" = "yes"],
150     [AC_CHECK_LIB(crypto, RSA_free)])
151 michael 1015 ],[AC_MSG_RESULT(no - OpenSSL support disabled)
152     cf_enable_openssl="no"])])
153    
154 michael 1304 AM_CONDITIONAL(ENABLE_SSL, [test "$ac_cv_lib_crypto_RSA_free" = yes])
155 michael 912
156    
157 michael 955 AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
158     [Enable assert() statements]),
159 michael 924 [assert=$enableval], [assert=no])
160    
161 michael 1010 AS_IF([test "$assert" = "no"],
162     [AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
163 michael 924
164 michael 1010
165 michael 955 AC_ARG_ENABLE(small-net, AS_HELP_STRING([--enable-small-net],
166     [Enable small network support.]),
167 michael 925 [small_net=$enableval], [small_net=no])
168    
169 michael 1015 AS_IF([test "$small_net" = "yes"], [
170 michael 925 AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
171     AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
172     AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
173     AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
174     AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
175     AC_DEFINE([DNODE_HEAP_SIZE], 256, [Size of the dlink_node heap.])
176     AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
177     AC_DEFINE([DBUF_HEAP_SIZE], 64, [Size of the dbuf heap.])
178 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
179 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 128, [Size of the dns heap.])], [
180    
181 michael 925 AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.])
182     AC_DEFINE([CHANNEL_HEAP_SIZE], 1024, [Size of the channel heap.])
183     AC_DEFINE([BAN_HEAP_SIZE], 1024, [Size of the ban heap.])
184     AC_DEFINE([CLIENT_HEAP_SIZE], 1024, [Size of the client heap.])
185     AC_DEFINE([LCLIENT_HEAP_SIZE], 512, [Size of the local client heap.])
186     AC_DEFINE([DNODE_HEAP_SIZE], 1024, [Size of the dlink_node heap.])
187     AC_DEFINE([TOPIC_HEAP_SIZE], 1024, [Size of the topic heap.])
188     AC_DEFINE([DBUF_HEAP_SIZE], 512, [Size of the dbuf heap.])
189 michael 998 AC_DEFINE([AUTH_HEAP_SIZE], 512, [Size of the auth heap.])
190 michael 1015 AC_DEFINE([DNS_HEAP_SIZE], 512, [Size of the dns heap.])])
191 michael 925
192 michael 942
193 stu 908 # Argument processing.
194     AX_ARG_ENABLE_IOLOOP_MECHANISM
195     AX_ARG_WITH_NICKLEN
196     AX_ARG_WITH_TOPICLEN
197     AX_ARG_ENABLE_EFNET
198     AX_ARG_ENABLE_HALFOPS
199     AX_ARG_ENABLE_DEBUGGING
200     AX_ARG_ENABLE_WARNINGS
201 adx 30
202 stu 908 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
203     AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
204     AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
205     AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
206     AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
207 adx 30
208 michael 922 AC_CONFIG_FILES( \
209     Makefile \
210     contrib/Makefile \
211     contrib/help/Makefile \
212     src/Makefile \
213 michael 1092 libltdl/Makefile \
214 michael 922 messages/Makefile \
215     modules/Makefile \
216 michael 1053 modules/core/Makefile \
217 michael 922 doc/Makefile \
218     help/Makefile \
219 michael 1053 help/opers/Makefile \
220     help/users/Makefile \
221 michael 1015 tools/Makefile)
222 adx 30
223     AC_OUTPUT

Properties

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