4 |
|
|
5 |
AC_INIT |
AC_INIT |
6 |
|
|
7 |
SERVER_VERSION="0.0.3" |
SERVER_VERSION="0.0.5" |
8 |
AC_DEFINE_UNQUOTED(SERVER_VERSION, "$SERVER_VERSION", [Version of Hydra]) |
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 |
|
|
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 |
40 |
AC_FUNC_MMAP |
AC_FUNC_MMAP |
41 |
AC_CHECK_FUNCS(getcwd strdup strstr) |
AC_CHECK_FUNCS(getcwd strdup strstr) |
42 |
AC_CHECK_FUNCS(gethostname gethostbyname select socket inet_aton) |
AC_CHECK_FUNCS(gethostname gethostbyname select socket inet_aton) |
43 |
AC_CHECK_FUNCS(scandir alphasort) |
AC_CHECK_FUNCS(scandir alphasort qsort) |
44 |
|
AC_CHECK_FUNCS(getrlimit setrlimit) |
45 |
|
|
46 |
AC_CHECK_STRUCT_FOR([ |
AC_CHECK_STRUCT_FOR([ |
47 |
#if TIME_WITH_SYS_TIME |
#if TIME_WITH_SYS_TIME |
109 |
|
|
110 |
LIBS="$LIBS $MYLIBS" |
LIBS="$LIBS $MYLIBS" |
111 |
|
|
|
if test $ac_cv_func_scandir = no; then |
|
|
# scandir not defined, add it |
|
|
SCANDIR="scandir.o" |
|
|
fi |
|
|
|
|
|
if test $ac_cv_func_alphasort = no; then |
|
|
# alphasort not defined, add it |
|
|
ALPHASORT="alphasort.o" |
|
|
fi |
|
|
|
|
112 |
# Try to find TCP_CORK and use it if found. |
# Try to find TCP_CORK and use it if found. |
113 |
AC_MSG_CHECKING([whether TCP_CORK is a valid TCP socket option]) |
AC_MSG_CHECKING([whether TCP_CORK is a valid TCP socket option]) |
114 |
AC_TRY_COMPILE( |
AC_TRY_COMPILE( |
147 |
|
|
148 |
if test "$use_ssl" = "yes"; then |
if test "$use_ssl" = "yes"; then |
149 |
AM_PATH_LIBGNUTLS( 0.5.8, |
AM_PATH_LIBGNUTLS( 0.5.8, |
150 |
AC_DEFINE(HAVE_LIBGNUTLS,1, [Have libgnutls]), |
AC_DEFINE(HAVE_LIBGNUTLS, 1, [Have libgnutls]) |
151 |
AC_MSG_ERROR([[ |
LIBS="$LIBS $LIBGNUTLS_LIBS" |
152 |
|
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
153 |
|
AC_DEFINE( ENABLE_SSL, 1, [whether to enable ssl]), |
154 |
|
AC_MSG_WARN([[ |
155 |
*** |
*** |
156 |
*** libgnutls was not found. You may want to get it from |
*** libgnutls was not found. You may want to get it from |
157 |
*** ftp://ftp.gnutls.org/pub/gnutls/ |
*** ftp://ftp.gnutls.org/pub/gnutls/ |
158 |
]])) |
]])) |
159 |
|
|
|
LIBS="$LIBS $LIBGNUTLS_LIBS" |
|
|
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" |
|
|
AC_DEFINE( ENABLE_SSL, 1, [whether to enable ssl]) |
|
160 |
fi |
fi |
161 |
|
|
162 |
use_smp=yes |
use_smp=yes |
208 |
) |
) |
209 |
fi |
fi |
210 |
|
|
|
|
|
|
if test $ac_cv_func_strdup = no -o $ac_cv_func_strstr = no; then |
|
|
# strdup or strstr not defined |
|
|
STRUTIL="strutil.o" |
|
|
fi |
|
|
|
|
211 |
if test -n "$GCC"; then |
if test -n "$GCC"; then |
212 |
dnl if we are running gcc, use -pipe |
dnl if we are running gcc, use -pipe |
213 |
test -n "$GCC" && CFLAGS="$CFLAGS -pipe" |
test -n "$GCC" && CFLAGS="$CFLAGS -pipe" |
276 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
277 |
]) |
]) |
278 |
|
|
279 |
dnl For anything that wasn't found but we have source for |
AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile examples/Makefile docs/Makefile]) |
|
AC_SUBST(STRUTIL) |
|
|
AC_SUBST(ALPHASORT) |
|
|
AC_SUBST(SCANDIR) |
|
|
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile extras/Makefile contrib/Makefile examples/Makefile docs/Makefile]) |
|
280 |
|
|
281 |
AC_OUTPUT |
AC_OUTPUT |
282 |
|
|