ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/configure.ac
Revision: 1452
Committed: Fri Jun 29 11:33:21 2012 UTC (11 years, 9 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-8/configure.ac
File size: 7156 byte(s)
Log Message:
- Update configure in preparation for beta2

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

Properties

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