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)
|
2000-06-30 10:02:52 +00:00
|
|
|
AM_INIT_AUTOMAKE(echoping, 3.0.0)
|
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)
|
|
|
|
fi],
|
|
|
|
dnl Default: enable it
|
|
|
|
AC_DEFINE(HTTP))
|
|
|
|
AC_ARG_ENABLE(icp,
|
|
|
|
[--enable-icp ICP (for testing Web proxies/caches) support],dnl
|
|
|
|
[if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(ICP)
|
|
|
|
fi])
|
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
|
2000-04-17 13:49:40 +00:00
|
|
|
if test "$GCC" = yes; then
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
fi
|
2000-04-17 11:36:29 +00:00
|
|
|
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-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-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-04-17 14:31:25 +00:00
|
|
|
fi)
|
|
|
|
|
|
|
|
|
2000-04-17 11:36:29 +00:00
|
|
|
AC_OUTPUT(Makefile)
|