ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/releases/8.1.7/configure.ac
Revision: 1348
Committed: Wed Apr 11 17:04:22 2012 UTC (14 years, 6 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-8/configure.ac
File size: 7488 byte(s)
Log Message:
- remove link.h from header checks

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

Properties

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