2000-04-17 11:36:29 +00:00
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(echoping.h)
|
2001-01-22 09:01:13 +00:00
|
|
|
dnl AC_CANONICAL_HOST
|
2001-01-26 14:39:52 +00:00
|
|
|
AM_INIT_AUTOMAKE(echoping, 4.0.2)
|
2000-04-17 11:36:29 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
2000-04-17 13:11:31 +00:00
|
|
|
dnl User options
|
|
|
|
AC_ARG_ENABLE(http,
|
|
|
|
[--enable-http HTTP (Web's main protocol) support],dnl
|
|
|
|
[if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(HTTP)
|
2000-07-02 20:43:55 +00:00
|
|
|
HTTP=1
|
2000-04-17 13:11:31 +00:00
|
|
|
fi],
|
|
|
|
dnl Default: enable it
|
2000-07-02 20:43:55 +00:00
|
|
|
[AC_DEFINE(HTTP)
|
|
|
|
HTTP=1])
|
2000-04-17 13:11:31 +00:00
|
|
|
AC_ARG_ENABLE(icp,
|
|
|
|
[--enable-icp ICP (for testing Web proxies/caches) support],dnl
|
|
|
|
[if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(ICP)
|
2000-11-05 12:55:04 +00:00
|
|
|
ICP=1
|
2000-04-17 13:11:31 +00:00
|
|
|
fi])
|
2000-09-27 05:38:29 +00:00
|
|
|
AC_ARG_ENABLE(smtp,
|
|
|
|
[--enable-smtp SMTP (Mail's main protocol) support],dnl
|
|
|
|
[if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(SMTP)
|
|
|
|
SMTP=1
|
|
|
|
fi],
|
|
|
|
dnl Default: enable it
|
|
|
|
[AC_DEFINE(SMTP)
|
|
|
|
SMTP=1])
|
2000-11-20 21:37:31 +00:00
|
|
|
AC_ARG_WITH(ssl,
|
|
|
|
[--with-ssl[=DIR] SSL crypt support (needs OpenSSL)],dnl
|
|
|
|
[if test "$withval" != "no"; then
|
|
|
|
AC_DEFINE(OPENSSL)
|
|
|
|
OPENSSL=1
|
|
|
|
if test "$withval" != "yes"; then
|
|
|
|
SSLROOT=$withval
|
2001-01-24 15:43:09 +00:00
|
|
|
LDFLAGS="${LDFLAGS} -L$SSLROOT/lib"
|
2000-11-20 21:37:31 +00:00
|
|
|
CPPFLAGS="${CPPFLAGS} -I$SSLROOT/include"
|
|
|
|
fi
|
2000-11-04 12:36:37 +00:00
|
|
|
fi],
|
|
|
|
dnl Default: disable it
|
|
|
|
)
|
2000-09-27 05:38:29 +00:00
|
|
|
|
2000-04-17 14:31:25 +00:00
|
|
|
dnl See T/TCP later
|
2000-04-17 13:11:31 +00:00
|
|
|
|
2000-04-17 11:36:29 +00:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(sys/time.h unistd.h)
|
|
|
|
CF_SYS_ERRLIST
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
2000-06-29 13:39:16 +00:00
|
|
|
CF_LIB_SOCKET
|
|
|
|
CF_LIB_NSL
|
2000-04-17 11:36:29 +00:00
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_VPRINTF
|
2000-06-29 13:39:16 +00:00
|
|
|
AC_CHECK_FUNCS(gettimeofday socket gethostbyname sigaction, , AC_MSG_ERROR(Missing mandatory function))
|
2000-04-17 11:36:29 +00:00
|
|
|
|
2000-11-04 12:36:37 +00:00
|
|
|
if test "$OPENSSL" = "1"; then
|
|
|
|
CF_LIB_OPENSSL
|
|
|
|
fi
|
|
|
|
|
2000-04-17 14:31:25 +00:00
|
|
|
dnl T/TCP
|
|
|
|
AC_MSG_CHECKING([T/TCP])
|
|
|
|
AC_TRY_COMPILE(
|
2000-04-17 14:35:35 +00:00
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
],
|
2000-04-17 14:31:25 +00:00
|
|
|
[int foobar = MSG_EOF;],
|
2000-04-17 14:43:43 +00:00
|
|
|
[AC_DEFINE(TTCP)
|
|
|
|
ac_have_ttcp="yes"],
|
2000-04-17 14:31:25 +00:00
|
|
|
ac_have_ttcp=no)
|
|
|
|
AC_MSG_RESULT($ac_have_ttcp)
|
|
|
|
AC_ARG_ENABLE(ttcp,
|
|
|
|
[--enable-ttcp T/TCP (Transaction TCP) support],
|
|
|
|
[if test "$enableval" = "yes"; then
|
|
|
|
if test $ac_have_ttcp = "yes"; then
|
2000-04-17 14:43:43 +00:00
|
|
|
AC_DEFINE(HAVE_TTCP)
|
2000-11-20 21:14:41 +00:00
|
|
|
TTCP=1
|
2000-04-17 14:31:25 +00:00
|
|
|
else
|
|
|
|
AC_MSG_WARN([No T/TCP support on this system, request ignored])
|
|
|
|
fi
|
|
|
|
fi],
|
|
|
|
dnl Default: enable it if supported
|
|
|
|
if test $ac_have_ttcp = "yes"; then
|
2000-04-17 14:43:43 +00:00
|
|
|
AC_DEFINE(HAVE_TTCP)
|
2000-11-20 21:14:41 +00:00
|
|
|
TTCP=1
|
2000-04-17 14:31:25 +00:00
|
|
|
fi)
|
|
|
|
|
2000-11-06 14:14:14 +00:00
|
|
|
dnl if test "$ICP" = "1"; then
|
|
|
|
dnl CF_CHECK_SERVICES
|
|
|
|
dnl fi
|
2000-04-17 14:31:25 +00:00
|
|
|
|
2001-01-24 14:03:42 +00:00
|
|
|
if test "$GCC" = yes; then
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
fi
|
|
|
|
|
2000-04-17 11:36:29 +00:00
|
|
|
AC_OUTPUT(Makefile)
|
2000-07-06 08:03:37 +00:00
|
|
|
|
|
|
|
|
2000-11-20 21:14:41 +00:00
|
|
|
AC_DEFUN([DISPLAY_SETTING],
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING($1)
|
|
|
|
if [ eval 'test "$$1" = "1"' > /dev/null]; then
|
|
|
|
AC_MSG_RESULT( enabled)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT( disabled)
|
|
|
|
fi
|
|
|
|
])dnl
|
|
|
|
echo ""
|
|
|
|
echo "Configuration of echoping:"
|
|
|
|
|
|
|
|
DISPLAY_SETTING(HTTP)
|
|
|
|
DISPLAY_SETTING(ICP)
|
|
|
|
DISPLAY_SETTING(OPENSSL)
|
|
|
|
DISPLAY_SETTING(SMTP)
|
|
|
|
DISPLAY_SETTING(TTCP)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|