1 |
dnl $Id$ |
dnl $Id$ |
2 |
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
3 |
AC_PREREQ(2.50) |
AC_PREREQ(2.50) |
|
AC_INIT(src/boa.c) |
|
4 |
|
|
5 |
AC_DEFINE_UNQUOTED(SERVER_VERSION, "0.0.2", [Version of Hydra]) |
AC_INIT |
6 |
|
|
7 |
|
SERVER_VERSION="0.0.3" |
8 |
|
AC_DEFINE_UNQUOTED(SERVER_VERSION, "$SERVER_VERSION", [Version of Hydra]) |
9 |
AC_DEFINE_UNQUOTED(SERVER_NAME, "Hydra", [Name of the server]) |
AC_DEFINE_UNQUOTED(SERVER_NAME, "Hydra", [Name of the server]) |
10 |
|
|
11 |
AM_INIT_AUTOMAKE($SERVER_NAME, $SERVER_VERSION, [nothing here]) |
AM_INIT_AUTOMAKE(hydra, $SERVER_VERSION, [nothing here]) |
12 |
|
|
13 |
dnl Make config.h |
dnl Make config.h |
14 |
AM_CONFIG_HEADER(config.h) |
AM_CONFIG_HEADER(config.h) |
15 |
|
|
16 |
|
AM_MAINTAINER_MODE |
17 |
|
|
18 |
dnl Checks for programs. |
dnl Checks for programs. |
19 |
AM_PROG_LEX |
AM_PROG_LEX |
20 |
AC_PROG_YACC |
AC_PROG_YACC |
30 |
|
|
31 |
dnl Checks for typedefs, structures, and compiler characteristics. |
dnl Checks for typedefs, structures, and compiler characteristics. |
32 |
AC_C_CONST |
AC_C_CONST |
33 |
|
AC_C_INLINE |
34 |
AC_TYPE_UID_T |
AC_TYPE_UID_T |
35 |
AC_TYPE_PID_T |
AC_TYPE_PID_T |
36 |
AC_HEADER_TIME |
AC_HEADER_TIME |
156 |
|
|
157 |
if test "$use_ssl" = "yes"; then |
if test "$use_ssl" = "yes"; then |
158 |
AM_PATH_LIBGNUTLS( 0.5.8, |
AM_PATH_LIBGNUTLS( 0.5.8, |
159 |
AC_DEFINE(HAVE_LIBGNUTLS,1, [Have libgnutls]), |
AC_DEFINE(HAVE_LIBGNUTLS, 1, [Have libgnutls]) |
160 |
|
LIBS="$LIBS $LIBGNUTLS_LIBS" |
161 |
|
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
162 |
|
AC_DEFINE( ENABLE_SSL, 1, [whether to enable ssl]), |
163 |
AC_MSG_WARN([[ |
AC_MSG_WARN([[ |
164 |
*** |
*** |
165 |
*** libgnutls was not found. You may want to get it from |
*** libgnutls was not found. You may want to get it from |
166 |
*** ftp://ftp.gnutls.org/pub/gnutls/ |
*** ftp://ftp.gnutls.org/pub/gnutls/ |
167 |
]])) |
]])) |
168 |
|
|
|
LIBS="$LIBS $LIBGNUTLS_LIBS" |
|
|
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
|
|
AC_DEFINE( ENABLE_SSL, 1, [whether to enable ssl]) |
|
169 |
fi |
fi |
170 |
|
|
171 |
use_smp=yes |
use_smp=yes |
188 |
AC_DEFINE( ENABLE_SMP, 1, [whether to enable SMP code]) |
AC_DEFINE( ENABLE_SMP, 1, [whether to enable SMP code]) |
189 |
LIBS="-lpthread $LIBS" |
LIBS="-lpthread $LIBS" |
190 |
]) |
]) |
191 |
|
CFLAGS="$CFLAGS -D_REENTRANT" |
192 |
|
fi |
193 |
|
|
194 |
|
if test "$use_smp" = "yes"; then use_hic=yes |
195 |
|
else use_hic = no |
196 |
|
fi |
197 |
|
|
198 |
|
AC_MSG_CHECKING(whether to include HIC (internally handled CGIs) support) |
199 |
|
AC_ARG_ENABLE(hic, [ --disable-hic Do not include HIC support], |
200 |
|
[ |
201 |
|
if test "$enableval" = "yes" ; then |
202 |
|
if test "$use_smp" = "yes"; then use_hic=yes |
203 |
|
else use_hic = no |
204 |
|
fi |
205 |
|
else |
206 |
|
use_hic=no |
207 |
|
fi |
208 |
|
] |
209 |
|
) |
210 |
|
|
211 |
|
AC_MSG_RESULT($use_hic) |
212 |
|
|
213 |
|
if test "$use_hic" = "yes"; then |
214 |
|
AC_CHECK_LIB(dl, dlopen, |
215 |
|
LIBS="$LIBS -ldl" |
216 |
|
AC_DEFINE( ENABLE_HIC, 1, [whether to use HIC code]) |
217 |
|
) |
218 |
fi |
fi |
219 |
|
|
220 |
|
|
299 |
AC_CONFIG_FILES([Makefile src/Makefile extras/Makefile contrib/Makefile examples/Makefile docs/Makefile]) |
AC_CONFIG_FILES([Makefile src/Makefile extras/Makefile contrib/Makefile examples/Makefile docs/Makefile]) |
300 |
|
|
301 |
AC_OUTPUT |
AC_OUTPUT |
302 |
|
|
303 |
|
echo "**********************************************************" |
304 |
|
echo "" |
305 |
|
echo "An example configuration file for hydra can be found at" |
306 |
|
echo "examples/hydra.conf." |
307 |
|
echo "" |
308 |
|
echo "**********************************************************" |