SMTP support by Samuel Tardieu

GETADDRINFO
Stephane Bortzmeyer 24 years ago
parent 63c3b3a21b
commit 0e28b87f8c

@ -12,6 +12,8 @@ and beta-testing.
Christian Grimm for the ICP code. Christian Grimm for the ICP code.
Samuel Tardieu <sam@inf.enst.fr> for the SMTP code.
The Pasteur Institute because the work was done when working on the The Pasteur Institute because the work was done when working on the
French national Web cache project, while being an employee of the French national Web cache project, while being an employee of the
Institute. Institute.

@ -1,3 +1,7 @@
3.1.0
* SMTP support
3.0.1 (2000-07-06) 3.0.1 (2000-07-06)
* configure now tries to detect the name of the HTTP port * configure now tries to detect the name of the HTTP port

@ -1,17 +1,20 @@
echoping appears to compile and run at least on Tru64 (ex-Digital echoping appears to compile and run at least on Tru64 (ex-Digital
Unix, ex-OSF/1), Solaris, Linux, SunOS, FreeBSD, IRIX and Ultrix. You Unix, ex-OSF/1), Solaris, Linux, SunOS, FreeBSD, NetBSD, IRIX and
do not have to be root to install it. Ultrix. You do not have to be root to install it.
Just type "./configure", then "make", and then (as root if necessary), Just type "./configure", then "make", and then (as root if necessary),
"make install". "make install".
"configure" has some options: "configure" has some options:
--disable-http (suppress the HTTP support) --disable-http (suppress the HTTP support)
--disable-smtp (suppress the SMTP support)
--enable-icp (add the ICP support, to monitor Web proxies like Squid) --enable-icp (add the ICP support, to monitor Web proxies like Squid)
--disable-ttcp (suppress the T/TCP support which is enabled only if --disable-ttcp (suppress the T/TCP support which is enabled only if
your system supports it - FreeBSD does. See your system supports it - FreeBSD does. See
<http://www.kohala.com/start/ttcp.html>) <http://www.kohala.com/start/ttcp.html>)
Standard "autoconf/configure" options are supported such as --prefix
to set the installation root directory.
If 'echoping -h' fails with "tcp_open: unknown service: If 'echoping -h' fails with "tcp_open: unknown service:
undefined:use_:80/tcp",it means configure was not able to find a port undefined:use_:80/tcp",it means configure was not able to find a port

@ -4,7 +4,7 @@
bin_PROGRAMS = echoping bin_PROGRAMS = echoping
man_MANS = echoping.1 man_MANS = echoping.1
echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c echoping.h icp.h HTParse.h echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c echoping.h icp.h HTParse.h smtp.c
echoping_LDADD = echoping_LDADD =
DOCS=DETAILS DOCS=DETAILS

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.3 from Makefile.am # Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -13,7 +13,7 @@
# $Id$ # $Id$
SHELL = /bin/sh SHELL = @SHELL@
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
@ -34,7 +34,7 @@ mandir = @mandir@
includedir = @includedir@ includedir = @includedir@
oldincludedir = /usr/include oldincludedir = /usr/include
DISTDIR = DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
@ -48,7 +48,7 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@ transform = @program_transform_name@
@ -66,11 +66,11 @@ VERSION = @VERSION@
bin_PROGRAMS = echoping bin_PROGRAMS = echoping
man_MANS = echoping.1 man_MANS = echoping.1
echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c echoping.h icp.h HTParse.h echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HTParse.c echoping.h icp.h HTParse.h smtp.c
echoping_LDADD = echoping_LDADD =
DOCS=DETAILS DOCS = DETAILS
TESTS=test-echoping-local test-echoping-remote test-echoping-icp TESTS = test-echoping-local test-echoping-remote test-echoping-icp
EXTRA_DIST = $(man_MANS) $(TESTS) $(DOCS) EXTRA_DIST = $(man_MANS) $(TESTS) $(DOCS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -85,60 +85,65 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
echoping_OBJECTS = echoping.o error.o readline.o writen.o util.o http.o \ echoping_OBJECTS = echoping.o error.o readline.o writen.o util.o http.o \
icp.o HTParse.o icp.o HTParse.o smtp.o
echoping_DEPENDENCIES = echoping_DEPENDENCIES =
echoping_LDFLAGS = echoping_LDFLAGS =
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
man1dir = $(mandir)/man1 man1dir = $(mandir)/man1
MANS = $(man_MANS) MANS = $(man_MANS)
NROFF = nroff NROFF = nroff
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 config.h.in \ Makefile.am Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 \
configure configure.in install-sh missing mkinstalldirs stamp-h.in config.h.in configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = tar
GZIP = --best GZIP_ENV = --best
DEP_FILES = .deps/HTParse.P .deps/echoping.P .deps/error.P .deps/http.P \
.deps/icp.P .deps/readline.P .deps/util.P .deps/writen.P
SOURCES = $(echoping_SOURCES) SOURCES = $(echoping_SOURCES)
OBJECTS = $(echoping_OBJECTS) OBJECTS = $(echoping_OBJECTS)
all: Makefile $(PROGRAMS) $(MANS) config.h all: all-redirect
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .S .c .o .s .SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4 $(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h config.h: stamp-h
@: @if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \ && CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status $(SHELL) ./config.status
@echo timestamp > stamp-h @echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in $(srcdir)/config.h.in: $(srcdir)/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER) cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr: mostlyclean-hdr:
@ -163,17 +168,20 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \ @list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \ else :; fi; \
done done
uninstall-binPROGRAMS: uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \ list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done done
.c.o:
$(COMPILE) -c $<
.s.o: .s.o:
$(COMPILE) -c $< $(COMPILE) -c $<
@ -228,16 +236,20 @@ uninstall-man1:
done done
install-man: $(MANS) install-man: $(MANS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(MAKE) install-man1 $(MAKE) $(AM_MAKEFLAGS) install-man1
uninstall-man: uninstall-man:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
$(MAKE) uninstall-man1 $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \ here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) && mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \ tags=; \
@ -266,69 +278,46 @@ top_distdir = $(distdir)
# tarfile. # tarfile.
distcheck: dist distcheck: dist
-rm -rf $(distdir) -rm -rf $(distdir)
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build mkdir $(distdir)/=build
mkdir $(distdir)/=inst mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \ dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \ cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \ && ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) install \ && $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) dist && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir) -rm -rf $(distdir)
@echo "========================"; \ @banner="$(distdir).tar.gz is ready for distribution"; \
echo "$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \
echo "========================" echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir dist: distdir
-chmod -R a+r $(distdir) -chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir) -rm -rf $(distdir)
dist-all: distdir dist-all: distdir
-chmod -R a+r $(distdir) -chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir) -rm -rf $(distdir)
distdir: $(DISTFILES) distdir: $(DISTFILES)
-rm -rf $(distdir) -rm -rf $(distdir)
mkdir $(distdir) mkdir $(distdir)
-chmod 777 $(distdir) -chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ d=$(srcdir); \
test -f $(distdir)/$$file \ if test -d $$d/$$file; then \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \ cp -pr $$d/$$file $(distdir)/$$file; \
|| cp -p $$d/$$file $(distdir)/$$file; \ else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
check-TESTS: $(TESTS) check-TESTS: $(TESTS)
@failed=0; all=0; \ @failed=0; all=0; \
srcdir=$(srcdir); export srcdir; \ srcdir=$(srcdir); export srcdir; \
@ -354,59 +343,70 @@ check-TESTS: $(TESTS)
echo "$$banner"; \ echo "$$banner"; \
echo "$$dashes"; \ echo "$$dashes"; \
test "$$failed" -eq 0 test "$$failed" -eq 0
info: info-am:
dvi: info: info-am
check: all dvi-am:
$(MAKE) check-TESTS dvi: dvi-am
installcheck: check-am: all-am
install-exec: install-binPROGRAMS $(MAKE) $(AM_MAKEFLAGS) check-TESTS
@$(NORMAL_INSTALL) check: check-am
installcheck-am:
install-data: install-man installcheck: installcheck-am
@$(NORMAL_INSTALL) all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install: install-exec install-data all
@: install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
uninstall: uninstall-binPROGRAMS uninstall-man
install-data-am: install-man
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS uninstall-man
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(MANS) config.h
all-redirect: all-am
install-strip: install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs:
$(mkinstalldirs) $(DATADIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
mostlyclean-generic: mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-rm -f Makefile $(DISTCLEANFILES) -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean-compile mostlyclean-tags \
mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \
mostlyclean-compile mostlyclean-tags mostlyclean-depend \
mostlyclean-generic mostlyclean-generic
clean: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ mostlyclean: mostlyclean-am
clean-depend clean-generic mostlyclean
clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \
clean-generic mostlyclean-am
distclean: distclean-hdr distclean-binPROGRAMS distclean-compile \ clean: clean-am
distclean-tags distclean-depend distclean-generic clean
distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \
distclean-tags distclean-generic clean-am
distclean: distclean-am
-rm -f config.status -rm -f config.status
maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \ maintainer-clean-generic distclean-am
distclean
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-rm -f config.status -rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
@ -415,9 +415,10 @@ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \ mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile install-man1 uninstall-man1 install-man \ maintainer-clean-compile install-man1 uninstall-man1 install-man \
uninstall-man tags mostlyclean-tags distclean-tags clean-tags \ uninstall-man tags mostlyclean-tags distclean-tags clean-tags \
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \ maintainer-clean-tags distdir check-TESTS info-am info dvi-am dvi check \
clean-depend maintainer-clean-depend check-TESTS info dvi installcheck \ check-am installcheck-am installcheck all-recursive-am install-exec-am \
install-exec install-data install uninstall all installdirs \ install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \ mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean maintainer-clean-generic clean mostlyclean distclean maintainer-clean

@ -15,6 +15,9 @@
/* HTTP support */ /* HTTP support */
#undef HTTP #undef HTTP
/* SMTP support */
#undef SMTP
/* ICP support */ /* ICP support */
#undef ICP #undef ICP

21
SRC/aclocal.m4 vendored

@ -1,7 +1,7 @@
dnl aclocal.m4 generated automatically by aclocal 1.3 dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -210,7 +210,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE, AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AM_PROG_INSTALL]) [AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1] PACKAGE=[$1]
AC_SUBST(PACKAGE) AC_SUBST(PACKAGE)
VERSION=[$2] VERSION=[$2]
@ -220,8 +220,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi fi
ifelse([$3],, ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM]) AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross. dnl FIXME This is truly gross.
@ -233,15 +233,6 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])]) AC_REQUIRE([AC_PROG_MAKE_SET])])
# serial 1
AC_DEFUN(AM_PROG_INSTALL,
[AC_REQUIRE([AC_PROG_INSTALL])
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
AC_SUBST(INSTALL_SCRIPT)dnl
])
# #
# Check to make sure that the build environment is sane. # Check to make sure that the build environment is sane.
# #

@ -36,6 +36,13 @@
/* Define if you have the <unistd.h> header file. */ /* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* Do we have POSIX signals? */ /* Do we have POSIX signals? */
#undef HAVE_SIGACTION #undef HAVE_SIGACTION
@ -51,6 +58,9 @@
/* HTTP support */ /* HTTP support */
#undef HTTP #undef HTTP
/* SMTP support */
#undef SMTP
/* ICP support */ /* ICP support */
#undef ICP #undef ICP

325
SRC/configure vendored

@ -1,7 +1,7 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 # Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
# #
# This configure script is free software; the Free Software Foundation # This configure script is free software; the Free Software Foundation
@ -16,6 +16,8 @@ ac_help="$ac_help
ac_help="$ac_help ac_help="$ac_help
--enable-icp ICP (for testing Web proxies/caches) support" --enable-icp ICP (for testing Web proxies/caches) support"
ac_help="$ac_help ac_help="$ac_help
--enable-smtp SMTP (Mail's main protocol) support"
ac_help="$ac_help
--enable-ttcp T/TCP (Transaction TCP) support" --enable-ttcp T/TCP (Transaction TCP) support"
# Initialize some variables set by options. # Initialize some variables set by options.
@ -55,6 +57,7 @@ mandir='${prefix}/man'
# Initialize some other variables. # Initialize some other variables.
subdirs= subdirs=
MFLAGS= MAKEFLAGS= MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document. # Maximum number of lines to put in a shell here document.
ac_max_here_lines=12 ac_max_here_lines=12
@ -338,7 +341,7 @@ EOF
verbose=yes ;; verbose=yes ;;
-version | --version | --versio | --versi | --vers) -version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12" echo "configure generated by autoconf version 2.13"
exit 0 ;; exit 0 ;;
-with-* | --with-*) -with-* | --with-*)
@ -508,9 +511,11 @@ ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@ -550,28 +555,30 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SunOS /usr/etc/install # SunOS /usr/etc/install
# IRIX /sbin/install # IRIX /sbin/install
# AIX /bin/install # AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args # AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:558: checking for a BSD compatible install" >&5 echo "configure:564: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements. # Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*) *)
# OSF1 and SCO ODT 3.0 have their own names for install. # OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do # Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install && if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention. # AIX install. It has an incompatible calling convention.
# OSF/1 installbsd also uses dspmsg, but is usable.
: :
else else
ac_cv_path_install="$ac_dir/$ac_prog -c" ac_cv_path_install="$ac_dir/$ac_prog -c"
@ -601,13 +608,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution. # It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:611: checking whether build environment is sane" >&5 echo "configure:617: checking whether build environment is sane" >&5
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftestfile
@ -664,7 +670,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x," test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:668: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:674: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -693,7 +699,7 @@ fi
PACKAGE=echoping PACKAGE=echoping
VERSION=3.0.1 VERSION=3.1.0-BETA
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@ -710,7 +716,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd` missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:714: checking for working aclocal" >&5 echo "configure:720: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -723,7 +729,7 @@ else
fi fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:727: checking for working autoconf" >&5 echo "configure:733: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -736,7 +742,7 @@ else
fi fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:740: checking for working automake" >&5 echo "configure:746: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -749,7 +755,7 @@ else
fi fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:753: checking for working autoheader" >&5 echo "configure:759: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -762,7 +768,7 @@ else
fi fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:766: checking for working makeinfo" >&5 echo "configure:772: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -809,18 +815,39 @@ EOF
fi fi
# Check whether --enable-smtp or --disable-smtp was given.
if test "${enable_smtp+set}" = set; then
enableval="$enable_smtp"
if test "$enableval" = "yes"; then
cat >> confdefs.h <<\EOF
#define SMTP 1
EOF
SMTP=1
fi
else
cat >> confdefs.h <<\EOF
#define SMTP 1
EOF
SMTP=1
fi
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:816: checking for $ac_word" >&5 echo "configure:842: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
if test -n "$CC"; then if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test. ac_cv_prog_CC="$CC" # Let the user override the test.
else else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
for ac_dir in $PATH; do ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=. test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc" ac_cv_prog_CC="gcc"
@ -841,16 +868,17 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:845: checking for $ac_word" >&5 echo "configure:872: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
if test -n "$CC"; then if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test. ac_cv_prog_CC="$CC" # Let the user override the test.
else else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no ac_prog_rejected=no
for ac_dir in $PATH; do ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=. test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@ -885,25 +913,61 @@ else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
fi fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:923: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:955: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext << EOF
#line 903 "configure"
#line 966 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@ -917,18 +981,24 @@ else
ac_cv_prog_cc_works=no ac_cv_prog_cc_works=no
fi fi
rm -fr conftest* rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:927: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:932: checking whether we are using GNU C" >&5 echo "configure:1002: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -937,7 +1007,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@ -948,11 +1018,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then if test $ac_cv_prog_gcc = yes; then
GCC=yes GCC=yes
ac_test_CFLAGS="${CFLAGS+set}" else
ac_save_CFLAGS="$CFLAGS" GCC=
CFLAGS= fi
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:956: checking whether ${CC-cc} accepts -g" >&5 ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1030: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -967,16 +1041,20 @@ rm -f conftest*
fi fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2" CFLAGS="-g -O2"
else else
CFLAGS="-O2" CFLAGS="-g"
fi fi
else else
GCC= if test "$GCC" = yes; then
test "${CFLAGS+set}" = set || CFLAGS="-g" CFLAGS="-O2"
else
CFLAGS=
fi
fi fi
if test "$GCC" = yes; then if test "$GCC" = yes; then
@ -989,28 +1067,30 @@ fi
# SunOS /usr/etc/install # SunOS /usr/etc/install
# IRIX /sbin/install # IRIX /sbin/install
# AIX /bin/install # AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args # AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:997: checking for a BSD compatible install" >&5 echo "configure:1076: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements. # Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*) *)
# OSF1 and SCO ODT 3.0 have their own names for install. # OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do # Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install && if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention. # AIX install. It has an incompatible calling convention.
# OSF/1 installbsd also uses dspmsg, but is usable.
: :
else else
ac_cv_path_install="$ac_dir/$ac_prog -c" ac_cv_path_install="$ac_dir/$ac_prog -c"
@ -1040,12 +1120,14 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution. # It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1049: checking how to run the C preprocessor" >&5 echo "configure:1131: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1060,14 +1142,14 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1064 "configure" #line 1146 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
else else
@ -1077,14 +1159,31 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1081 "configure" #line 1163 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1180 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
else else
@ -1096,6 +1195,8 @@ else
fi fi
rm -f conftest* rm -f conftest*
fi fi
rm -f conftest*
fi
rm -f conftest* rm -f conftest*
ac_cv_prog_CPP="$CPP" ac_cv_prog_CPP="$CPP"
fi fi
@ -1106,12 +1207,12 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1110: checking for ANSI C header files" >&5 echo "configure:1211: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1115 "configure" #line 1216 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
@ -1119,8 +1220,8 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_stdc=yes ac_cv_header_stdc=yes
@ -1136,7 +1237,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1140 "configure" #line 1241 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
@ -1154,7 +1255,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1158 "configure" #line 1259 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
@ -1175,7 +1276,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1179 "configure" #line 1280 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1186,7 +1287,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -1213,18 +1314,18 @@ for ac_hdr in sys/time.h unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1217: checking for $ac_hdr" >&5 echo "configure:1318: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1222 "configure" #line 1323 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes" eval "ac_cv_header_$ac_safe=yes"
@ -1254,13 +1355,13 @@ for cf_name in sys_nerr sys_errlist
do do
echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6
echo "configure:1258: checking if external $cf_name is declared" >&5 echo "configure:1359: checking if external $cf_name is declared" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1264 "configure" #line 1365 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
@ -1273,7 +1374,7 @@ int main() {
long x = (long) $cf_name long x = (long) $cf_name
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval 'cf_cv_dcl_'$cf_name'=yes' eval 'cf_cv_dcl_'$cf_name'=yes'
else else
@ -1303,13 +1404,13 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist # It's possible (for near-UNIX clones) that the data doesn't exist
echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6 echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6
echo "configure:1307: checking if external $cf_name exists" >&5 echo "configure:1408: checking if external $cf_name exists" >&5
if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1313 "configure" #line 1414 "configure"
#include "confdefs.h" #include "confdefs.h"
#undef $cf_name #undef $cf_name
@ -1319,7 +1420,7 @@ int main() {
$cf_name = 2 $cf_name = 2
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval 'cf_cv_have_'$cf_name'=yes' eval 'cf_cv_have_'$cf_name'=yes'
else else
@ -1352,18 +1453,18 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1356: checking for working const" >&5 echo "configure:1457: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1361 "configure" #line 1462 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
/* Ultrix mips cc rejects this. */ /* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x; typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */ /* SunOS 4.1.1 cc rejects this. */
char const *const *ccp; char const *const *ccp;
char **p; char **p;
@ -1406,7 +1507,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
@ -1427,12 +1528,12 @@ EOF
fi fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1431: checking whether time.h and sys/time.h may both be included" >&5 echo "configure:1532: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1436 "configure" #line 1537 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
@ -1441,7 +1542,7 @@ int main() {
struct tm *tp; struct tm *tp;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_time=yes ac_cv_header_time=yes
else else
@ -1464,7 +1565,7 @@ fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:1468: checking for socket in -lsocket" >&5 echo "configure:1569: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1472,7 +1573,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS" LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1476 "configure" #line 1577 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1483,7 +1584,7 @@ int main() {
socket() socket()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1500,9 +1601,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6 echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6
echo "configure:1504: checking if libsocket is mandatory" >&5 echo "configure:1605: checking if libsocket is mandatory" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1506 "configure" #line 1607 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -1518,7 +1619,7 @@ int main() {
socket (AF_INET, SOCK_STREAM, 0) socket (AF_INET, SOCK_STREAM, 0)
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
else else
@ -1536,7 +1637,7 @@ fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:1540: checking for gethostbyname in -lnsl" >&5 echo "configure:1641: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1544,7 +1645,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS" LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1548 "configure" #line 1649 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1555,7 +1656,7 @@ int main() {
gethostbyname() gethostbyname()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1572,9 +1673,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6 echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6
echo "configure:1576: checking if libnsl is mandatory" >&5 echo "configure:1677: checking if libnsl is mandatory" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1578 "configure" #line 1679 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -1583,7 +1684,7 @@ int main() {
gethostbyname(domain) gethostbyname(domain)
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
else else
@ -1600,12 +1701,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1604: checking return type of signal handlers" >&5 echo "configure:1705: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1609 "configure" #line 1710 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
@ -1622,7 +1723,7 @@ int main() {
int i; int i;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_type_signal=void ac_cv_type_signal=void
else else
@ -1641,12 +1742,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1645: checking for vprintf" >&5 echo "configure:1746: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1650 "configure" #line 1751 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
@ -1669,7 +1770,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
@ -1693,12 +1794,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:1697: checking for _doprnt" >&5 echo "configure:1798: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1702 "configure" #line 1803 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
@ -1721,7 +1822,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
@ -1748,12 +1849,12 @@ fi
for ac_func in gettimeofday socket gethostbyname sigaction for ac_func in gettimeofday socket gethostbyname sigaction
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1752: checking for $ac_func" >&5 echo "configure:1853: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1757 "configure" #line 1858 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -1776,7 +1877,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -1803,9 +1904,9 @@ done
echo $ac_n "checking T/TCP""... $ac_c" 1>&6 echo $ac_n "checking T/TCP""... $ac_c" 1>&6
echo "configure:1807: checking T/TCP" >&5 echo "configure:1908: checking T/TCP" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1809 "configure" #line 1910 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
@ -1814,7 +1915,7 @@ int main() {
int foobar = MSG_EOF; int foobar = MSG_EOF;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define TTCP 1 #define TTCP 1
@ -1855,7 +1956,7 @@ fi
if test "$HTTP" = "1"; then if test "$HTTP" = "1"; then
echo $ac_n "checking what is the name of the HTTP port in your services database""... $ac_c" 1>&6 echo $ac_n "checking what is the name of the HTTP port in your services database""... $ac_c" 1>&6
echo "configure:1859: checking what is the name of the HTTP port in your services database" >&5 echo "configure:1960: checking what is the name of the HTTP port in your services database" >&5
if grep http /etc/services > /dev/null; then if grep http /etc/services > /dev/null; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HTTP_TCP_PORT "http" #define HTTP_TCP_PORT "http"
@ -1878,7 +1979,7 @@ EOF
fi fi
fi fi
echo $ac_n "checking what is the name of the ICP port in your services database""... $ac_c" 1>&6 echo $ac_n "checking what is the name of the ICP port in your services database""... $ac_c" 1>&6
echo "configure:1882: checking what is the name of the ICP port in your services database" >&5 echo "configure:1983: checking what is the name of the ICP port in your services database" >&5
if grep icp /etc/services > /dev/null; then if grep icp /etc/services > /dev/null; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define ICP_UDP_PORT "icp" #define ICP_UDP_PORT "icp"
@ -1918,7 +2019,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly, # Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars. # and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 | (set) 2>&1 |
case `(ac_space=' '; set) 2>&1` in case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *) *ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution # `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \). # turns \\\\ into \\, and sed turns \\ into \).
@ -1985,7 +2086,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v) -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12" echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;; exit 0 ;;
-help | --help | --hel | --he | --h) -help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;; echo "\$ac_cs_usage"; exit 0 ;;
@ -2005,9 +2106,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub $ac_vpsub
$extrasub $extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g s%@LIBS@%$LIBS%g
@ -2027,8 +2130,8 @@ s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g s%@infodir@%$infodir%g
s%@mandir@%$mandir%g s%@mandir@%$mandir%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g s%@VERSION@%$VERSION%g
s%@ACLOCAL@%$ACLOCAL%g s%@ACLOCAL@%$ACLOCAL%g

@ -2,7 +2,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(echoping.h) AC_INIT(echoping.h)
AM_INIT_AUTOMAKE(echoping, 3.0.2-BETA) AM_INIT_AUTOMAKE(echoping, 3.1.0-BETA)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
dnl User options dnl User options
@ -20,6 +20,18 @@ AC_ARG_ENABLE(icp,
[if test "$enableval" = "yes"; then [if test "$enableval" = "yes"; then
AC_DEFINE(ICP) AC_DEFINE(ICP)
fi]) fi])
dnl User options
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])
dnl See T/TCP later dnl See T/TCP later
dnl Checks for programs. dnl Checks for programs.

@ -14,6 +14,7 @@ echoping \- tests a remote host with TCP or UDP
.RI [ -t\ number ] .RI [ -t\ number ]
.RI [ -h\ URL ] .RI [ -h\ URL ]
.RI [ -i\ URL ] .RI [ -i\ URL ]
.RI [ -S ]
.B hostname .B hostname
[:port] [:port]
@ -65,6 +66,8 @@ servers will not understand a request for an absolute URL.
.IP -i\ url .IP -i\ url
Use the ICP protocol (instead of echo) for the given URL. The URL has to Use the ICP protocol (instead of echo) for the given URL. The URL has to
be an absolute one. This is mostly for testing Squid Web proxy/caches. be an absolute one. This is mostly for testing Squid Web proxy/caches.
.IP -S
Use the SMTP protocol (instead of echo) for the given server.
.IP -r .IP -r
Use T/TCP (if it has been compiled with it). See the INSTALL file for details. Use T/TCP (if it has been compiled with it). See the INSTALL file for details.
.IP -f\ character .IP -f\ character

@ -30,10 +30,10 @@ unsigned int successes, attempts = 0;
unsigned int size = DEFLINE; unsigned int size = DEFLINE;
unsigned int j = 0; unsigned int j = 0;
struct result struct result
{ {
unsigned short valid; unsigned short valid;
struct timeval timevalue; struct timeval timevalue;
}; };
struct result results[MAXNUMBER]; struct result results[MAXNUMBER];
struct timeval good_results[MAXNUMBER]; struct timeval good_results[MAXNUMBER];
extern int tvcmp (); extern int tvcmp ();
@ -54,12 +54,12 @@ main (argc, argv)
struct sockaddr_in serv_addr; struct sockaddr_in serv_addr;
struct sockaddr_in udp_cli_addr; /* client's Internet socket struct sockaddr_in udp_cli_addr; /* client's Internet socket
* addr */ * addr */
struct servent *sp; struct servent *sp = NULL;
int verbose = FALSE; int verbose = FALSE;
char *server_address; char *server_address;
u_int addr; u_int addr;
struct in_addr *ptr; struct in_addr *ptr;
int n, nr; int n, nr = 0;
char *sendline, recvline[MAXLINE + 1]; char *sendline, recvline[MAXLINE + 1];
#ifdef ICP #ifdef ICP
char retcode[DEFLINE]; char retcode[DEFLINE];
@ -88,6 +88,7 @@ main (argc, argv)
char *port_name = ECHO_TCP_PORT; char *port_name = ECHO_TCP_PORT;
unsigned short port_to_use = USE_ECHO; unsigned short port_to_use = USE_ECHO;
unsigned short http = 0; unsigned short http = 0;
unsigned short smtp = 0;
unsigned short udp = 0; unsigned short udp = 0;
unsigned short icp = 0; unsigned short icp = 0;
#ifdef ICP #ifdef ICP
@ -116,7 +117,7 @@ main (argc, argv)
results[i].valid = 0; results[i].valid = 0;
} }
progname = argv[0]; progname = argv[0];
while ((ch = getopt (argc, argv, "vs:n:w:dch:i:rut:f:")) != EOF) while ((ch = getopt (argc, argv, "vs:n:w:dch:i:rut:f:S")) != EOF)
{ {
switch (ch) switch (ch)
{ {
@ -155,6 +156,11 @@ main (argc, argv)
fill = *optarg; fill = *optarg;
fill_requested = 1; fill_requested = 1;
break; break;
case 'S':
port_name = "smtp";
port_to_use = USE_SMTP;
smtp = 1;
break;
case 's': case 's':
size = atoi (optarg); size = atoi (optarg);
if (size > MAXLINE) if (size > MAXLINE)
@ -166,8 +172,7 @@ main (argc, argv)
} }
if (size <= 0) if (size <= 0)
{ {
(void) fprintf (stderr, (void) fprintf (stderr, "%s: illegal packet size.\n", progname);
"%s: illegal packet size.\n", progname);
exit (1); exit (1);
} }
size_requested = 1; size_requested = 1;
@ -177,8 +182,7 @@ main (argc, argv)
timeout_requested = 1; timeout_requested = 1;
if (size <= 0) if (size <= 0)
{ {
(void) fprintf (stderr, (void) fprintf (stderr, "%s: illegal timeout.\n", progname);
"%s: illegal timeout.\n", progname);
exit (1); exit (1);
} }
break; break;
@ -187,14 +191,15 @@ main (argc, argv)
if (number > MAXNUMBER) if (number > MAXNUMBER)
{ {
(void) fprintf (stderr, (void) fprintf (stderr,
"%s: number of iterations too large, max is %d.\n", "%s: number of iterations too large, max is %d.\n",
progname, MAXNUMBER); progname, MAXNUMBER);
exit (1); exit (1);
} }
if (number <= 0) if (number <= 0)
{ {
(void) fprintf (stderr, (void) fprintf (stderr,
"%s: illegal number of iterations.\n", progname); "%s: illegal number of iterations.\n",
progname);
exit (1); exit (1);
} }
break; break;
@ -213,10 +218,12 @@ main (argc, argv)
usage (); usage ();
} }
} }
if (udp && ((port_to_use == USE_CHARGEN) || (port_to_use == USE_HTTP))) if (udp && ((port_to_use == USE_CHARGEN) ||
(port_to_use == USE_HTTP) || (port_to_use == USE_SMTP)))
{ {
(void) fprintf (stderr, (void) fprintf (stderr,
"%s: I don't know how to use this port with UDP.\n", progname); "%s: I don't know how to use this port with UDP.\n",
progname);
exit (1); exit (1);
} }
/* /*
@ -229,10 +236,11 @@ main (argc, argv)
exit (1); exit (1);
} }
*/ */
if (http && (fill_requested)) if ((http || smtp) && (fill_requested))
{ {
(void) fprintf (stderr, (void) fprintf (stderr,
"%s: Filling incompatible with HTTP connections.\n", progname); "%s: Filling incompatible with HTTP connections.\n",
progname);
exit (1); exit (1);
} }
#ifndef USE_TTCP #ifndef USE_TTCP
@ -251,6 +259,14 @@ main (argc, argv)
exit (1); exit (1);
} }
#endif #endif
#ifndef SMTP
if (smtp)
{
(void) fprintf (stderr,
"%s: Not compiled with SMTP support.\n", progname);
exit (1);
}
#endif
#ifndef ICP #ifndef ICP
if (icp) if (icp)
{ {
@ -259,10 +275,11 @@ main (argc, argv)
exit (1); exit (1);
} }
#endif #endif
if (http && size_requested) if ((http || smtp) && size_requested)
{ {
(void) fprintf (stderr, (void) fprintf (stderr,
"%s: HTTP and message size specification are incompatible.\n", progname); "%s: %s and message size specification are incompatible.\n",
http ? "HTTP" : "SMTP", progname);
exit (1); exit (1);
} }
if (udp && ttcp) if (udp && ttcp)
@ -313,8 +330,8 @@ main (argc, argv)
err_quit ("gethostbyname error for host: %s %s", err_quit ("gethostbyname error for host: %s %s",
server, sys_err_str ()); server, sys_err_str ());
} }
server_address = *(hostptr->h_addr_list); /* First item of the server_address = *(hostptr->h_addr_list); /* First item of the
* list */ * list */
/* /*
* addr = (u_long) *server_address; * addr = (u_long) *server_address;
*/ */
@ -329,7 +346,7 @@ main (argc, argv)
ptr = (struct in_addr *) malloc (sizeof (struct in_addr)); ptr = (struct in_addr *) malloc (sizeof (struct in_addr));
ptr->s_addr = addr; ptr->s_addr = addr;
} }
if (!http && !icp) /* Already find */ if (!http && !icp) /* Already find */
{ {
if (!udp) if (!udp)
{ {
@ -338,7 +355,7 @@ main (argc, argv)
err_quit ("tcp_open: unknown service: %s/tcp", port_name); err_quit ("tcp_open: unknown service: %s/tcp", port_name);
} }
} }
else else
{ {
if ((sp = getservbyname (port_name, "udp")) == NULL) if ((sp = getservbyname (port_name, "udp")) == NULL)
{ {
@ -370,6 +387,13 @@ main (argc, argv)
} }
else else
#endif #endif
#ifdef SMTP
if (smtp)
{
sendline = "QUIT\r\n";
}
else
#endif
#ifdef ICP #ifdef ICP
if (icp) if (icp)
{ {
@ -379,7 +403,7 @@ main (argc, argv)
#endif #endif
if (!fill_requested) if (!fill_requested)
{ {
sendline = random_string (size); sendline = random_string (size);
} }
else else
{ {
@ -421,14 +445,16 @@ main (argc, argv)
{ {
if (tcp) if (tcp)
{ {
printf ("Trying to connect to internet address %s %s to transmit %u bytes...\n", printf
inet_ntoa (*ptr), (port == 0 ? "" : text_port), n); ("Trying to connect to internet address %s %s to transmit %u bytes...\n",
inet_ntoa (*ptr), (port == 0 ? "" : text_port), n);
} }
#ifdef ICP #ifdef ICP
if (icp) if (icp)
{ {
printf ("Trying to send an ICP packet of %u bytes to the internet address %s...\n", printf
length, inet_ntoa (*ptr)); ("Trying to send an ICP packet of %u bytes to the internet address %s...\n",
length, inet_ntoa (*ptr));
} }
#endif #endif
else else
@ -503,13 +529,15 @@ main (argc, argv)
/* No initial connection */ /* No initial connection */
} }
if ((port_to_use == USE_ECHO) || (port_to_use == USE_DISCARD) || if ((port_to_use == USE_ECHO) || (port_to_use == USE_DISCARD) ||
(port_to_use == USE_HTTP) || (port_to_use == USE_ICP)) (port_to_use == USE_HTTP) || (port_to_use == USE_ICP) ||
(port_to_use == USE_SMTP))
{ {
#ifdef USE_TTCP #ifdef USE_TTCP
if (ttcp) if (ttcp)
{ {
if (sendto (sockfd, sendline, n, MSG_EOF, if (sendto (sockfd, sendline, n, MSG_EOF,
(struct sockaddr *) &serv_addr, sizeof (serv_addr)) != n) (struct sockaddr *) &serv_addr,
sizeof (serv_addr)) != n)
err_sys ("sendto error on socket"); err_sys ("sendto error on socket");
if (verbose) if (verbose)
{ {
@ -521,16 +549,17 @@ main (argc, argv)
if (!udp) if (!udp)
{ {
/* Write something to the server */ /* Write something to the server */
if (writen (sockfd, sendline, n) != n) { if (writen (sockfd, sendline, n) != n)
if ((nr < 0 || nr != n) && timeout_flag) {
{ if ((nr < 0 || nr != n) && timeout_flag)
nr = n; {
printf ("Timeout while writing\n"); nr = n;
continue; printf ("Timeout while writing\n");
} continue;
else }
err_sys ("writen error on socket"); else
} err_sys ("writen error on socket");
}
} }
else else
{ {
@ -569,22 +598,29 @@ main (argc, argv)
} }
} }
if ((port_to_use == USE_ECHO) || (port_to_use == USE_CHARGEN) || if ((port_to_use == USE_ECHO) || (port_to_use == USE_CHARGEN) ||
(port_to_use == USE_HTTP) || (port_to_use == USE_ICP)) (port_to_use == USE_HTTP) || (port_to_use == USE_ICP) ||
(port_to_use == USE_SMTP))
{ {
if (!udp) if (!udp)
{ {
if ((fs = fdopen (sockfd, "r")) == NULL) if ((fs = fdopen (sockfd, "r")) == NULL)
err_sys ("Cannot fdopen"); err_sys ("Cannot fdopen");
if (!http) if (!http && !smtp)
{ {
/* Read from the server */ /* Read from the server */
nr = readline (fs, recvline, n, stop_at_newlines); nr = readline (fs, recvline, n, stop_at_newlines);
} }
#ifdef HTTP #ifdef HTTP
else else if (http)
{ {
nr = read_from_server (fs); nr = read_from_server (fs);
} }
#endif
#ifdef SMTP
else if (smtp)
{
nr = smtp_read_response_from_server (fs);
}
#endif #endif
} }
else else
@ -643,12 +679,13 @@ main (argc, argv)
} }
#endif #endif
} }
if (!http && !icp) if (!http && !icp && !smtp)
{ {
if ((nr < 0 || nr != n) && timeout_flag) if ((nr < 0 || nr != n) && timeout_flag)
/* if ((nr < 0 || nr != n) && (errno == EINTR) && timeout_flag) */ /* if ((nr < 0 || nr != n) && (errno == EINTR) && timeout_flag) */
{ {
printf ("Timeout while reading (%d byte(s) read)\n", (nr == -1) ? 0 : nr); printf ("Timeout while reading (%d byte(s) read)\n",
(nr == -1) ? 0 : nr);
nr = n; nr = n;
#ifdef FLUSH_OUTPUT #ifdef FLUSH_OUTPUT
if (fflush ((FILE *) NULL) != 0) if (fflush ((FILE *) NULL) != 0)
@ -659,14 +696,16 @@ main (argc, argv)
continue; continue;
} }
if (nr < 0 || nr != n) if (nr < 0 || nr != n)
err_sys ("readline error: %d bytes read, %d bytes requested", nr, n); err_sys ("readline error: %d bytes read, %d bytes requested",
nr, n);
} }
else else
/* This is HTTP */ /* This is HTTP */
{ {
if ((nr < 0) && (errno == EINTR) && (timeout_flag)) if ((nr < 0) && (errno == EINTR) && (timeout_flag))
{ {
printf ("Timeout while reading (%d byte(s) read)\n", (nr == -1) ? 0 : nr); printf ("Timeout while reading (%d byte(s) read)\n",
(nr == -1) ? 0 : nr);
#ifdef FLUSH_OUTPUT #ifdef FLUSH_OUTPUT
if (fflush ((FILE *) NULL) != 0) if (fflush ((FILE *) NULL) != 0)
{ {
@ -675,9 +714,10 @@ main (argc, argv)
#endif #endif
continue; continue;
} }
if (nr < 0) { if (nr < 0)
err_ret ("Error reading HTTP reply"); {
} err_ret ("Error reading HTTP reply");
}
} }
if (verbose) if (verbose)
printf ("%d bytes read from server.\n", nr); printf ("%d bytes read from server.\n", nr);
@ -773,12 +813,15 @@ printstats ()
printf ("Warning: %d message(s) lost (%d %%)\n", attempts - successes, printf ("Warning: %d message(s) lost (%d %%)\n", attempts - successes,
((attempts - successes) * 100) / attempts); ((attempts - successes) * 100) / attempts);
printf ("Minimum time: %d.%06d seconds (%.0f bytes per sec.)\n", printf ("Minimum time: %d.%06d seconds (%.0f bytes per sec.)\n",
(int) min.tv_sec, (int) min.tv_usec, (double) size / tv2double (min)); (int) min.tv_sec, (int) min.tv_usec,
(double) size / tv2double (min));
printf ("Maximum time: %d.%06d seconds (%.0f bytes per sec.)\n", printf ("Maximum time: %d.%06d seconds (%.0f bytes per sec.)\n",
(int) max.tv_sec, (int) max.tv_usec, (double) size / tv2double (max)); (int) max.tv_sec, (int) max.tv_usec,
(double) size / tv2double (max));
tvavg (&total, successes); tvavg (&total, successes);
printf ("Average time: %d.%06d seconds (%.0f bytes per sec.)\n", printf ("Average time: %d.%06d seconds (%.0f bytes per sec.)\n",
(int) total.tv_sec, (int) total.tv_usec, (double) size / tv2double (total)); (int) total.tv_sec, (int) total.tv_usec,
(double) size / tv2double (total));
/* The number of bytes/second, as printed above, is not really /* The number of bytes/second, as printed above, is not really
meaningful: size does not reflect the number of bytes exchanged. meaningful: size does not reflect the number of bytes exchanged.
With echo, N = 2*size, with discard, N = size, with http, N = size + (response)... */ With echo, N = 2*size, with discard, N = size, with http, N = size + (response)... */
@ -814,7 +857,8 @@ printstats ()
tvavg (&median, 2); tvavg (&median, 2);
} }
printf ("Median time: %d.%06d seconds (%.0f bytes per sec.)\n", printf ("Median time: %d.%06d seconds (%.0f bytes per sec.)\n",
(int) median.tv_sec, (int) median.tv_usec, (double) size / tv2double (median)); (int) median.tv_sec, (int) median.tv_usec,
(double) size / tv2double (median));
} }
} }

@ -1,5 +1,11 @@
/* $Id* */ /* $Id* */
/* Settings you should not change -- see below for changeable ones */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* Settings you can change */ /* Settings you can change */
#define DEFLINE 256 #define DEFLINE 256
@ -8,13 +14,11 @@
#ifdef HTTP #ifdef HTTP
#define MAXTOREAD 150000 #define MAXTOREAD 150000
#endif #endif
#define MAXNUMBER 20 #ifdef SMTP
#define MAXSMTP 1024
/* Settings you should not change */ #define MAXSMTPLINES 30
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif #endif
#define MAXNUMBER 20
/* Probably too many inclusions but this is to keep 'gcc -Wall' happy... */ /* Probably too many inclusions but this is to keep 'gcc -Wall' happy... */
#include <stdio.h> #include <stdio.h>
@ -80,6 +84,7 @@ struct timeval max_timeval;
#define USE_CHARGEN 3 #define USE_CHARGEN 3
#define USE_HTTP 4 #define USE_HTTP 4
#define USE_ICP 5 #define USE_ICP 5
#define USE_SMTP 6
#define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"; #define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg";
@ -122,6 +127,9 @@ int read_from_server ();
#endif #endif
#endif #endif
#ifdef SMTP
int smtp_read_response_from_server ();
#endif
extern char *progname; extern char *progname;

@ -96,7 +96,7 @@ err_sys (va_alist)
void void
usage () usage ()
{ {
fprintf (stderr, "Usage: %s [-v] [-t timeout] [-c] [-d] [-u] [-s size] [-n number] [-w delay] [-h url] server-name[:port]\n", progname); fprintf (stderr, "Usage: %s [-v] [-t timeout] [-c] [-d] [-u] [-s size] [-n number] [-w delay] [-h url] [-S] server-name[:port]\n", progname);
exit (1); exit (1);
} }

@ -16,30 +16,35 @@ readline (fs, ptr, maxlen, ln)
{ {
int n = 1; int n = 1;
char *rc; char *rc;
if (ln) { if (ln)
rc = fgets (ptr, maxlen+1, fs); {
/* printf ("DEBUG: %d bytes asked, I read \"%s\"\n", maxlen, rc); */ rc = fgets (ptr, maxlen + 1, fs);
if (rc == NULL) { /* printf ("DEBUG: %d bytes asked, I read \"%s\"\n", maxlen, rc); */
return (-1); if (rc == NULL)
{
return (-1);
}
n = strlen (rc);
return n;
} }
n = strlen (rc); else
return n; {
} while (n < maxlen)
else { {
while (n < maxlen) { rc = fgets (ptr, maxlen, fs);
rc = fgets (ptr, maxlen, fs); if (rc == NULL)
if (rc == NULL) { {
if (timeout_flag) if (timeout_flag)
return n; return n;
if (n == 1) if (n == 1)
return (0); /* EOF, no data read */ return (0); /* EOF, no data read */
else else
break; /* EOF, some data was read */ break; /* EOF, some data was read */
} }
n = n + strlen (rc); n = n + strlen (rc);
}
} }
}
return (n); return (n);
} }

@ -0,0 +1,38 @@
/* Code contributed by Samuel Tardieu <sam@inf.enst.fr>
*
* $Id$
*
*/
#include "echoping.h"
#ifdef SMTP
char big_recvline[MAXTOREAD];
int
smtp_read_response_from_server (FILE *fs)
{
int nr;
int i;
for (i = 0; i < MAXSMTPLINES; i++)
{
nr = readline (fs, big_recvline, MAXTOREAD, TRUE);
if (nr <= 4)
{
return -1;
}
if (big_recvline[3] == ' ')
{
return nr;
}
if (big_recvline[3] != '-')
{
return -1;
}
}
return -1;
}
#endif /* SMTP */
Loading…
Cancel
Save