changeset 200:2c10d803a695

Add autossh package
author ray@terran.dlink.ua
date Sat, 17 Sep 2011 14:35:37 +0300
parents 7b25fec73b53
children 3b87524c2bed
files contrib/autossh/CHANGES contrib/autossh/INSTALL contrib/autossh/Makefile contrib/autossh/Makefile.in contrib/autossh/README contrib/autossh/autossh.1 contrib/autossh/autossh.c contrib/autossh/autossh.host contrib/autossh/autossh.spec contrib/autossh/config.h contrib/autossh/config.h.in contrib/autossh/config.log contrib/autossh/config.status contrib/autossh/configure contrib/autossh/configure.ac contrib/autossh/daemon.h contrib/autossh/fakepoll.h contrib/autossh/rscreen target/usr.sbin/autossh/Makefile
diffstat 19 files changed, 13600 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/CHANGES	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,156 @@
+
+Version 1.4b
+
+- add AUTOSSH_MAXLIFETIME (patch from Steven Clark)
+- include configure.ac in package
+- fix poll flags so not checking for writable when write done (patch
+  from John Grahor)
+- compile time TOUCH_PIDFILE option to touch pid file on connection test.
+
+Version 1.4a
+
+- fix up pid file generation (Xander Hudson)
+- fix up Makefile.in (Andrew Schulman)
+
+Version 1.4
+
+- initialise ep in main() to avoid warning (Marcelo Goes)
+- fix where cast to int happens when calculating next time to poll
+  connection (Omer Erdem Demir)
+- fix '--' use so can pass -M to autossh for session multiplexing
+- fix use of strcpy for overlapping copy in strip_arg (Filippo Giunchedi).
+- add basic GNU autoconf support and drop per-platform Makefiles (Andre Lucas)
+- pid file support (Ben Vitale)
+- arbitrary messages in echo string (Ron Yorston)
+
+Version 1.3
+
+- fix AUTOSSH_DEBUG for Solaris and AIX
+- fix attempt to free() static storage (affected platforms without 
+  getaddrinfo() -- mostly cygwin) (Andrew Schulman)
+- change test and placement of typedef for socklen_t under OS X; new
+  OS X defines it
+- add ability to signal autossh to kill and restart ssh child, using
+  SIGUSR1
+- add hostname to monitor message (Ron Yorston)
+- check on looping on poll() where connection has been lost (spinning
+  and high CPU)
+- fix bug where length argument to accept() was not initialised
+- fix arg parsing bug where stripping -f from arguments would strip
+  from a parameter to the argument: e.g -L8808:foo:80 would become
+  -L8808:oo:80 (pointed out by Eric Larson)
+- pull out r/w loops in conn_test() into separate functions, makes
+  logic more apparent
+- add echo port support: have the remote server use the inetd
+  echo service to echo our test string back to us. Or use some other
+  echo service. Idea and patch from Ron Yorston. This makes it 1.3.
+- remove bad strcpy() (left over from some testing?) thanks to Ron
+  Yorston, change to memset read buffer to all zeros
+- fix ssh args when AUTOSSH_PORT=0 is used to turn monitor loop off
+  (Karl Berry)
+- add more descriptive usage output, by popular request
+
+Version 1.2g
+
+- add AUTOSSH_NTSERVICE (Andrew Schulman)
+- fix bad calculation for seconds left in poll time (again from
+  Andrew Schulman)
+- from Andrew Schulman: add support for older networking and cygwin
+- add AUTOSSH_MAXSTART (from Hugo Haas)
+- loop around waitpid() in ssh_kill() in case interrupted (thanks to
+  Jens Krabbenhoeft)
+- update ssh argument string
+- move openlog above port error checking
+- handle environment variables and -M arg being set to the
+  empty string (reported by Dan Christensen via Filippo Giunche)
+- add some rudimetary auto-adjust to the network timeouts for
+  low poll times. So by default 15secs on each of accept() and 
+  poll()to deal with high-latency connections, but as poll time 
+  falls below 30secs, then adjust timeouts down as well.
+- adjust division in grace_time() to allow for low poll time
+- don't call shutdown() and close() on invalid socket ()
+  (found by Dmitry V. Levin)
+
+Version 1.2f
+
+- by popular request, support the -f flag by doing the fork/background 
+  ourselves, and not passing the flag to ssh (thanks to Dan Christensen
+  for prodding me into it)
+- change timeout to from 5000 to 15000 ms to deal with reported issues
+  with high-latency links; unused var removal; and man page typo (thanks
+  to Michael Shields)
+
+Version 1.2e
+
+- check for attempt to use -f flag; exit as error
+- if AUTOSSH_GATETIME is 0, then disable any of the startup
+  failure bailouts, and just retry
+- set SO_REUSEADDR on listening socket (Jedi One's suggestion)
+- show port number in some error messages
+- note in man page and README about -M 0 turning port monitoring off
+- remove duplicate include of sys/socket.h
+
+Version 1.2d
+
+- AIX support (thanks to Stefan Rodenstein)
+- fix argument rewrite bug when using AUTOSSH_PORT (thanks
+  to Peter Williams)
+- log pid of ssh child just after fork
+
+Version 1.2c
+
+- use Marcus Friedl's suggestion to simply connect to "127.0.0.1" 
+  rather than "localhost", as not really using IPv6 anyway. And this
+  gets rid of annoying ipv6 localhost message on Solaris at least.
+- support for MacOS X using Greg Parker's fakepoll.
+
+Version 1.2b
+
+(Thanks to Simon Easter for bug reports and trials)
+
+- fix file descriptor leak
+- setsockopt()'s don't work for Solaris either. Give up on them.
+- set close-on-exec for read socket so will be closed when
+  ssh executed
+- do shutdown() before close() (paranoia)
+- close read socket before exit
+- pull read socket open and close up out of ssh_run()
+- cosmetic changes to some loops, get rid of newlines in some
+  errlog strings.
+
+Version 1.2a
+
+- setsockopt() will not set timeouts on socket read/write ops
+  under Linux 2.2 kernels (and earlier, I presume). So unless
+  someone tells me we really need them, I've #ifdef'd  the
+  setsockopt()s out for Linux.
+- check value of fd returned by accept().
+- Oh, there's a man page now. Unfortunately, it doesn't render 
+  for Solaris. Sorry, Solaris users are still stuck with the
+  README.
+
+Version 1.2
+
+- Major restructuring of code, mostly to support the change to 
+  a loop of forwarded ports to test the network connection.
+- Incremental back off on rate of connection attempts when
+  there are rapid failures to establish/maintain a connection.
+
+Version 1.1b
+
+- change handling of ssh exit status
+- introduce "starting gate" time: ssh process that dies too
+  early is deemed not to have made it out of the starting
+  gate, and autossh exits.
+
+Version 1.1a
+
+- fix race after failure to exec ssh where parent will
+  loop attempting to restart
+- add -V version flag
+- use strtoul() for environment option parsing
+- drop useless intermediate function ssh_setwatch()
+
+Version 1.1
+
+Initial release
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/INSTALL	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/Makefile	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,62 @@
+# $Id: Makefile.in,v 1.4 2007/12/16 06:08:04 harding Exp $
+#
+# Makefile.  Generated from Makefile.in by configure.
+
+VER=		1.4b
+
+SSH=		/usr/bin/ssh
+
+prefix=		/usr/local
+exec_prefix=	${prefix}
+bindir=		${exec_prefix}/bin
+datadir=	${prefix}/share
+mandir=		/usr/local/man
+
+SRCDIR=		.
+
+
+CC=		cc
+CFLAGS=		-O2 -pipe -fno-strict-aliasing -Wall -DVER=\"$(VER)\" -DSSH_PATH=\"$(SSH)\"
+CPPFLAGS=	
+
+OFILES=		autossh.o
+
+LD=		@[email protected]
+LDFLAGS=	
+LIBS=		
+
+TARGET=		autossh
+
+all:		$(TARGET)
+
+
+$(TARGET):	$(OFILES)
+		$(CC) $(CPPFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
+
+clean:
+		- /bin/rm -f *.o *.a *.core *~
+
+allclean:	clean
+		- /bin/rm -f $(TARGET)
+
+distclean:	allclean
+		- /bin/rm -f config.log config.cache config.status config.h
+		- /bin/rm -rf autom4te.cache
+		- /bin/rm -f Makefile
+
+install:	$(TARGET)
+		mkdir -p -m 755 $(bindir)
+		mkdir -p -m 755 $(prefix)/share/doc/autossh
+		mkdir -p -m 755 $(datadir)/examples/autossh
+		mkdir -p -m 755 $(mandir)/man1
+		${BSD_INSTALL_DATA} $(TARGET) $(bindir)
+		${BSD_INSTALL_DATA} CHANGES README $(datadir)/doc/autossh
+		${BSD_INSTALL_DATA} autossh.host	$(datadir)/examples/autossh
+		${BSD_INSTALL_DATA} rscreen $(datadir)/examples/autossh
+		${BSD_INSTALL_MAN} autossh.1 $(mandir)/man1
+		chmod 755 $(bindir)/$(TARGET)
+		chmod 644 $(datadir)/doc/autossh/CHANGES
+		chmod 644 $(datadir)/doc/autossh/README
+		chmod 644 $(datadir)/examples/autossh/autossh.host 
+		chmod 644 $(datadir)/examples/autossh/rscreen
+		chmod 644 $(mandir)/man1/autossh.1 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/Makefile.in	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,62 @@
+# $Id: Makefile.in,v 1.4 2007/12/16 06:08:04 harding Exp $
+#
+# @[email protected]
+
+VER=		1.4b
+
+SSH=		@[email protected]
+
+prefix=		@[email protected]
+exec_prefix=	@[email protected]
+bindir=		@[email protected]
+datadir=	@[email protected]
+mandir=		@[email protected]
+
+SRCDIR=		@[email protected]
+VPATH=		@[email protected]
+
+CC=		@[email protected]
+CFLAGS=		@[email protected] -DVER=\"$(VER)\" -DSSH_PATH=\"$(SSH)\"
+CPPFLAGS=	@[email protected]
+
+OFILES=		autossh.o
+
+LD=		@[email protected]
+LDFLAGS=	@[email protected]
+LIBS=		@[email protected]
+
+TARGET=		autossh
+
+all:		$(TARGET)
+
+
+$(TARGET):	$(OFILES)
+		$(CC) $(CPPFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
+
+clean:
+		- /bin/rm -f *.o *.a *.core *~
+
+allclean:	clean
+		- /bin/rm -f $(TARGET)
+
+distclean:	allclean
+		- /bin/rm -f config.log config.cache config.status config.h
+		- /bin/rm -rf autom4te.cache
+		- /bin/rm -f Makefile
+
+install:	$(TARGET)
+		mkdir -p -m 755 $(bindir)
+		mkdir -p -m 755 $(prefix)/share/doc/autossh
+		mkdir -p -m 755 $(datadir)/examples/autossh
+		mkdir -p -m 755 $(mandir)/man1
+		${BSD_INSTALL_DATA} $(TARGET) $(bindir)
+		${BSD_INSTALL_DATA} CHANGES README $(datadir)/doc/autossh
+		${BSD_INSTALL_DATA} autossh.host	$(datadir)/examples/autossh
+		${BSD_INSTALL_DATA} rscreen $(datadir)/examples/autossh
+		${BSD_INSTALL_MAN} autossh.1 $(mandir)/man1
+		chmod 755 $(bindir)/$(TARGET)
+		chmod 644 $(datadir)/doc/autossh/CHANGES
+		chmod 644 $(datadir)/doc/autossh/README
+		chmod 644 $(datadir)/examples/autossh/autossh.host 
+		chmod 644 $(datadir)/examples/autossh/rscreen
+		chmod 644 $(mandir)/man1/autossh.1 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/README	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,212 @@
+
+autossh Version 1.4
+-------------------
+
+Building and Installing Autossh
+--------------------------------
+
+With version 1.4, autossh now uses autoconf. So the build procedure
+is now the well-known:
+
+	./configure
+	make
+	make install
+
+Look at autossh.host for an example wrapper script.
+
+
+Usage
+-----
+	autossh -M <port>[:echo_port] [-f] [SSH OPTIONS]
+
+Description
+-----------
+
+autossh is a program to start a copy of ssh and monitor it, restarting
+it as necessary should it die or stop passing traffic.
+
+The original idea and the mechanism were from rstunnel (Reliable SSH
+Tunnel). With version 1.2 the method changed: autossh now uses ssh to
+construct a loop of ssh forwardings (one from local to remote, one
+from remote to local), and then sends test data that it expects to get
+back. (The idea is thanks to Terrence Martin.) 
+
+With version 1.3, a new method is added (thanks to Ron Yorston): a
+port may be specified for a remote echo service that will echo back
+the test data. This avoids the congestion and the aggravation of
+making sure all the port numbers on the remote machine do not
+collide. The loop-of -forwardings method remains available for
+situations where using an echo service may not be possible.
+
+autossh has only three arguments of its own:
+
+ -M <port>[:echo_port], to specify the base monitoring port to use, or
+	alternatively, to specify the monitoring port and echo service
+	port to use. 
+
+	When no echo service port is specified, this port and the port 
+	immediately above it (port# + 1) should be something nothing 
+	else is using. autossh will send test data on the base monitoring 
+	port, and receive it back on the port above. For example, if you 
+	specify "-M 20000", autossh will set up forwards so that it can 
+	send data on port 20000 and receive it back on 20001.
+
+	Alternatively a port for a remote echo service may be
+	specified. This should be port 7 if you wish to use the
+	standard inetd echo service.  When an echo port is specified,
+	only the specified monitor port is used, and it carries the
+	monitor message in both directions.
+
+	Many people disable the echo service, or even disable inetd,
+	so check that this service is available on the remote
+	machine. Some operating systems allow one to specify that the
+	service only listen on the localhost (loopback interface),
+	which would suffice for this use.
+
+	The echo service may also be something more complicated:
+	perhaps a daemon that monitors a group of ssh tunnels.
+
+	-M 0 will turn the monitoring off, and autossh will only
+	restart ssh on ssh exit.
+
+	For example, if you are using a recent version of OpenSSH, you 
+	may wish to explore using the ServerAliveInterval and 
+	ServerAliveCountMax options to have the SSH client exit if it 
+	finds itself no longer connected to the server. In many ways 
+	this may be a better solution than the monitoring port.
+
+ -f     Causes autossh to drop to the background before running ssh. The
+        -f flag is stripped from arguments passed to ssh. Note that there
+        is a crucial a difference between the -f with autossh, and -f
+        with ssh: when used with autossh, ssh will be *unable* to ask for
+        passwords or passphrases.
+
+ -V     to have autossh display its version and exit.
+
+All other arguments are passed to ssh. There are a number of
+other settings, but these are all controlled through environment
+variables. ssh seems to be appropriating more and more letters for
+options, and this seems the easiest way to avoid collisions.
+
+autossh tries to distinguish the manner of death of the ssh process it
+is monitoring and act appropriately. The rules are:
+
+   - If the ssh process exited normally (for example, someone typed
+     "exit" in an interactive session), autossh exits rather than 
+     restarting;
+   - If autossh itself receives a SIGTERM, SIGINT, or a SIGKILL
+     signal, it assumes that it was deliberately signalled, and exits
+     after killing the child ssh process;
+   - If autossh itself receives a SIGUSR1 signal, it will kill the child
+     ssh process and start a new one;
+   - Periodically (by default every 10 minutes), autossh attempts to pass
+     traffic on the monitor forwarded port. If this fails, autossh will
+     kill the child ssh process (if it is still running) and start a new
+     one; 
+   - If the child ssh process dies for any other reason, autossh will
+     attempt to start a new one.
+
+Startup behaviour:
+
+   - If the ssh session fails with an exit status of 1 on the very first 
+     try, autossh will assume that there is some problem with syntax or
+     the connection setup, and will exit rather than retrying;
+   - There is now a "starting gate" time. If the first ssh process fails 
+     within the first few seconds of being started, autossh assumes that 
+     it never made it "out of the starting gate", and exits. This is to handle
+     initial failed authentication, connection, etc. This time is 30 seconds
+     by default, and can be adjusted (see the AUTOSSH_GATETIME environment
+     variable below).
+   - NOTE: if AUTOSSH_GATETIME is set to 0, then BOTH of the above
+           behaviours are disabled. This is useful for, for example,
+	   having autossh start on boot.
+
+Continued failures:
+
+   - If the ssh connection fails and attempts to restart it fail in
+     quick succession, autossh will start delaying its attempts to
+     restart, gradually backing farther and farther off up to a
+     maximum interval of the autossh poll time (usually 10 minutes).
+     autossh can be "prodded" to retry by signalling it, perhaps with
+     SIGHUP ("kill -HUP").
+
+Connection Setup
+----------------
+
+As connections must be established unattended, the use of autossh
+requires that some form of automatic authentication be set up. The use
+of RSAAuthentication with ssh-agent is the recommended method. The
+example wrapper script attempts to check if there is an agent running
+for the current environment, and to start one if there isn't.
+
+It cannot be stressed enough that you must make sure ssh works on its
+own, that you can set up the session you want before you try to
+run it under autossh.
+
+If you are tunnelling and using an older version of ssh that does not
+support the -N flag, you should upgrade (your version has security
+flaws). If you can't upgrade, you may wish to do as rstunnel does, and
+give ssh a command to run, such as "sleep 99999999999".
+
+Disabling connection monitoring
+-------------------------------
+
+A monitor port value of "0" ("autossh -M 0") will disable use of
+the monitor ports; autossh will then only react to signals and the
+death of the ssh process.
+
+Environment Variables
+---------------------
+
+The following environment variables can be set:
+
+    AUTOSSH_DEBUG	  - sets logging level to LOG_DEBUG, and if
+			    the operating system supports it, sets
+			    syslog to duplicate log entries to stderr.
+    AUTOSSH_FIRST_POLL	  - time to initial poll (default is as 
+			    AUTOSSH_POLL below).
+    AUTOSSH_GATETIME      - how long ssh must be up before we consider
+	                    it a successful connection. Default is 30
+			    seconds. If set to 0, then this behaviour
+			    is disabled, and as well, autossh will retry
+			    even on failure of first attempt to run ssh.
+    AUTOSSH_LOGFILE	  - sets autossh to use the named log file,
+			    rather than syslog.
+    AUTOSSH_LOGLEVEL	  - log level, they correspond to the levels 
+			    used by syslog; so 0-7 with 7 being the
+			    chattiest.
+    AUTOSSH_MAXLIFETIME   - Sets the maximum number of seconds the process 
+			    should live for before killing off the ssh child 
+			    and exiting.
+    AUTOSSH_MAXSTART	  - specifies how many times ssh should be started.
+			    A negative number means no limit on the number 
+			    of times ssh is started. The default value is -1.
+    AUTOSSH_MESSAGE	  - append a custom message to the echo string (max 64
+			    bytes).
+    AUTOSSH_NTSERVICE     - when set to "yes" , setup autossh to run as an 
+			    NT service under cygrunsrv. This adds the -N flag
+			    for ssh if not already set, sets the log output 
+			    to stdout, and changes the behaviour on ssh exit 
+			    so that it will restart even on a normal exit.
+    AUTOSSH_PATH	  - path to the ssh executable, in case
+			    it is different than that compiled in.
+    AUTOSSH_PIDFILE	  - write autossh pid to specified file.
+    AUTOSSH_POLL	  - poll time in seconds; default is 600.
+			    If the poll time is less than twice the 
+			    network timeouts (default 15 seconds) the 
+			    network timeouts will be adjusted downward 
+			    to 1/2 the poll time.
+    AUTOSSH_PORT	  - set monitor port. Mostly in case ssh
+			    appropriates -M at some time. But because
+			    of this possible use, AUTOSSH_PORT overrides
+			    the -M flag.
+
+Logging and Syslog
+------------------
+
+autossh logs to syslog using the LOG_USER facility. Your syslog may
+have to be configured to accept messages for this facility. This is
+usually done in /etc/syslog.conf.
+
+-- 
+Kudos and raspberries to harding [at] motd.ca
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/autossh.1	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,267 @@
+.\"  -*- nroff -*-
+.\"
+.\" Author: Carson Harding
+.\" Copyright (c) 2002 Carson Harding. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $Id: autossh.1,v 1.21 2008/03/28 16:58:21 harding Exp $
+.\"
+.Dd Jul 20, 2004
+.Dt AUTOSSH 1
+.Os
+.Sh NAME
+.Nm autossh
+.Nd monitor and restart ssh sessions
+.Sh SYNOPSIS
+.Nm autossh
+.Op Fl V
+.Op Fl M Ar port[:echo_port]
+.Op Fl f
+.Ar [SSH_OPTIONS]
+.Sh DESCRIPTION
+.Nm
+is a program to start a copy of ssh and monitor it, restarting it as
+necessary should it die or stop passing traffic.
+.Pp
+The original idea and the mechanism were from rstunnel (Reliable SSH
+Tunnel). With version 1.2 of
+.Nm
+the method changed: 
+.Nm
+uses ssh to construct a loop of ssh forwardings (one from local to
+remote, one from remote to local), and then sends test data that it
+expects to get back. (The idea is thanks to Terrence Martin.)
+.Pp
+With version 1.3, a new method is added (thanks to Ron Yorston): a
+port may be specified for a remote echo service that will echo back
+the test data. This avoids the congestion and the aggravation of
+making sure all the port numbers on the remote machine do not
+collide. The loop-of -forwardings method remains available for
+situations where using an echo service may not be possible.
+.Pp
+.Sh CONTROLLING SSH
+.Pp
+.Ss SSH exits
+.Pp
+.Bl -tag -width Ds
+.Nm
+tries to distinguish the manner of death of the ssh process it
+is monitoring and act appropriately. The rules are:
+.Bl -tag -width Ds
+.It 1.
+If the ssh process exited normally (for example, someone typed
+"exit" in an interactive session), 
+.Nm
+exits rather than restarting;
+.It 2.
+If 
+.Nm
+itself receives a SIGTERM, SIGINT, or a SIGKILL signal, it assumes
+that it was deliberately signalled, and exits after killing the child
+ssh process; 
+.It 3.
+If
+.Nm 
+itself receives a SIGUSR1 signal, it kills the child ssh process and starts
+a new one;
+.It 4.
+Periodically (by default every 10 minutes),
+.Nm
+attempts to pass traffic on the monitor forwarded port. If this fails, 
+.Nm
+will kill the child ssh process (if it is still running) and start a new one; 
+.It 5.
+If the child ssh process dies for any other reason, 
+.Nm
+will attempt to start a new one.
+.El
+.Pp
+.Ss Startup behaviour
+.Pp
+If the ssh session fails with an exit status of 1 on the very first 
+try, 
+.Nm
+.Bl -tag -width Ds
+.It 1.
+will assume that there is some problem with syntax or the connection 
+setup, and will exit rather than retrying;
+.It 2.
+There is a "starting gate" time. If the first ssh process fails within
+the first few seconds of being started,
+.Nm
+assumes that 
+it never made it "out of the starting gate", and exits. This is to handle
+initial failed authentication, connection, etc. This time is 30 seconds
+by default, and can be adjusted (see the AUTOSSH_GATETIME environment
+variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours 
+are disabled: there is no "starting gate", and autossh will restart even 
+if ssh fails on the first run with an exit status of 1.
+.El
+.Pp
+.Ss Continued failures
+.Pp
+If the ssh connection fails and attempts to restart it fail in
+quick succession, 
+.Nm
+will start delaying its attempts to
+restart, gradually backing farther and farther off up to a
+maximum interval of the 
+.Nm
+poll time (usually 10 minutes).
+.Nm
+can be "prodded" to retry by signalling it, perhaps with
+SIGHUP ("kill -HUP").
+.Pp
+.Ss Connection setup
+.Pp
+As connections must be established unattended, the use of 
+.Nm
+requires that some form of automatic authentication be set up. The use
+of RSAAuthentication with ssh-agent is the recommended method. The
+example wrapper script attempts to check if there is an agent running
+for the current environment, and to start one if there isn't.
+.Pp
+It cannot be stressed enough that you must make sure ssh works on its
+own, that you can set up the session you want before you try to
+run it under 
+.Nm 
+.
+.Pp
+If you are tunnelling and using an older version of ssh that does not
+support the 
+.Fl N
+flag, you should upgrade (your version has security
+flaws). If you can't upgrade, you may wish to do as rstunnel does, and
+give ssh a command to run, such as "sleep 99999999999".
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl M Ar port[:echo_port]
+specifies the base monitoring port to use. Without the echo port,
+this port and the port
+immediately above it (
+.Ar port
++ 1) should be something nothing else is
+using. 
+.Nm 
+will send test data on the base monitoring port, and
+receive it back on the port above. For example, if you specify "-M
+20000", 
+.Nm
+will set up forwards so that it can send data on port
+20000 and receive it back on 20001.
+.Pp
+Alternatively, a port for a remote echo service may be specified. This
+should be port 7 if you wish to use the standard inetd echo service.
+When an echo port is specified, only the specified monitor port is
+used, and it carries the monitor message in both directions.
+.Pp
+Many people disable the echo service, or even disable inetd, so check
+that this service is available on the remote machine. Some operating
+systems allow one to specify that the service only listen on the 
+localhost (loopback interface), which would suffice for this use.
+.Pp
+The echo service may also be something more complicated: perhaps
+a daemon that monitors a group of ssh tunnels.
+.Pp
+Setting the monitor port to 0 turns the monitoring function off, and
+autossh will only restart ssh upon ssh's exit. For example, if you are
+using a recent version of OpenSSH, you may wish to explore using the
+.Cm ServerAliveInterval
+and
+.Cm ServerAliveCountMax
+options to have the SSH client exit if it finds itself no longer 
+connected to the server. In many ways this may be a better solution than 
+the monitoring port.
+.It Fl f
+causes autossh to drop to the background before running ssh. The
+.Fl f 
+flag is stripped from arguments passed to ssh. Note that there is a crucial
+a difference between
+.Fl f 
+with autossh, and
+.Fl f
+with ssh: when used with
+.Nm
+ssh will be unable to ask for passwords or passphrases.
+.It Fl V 
+causes 
+.Nm 
+to display its version number and exit.
+.Sh ENVIRONMENT
+Other than the flag to set the connection monitoring port,
+.Nm 
+uses environment variables to control features. ssh seems to be 
+still collecting letters for options, and this seems the easiest
+way to avoid collisions.
+.Bl -tag -width Ds
+.It Ev AUTOSSH_DEBUG
+If this variable is set, the logging level is set to to LOG_DEBUG, and
+if the operating system supports it, syslog is set to duplicate log
+entries to stderr.
+.It Ev AUTOSSH_FIRST_POLL
+Specifies the time to wait before the first connection test. Thereafter
+the general poll time is used (see AUTOSSH_POLL below).
+.It Ev AUTOSSH_GATETIME
+Specifies how long ssh must be up before we consider it a successful
+connection. The default is 30 seconds. Note that if AUTOSSH_GATETIME
+is set to 0, then not only is the gatetime behaviour turned off, but
+autossh also ignores the first run failure of ssh. This may be useful
+when running autossh at boot.  
+.It Ev AUTOSSH_LOGLEVEL
+Specifies the log level, corresponding to the levels used by syslog;
+so 0-7 with 7 being the chattiest.
+.It Ev AUTOSSH_LOGFILE
+Specifies that
+.Nm
+should use the named log file, rather than syslog.
+.It Ev AUTOSSH_MAXLIFETIME
+Sets the maximum number of seconds that the program should run. Once
+the number of seconds has been passed, the ssh child will be killed
+and the program will exit.
+.It Ev AUTOSSH_MAXSTART
+Specifies how many times ssh should be started. A negative number
+means no limit on the number of times ssh is started. The default
+value is -1.
+.It Ev AUTOSSH_MESSAGE
+Append message to echo message sent when testing connections.
+.It Ev AUTOSSH_NTSERVICE 
+(Cygwin only.) When set to "yes" , autossh sets up to run as an NT
+service under cygrunsrv. This adds the -N flag for ssh if not already
+set, sets the log output to stdout, and changes the behaviour on ssh
+exit so that it will restart even on a normal exit.
+.It Ev AUTOSSH_PATH
+Specifies the path to the ssh executable, in case it is 
+different than the path compiled in.
+.It Ev AUTOSSH_PIDFILE
+Write autossh pid to specified file.
+.It Ev AUTOSSH_POLL
+Specifies the connection poll time in seconds; default is 600 seconds.
+If the poll time is less than twice the network timeouts (default 15
+seconds) the network timeouts will be adjusted downward to 1/2 the
+poll time.
+.It Ev AUTOSSH_PORT
+Sets the connection monitoring port. Mostly in case ssh appropriates
+-M at some time. But because of this possible use, AUTOSSH_PORT
+overrides the -M flag. A value of 0 turns the monitoring function off.
+.Sh AUTHOR
+.Nm
+was written by Carson Harding.
+.Sh SEE ALSO
+.Xr ssh 1 ,
+.Xr ssh-add 1 ,
+.Xr ssh-agent 1 ,
+.Xr ssh-keygen 1 ,
+.Xr cygrunsrv 1 .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/autossh.c	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,1679 @@
+/*
+ *	Start an ssh session (or tunnel) and monitor it.
+ *	If it fails or blocks, restart it.
+ *
+ * 	From the example of rstunnel.
+ *
+ * Copyright (c) Carson Harding, 2002-2008.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are freely permitted.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
+ * THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+#ifndef HAVE_SOCKLEN_T
+typedef int32_t socklen_t;
+#endif
+
+#include <sys/socket.h>
+#include <sys/utsname.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <limits.h>
+#include <sys/wait.h>
+#include <setjmp.h>
+#include <stdarg.h>
+#include <syslog.h>
+#include <time.h>
+#include <errno.h>
+
+#ifndef HAVE_POLL
+#  ifdef HAVE_SELECT
+#    include "fakepoll.h"
+#  else
+#    error "System lacks both select() and poll()!"
+#  endif
+#else
+#  include <poll.h>
+#endif
+
+#ifndef __attribute__
+#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+#    define __attribute__(x)
+#  endif
+#endif
+
+#ifndef _PATH_DEVNULL
+#  define _PATH_DEVNULL "/dev/null"
+#endif
+
+#ifndef HAVE_DAEMON
+#  include "daemon.h"
+#endif
+
+#ifdef HAVE___PROGNAME
+extern char *__progname;
+#else
+char *__progname;
+#endif
+
+const char *rcsid = "$Id: autossh.c,v 1.81 2008/04/04 22:29:58 harding Exp $";
+
+#ifndef SSH_PATH
+#  define SSH_PATH "/usr/bin/ssh"
+#endif
+
+#define POLL_TIME	600	/* 10 minutes default */
+#define GATE_TIME	30	/* 30 seconds default */
+#define MAX_LIFETIME	0	/* default max lifetime of forever */
+#define TIMEO_NET	15000	/* poll on accept() and io (msecs) */
+#define MAX_CONN_TRIES	3	/* how many attempts */
+#define MAX_START	(-1)	/* max # of runs; <0 == forever */
+#define MAX_MESSAGE	64	/* max length of message we can add */
+
+#define P_CONTINUE	0	/* continue monitoring */
+#define P_RESTART	1	/* restart ssh process */
+#define P_EXIT		2	/* exit */
+
+#define L_FILELOG 	0x01	/* log to file   */
+#define L_SYSLOG  	0x02	/* log to syslog */
+
+#define NO_RD_SOCK	-2	/* magic flag for echo: no read socket */
+
+#define	OPTION_STRING "M:V1246ab:c:e:fgi:kl:m:no:p:qstvw:xACD:F:I:L:NO:PR:S:TXY"
+
+int	logtype  = L_SYSLOG;	/* default log to syslog */
+int	loglevel = LOG_INFO;	/* default loglevel */
+int	syslog_perror;		/* use PERROR option? */
+FILE	*flog;			/* log file */
+
+char	*writep;		/* write port as string */
+char	readp[16];		/* read port as string */
+char	*echop;			/* echo port as string */
+char	*mhost = "127.0.0.1";	/* host in port forwards */
+char	*env_port;		/* port spec'd in environment */
+char	*echo_message = "";	/* message to append to echo string */
+char	*pid_file_name;		/* path to pid file */
+int	pid_file_created;	/* we have created pid file */
+time_t	pid_start_time;		/* time autossh process started */
+int	poll_time = POLL_TIME;	/* default connection poll time */
+int	first_poll_time = POLL_TIME; /* initial connection poll time */
+double	gate_time = GATE_TIME;	/* time to "make it out of the gate" */
+int	max_start = MAX_START;  /* how many times to run (default no limit) */
+double 	max_lifetime = MAX_LIFETIME; /* how long can the process/daemon live */
+int	net_timeout = TIMEO_NET; /* timeout on network data */
+char	*ssh_path = SSH_PATH;	/* default path to ssh */
+int	start_count;		/* # of times exec()d ssh */
+time_t	start_time;		/* time we exec()d ssh */
+
+#if defined(__CYGWIN__)
+int	ntservice;		/* set some stuff for running as nt service */
+#endif
+
+int	newac;			/* argc, argv for ssh */
+char	**newav;
+#define START_AV_SZ	16
+
+int	cchild;			/* current child */
+
+volatile sig_atomic_t	restart_ssh;	/* signalled to restart ssh child */
+volatile sig_atomic_t	dolongjmp;
+sigjmp_buf jumpbuf;
+
+void	usage(int code) __attribute__ ((__noreturn__));
+void	get_env_args(void);
+void	add_arg(char *s);
+void	strip_arg(char *arg, char ch, char *opts);
+void	ssh_run(int sock, char **argv);
+int	ssh_watch(int sock);
+int	ssh_wait(int options);
+void	ssh_kill(void);
+int	conn_test(int sock, char *host, char *write_port);
+int	conn_poll_for_accept(int sock, struct pollfd *pfd);
+int	conn_send_and_receive(char *rp, char *wp, size_t len, 
+	    struct pollfd *pfd, int ntopoll);
+#ifndef HAVE_ADDRINFO
+void	conn_addr(char *host, char *port, struct sockaddr_in *resp);
+#else
+void	conn_addr(char *host,  char *port, struct addrinfo **resp);
+#endif
+int	conn_listen(char *host,  char *port);
+int	conn_remote(char *host,  char *port);
+void	grace_time(time_t last_start);
+void	unlink_pid_file(void);
+void	errlog(int level, char *fmt, ...)
+	    __attribute__ ((__format__ (__printf__, 2, 3)));
+void	xerrlog(int level, char *fmt, ...)
+	    __attribute__ ((__format__ (__printf__, 2, 3)));
+void	doerrlog(int level, char *fmt, va_list ap);
+char	*timestr(void);
+void	sig_catch(int sig);
+int	exceeded_lifetime(void);
+
+void
+usage(int code)
+{
+	fprintf(code ? stderr : stdout,
+	    "usage: %s [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]\n", 
+	    __progname);
+	if (code) {
+		fprintf(stderr, "\n");
+		fprintf(stderr, 
+		    "    -M specifies monitor port. May be overridden by"
+		    " environment\n"
+		    "       variable AUTOSSH_PORT. 0 turns monitoring"
+		    " loop off.\n"
+		    "       Alternatively, a port for an echo service on"
+		    " the remote\n"
+		    "       machine may be specified. (Normally port 7.)\n");
+		fprintf(stderr, 
+		    "    -f run in background (autossh handles this, and"
+		    " does not\n"
+		    "       pass it to ssh.)\n");
+		fprintf(stderr, 
+		    "    -V print autossh version and exit.\n");
+		fprintf(stderr, "\n");
+		fprintf(stderr, "Environment variables are:\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_GATETIME    "
+		    "- how long must an ssh session be established\n"
+		    "                        "
+		    "  before we decide it really was established\n"
+		    "                        "
+		    "  (in seconds)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_LOGFILE     "
+		    "- file to log to (default is to use the syslog\n"
+		    "                        "
+		    "  facility)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_LOGLEVEL    "
+		    "- level of log verbosity\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_MAXLIFETIME "
+		    "- set the maximum time to live (seconds)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_MAXSTART    "
+		    "- max times to restart (default is no limit)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_MESSAGE     "
+		    "- message to append to echo string (max 64 bytes)\n");
+#if defined(__CYGWIN__)
+		fprintf(stderr, 
+		    "    AUTOSSH_NTSERVICE   "
+		    "- tweak some things for running under cygrunsrv\n");
+#endif
+		fprintf(stderr, 
+		    "    AUTOSSH_PATH        "
+		    "- path to ssh if not default\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_PIDFILE     "
+		    "- write pid to this file\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_POLL        "
+		    "- how often to check the connection (seconds)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_FIRST_POLL  "
+		    "- time before first connection check (seconds)\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_PORT        "
+		    "- port to use for monitor connection\n");
+		fprintf(stderr, 
+		    "    AUTOSSH_DEBUG       "
+		    "- turn logging to maximum verbosity and log to\n"
+		    "                        "
+		    "  stderr\n");
+		fprintf(stderr, "\n");
+	}
+	exit(code);
+}
+
+int
+main(int argc, char **argv)
+{
+	int	i;
+	int	n;
+	int	ch;
+	char	*s;
+	int	wp, rp, ep = 0;
+	char	wmbuf[256], rmbuf[256];
+	FILE	*pid_file;
+
+	int	sock = -1;
+	int	done_fwds = 0;
+	int	runasdaemon = 0;
+	int	sawargstop = 0;
+#if defined(__CYGWIN__)
+	int	sawoptionn = 0;
+#endif
+
+#ifndef HAVE___PROGNAME
+	__progname = "autossh";
+#endif	
+
+	/* 
+	 * set up options from environment
+	 */
+	get_env_args();
+
+	/*
+	 * We accept all ssh args, and quietly pass them on
+	 * to ssh when we call it.
+	 */
+	while ((ch = getopt(argc, argv, OPTION_STRING)) != -1) {
+		switch(ch) {
+		case 'M':
+			if (!env_port)
+				writep = optarg;
+			break;
+		case 'V':
+			fprintf(stdout, "%s %s\n", __progname, VER);
+			exit(0);
+			break;
+		case 'f':
+			runasdaemon = 1;
+			break;
+#if defined(__CYGWIN__)
+		case 'N':
+			sawoptionn = 1;
+			break;
+#endif
+		case '?':
+			usage(1);
+			break;
+		default:
+			/* other options get passed to ssh */
+			break;
+		}
+	}
+
+	/* if we got it from the environment */
+	if (env_port)
+		writep = env_port;
+
+	/*
+	 * We must at least have a monitor port and a remote host.
+	 */
+	if (env_port) { 
+		if (argc < 2)
+			usage(1);
+	} else if (!writep || argc < 4)
+		usage(1);
+
+	if (logtype & L_SYSLOG)
+		openlog(__progname, LOG_PID|syslog_perror, LOG_USER);
+
+	/*
+	 * Check for echo port
+	 */
+	if ((s = strchr(writep, ':')) != NULL) {
+		*s = '\0';
+		echop = s + 1;
+		ep = strtoul(echop, &s, 0);
+		if (*echop == '\0' || *s != '\0' || ep == 0)
+			xerrlog(LOG_ERR, "invalid echo port  \"%s\"", echop);
+	}
+
+	/* 
+	 * Check, and get the read port (write port + 1);
+	 * then construct port-forwarding arguments for ssh.
+	 */
+	wp = strtoul(writep, &s, 0);
+	if (*writep == '\0' || *s != '\0')
+		xerrlog(LOG_ERR, "invalid port \"%s\"", writep);
+	if (wp == 0) {
+		errlog(LOG_INFO, "port set to 0, monitoring disabled");
+		writep = NULL;
+	}
+	else if (wp > 65534 || wp < 0)
+		xerrlog(LOG_ERR, "monitor port (%d) out of range", wp);
+	else {
+		rp = wp+1;
+		/* all this for solaris; we could use asprintf() */
+		(void)snprintf(readp, sizeof(readp), "%d", rp);
+
+		/* port-forward arg strings */
+		n = snprintf(wmbuf, sizeof(wmbuf), "%d:%s:%d", wp, mhost, 
+		        echop ? ep : wp);
+		if (n > sizeof(wmbuf))
+			xerrlog(LOG_ERR, 
+			    "overflow building forwarding string");
+		if (!echop) {
+			n = snprintf(rmbuf, sizeof(rmbuf), "%d:%s:%d", 
+			        wp, mhost, rp);
+			if (n > sizeof(rmbuf))
+				xerrlog(LOG_ERR, 
+				    "overflow building forwarding string");
+		}
+	}
+
+	/* 
+	 * Adjust timeouts if necessary: net_timeout is first
+	 * the timeout for accept and then for io, so if the 
+	 * poll_time is set less than 2 timeouts, the timeouts need 
+	 * to be adjusted to be at least 1/2. Perhaps there should be
+	 * be some padding here as well....
+	 */
+	if ((poll_time * 1000) / 2 < net_timeout) {
+		net_timeout = (poll_time * 1000) / 2;
+		errlog(LOG_INFO,
+		    "short poll time: adjusting net timeouts to %d",
+		    net_timeout);
+	}
+
+	/*
+	 * Build a new arg list, skipping -f, -M and inserting 
+	 * port forwards.
+	 */
+	add_arg(ssh_path);
+
+#if defined(__CYGWIN__)
+	if (ntservice && !sawoptionn)
+		add_arg("-N");
+#endif
+
+	for (i = 1; i < argc; i++) {
+		/* 
+		 * We step past the first '--', taking it as ours
+		 * (autossh's). Any further ones we pass to ssh.
+		 */
+		if (argv[i][0] == '-' && argv[i][1] == '-') {
+			if (!sawargstop) {
+				sawargstop = 1;
+				continue;
+			}
+		}
+ 		if (wp && env_port && !done_fwds) {
+			add_arg("-L");
+			add_arg(wmbuf);
+			if (!echop) {
+				add_arg("-R");
+				add_arg(rmbuf);
+			}
+			done_fwds = 1;
+		} else if (!sawargstop && argv[i][0] == '-' && argv[i][1] == 'M') {
+			if (argv[i][2] == '\0')
+				i++;
+			if (wp && !done_fwds) {
+				add_arg("-L");
+				add_arg(wmbuf);
+				if (!echop) {
+					add_arg("-R");
+					add_arg(rmbuf);
+				}
+				done_fwds = 1;
+			}
+			continue;
+		}
+		/* look for -f in option args and strip out */
+		strip_arg(argv[i], 'f', OPTION_STRING);
+		add_arg(argv[i]);
+	}
+
+	/* 
+	 * Only if we're doing the network monitor thing.
+	 * Socket once opened stays open for listening for 
+	 * the duration of the program.
+	 */
+	if (writep) {
+		if (!echop) {
+			sock = conn_listen(mhost, readp);
+			/* set close-on-exec */
+			(void)fcntl(sock, F_SETFD, FD_CLOEXEC);
+		} else
+			sock = NO_RD_SOCK;
+	}
+
+	if (runasdaemon) {
+		if (daemon(0, 0) == -1) {
+			xerrlog(LOG_ERR, "run as daemon failed: %s", 
+			    strerror(errno));
+		}
+	}
+
+	if (pid_file_name) {
+		pid_file = fopen(pid_file_name, "w");
+		if (!pid_file) {
+			xerrlog(LOG_ERR, "cannot open pid file \"%s\": %s",
+			    pid_file_name, strerror(errno));
+		}
+		pid_file_created = 1;
+		atexit(unlink_pid_file);
+		if (fprintf(pid_file, "%d\n", (int)getpid()) == 0)
+			xerrlog(LOG_ERR, "write failed to pid file \"%s\": %s",
+			    pid_file_name, strerror(errno));
+		fflush(pid_file);
+		fclose(pid_file);
+	}
+
+	ssh_run(sock, newav);
+
+	if (sock >= 0) {
+		shutdown(sock, SHUT_RDWR);
+		close(sock);
+	}
+
+	if (logtype & L_SYSLOG)
+		closelog();
+
+	exit(0);
+}
+
+/*
+ * Add an argument to the argument array.
+ */
+void
+add_arg(char *s) 
+{
+	char	*p;
+	size_t	len;
+	static	size_t newamax = START_AV_SZ;
+
+	len = strlen(s);
+	if (len == 0)
+		return;
+
+	if (!newav) {
+		newav = malloc(START_AV_SZ * sizeof(char *));
+		if (!newav)
+			xerrlog(LOG_ERR, "malloc: %s", strerror(errno));
+	} else if (newac >= newamax-1) {
+		newamax *= 2;
+		newav = realloc(newav, newamax * sizeof(char *));
+		if (!newav)
+			xerrlog(LOG_ERR, "realloc: %s", strerror(errno));
+	}
+	p = malloc(len+1);		
+	if (!p) xerrlog(LOG_ERR, "malloc: %s", strerror(errno));
+	memmove(p, s, len);
+	p[len] = '\0';
+	newav[newac++] = p;
+	newav[newac] = NULL;
+	
+	return;
+}
+
+/*
+ * strip an argument option from an option string; strings that
+ * end up with just a '-' become zero length (add_arg() will
+ * skip them). An option that enters as '-' is untouched.
+ *
+ */
+void
+strip_arg(char *arg, char ch, char *opts)
+{
+	char *f, *o;
+	size_t len;
+	
+
+	if (arg[0] == '-' && arg[1] != '\0') {
+		for (len = strlen(arg), f = arg; *f != '\0'; f++, len--) {
+			/* 
+			 * If f in option string and next char is ':' then
+			 * what follows is a parameter to the flag, and
+			 * what we're stripping may be valid in it. We do 
+			 * not validate f in opts: that is really someone 
+			 * else's job, and the options may change. In that
+			 * case, this provides a best effort. This is 
+			 * terribly inefficient.
+			 */
+			if ((o = strchr(opts, *f)) != NULL) {
+				if (*(o+1) == ':')
+					return; 
+			}
+			if (*f == ch)
+				(void)memmove(f, f+1, len); 
+		}
+		/* left with "-" alone? then truncate */
+		if (arg[1] == '\0')
+			arg[0] = '\0';
+	}
+
+	return;
+}
+
+/* 
+ * Ugly, but as we've used so many command args...
+ */
+void
+get_env_args(void)
+{
+	char	*s;
+	char	*t;
+
+	if ((s = getenv("AUTOSSH_PATH")) != NULL)
+		ssh_path = s;
+
+	if ((s = getenv("AUTOSSH_DEBUG")) != NULL) {
+#ifdef HAVE_LOG_PERROR
+		syslog_perror = LOG_PERROR;
+#else
+		syslog_perror = 0;
+		logtype |= L_FILELOG;
+		flog = stderr;
+#endif
+		loglevel = LOG_DEBUG;
+	} else if ((s = getenv("AUTOSSH_LOGLEVEL")) != NULL) {
+		loglevel = strtoul(s, &t, 0);
+		if (*s == '\0' || *t != '\0' ||
+		    loglevel < LOG_EMERG || loglevel > LOG_DEBUG)
+			xerrlog(LOG_ERR, "invalid log level \"%s\"", s);
+	}
+
+	if ((s = getenv("AUTOSSH_FIRST_POLL")) != NULL) {
+		first_poll_time = strtoul(s, &t, 0);
+		if (*s == '\0' || first_poll_time == 0 || *t != '\0' )
+			xerrlog(LOG_ERR, 
+			    "invalid first poll time \"%s\"", s);
+		if (first_poll_time <= 0)
+			first_poll_time = POLL_TIME;
+	}
+
+	if ((s = getenv("AUTOSSH_POLL")) != NULL) {
+		poll_time = strtoul(s, &t, 0);
+		if (*s == '\0' || poll_time == 0 || *t != '\0' )
+			xerrlog(LOG_ERR, 
+			    "invalid poll time \"%s\"", s);
+		if (poll_time <= 0)
+			poll_time = POLL_TIME;
+	}
+
+	if ((s = getenv("AUTOSSH_GATETIME")) != NULL) {
+		gate_time = (double)strtol(s, &t, 0);
+		if (*s == '\0' || gate_time < 0 || *t != '\0' )
+			xerrlog(LOG_ERR, "invalid gate time \"%s\"", s);
+	}
+
+	if ((s = getenv("AUTOSSH_MAXSTART")) != NULL) {
+		max_start = (int)strtol(s, &t, 0);
+		if (*s == '\0' || max_start < 0 || *t != '\0')
+			xerrlog(LOG_ERR, "invalid max start number \"%s\"", s);
+	}
+
+	if ((s = getenv("AUTOSSH_MESSAGE")) != NULL) {
+		if (*s != '\0')
+			echo_message = s;
+		if (strlen(echo_message) > MAX_MESSAGE)
+			xerrlog(LOG_ERR, "echo message may only be %d bytes long",
+			    MAX_MESSAGE);
+	} 
+
+
+	if ((s = getenv("AUTOSSH_PORT")) != NULL)
+		if (*s != '\0')
+			env_port = s;
+
+	if ((s = getenv("AUTOSSH_MAXLIFETIME")) != NULL) {
+		max_lifetime = (double)strtoul(s, &t, 0);
+		if (*s == '\0' || *t != '\0' )
+			xerrlog(LOG_ERR,
+				"invalid max lifetime \"%s\"", s);
+		/* can't really be < 0, as converted as unsigned long */
+		if (max_lifetime <= 0 )
+			max_lifetime = MAX_LIFETIME;
+		else {
+			if (poll_time > max_lifetime) {
+				errlog( LOG_INFO, 
+					"poll time is greater then lifetime,"
+					" dropping poll time to %.0f", max_lifetime );
+				poll_time = max_lifetime;
+			}
+
+			if (first_poll_time > max_lifetime) {
+				errlog( LOG_INFO, 
+					"first poll time is greater then lifetime,"
+					" dropping first poll time to %.0f", max_lifetime );
+				first_poll_time = max_lifetime;
+			}
+
+			time(&pid_start_time);
+		}
+	}
+
+	if ((s = getenv("AUTOSSH_PIDFILE")) != NULL)
+		if (*s != '\0')
+			pid_file_name = s;
+
+#if defined(__CYGWIN__)
+	if ((s = getenv("AUTOSSH_NTSERVICE")) != NULL) {
+		if (*s != '\0' && strncasecmp("yes", s, strlen(s)) == 0) {
+			ntservice = 1;
+			logtype = L_FILELOG;
+			flog = stdout;
+		}
+	}
+#endif
+
+	/* 
+	 * Look for this after nt service; in case we may wish to log
+	 * elsewhere than stdout when running under cygrunsrv.
+	 */
+	if ((s = getenv("AUTOSSH_LOGFILE")) != NULL) {
+		flog = fopen(s, "a");
+		if (!flog)
+			xerrlog(LOG_ERR, "%s: %s", s, strerror(errno));
+		logtype = L_FILELOG;
+	}
+
+	return;
+}
+
+/*
+ * Run ssh
+ */
+void
+ssh_run(int sock, char **av) 
+{
+	struct	sigaction act;
+	struct	timeval tv;
+
+	act.sa_handler = sig_catch;
+	sigemptyset(&act.sa_mask);
+	act.sa_flags = 0;
+
+	sigaction(SIGTERM, &act, NULL);
+	sigaction(SIGINT,  &act, NULL);
+	sigaction(SIGHUP,  &act, NULL);
+	sigaction(SIGUSR1, &act, NULL);
+	sigaction(SIGUSR2, &act, NULL);
+	sigaction(SIGCHLD, &act, NULL);
+
+	act.sa_flags |= SA_RESTART;
+	sigaction(SIGALRM, &act, NULL);
+
+	/* 
+	 * There are much better things. and we all wait
+	 * for solaris to get /dev/random.
+	 */
+	gettimeofday(&tv, NULL);
+	srandom(getpid() ^ tv.tv_usec ^ tv.tv_sec);
+
+	while (max_start < 0 || start_count < max_start) {
+		if (exceeded_lifetime())
+			return;
+		restart_ssh = 0;
+		start_count++;
+		grace_time(start_time);
+		time(&start_time);
+		if (max_start < 0)
+			errlog(LOG_INFO, "starting ssh (count %d)", 
+			   start_count);
+		else
+			errlog(LOG_INFO, "starting ssh (count %d of %d)", 
+			   start_count, max_start);
+		cchild = fork();
+		switch (cchild) {
+		case 0:
+			errlog(LOG_DEBUG, "execing %s", av[0]);
+			execvp(av[0], av);
+			xerrlog(LOG_ERR, "%s: %s", av[0], strerror(errno));
+			 /* else can loop restarting! */
+			kill(SIGTERM, getppid());
+			exit(1);
+			break;
+		case -1:
+			cchild = 0;
+			xerrlog(LOG_ERR, "fork: %s", strerror(errno));
+			break;
+		default:
+			errlog(LOG_INFO, "ssh child pid is %d", (int)cchild);
+			if (ssh_watch(sock) == P_EXIT)
+				return;
+			break;
+		}
+	}
+
+	errlog(LOG_INFO, "max start count reached; exiting"); 
+}
+
+/*
+ * Periodically test network connection. On signals, determine what
+ * happened or what to do with child. Return as necessary for exit 
+ * or restart of child.
+ */
+int
+ssh_watch(int sock)
+{
+	int	r;
+	int	val;
+	static	int	secs_left;
+	int	my_poll_time = first_poll_time;
+	time_t	now;
+	double	secs_to_shutdown;
+
+#if defined(HAVE_SETPROCTITLE)
+	setproctitle("parent of %d (%d)", 
+	    (int)cchild, start_count);
+#endif
+
+	for (;;) {
+		if (restart_ssh) {
+			errlog(LOG_INFO, "signalled to kill and restart ssh");
+			ssh_kill();
+			return P_RESTART;
+		}
+		if ((val = sigsetjmp(jumpbuf, 1)) == 0) {
+
+			errlog(LOG_DEBUG, "check on child %d", cchild);
+
+			/* poll for expired child */
+			r = ssh_wait(WNOHANG);
+			if (r != P_CONTINUE) {
+				errlog(LOG_DEBUG, 
+				    "expired child, returning %d", r);
+				return r;
+			}
+
+			secs_left = alarm(0);
+			if (secs_left == 0)
+				secs_left = my_poll_time;
+
+			my_poll_time = poll_time;
+
+			if (max_lifetime != 0) {
+				time(&now);
+				secs_to_shutdown = max_lifetime - difftime(now,pid_start_time);
+				if (secs_to_shutdown < poll_time)
+					secs_left = secs_to_shutdown;
+			}
+
+			errlog(LOG_DEBUG, 
+			    "set alarm for %d secs", secs_left);
+
+			alarm(secs_left);
+			dolongjmp = 1;
+			pause();
+
+		} else {
+
+			switch(val) {
+			case SIGINT:
+			case SIGTERM:
+			case SIGQUIT:
+			case SIGABRT:
+				errlog(LOG_INFO, 
+				    "received signal to exit (%d)", val);
+				ssh_kill();
+				return P_EXIT;
+				break;
+			case SIGALRM:
+				if (exceeded_lifetime()) {
+					ssh_kill();
+					return P_EXIT;
+				}
+
+				if (writep && sock != -1 &&
+				    !conn_test(sock, mhost, writep)) {
+					errlog(LOG_INFO, 
+					    "port down, restarting ssh");
+					ssh_kill();
+					return P_RESTART;
+				}
+#ifdef TOUCH_PIDFILE
+				/*
+				 * utimes() with a NULL time argument sets
+				 * file access and modification times to
+				 * the current time
+				 */
+				if (pid_file_name && 
+				    utimes(pid_file_name, NULL) != 0) {
+					errlog(LOG_ERR,
+					    "could not touch pid file: %s",
+					    strerror(errno));
+				}
+#endif
+				break;
+			default:
+				break;
+			}
+		}
+	}
+}
+
+/*
+ * Checks to see if we have exceeded our time to live
+ * Returns 1 if we have, 0 if we haven't
+ */
+int
+exceeded_lifetime(void)
+{
+	time_t	now;
+
+	if (max_lifetime > 0 ) {
+		time(&now);
+		if (difftime(now, pid_start_time) >= max_lifetime ) {
+			errlog(LOG_INFO, 
+				"exceeded maximum time to live, shutting down");
+			return 1;
+		}
+	}
+
+	return 0;
+}
+
+/*
+ * Wait on child: with options == WNOHANG, poll for
+ * dead child, else if options == 0, then wait for
+ * known dead child.
+ *
+ * If child was deliberately killed (TERM, INT, KILL),
+ * or if child called exit(0) or _exit(0), then pass
+ * message on return to give up (P_EXIT). Otherwise death 
+ * was unnatural (or unintended), and pass message back
+ * to restart (P_RESTART).
+ *
+ * However, if child died with exit(1) on first try, then
+ * there is some startup error (anything from network
+ * connection to authentication failure), so we exit. 
+ * If on a restart, however, we keep trying as it must
+ * have worked once. This doesn't necessarily work if
+ * the user did an interactive authentication, and then
+ * isn't there on the restart to enter his password....
+ * But we can only know very little about what's going 
+ * on inside ssh.
+ *
+ * This is further complicated by the behaviour of 
+ * OpenSSH when sent SIGTERM (15). It is possible to 
+ * kill it before it installs the handler for that 
+ * signal, in which case it autossh behaves as above 
+ * and exits. But, in  at least interactive use, it 
+ * appears that once the session is established ssh 
+ * installs a handler, and then when signalled (killed) 
+ * it exits with status 255. autossh does not know 
+ * it (ssh) was signalled, so restarts it.
+ *
+ */
+int
+ssh_wait(int options) {
+
+	int	status;
+	int	evalue;
+	time_t	now;
+
+	if (waitpid(cchild, &status, options) > 0) {
+		if (WIFSIGNALED(status)) {
+			switch(WTERMSIG(status)) {
+			case SIGINT: 
+			case SIGTERM: 
+			case SIGKILL:
+				/* someone meant it */
+				errlog(LOG_INFO, 
+				    "ssh exited on signal %d; parent exiting", 
+				    WTERMSIG(status));
+				return P_EXIT;
+				break;
+			default:
+				/* continue on and restart */
+				errlog(LOG_INFO, 
+				    "ssh exited on signal %d, restarting ssh", 
+				    WTERMSIG(status));
+				return P_RESTART;
+				break;
+			}
+		} else if (WIFEXITED(status)) {
+			evalue = WEXITSTATUS(status);
+			if (start_count == 1 && gate_time != 0) {
+				/*
+				 * If ssh exits too quickly, give up.
+				 */
+				time(&now);
+				if (difftime(now, start_time) <= gate_time) {
+					errlog(LOG_ERR, 
+					    "ssh exited prematurely "
+					    "with status %d; %s exiting", 
+					    evalue, __progname);
+					return P_EXIT;
+				}
+			}
+			switch(evalue) {
+			case 255:
+				/* 
+				 * we can get this on an initial
+				 * connection if the connection itself
+				 * is ok, but authentication fails.
+				 * But there's no way to do this nicely:
+				 * we don't have enough info from the
+			 	 * ssh session and we get the same exit
+				 * status from a dropped connection.
+				 * Hence the gate_time above.
+				 */ 
+				errlog(LOG_INFO,
+				    "ssh exited with error "
+				    "status %d; restarting ssh",
+				    evalue);
+				return P_RESTART;
+				break;
+			case 1:	
+				/*
+				 * the first time, it could be any of
+				 * a number of errors; so we exit and let
+				 * the user fix. But if been running ok
+				 * already, then network may be down and
+				 * then ssh fails exit(1) on the attempt 
+				 * to reconnect....so we try to restart.
+				 */
+				if (start_count > 1 || gate_time == 0) {
+					errlog(LOG_INFO,
+					    "ssh exited with error "
+					    "status %d; restarting ssh",
+					    evalue);
+					return P_RESTART;
+				}
+				/* FALLTHROUGH */
+			case 0:  /* exited on success */
+#if defined(__CYGWIN__)
+				if (ntservice)
+					return P_RESTART;
+				/* FALLTHROUGH */
+#endif
+			default: /* remote command error status */
+				errlog(LOG_INFO,
+				    "ssh exited with status %d; %s exiting",
+				    evalue, __progname);
+				return P_EXIT;
+				break;
+			}
+		}
+	}
+
+	/* do nothing */	
+	return P_CONTINUE;
+}
+
+/*
+ * Kill ssh child. This can be overly aggressive, and
+ * result in kill KILL before TERM has time to take....
+ * Perhaps just use TERM?
+ */
+void
+ssh_kill(void)
+{
+	int w;
+	int status;
+
+	if (cchild) {
+		/* overkill */
+		kill(cchild, SIGTERM);
+		/* if (kill(cchild, 0) != -1)
+		 +	kill(cchild, SIGKILL);
+		 */
+		do {
+			errno = 0;
+			w = waitpid(cchild, &status, 0);
+		} while (w < 0 && errno == EINTR );
+
+		if (w <= 0) {
+			errlog(LOG_ERR, 
+			    "waitpid() not successful: %s",
+			    strerror(errno));
+		}
+	}
+	return;
+}
+
+/*
+ * Try to prevent rapid-fire restarts on such things
+ * as connection refused. Back off and try more slowly.
+ * Calculate a grace period to wait based time between
+ * now and the last restart and the number of tries
+ * in a row that have had less than the poll_time
+ * between them. 
+ *
+ * Questions:
+ *	- should it back off faster? slower?
+ */
+void
+grace_time(time_t last_start)
+{
+	int	n;
+	double	t;
+	int	interval;
+	time_t	now;
+	static	int tries;
+
+	double	min_time;
+
+	/* 
+	 * Minimum time we have to stay up to avoid backoff
+	 * behaviour. With default poll_time this is 60 secs.
+	 * This may be too complicated.
+	 */
+	min_time = (double)(poll_time / 10);
+	if (min_time < 10) min_time = 10;
+
+	time(&now);
+	if (difftime(now, last_start) >= min_time)
+		tries = 0;
+	else
+		tries++;
+
+	errlog(LOG_DEBUG,
+	    "checking for grace period, tries = %d", tries);
+
+	if (tries > 5) {
+		t = (double)(tries - 5);
+		n = (int)((poll_time / 100.0) * (t * (t/3)));
+		interval = (n > poll_time) ? poll_time : n;
+		if (interval) {
+			errlog(LOG_DEBUG, 
+			    "sleeping for grace time %d secs", interval);
+			sleep(interval);
+		}
+	}
+	return;
+}
+
+/*
+ * If we're primed, longjump back.
+ */
+void
+sig_catch(int sig)
+{
+	if (sig == SIGUSR1)
+		restart_ssh = 1;
+	if (dolongjmp) {
+		dolongjmp = 0;
+		siglongjmp(jumpbuf, sig);
+	}
+	return;
+}
+
+/*
+ * Test the connection monitor loop can pass traffic, and that
+ * we get back what we send. This needs the most testing.
+ */
+int
+conn_test(int sock, char *host, char *write_port)
+{
+	int	rval;			/* default return value (failure) */
+	int	tries;			/* message attempts */
+	int	send_error;		/* did it go/come ok? */
+	struct	pollfd	pfd[2];		/* poll fds */
+	int	ntopoll;		/* # fds to poll */
+	int	rd, wd;			/* read and write descriptors */
+	long	id;			/* for a random number */
+
+	struct	utsname uts;
+	char	wbuf[64+sizeof(uts.nodename)+MAX_MESSAGE];
+	char	rbuf[sizeof(wbuf)];
+
+	wd = -1;			/* default desc. values */
+	rd = -1;
+	rval = 0;			/* default return value : no success */
+	tries = 0;			/* number of attempts */
+
+	uts.nodename[0] = '\0';
+	(void)uname(&uts);
+	id = random();
+
+	if (dolongjmp != 0)
+		errlog(LOG_ERR, "conn_test(): error: dolongjmp != 0");
+
+	/* set up write connection */
+	if ((wd = conn_remote(host, write_port)) == -1)
+		return 0;
+
+	pfd[1].fd = wd;
+	pfd[1].events = POLLOUT;
+
+	while (tries++ < MAX_CONN_TRIES) {
+
+		if (tries >= MAX_CONN_TRIES) {
+			errlog(LOG_DEBUG, 
+			    "tried connection %d times and failed",
+			    tries);
+			break;				/* give up */
+		} 
+
+		/* close read socket if we're coming around again */
+		if (sock != NO_RD_SOCK && rd != -1) {
+			shutdown(rd, SHUT_RDWR);
+			close(rd);
+			rd = -1;
+		}
+
+		/* 
+		 * Some data to send: something that is identifiable 
+		 * as coming from ourselves. Any user can still trash 
+		 * our listening port. We'd really like to be able to 
+		 * connect and accept connections from certain pids 
+		 * (ourself, our children).
+		 */
+		if (snprintf(wbuf, sizeof(wbuf), 
+		    "%s %s %d %ld %s\r\n", uts.nodename, __progname, 
+		    (int)getpid(), id, echo_message) >= sizeof(wbuf))
+			xerrlog(LOG_ERR, "conn_test: buffer overflow");
+		memset(rbuf, '\0', sizeof(rbuf));
+
+		if (sock != NO_RD_SOCK) {
+			/* 
+			 * If doing loop of connections, then accept() the read
+			 * connection and use both read and write fds for
+			 * poll(). Replace poll fd with accepted connection fd.
+			 */
+			rd = conn_poll_for_accept(sock, pfd);
+			if (rd < 0)
+				break;			/* give up */
+			pfd[0].fd = rd;
+			pfd[0].events = POLLIN;
+			ntopoll = 2;
+		} else {
+			/* 
+			 * For talking to echo service, shift over and
+			 * just use the one descriptor for both read and
+			 * write.
+			 */
+			pfd[0].fd = wd;
+			pfd[0].events = POLLIN|POLLOUT;
+			ntopoll = 1;
+		}
+
+		send_error = conn_send_and_receive(rbuf, wbuf, 
+				 	strlen(wbuf), pfd, ntopoll);
+		if (send_error == 0) {
+			/* we try again if received does not match sent */
+			if (strcmp(rbuf, wbuf) == 0) {
+				errlog(LOG_DEBUG, "connection ok");
+				rval = 1;		/* success */
+				break;			/* out of here */
+			} else {
+				errlog(LOG_DEBUG, 
+				    "not what I sent: \"%s\" : \"%s\"",
+				     wbuf, rbuf);
+				/* loop again */
+			}
+		} else if (send_error == 1) {
+			errlog(LOG_DEBUG, 
+			    "timeout on io poll, looping to accept again");
+		} else {
+			errlog(LOG_DEBUG, "error on poll: %s",
+			    strerror(errno));
+			break;		/* hard error, we're out of here */
+		}
+	}
+
+	shutdown(wd, SHUT_RDWR);
+	close(wd); 
+	if (sock != NO_RD_SOCK) {
+		shutdown(rd, SHUT_RDWR);
+		close(rd);
+	}
+
+	return rval;
+}
+
+/*
+ * poll for accept(), return file descriptor for accepted connection,
+ * or -1 for error.
+ */
+int
+conn_poll_for_accept(int sock, struct pollfd *pfd)
+{
+	int	rd;			/* new descriptor on accept */
+	int	timeo_polla;		/* for accept() */
+	struct sockaddr cliaddr;
+	socklen_t	len;		/* listen socket info */
+
+	rd = 0;
+	timeo_polla  = net_timeout;	/* timeout value for accept() */
+	len = sizeof(struct sockaddr);
+
+	/* 
+	 * first we're going to poll for accept()
+	 */
+	pfd[0].fd = sock;
+	pfd[0].events = POLLIN;
+
+	for (;;) {
+		switch(poll(pfd, 1, timeo_polla)) {
+		case 0:
+			errlog(LOG_INFO, 
+			    "timeout polling to accept read connection");
+			return -1;
+		case -1:
+			errlog(LOG_ERR, 
+			    "error polling to accept read connection: %s",
+			    strerror(errno));
+			return -1;
+		default:
+			break;
+		}
+
+		if (pfd[0].revents & POLLIN) {
+			rd = accept(sock, &cliaddr, &len);
+			if (rd == -1) {
+				errlog(LOG_ERR, 
+				    "error accepting read connection: %s",
+				    strerror(errno));
+				return -1;
+			}
+			break;
+		}
+		break;
+	}
+
+	return rd;
+}
+
+/* 
+ * Send from wp and receive into rp.
+ * 	1  = try again
+ * 	0  = ok
+ * 	-1 = error 
+ */
+int
+conn_send_and_receive(char *rp, char *wp, size_t len, 
+    struct pollfd *pfd, int ntopoll)
+{
+	ssize_t nwrite, nread;
+	size_t  rleft, wleft;
+	int	timeo_pollio;
+	int	ird, iwr;
+	int	loops = 0;
+
+	timeo_pollio = net_timeout;	/* timeout value for net io */
+	rleft = wleft = len;
+
+	/* 
+	 * If two fds, one is to read, one is to write,
+	 * else read and write on the same fd.
+	 */
+	if (ntopoll == 2) {
+		ird = 0;
+		iwr = 1;
+	} else {
+		iwr = ird = 0;
+	}
+
+
+	/*
+	 * Now, send and receive. When we're doing the loop thing, we stop
+	 * polling for write() once we've sent the whole message.
+	 */
+	while (rleft > 0) {
+
+		switch(poll(pfd, ntopoll, timeo_pollio)) {
+		case 0:
+			return 1;
+			break;
+		case -1:
+			return -1;
+			break;
+		default:
+			break;
+		}
+
+		if (wleft && pfd[iwr].revents & POLLOUT) {
+			while (wleft > 0) {
+				nwrite = write(pfd[iwr].fd, wp, wleft);
+				if (nwrite == 0) {
+					wleft = 0; /* EOF */
+					break;
+				} else if (nwrite == -1) {
+				    if (errno == EINTR || errno == EAGAIN)
+					break;
+			            else
+					return -1;
+				}
+				wleft -= nwrite;
+				wp    += nwrite;
+			}
+			/* if complete, turn off polling for write */
+			if (wleft == 0) {
+				ntopoll = 1;
+				/* 
+				 * if we are reading and writing to the 
+				 * same fd then we must clear the write bit 
+				 * so that poll doesn't loop tight.
+				 */
+				if (iwr == ird)
+				    pfd[ird].events = POLLIN;
+			}
+		}
+
+		if (pfd[ird].revents & POLLIN || pfd[ird].revents & POLLHUP) {
+			while (rleft > 0) {
+				nread = read(pfd[ird].fd, rp, rleft);
+				if (nread == 0) {
+					rleft = 0; /* EOF */
+					break;
+				} else if (nread == -1) {
+				    if (errno == EINTR || errno == EAGAIN)
+					break;
+			            else
+					return -1;
+				}
+				rleft -= nread;
+				rp    += nread;
+			}
+		}
+
+		/* 
+		 * we can run into situations where the data gets black-holed
+		 * and poll() can't tell. And then we loop fast and
+		 * things go nuts. So if we do that, give up after a while.
+		 */
+		if (loops++ > 5) {
+			sleep(1);
+			if (loops > 10) {
+				errlog(LOG_INFO, 
+				    "too many loops without data");
+				return -1;
+			}
+		}
+	}
+
+	return 0;
+}
+
+#ifndef HAVE_ADDRINFO
+
+/*
+ * Convert names to addresses, setup for connection.
+ */
+void
+conn_addr(char *host, char *port, struct sockaddr_in *resp)
+{
+	struct hostent *h;
+
+	if ((h = gethostbyname(host)) == NULL)
+		xerrlog(LOG_ERR, "%s: %s", host, hstrerror(h_errno));
+
+	resp->sin_family = h->h_addrtype;
+	resp->sin_port = htons(atoi(port));
+	resp->sin_addr = *((struct in_addr *) h->h_addr_list[0]);
+
+	return;
+}
+
+/*
+ * Open connection we're writing to.
+ */
+int
+conn_remote(char *host, char *port)
+{
+	int	sock;
+	static struct sockaddr_in res = {AF_UNSPEC};
+
+	/* Cache the address info */
+	if (res.sin_family == AF_UNSPEC)
+		conn_addr(host, port, &res);
+
+	if ((sock = socket(res.sin_family, SOCK_STREAM, 0)) == -1)
+		xerrlog(LOG_ERR, "socket: %s", strerror(errno));
+
+	if (connect(sock, (struct sockaddr *) &res, sizeof(res)) == -1) {
+		errlog(LOG_INFO, "%s:%s: %s", host, port, strerror(errno));
+		close(sock);
+		return -1;
+	}
+
+	return sock;
+}
+
+/*
+ * Returns a socket listening on a local port, bound to specified source
+ * address. Errors in binding to the local listening port are fatal.
+ */
+int
+conn_listen(char *host,  char *port)
+{
+	int sock;
+	struct sockaddr_in res;
+	int on = 1;
+
+	/* 
+	 * Unlike conn_remote, we don't need to cache the 
+	 * info; we're only calling once at start. All errors
+	 * here are fatal.
+	 */
+	conn_addr(host, port, &res);
+
+	if ((sock = socket(res.sin_family, SOCK_STREAM, 0)) == -1)
+		xerrlog(LOG_ERR, "socket: %s", strerror(errno));
+
+	if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+	    (char *) &on, sizeof on) != 0) {
+		xerrlog(LOG_ERR, "setsockopt: %s", strerror(errno));
+	}
+
+	if (bind(sock, (struct sockaddr *)&res, sizeof(res)) == -1)
+		xerrlog(LOG_ERR, "bind on %s:%s: %s", 
+		    host, port, strerror(errno));
+
+	if (listen(sock, 1) < 0)
+		xerrlog(LOG_ERR, "listen: %s", strerror(errno));
+
+	return sock;
+}
+
+#else /* HAVE_ADDRINFO */
+
+/*
+ * Convert names to addresses, setup for connection.
+ */
+void
+conn_addr(char *host,  char *port, struct addrinfo **resp)
+{
+	int family = AF_INET;
+	struct addrinfo hints;
+	int error;
+
+	memset(&hints, 0, sizeof(struct addrinfo));
+	hints.ai_family = family;
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_protocol = IPPROTO_TCP;
+
+	/* Allow nodename to be null */
+	hints.ai_flags |= AI_PASSIVE;
+
+	/*
+	 * In the case of binding to a wildcard address
+	 * default to binding to an ipv4 address.
+	 */
+	if (host == NULL && hints.ai_family == AF_UNSPEC)
+		hints.ai_family = AF_INET;
+
+	if ((error = getaddrinfo(host, port, &hints, resp)))
+                xerrlog(LOG_ERR, "%s", gai_strerror(error));
+
+	return;
+}
+
+/*
+ * Open connection we're writing to.
+ */
+int
+conn_remote(char *host, char *port)
+{
+	int	sock;
+	static  struct addrinfo *res;
+
+	/* Cache the address info */
+	if (!res)
+		conn_addr(host, port, &res);
+
+	if ((sock = socket(res->ai_family, res->ai_socktype, 
+	    res->ai_protocol)) == -1)
+		xerrlog(LOG_ERR, "socket: %s", strerror(errno));
+
+	if (connect(sock, res->ai_addr, res->ai_addrlen) == -1) {
+		errlog(LOG_INFO, "%s:%s: %s", host, port, strerror(errno));
+		close(sock);
+		return -1;
+	}
+
+	return sock;
+}
+
+/*
+ * Returns a socket listening on a local port, bound to specified source
+ * address. Errors in binding to the local listening port are fatal.
+ */
+int
+conn_listen(char *host,  char *port)
+{
+	int sock;
+	struct addrinfo *res;
+	int on = 1;
+
+	/* 
+	 * Unlike conn_remote, we don't need to cache the 
+	 * info; we're only calling once at start. All errors
+	 * here are fatal.
+	 */
+	conn_addr(host, port, &res);
+
+	if ((sock = socket(res->ai_family, res->ai_socktype,
+	    res->ai_protocol)) == -1)
+		xerrlog(LOG_ERR, "socket: %s", strerror(errno));
+
+	if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+	    (char *) &on, sizeof on) != 0) {
+		xerrlog(LOG_ERR, "setsockopt: %s", strerror(errno));
+	}
+
+	if (bind(sock, (struct sockaddr *)res->ai_addr,
+	    res->ai_addrlen) == -1)
+		xerrlog(LOG_ERR, "bind on %s:%s: %s", 
+		    host, port, strerror(errno));
+
+	if (listen(sock, 1) < 0)
+		xerrlog(LOG_ERR, "listen: %s", strerror(errno));
+
+	freeaddrinfo(res);
+
+	return sock;
+}
+#endif /* ! HAVE_ADDRINFO */
+
+/*
+ * On OpenBSD _exit() calls atexit() registered functions.
+ * Solaris has a function, _exithandle(), you can call
+ * before _exit().
+ */
+void
+unlink_pid_file(void)
+{
+	if (pid_file_created)
+		(void)unlink(pid_file_name);
+	pid_file_created = 0;
+}
+
+/*
+ * Nicely formatted time string for logging
+ */
+char *
+timestr(void)
+{
+	static	char timestr[32];
+	time_t  now;
+	struct	tm *tm;
+
+	(void)time(&now);
+	tm = localtime(&now);
+	(void)strftime(timestr, sizeof(timestr), 
+	    "%Y/%m/%d %H:%M:%S", tm);
+
+	return timestr;
+}
+
+/*
+ * Log errors.
+ */	
+void
+errlog(int level, char *fmt, ...)
+{
+	va_list	ap;
+
+	va_start(ap, fmt);
+	doerrlog(level, fmt, ap);
+	va_end(ap);
+}
+
+/*
+ * Log and then exit with error status.
+ */
+void
+xerrlog(int level, char *fmt, ...)
+{
+	va_list	ap;
+
+	va_start(ap, fmt);
+	doerrlog(level, fmt, ap);
+	va_end(ap);
+
+	ssh_kill();
+	unlink_pid_file();
+	_exit(1);
+}
+
+/*
+ * Log to file and/or syslog as directed. We want different
+ * behaviour before syslog has been called and set up; and
+ * different behaviour before we fork for ssh: errors before
+ * that point result in exit.
+ */
+void
+doerrlog(int level, char *fmt, va_list ap)
+{
+	FILE	*fl;
+#ifndef HAVE_VSYSLOG
+	char	logbuf[1024];
+#endif
+
+	fl = flog;	/* only set per-call */
+
+	if (loglevel >= level) {
+		if (logtype & L_SYSLOG) {
+#ifndef HAVE_VSYSLOG
+			(void)vsnprintf(logbuf, sizeof(logbuf), fmt, ap);
+			syslog(level, logbuf);
+#else
+			vsyslog(level, fmt, ap);
+#endif
+		} else if (!fl) {
+			/* 
+			 * if we're not using syslog, and we
+			 * don't have a log file, then use
+			 * stderr.
+			 */
+			fl = stderr;
+		}
+		if ((logtype & L_FILELOG) && fl) {
+			fprintf(fl, 
+			    "%s %s[%d]: ", timestr(),
+			    __progname, (int)getpid());
+			vfprintf(fl, fmt, ap);
+			fprintf(fl, "\n");
+			fflush(fl);
+		}
+	}
+	return;
+}
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/autossh.host	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Example script to start up tunnel with autossh.
+#
+# This script will tunnel 2200 from the remote host
+# to 22 on the local host. On remote host do:
+#     ssh -p 2200 localhost
+#
+# $Id: autossh.host,v 1.6 2004/01/24 05:53:09 harding Exp $
+#
+
+ID=username
+HOST=hostname.your.net
+
+if [ "X$SSH_AUTH_SOCK" = "X" ]; then
+    eval `ssh-agent -s`
+    ssh-add $HOME/.ssh/id_rsa
+fi
+
+#AUTOSSH_POLL=600
+#AUTOSSH_PORT=20000
+#AUTOSSH_GATETIME=30
+#AUTOSSH_LOGFILE=$HOST.log
+#AUTOSSH_DEBUG=yes 
+#AUTOSSH_PATH=/usr/local/bin/ssh
+export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT
+
+autossh -2 -fN -M 20000 -R 2200:localhost:22 ${ID}@${HOST}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/autossh.spec	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,51 @@
+Summary:	Automatically restart SSH sessions and tunnels
+Name:		autossh
+Version:	1.4b
+Release:	1
+License:	Distributable
+Group:		Applications/Networking
+Vendor:		Carson Harding <[email protected]>
+URL:		http://www.harding.motd.ca/autossh/
+Source0:	%{name}-%{version}.tgz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+autossh is a program to start a copy of ssh and monitor it, restarting
+it as necessary should it die or stop passing traffic.
+
+%prep
+%setup -q
+
+%build
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+
+install autossh $RPM_BUILD_ROOT%{_bindir}
+install autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README CHANGES autossh.host rscreen
+%attr(755,root,root) %{_bindir}/*
+%{_mandir}/man1/*
+
+%changelog
+* Fri Mar 28 2008 Carson Harding <[email protected]>
+- update to 1.4b
+
+* Sat May 20 2006 Carson Harding <[email protected]>
+- update to 1.4 and use autoconf
+
+* Wed Feb 02 2005 Carson Harding <[email protected]>
+- very minor changes to spec file
+
+* Thu Oct 21 2004 Ron Yorston <[email protected]> 1.3-1
+- Original version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/config.h	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,233 @@
+/* config.h.  Generated by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have struct addrinfo. */
+#define HAVE_ADDRINFO 1
+
+/* Define to 1 if you have the `alarm' function. */
+#define HAVE_ALARM 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `daemon' function. */
+#define HAVE_DAEMON 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the `dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have LOG_PERROR. */
+#define HAVE_LOG_PERROR 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
+/* Define to 1 if you have the `poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the `setproctitle' function. */
+#define HAVE_SETPROCTITLE 1
+
+/* Define to 1 if you have the `socket' function. */
+#define HAVE_SOCKET 1
+
+/* Define to 1 if you have socklen_t. */
+#define HAVE_SOCKLEN_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#define HAVE_SYSLOG_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have uint16_t. */
+#define HAVE_UINT16_T 1
+
+/* Define to 1 if you have the `uname' function. */
+#define HAVE_UNAME 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have u_int16_t. */
+#define HAVE_U_INT16_T 1
+
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H */
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `vsyslog' function. */
+#define HAVE_VSYSLOG 1
+
+/* Define to 1 if `fork' works. */
+#define HAVE_WORKING_FORK 1
+
+/* Define to 1 if `vfork' works. */
+#define HAVE_WORKING_VFORK 1
+
+/* Define to 1 if you __progname is available. */
+/* #undef HAVE___PROGNAME */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "autossh"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "autossh 1.4"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "autossh"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.4"
+
+/* Set this to the path to your ssh program. */
+#define PATH_SSH "/usr/bin/ssh"
+
+/* Define to the type of arg 1 for `select'. */
+#define SELECT_TYPE_ARG1 int
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#define SELECT_TYPE_ARG234 (fd_set *)
+
+/* Define to the type of arg 5 for `select'. */
+#define SELECT_TYPE_ARG5 (struct timeval *)
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+/* #undef malloc */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to rpl_realloc if the replacement function should be used. */
+/* #undef realloc */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define as `fork' if `vfork' does not work. */
+/* #undef vfork */
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/config.h.in	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,232 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have struct addrinfo. */
+#undef HAVE_ADDRINFO
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the `daemon' function. */
+#undef HAVE_DAEMON
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the `dup2' function. */
+#undef HAVE_DUP2
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have LOG_PERROR. */
+#undef HAVE_LOG_PERROR
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H
+
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#undef HAVE_REALLOC
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `setproctitle' function. */
+#undef HAVE_SETPROCTITLE
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have socklen_t. */
+#undef HAVE_SOCKLEN_T
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have uint16_t. */
+#undef HAVE_UINT16_T
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have u_int16_t. */
+#undef HAVE_U_INT16_T
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the `vsyslog' function. */
+#undef HAVE_VSYSLOG
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you __progname is available. */
+#undef HAVE___PROGNAME
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Set this to the path to your ssh program. */
+#undef PATH_SSH
+
+/* Define to the type of arg 1 for `select'. */
+#undef SELECT_TYPE_ARG1
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#undef SELECT_TYPE_ARG234
+
+/* Define to the type of arg 5 for `select'. */
+#undef SELECT_TYPE_ARG5
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#undef realloc
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/config.log	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,1537 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by autossh configure 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ ./configure --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386-portbld-freebsd8.0
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = terran.dlink.ua
+uname -m = i386
+uname -r = 8.0-RELEASE-p2
+uname -s = FreeBSD
+uname -v = FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010     [email protected]:/usr/obj/usr/src/sys/GENERIC 
+
+/usr/bin/uname -p = i386
+/bin/uname -X     = unknown
+
+/bin/arch              = unknown
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo               = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /sbin
+PATH: /bin
+PATH: /usr/sbin
+PATH: /usr/bin
+PATH: /usr/games
+PATH: /usr/local/sbin
+PATH: /usr/local/bin
+PATH: /home/ray/bin
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:1363: checking for gcc
+configure:1389: result: cc
+configure:1633: checking for C compiler version
+configure:1636: cc --version </dev/null >&5
+cc (GCC) 4.2.1 20070719  [FreeBSD]
+Copyright (C) 2007 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:1639: $? = 0
+configure:1641: cc -v </dev/null >&5
+Using built-in specs.
+Target: i386-undermydesk-freebsd
+Configured with: FreeBSD/i386 system compiler
+Thread model: posix
+gcc version 4.2.1 20070719  [FreeBSD]
+configure:1644: $? = 0
+configure:1646: cc -V </dev/null >&5
+cc: '-V' option must have argument
+configure:1649: $? = 1
+configure:1672: checking for C compiler default output file name
+configure:1675: cc -O2 -pipe -fno-strict-aliasing   conftest.c  >&5
+configure:1678: $? = 0
+configure:1724: result: a.out
+configure:1729: checking whether the C compiler works
+configure:1735: ./a.out
+configure:1738: $? = 0
+configure:1755: result: yes
+configure:1762: checking whether we are cross compiling
+configure:1764: result: no
+configure:1767: checking for suffix of executables
+configure:1769: cc -o conftest -O2 -pipe -fno-strict-aliasing   conftest.c  >&5
+configure:1772: $? = 0
+configure:1797: result: 
+configure:1803: checking for suffix of object files
+configure:1824: cc -c -O2 -pipe -fno-strict-aliasing  conftest.c >&5
+configure:1827: $? = 0
+configure:1849: result: o
+configure:1853: checking whether we are using the GNU C compiler
+configure:1877: cc -c -O2 -pipe -fno-strict-aliasing  conftest.c >&5
+configure:1883: $? = 0
+configure:1887: test -z 
+			 || test ! -s conftest.err
+configure:1890: $? = 0
+configure:1893: test -s conftest.o
+configure:1896: $? = 0
+configure:1909: result: yes
+configure:1915: checking whether cc accepts -g
+configure:1936: cc -c -g  conftest.c >&5
+configure:1942: $? = 0
+configure:1946: test -z 
+			 || test ! -s conftest.err
+configure:1949: $? = 0
+configure:1952: test -s conftest.o
+configure:1955: $? = 0
+configure:1966: result: yes
+configure:1983: checking for cc option to accept ANSI C
+configure:2053: cc  -c -O2 -pipe -fno-strict-aliasing  conftest.c >&5
+configure:2059: $? = 0
+configure:2063: test -z 
+			 || test ! -s conftest.err
+configure:2066: $? = 0
+configure:2069: test -s conftest.o
+configure:2072: $? = 0
+configure:2090: result: none needed
+configure:2108: cc -c -O2 -pipe -fno-strict-aliasing  conftest.c >&5
+conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
+configure:2114: $? = 1
+configure: failed program was:
+| #ifndef __cplusplus
+|   choke me
+| #endif
+configure:2261: checking for ssh
+configure:2279: found /usr/bin/ssh
+configure:2291: result: /usr/bin/ssh
+configure:2322: checking how to run the C preprocessor
+configure:2440: result: cpp
+configure:2464: cpp  conftest.c
+configure:2470: $? = 0
+configure:2502: cpp  conftest.c
+conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
+configure:2508: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:2552: checking for egrep
+configure:2562: result: grep -E
+configure:2567: checking for ANSI C header files
+configure:2592: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2598: $? = 0
+configure:2602: test -z 
+			 || test ! -s conftest.err
+configure:2605: $? = 0
+configure:2608: test -s conftest.o
+configure:2611: $? = 0
+configure:2700: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c: In function 'main':
+conftest.c:27: warning: implicit declaration of function 'exit'
+conftest.c:27: warning: incompatible implicit declaration of built-in function 'exit'
+configure:2703: $? = 0
+configure:2705: ./conftest
+configure:2708: $? = 0
+configure:2723: result: yes
+configure:2733: checking for sys/wait.h that is POSIX.1 compatible
+configure:2764: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2770: $? = 0
+configure:2774: test -z 
+			 || test ! -s conftest.err
+configure:2777: $? = 0
+configure:2780: test -s conftest.o
+configure:2783: $? = 0
+configure:2794: result: yes
+configure:2818: checking for sys/types.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for sys/stat.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for stdlib.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for string.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for memory.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for strings.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for inttypes.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for stdint.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2818: checking for unistd.h
+configure:2834: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2840: $? = 0
+configure:2844: test -z 
+			 || test ! -s conftest.err
+configure:2847: $? = 0
+configure:2850: test -s conftest.o
+configure:2853: $? = 0
+configure:2864: result: yes
+configure:2893: checking arpa/inet.h usability
+configure:2905: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2911: $? = 0
+configure:2915: test -z 
+			 || test ! -s conftest.err
+configure:2918: $? = 0
+configure:2921: test -s conftest.o
+configure:2924: $? = 0
+configure:2934: result: yes
+configure:2938: checking arpa/inet.h presence
+configure:2948: cpp  conftest.c
+configure:2954: $? = 0
+configure:2974: result: yes
+configure:3009: checking for arpa/inet.h
+configure:3016: result: yes
+configure:2893: checking fcntl.h usability
+configure:2905: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2911: $? = 0
+configure:2915: test -z 
+			 || test ! -s conftest.err
+configure:2918: $? = 0
+configure:2921: test -s conftest.o
+configure:2924: $? = 0
+configure:2934: result: yes
+configure:2938: checking fcntl.h presence
+configure:2948: cpp  conftest.c
+configure:2954: $? = 0
+configure:2974: result: yes
+configure:3009: checking for fcntl.h
+configure:3016: result: yes
+configure:2893: checking limits.h usability
+configure:2905: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2911: $? = 0
+configure:2915: test -z 
+			 || test ! -s conftest.err
+configure:2918: $? = 0
+configure:2921: test -s conftest.o
+configure:2924: $? = 0
+configure:2934: result: yes
+configure:2938: checking limits.h presence
+configure:2948: cpp  conftest.c
+configure:2954: $? = 0
+configure:2974: result: yes
+configure:3009: checking for limits.h
+configure:3016: result: yes
+configure:2893: checking netdb.h usability
+configure:2905: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:2911: $? = 0
+configure:2915: test -z 
+			 || test ! -s conftest.err
+configure:2918: $? = 0
+configure:2921: test -s conftest.o
+configure:2924: $? = 0
+configure:2934: result: yes
+configure:2938: checking netdb.h presence
+configure:2948: cpp  conftest.c
+configure:2954: $? = 0
+configure:2974: result: yes
+configure:3009: checking for netdb.h
+configure:3016: result: yes
+configure:3047: checking netinet/in.h usability
+configure:3059: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3065: $? = 0
+configure:3069: test -z 
+			 || test ! -s conftest.err
+configure:3072: $? = 0
+configure:3075: test -s conftest.o
+configure:3078: $? = 0
+configure:3088: result: yes
+configure:3092: checking netinet/in.h presence
+configure:3102: cpp  conftest.c
+configure:3108: $? = 0
+configure:3128: result: yes
+configure:3163: checking for netinet/in.h
+configure:3170: result: yes
+configure:3047: checking paths.h usability
+configure:3059: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3065: $? = 0
+configure:3069: test -z 
+			 || test ! -s conftest.err
+configure:3072: $? = 0
+configure:3075: test -s conftest.o
+configure:3078: $? = 0
+configure:3088: result: yes
+configure:3092: checking paths.h presence
+configure:3102: cpp  conftest.c
+configure:3108: $? = 0
+configure:3128: result: yes
+configure:3163: checking for paths.h
+configure:3170: result: yes
+configure:3038: checking for stdlib.h
+configure:3043: result: yes
+configure:3038: checking for string.h
+configure:3043: result: yes
+configure:3047: checking sys/socket.h usability
+configure:3059: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3065: $? = 0
+configure:3069: test -z 
+			 || test ! -s conftest.err
+configure:3072: $? = 0
+configure:3075: test -s conftest.o
+configure:3078: $? = 0
+configure:3088: result: yes
+configure:3092: checking sys/socket.h presence
+configure:3102: cpp  conftest.c
+configure:3108: $? = 0
+configure:3128: result: yes
+configure:3163: checking for sys/socket.h
+configure:3170: result: yes
+configure:3199: checking sys/time.h usability
+configure:3211: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3217: $? = 0
+configure:3221: test -z 
+			 || test ! -s conftest.err
+configure:3224: $? = 0
+configure:3227: test -s conftest.o
+configure:3230: $? = 0
+configure:3240: result: yes
+configure:3244: checking sys/time.h presence
+configure:3254: cpp  conftest.c
+configure:3260: $? = 0
+configure:3280: result: yes
+configure:3315: checking for sys/time.h
+configure:3322: result: yes
+configure:3199: checking syslog.h usability
+configure:3211: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3217: $? = 0
+configure:3221: test -z 
+			 || test ! -s conftest.err
+configure:3224: $? = 0
+configure:3227: test -s conftest.o
+configure:3230: $? = 0
+configure:3240: result: yes
+configure:3244: checking syslog.h presence
+configure:3254: cpp  conftest.c
+configure:3260: $? = 0
+configure:3280: result: yes
+configure:3315: checking for syslog.h
+configure:3322: result: yes
+configure:3190: checking for unistd.h
+configure:3195: result: yes
+configure:3338: checking for an ANSI C-conforming const
+configure:3405: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:60: warning: unused variable 's'
+conftest.c:80: warning: unused variable 'foo'
+conftest.c:47: warning: unused variable 'zero'
+conftest.c:41: warning: unused variable 'x'
+conftest.c:62: warning: 't' is used uninitialized in this function
+conftest.c:77: warning: 'b' is used uninitialized in this function
+configure:3411: $? = 0
+configure:3415: test -z 
+			 || test ! -s conftest.err
+configure:3418: $? = 0
+configure:3421: test -s conftest.o
+configure:3424: $? = 0
+configure:3435: result: yes
+configure:3445: checking for inline
+configure:3466: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3472: $? = 0
+configure:3476: test -z 
+			 || test ! -s conftest.err
+configure:3479: $? = 0
+configure:3482: test -s conftest.o
+configure:3485: $? = 0
+configure:3497: result: inline
+configure:3516: checking for size_t
+configure:3540: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3546: $? = 0
+configure:3550: test -z 
+			 || test ! -s conftest.err
+configure:3553: $? = 0
+configure:3556: test -s conftest.o
+configure:3559: $? = 0
+configure:3570: result: yes
+configure:3582: checking whether time.h and sys/time.h may both be included
+configure:3607: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3613: $? = 0
+configure:3617: test -z 
+			 || test ! -s conftest.err
+configure:3620: $? = 0
+configure:3623: test -s conftest.o
+configure:3626: $? = 0
+configure:3637: result: yes
+configure:3647: checking whether struct tm is in sys/time.h or time.h
+configure:3670: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:40: warning: statement with no effect
+configure:3676: $? = 0
+configure:3680: test -z 
+			 || test ! -s conftest.err
+configure:3683: $? = 0
+configure:3686: test -s conftest.o
+configure:3689: $? = 0
+configure:3700: result: time.h
+configure:3710: checking for working volatile
+configure:3733: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:40: warning: unused variable 'y'
+conftest.c:39: warning: unused variable 'x'
+configure:3739: $? = 0
+configure:3743: test -z 
+			 || test ! -s conftest.err
+configure:3746: $? = 0
+configure:3749: test -s conftest.o
+configure:3752: $? = 0
+configure:3763: result: yes
+configure:3773: checking for socklen_t
+configure:3809: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3815: $? = 0
+configure:3819: test -z 
+			 || test ! -s conftest.err
+configure:3822: $? = 0
+configure:3825: test -s conftest.o
+configure:3828: $? = 0
+configure:3839: result: yes
+configure:3849: checking for struct addrinfo
+configure:3879: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3885: $? = 0
+configure:3889: test -z 
+			 || test ! -s conftest.err
+configure:3892: $? = 0
+configure:3895: test -s conftest.o
+configure:3898: $? = 0
+configure:3909: result: yes
+configure:3919: checking for u_int16_t
+configure:3949: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:3955: $? = 0
+configure:3959: test -z 
+			 || test ! -s conftest.err
+configure:3962: $? = 0
+configure:3965: test -s conftest.o
+configure:3968: $? = 0
+configure:3979: result: yes
+configure:3989: checking for uint16_t
+configure:4019: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:4025: $? = 0
+configure:4029: test -z 
+			 || test ! -s conftest.err
+configure:4032: $? = 0
+configure:4035: test -s conftest.o
+configure:4038: $? = 0
+configure:4049: result: yes
+configure:4059: checking whether LOG_PERROR is declared
+configure:4089: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:4095: $? = 0
+configure:4099: test -z 
+			 || test ! -s conftest.err
+configure:4102: $? = 0
+configure:4105: test -s conftest.o
+configure:4108: $? = 0
+configure:4119: result: yes
+configure:4132: checking for pid_t
+configure:4156: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:4162: $? = 0
+configure:4166: test -z 
+			 || test ! -s conftest.err
+configure:4169: $? = 0
+configure:4172: test -s conftest.o
+configure:4175: $? = 0
+configure:4186: result: yes
+configure:4204: checking for unistd.h
+configure:4209: result: yes
+configure:4213: checking vfork.h usability
+configure:4225: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+conftest.c:74:19: error: vfork.h: No such file or directory
+configure:4231: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <vfork.h>
+configure:4254: result: no
+configure:4258: checking vfork.h presence
+configure:4268: cpp  conftest.c
+conftest.c:40:19: error: vfork.h: No such file or directory
+configure:4274: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| /* end confdefs.h.  */
+| #include <vfork.h>
+configure:4294: result: no
+configure:4329: checking for vfork.h
+configure:4336: result: no
+configure:4354: checking for fork
+configure:4411: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:64: warning: conflicting types for built-in function 'fork'
+configure:4417: $? = 0
+configure:4421: test -z 
+			 || test ! -s conftest.err
+configure:4424: $? = 0
+configure:4427: test -s conftest
+configure:4430: $? = 0
+configure:4442: result: yes
+configure:4354: checking for vfork
+configure:4411: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:4417: $? = 0
+configure:4421: test -z 
+			 || test ! -s conftest.err
+configure:4424: $? = 0
+configure:4427: test -s conftest
+configure:4430: $? = 0
+configure:4442: result: yes
+configure:4453: checking for working fork
+configure:4476: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c: In function 'main':
+conftest.c:9: warning: implicit declaration of function 'fork'
+conftest.c:10: warning: implicit declaration of function 'exit'
+conftest.c:10: warning: incompatible implicit declaration of built-in function 'exit'
+configure:4479: $? = 0
+configure:4481: ./conftest
+configure:4484: $? = 0
+configure:4498: result: yes
+configure:4519: checking for working vfork
+configure:4652: result: yes
+configure:4688: checking for stdlib.h
+configure:4693: result: yes
+configure:4833: checking for GNU libc compatible malloc
+configure:4862: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:4865: $? = 0
+configure:4867: ./conftest
+configure:4870: $? = 0
+configure:4884: result: yes
+configure:4919: checking for stdlib.h
+configure:4924: result: yes
+configure:5064: checking for GNU libc compatible realloc
+configure:5093: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5096: $? = 0
+configure:5098: ./conftest
+configure:5101: $? = 0
+configure:5115: result: yes
+configure:5160: checking sys/select.h usability
+configure:5172: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:5178: $? = 0
+configure:5182: test -z 
+			 || test ! -s conftest.err
+configure:5185: $? = 0
+configure:5188: test -s conftest.o
+configure:5191: $? = 0
+configure:5201: result: yes
+configure:5205: checking sys/select.h presence
+configure:5215: cpp  conftest.c
+configure:5221: $? = 0
+configure:5241: result: yes
+configure:5276: checking for sys/select.h
+configure:5283: result: yes
+configure:5151: checking for sys/socket.h
+configure:5156: result: yes
+configure:5296: checking types of arguments for select
+configure:5329: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+configure:5335: $? = 0
+configure:5339: test -z 
+			 || test ! -s conftest.err
+configure:5342: $? = 0
+configure:5345: test -s conftest.o
+configure:5348: $? = 0
+configure:5364: result: int,fd_set *,struct timeval *
+configure:5391: checking for strftime
+configure:5448: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:77: warning: conflicting types for built-in function 'strftime'
+configure:5454: $? = 0
+configure:5458: test -z 
+			 || test ! -s conftest.err
+configure:5461: $? = 0
+configure:5464: test -s conftest
+configure:5467: $? = 0
+configure:5479: result: yes
+configure:5567: checking for vprintf
+configure:5624: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:78: warning: conflicting types for built-in function 'vprintf'
+configure:5630: $? = 0
+configure:5634: test -z 
+			 || test ! -s conftest.err
+configure:5637: $? = 0
+configure:5640: test -s conftest
+configure:5643: $? = 0
+configure:5655: result: yes
+configure:5662: checking for _doprnt
+configure:5719: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+/var/tmp//ccexW61F.o(.text+0x17): In function `main':
+: undefined reference to `_doprnt'
+/var/tmp//ccexW61F.o(.data+0x0): undefined reference to `_doprnt'
+configure:5725: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_FORK 1
+| #define HAVE_VFORK 1
+| #define HAVE_WORKING_VFORK 1
+| #define HAVE_WORKING_FORK 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_STRFTIME 1
+| #define HAVE_VPRINTF 1
+| /* end confdefs.h.  */
+| /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define _doprnt innocuous__doprnt
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char _doprnt (); below.
+|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+|     <limits.h> exists even on freestanding compilers.  */
+| 
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+| 
+| #undef _doprnt
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| {
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char _doprnt ();
+| /* The GNU C library defines this for functions which it implements
+|     to always fail with ENOSYS.  Some functions are actually named
+|     something starting with __ and the normal name is an alias.  */
+| #if defined (__stub__doprnt) || defined (__stub____doprnt)
+| choke me
+| #else
+| char (*f) () = _doprnt;
+| #endif
+| #ifdef __cplusplus
+| }
+| #endif
+| 
+| int
+| main ()
+| {
+| return f != _doprnt;
+|   ;
+|   return 0;
+| }
+configure:5750: result: no
+configure:5773: checking for alarm
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5773: checking for daemon
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5773: checking for dup2
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5773: checking for gethostbyname
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5773: checking for gettimeofday
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5773: checking for memmove
+configure:5830: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:84: warning: conflicting types for built-in function 'memmove'
+configure:5836: $? = 0
+configure:5840: test -z 
+			 || test ! -s conftest.err
+configure:5843: $? = 0
+configure:5846: test -s conftest
+configure:5849: $? = 0
+configure:5861: result: yes
+configure:5881: checking for memset
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:85: warning: conflicting types for built-in function 'memset'
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for poll
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for select
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for setproctitle
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for socket
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for strchr
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:90: warning: conflicting types for built-in function 'strchr'
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5881: checking for strerror
+configure:5938: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:5944: $? = 0
+configure:5948: test -z 
+			 || test ! -s conftest.err
+configure:5951: $? = 0
+configure:5954: test -s conftest
+configure:5957: $? = 0
+configure:5969: result: yes
+configure:5986: checking for strncasecmp
+configure:6043: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+conftest.c:92: warning: conflicting types for built-in function 'strncasecmp'
+configure:6049: $? = 0
+configure:6053: test -z 
+			 || test ! -s conftest.err
+configure:6056: $? = 0
+configure:6059: test -s conftest
+configure:6062: $? = 0
+configure:6074: result: yes
+configure:5986: checking for strtoul
+configure:6043: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:6049: $? = 0
+configure:6053: test -z 
+			 || test ! -s conftest.err
+configure:6056: $? = 0
+configure:6059: test -s conftest
+configure:6062: $? = 0
+configure:6074: result: yes
+configure:5986: checking for uname
+configure:6043: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:6049: $? = 0
+configure:6053: test -z 
+			 || test ! -s conftest.err
+configure:6056: $? = 0
+configure:6059: test -s conftest
+configure:6062: $? = 0
+configure:6074: result: yes
+configure:5986: checking for vsyslog
+configure:6043: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c  >&5
+configure:6049: $? = 0
+configure:6053: test -z 
+			 || test ! -s conftest.err
+configure:6056: $? = 0
+configure:6059: test -s conftest
+configure:6062: $? = 0
+configure:6074: result: yes
+configure:6086: checking for gethostbyname in -lnsl
+configure:6116: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c -lnsl   >&5
+/usr/bin/ld: cannot find -lnsl
+configure:6122: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_FORK 1
+| #define HAVE_VFORK 1
+| #define HAVE_WORKING_VFORK 1
+| #define HAVE_WORKING_FORK 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_STRFTIME 1
+| #define HAVE_VPRINTF 1
+| #define HAVE_ALARM 1
+| #define HAVE_DAEMON 1
+| #define HAVE_DUP2 1
+| #define HAVE_GETHOSTBYNAME 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_POLL 1
+| #define HAVE_SELECT 1
+| #define HAVE_SETPROCTITLE 1
+| #define HAVE_SOCKET 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRNCASECMP 1
+| #define HAVE_STRTOUL 1
+| #define HAVE_UNAME 1
+| #define HAVE_VSYSLOG 1
+| /* end confdefs.h.  */
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char gethostbyname ();
+| int
+| main ()
+| {
+| gethostbyname ();
+|   ;
+|   return 0;
+| }
+configure:6148: result: no
+configure:6160: checking for connect in -lsocket
+configure:6190: cc -o conftest -O2 -pipe -fno-strict-aliasing -Wall   conftest.c -lsocket   >&5
+/usr/bin/ld: cannot find -lsocket
+configure:6196: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_FORK 1
+| #define HAVE_VFORK 1
+| #define HAVE_WORKING_VFORK 1
+| #define HAVE_WORKING_FORK 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_STRFTIME 1
+| #define HAVE_VPRINTF 1
+| #define HAVE_ALARM 1
+| #define HAVE_DAEMON 1
+| #define HAVE_DUP2 1
+| #define HAVE_GETHOSTBYNAME 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_POLL 1
+| #define HAVE_SELECT 1
+| #define HAVE_SETPROCTITLE 1
+| #define HAVE_SOCKET 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRNCASECMP 1
+| #define HAVE_STRTOUL 1
+| #define HAVE_UNAME 1
+| #define HAVE_VSYSLOG 1
+| /* end confdefs.h.  */
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char connect ();
+| int
+| main ()
+| {
+| connect ();
+|   ;
+|   return 0;
+| }
+configure:6222: result: no
+configure:6235: checking whether __progname is declared
+configure:6259: cc -c -O2 -pipe -fno-strict-aliasing -Wall  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:110: error: '__progname' undeclared (first use in this function)
+conftest.c:110: error: (Each undeclared identifier is reported only once
+conftest.c:110: error: for each function it appears in.)
+conftest.c:110: warning: unused variable 'p'
+configure:6265: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME "autossh"
+| #define PACKAGE_TARNAME "autossh"
+| #define PACKAGE_VERSION "1.4"
+| #define PACKAGE_STRING "autossh 1.4"
+| #define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+| #define PATH_SSH "/usr/bin/ssh"
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_ARPA_INET_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_NETDB_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_PATHS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_UNISTD_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_SOCKLEN_T 1
+| #define HAVE_ADDRINFO 1
+| #define HAVE_U_INT16_T 1
+| #define HAVE_UINT16_T 1
+| #define HAVE_LOG_PERROR 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_FORK 1
+| #define HAVE_VFORK 1
+| #define HAVE_WORKING_VFORK 1
+| #define HAVE_WORKING_FORK 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_STRFTIME 1
+| #define HAVE_VPRINTF 1
+| #define HAVE_ALARM 1
+| #define HAVE_DAEMON 1
+| #define HAVE_DUP2 1
+| #define HAVE_GETHOSTBYNAME 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_POLL 1
+| #define HAVE_SELECT 1
+| #define HAVE_SETPROCTITLE 1
+| #define HAVE_SOCKET 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRNCASECMP 1
+| #define HAVE_STRTOUL 1
+| #define HAVE_UNAME 1
+| #define HAVE_VSYSLOG 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| int
+| main ()
+| {
+| #ifndef __progname
+|   char *p = (char *) __progname;
+| #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:6289: result: no
+configure:6395: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by autossh config.status 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  $ ./config.status 
+
+on terran.dlink.ua
+
+config.status:643: creating Makefile
+config.status:746: creating config.h
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_c_compiler_gnu=yes
+ac_cv_c_const=yes
+ac_cv_c_inline=inline
+ac_cv_c_volatile=yes
+ac_cv_env_CC_set=set
+ac_cv_env_CC_value=cc
+ac_cv_env_CFLAGS_set=set
+ac_cv_env_CFLAGS_value='-O2 -pipe -fno-strict-aliasing'
+ac_cv_env_CPPFLAGS_set=''
+ac_cv_env_CPPFLAGS_value=''
+ac_cv_env_CPP_set=set
+ac_cv_env_CPP_value=cpp
+ac_cv_env_LDFLAGS_set=''
+ac_cv_env_LDFLAGS_value=''
+ac_cv_env_build_alias_set=set
+ac_cv_env_build_alias_value=i386-portbld-freebsd8.0
+ac_cv_env_host_alias_set=''
+ac_cv_env_host_alias_value=''
+ac_cv_env_target_alias_set=''
+ac_cv_env_target_alias_value=''
+ac_cv_exeext=''
+ac_cv_func__doprnt=no
+ac_cv_func_alarm=yes
+ac_cv_func_daemon=yes
+ac_cv_func_dup2=yes
+ac_cv_func_fork=yes
+ac_cv_func_fork_works=yes
+ac_cv_func_gethostbyname=yes
+ac_cv_func_gettimeofday=yes
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_memmove=yes
+ac_cv_func_memset=yes
+ac_cv_func_poll=yes
+ac_cv_func_realloc_0_nonnull=yes
+ac_cv_func_select=yes
+ac_cv_func_select_args='int,fd_set *,struct timeval *'
+ac_cv_func_setproctitle=yes
+ac_cv_func_socket=yes
+ac_cv_func_strchr=yes
+ac_cv_func_strerror=yes
+ac_cv_func_strftime=yes
+ac_cv_func_strncasecmp=yes
+ac_cv_func_strtoul=yes
+ac_cv_func_uname=yes
+ac_cv_func_vfork=yes
+ac_cv_func_vfork_works=yes
+ac_cv_func_vprintf=yes
+ac_cv_func_vsyslog=yes
+ac_cv_have_decl_LOG_PERROR=yes
+ac_cv_have_decl___progname=no
+ac_cv_header_arpa_inet_h=yes
+ac_cv_header_fcntl_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_limits_h=yes
+ac_cv_header_memory_h=yes
+ac_cv_header_netdb_h=yes
+ac_cv_header_netinet_in_h=yes
+ac_cv_header_paths_h=yes
+ac_cv_header_stdc=yes
+ac_cv_header_stdint_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_strings_h=yes
+ac_cv_header_sys_select_h=yes
+ac_cv_header_sys_socket_h=yes
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_time_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_header_sys_wait_h=yes
+ac_cv_header_syslog_h=yes
+ac_cv_header_time=yes
+ac_cv_header_unistd_h=yes
+ac_cv_header_vfork_h=no
+ac_cv_lib_nsl_gethostbyname=no
+ac_cv_lib_socket_connect=no
+ac_cv_objext=o
+ac_cv_path_ssh=/usr/bin/ssh
+ac_cv_prog_CPP=cpp
+ac_cv_prog_ac_ct_CC=cc
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_stdc=''
+ac_cv_prog_egrep='grep -E'
+ac_cv_struct_tm=time.h
+ac_cv_type_pid_t=yes
+ac_cv_type_size_t=yes
+ac_cv_type_socklen_t=yes
+ac_cv_type_struct_addrinfo=yes
+ac_cv_type_u_int16_t=yes
+ac_cv_type_uint16_t=yes
+lt_cv_sys_max_cmd_len=262144
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+CC='cc'
+CFLAGS='-O2 -pipe -fno-strict-aliasing -Wall'
+CPP='cpp'
+CPPFLAGS=''
+DEFS='-DHAVE_CONFIG_H'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP='grep -E'
+EXEEXT=''
+LDFLAGS=''
+LIBOBJS=''
+LIBS=''
+LTLIBOBJS=''
+OBJEXT='o'
+PACKAGE_BUGREPORT='Carson Harding <[email protected]>'
+PACKAGE_NAME='autossh'
+PACKAGE_STRING='autossh 1.4'
+PACKAGE_TARNAME='autossh'
+PACKAGE_VERSION='1.4'
+PATH_SEPARATOR=':'
+SHELL='/bin/sh'
+ac_ct_CC='cc'
+bindir='${exec_prefix}/bin'
+build_alias='i386-portbld-freebsd8.0'
+datadir='${prefix}/share'
+exec_prefix='${prefix}'
+host_alias=''
+includedir='${prefix}/include'
+infodir='/usr/local/info/'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='${prefix}/var'
+mandir='/usr/local/man'
+oldincludedir='/usr/include'
+path_ssh='/usr/bin/ssh'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+ssh='/usr/bin/ssh'
+sysconfdir='${prefix}/etc'
+target_alias=''
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define HAVE_ADDRINFO 1
+#define HAVE_ALARM 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_DAEMON 1
+#define HAVE_DUP2 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FORK 1
+#define HAVE_GETHOSTBYNAME 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOG_PERROR 1
+#define HAVE_MALLOC 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMORY_H 1
+#define HAVE_MEMSET 1
+#define HAVE_NETDB_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_PATHS_H 1
+#define HAVE_POLL 1
+#define HAVE_REALLOC 1
+#define HAVE_SELECT 1
+#define HAVE_SETPROCTITLE 1
+#define HAVE_SOCKET 1
+#define HAVE_SOCKLEN_T 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRCHR 1
+#define HAVE_STRERROR 1
+#define HAVE_STRFTIME 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_STRTOUL 1
+#define HAVE_SYSLOG_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_UINT16_T 1
+#define HAVE_UNAME 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_U_INT16_T 1
+#define HAVE_VFORK 1
+#define HAVE_VPRINTF 1
+#define HAVE_VSYSLOG 1
+#define HAVE_WORKING_FORK 1
+#define HAVE_WORKING_VFORK 1
+#define PACKAGE_BUGREPORT "Carson Harding <[email protected]>"
+#define PACKAGE_NAME "autossh"
+#define PACKAGE_STRING "autossh 1.4"
+#define PACKAGE_TARNAME "autossh"
+#define PACKAGE_VERSION "1.4"
+#define PATH_SSH "/usr/bin/ssh"
+#define SELECT_TYPE_ARG1 int
+#define SELECT_TYPE_ARG234 (fd_set *)
+#define SELECT_TYPE_ARG5 (struct timeval *)
+#define STDC_HEADERS 1
+#define TIME_WITH_SYS_TIME 1
+
+configure: exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/config.status	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,1021 @@
+#! /bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=${CONFIG_SHELL-/bin/sh}
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"[email protected]"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by autossh $as_me 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 [email protected]
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+config_files=" Makefile"
+config_headers=" config.h"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <[email protected]>."
+ac_cs_version="\
+autossh config.status 1.4
+configured by ./configure, generated by GNU Autoconf 2.59,
+  with options \"'--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'CPP=cpp' 'build_alias=i386-portbld-freebsd8.0'\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=.
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+  echo "running /bin/sh ./configure " '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'CPP=cpp' 'build_alias=i386-portbld-freebsd8.0' $ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec /bin/sh ./configure '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'CPP=cpp' 'build_alias=i386-portbld-freebsd8.0' $ac_configure_extra_args --no-create --no-recursion
+fi
+
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@[email protected],/bin/sh,;t t
+s,@[email protected],:,;t t
+s,@[email protected],autossh,;t t
+s,@[email protected],autossh,;t t
+s,@[email protected],1.4,;t t
+s,@[email protected],autossh 1.4,;t t
+s,@[email protected],Carson Harding <[email protected]>,;t t
+s,@[email protected],${prefix},;t t
+s,@[email protected],/usr/local,;t t
+s,@[email protected],s,x,x,,;t t
+s,@[email protected],${exec_prefix}/bin,;t t
+s,@[email protected],${exec_prefix}/sbin,;t t
+s,@[email protected],${exec_prefix}/libexec,;t t
+s,@[email protected],${prefix}/share,;t t
+s,@[email protected],${prefix}/etc,;t t
+s,@[email protected],${prefix}/com,;t t
+s,@[email protected],${prefix}/var,;t t
+s,@[email protected],${exec_prefix}/lib,;t t
+s,@[email protected],${prefix}/include,;t t
+s,@[email protected],/usr/include,;t t
+s,@[email protected],/usr/local/info/,;t t
+s,@[email protected],/usr/local/man,;t t
+s,@[email protected],i386-portbld-freebsd8.0,;t t
+s,@[email protected],,;t t
+s,@[email protected],,;t t
+s,@[email protected],-DHAVE_CONFIG_H,;t t
+s,@[email protected],,;t t
+s,@[email protected],-n,;t t
+s,@[email protected],,;t t
+s,@[email protected],,;t t
+s,@[email protected],cc,;t t
+s,@[email protected],-O2 -pipe -fno-strict-aliasing -Wall,;t t
+s,@[email protected],,;t t
+s,@[email protected],,;t t
+s,@[email protected],cc,;t t
+s,@[email protected],,;t t
+s,@[email protected],o,;t t
+s,@[email protected],/usr/bin/ssh,;t t
+s,@[email protected],/usr/bin/ssh,;t t
+s,@[email protected],cpp,;t t
+s,@[email protected],grep -E,;t t
+s,@[email protected],,;t t
+s,@[email protected],,;t t
+CEOF
+
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @[email protected], @[email protected], and @[email protected] for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  sed "/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@[email protected]:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@[email protected],$configure_input,;t t
+s,@[email protected],$ac_srcdir,;t t
+s,@[email protected],$ac_abs_srcdir,;t t
+s,@[email protected],$ac_top_srcdir,;t t
+s,@[email protected],$ac_abs_top_srcdir,;t t
+s,@[email protected],$ac_builddir,;t t
+s,@[email protected],$ac_abs_builddir,;t t
+s,@[email protected],$ac_top_builddir,;t t
+s,@[email protected],$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+  # Handle all the #define templates only if necessary.
+  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then
+  # If there are no defines, we may have an empty if/fi
+  :
+  cat >$tmp/defines.sed <<CEOF
+/^[	 ]*#[	 ]*define/!b
+t clr
+: clr
+${ac_dA}PACKAGE_NAME${ac_dB}PACKAGE_NAME${ac_dC}"autossh"${ac_dD}
+${ac_dA}PACKAGE_TARNAME${ac_dB}PACKAGE_TARNAME${ac_dC}"autossh"${ac_dD}
+${ac_dA}PACKAGE_VERSION${ac_dB}PACKAGE_VERSION${ac_dC}"1.4"${ac_dD}
+${ac_dA}PACKAGE_STRING${ac_dB}PACKAGE_STRING${ac_dC}"autossh 1.4"${ac_dD}
+${ac_dA}PACKAGE_BUGREPORT${ac_dB}PACKAGE_BUGREPORT${ac_dC}"Carson Harding <[email protected]>"${ac_dD}
+${ac_dA}PATH_SSH${ac_dB}PATH_SSH${ac_dC}"/usr/bin/ssh"${ac_dD}
+${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_WAIT_H${ac_dB}HAVE_SYS_WAIT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_STAT_H${ac_dB}HAVE_SYS_STAT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ARPA_INET_H${ac_dB}HAVE_ARPA_INET_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LIMITS_H${ac_dB}HAVE_LIMITS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_NETDB_H${ac_dB}HAVE_NETDB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_NETINET_IN_H${ac_dB}HAVE_NETINET_IN_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_PATHS_H${ac_dB}HAVE_PATHS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SOCKET_H${ac_dB}HAVE_SYS_SOCKET_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TIME_H${ac_dB}HAVE_SYS_TIME_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYSLOG_H${ac_dB}HAVE_SYSLOG_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}TIME_WITH_SYS_TIME${ac_dB}TIME_WITH_SYS_TIME${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SOCKLEN_T${ac_dB}HAVE_SOCKLEN_T${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ADDRINFO${ac_dB}HAVE_ADDRINFO${ac_dC}1${ac_dD}
+${ac_dA}HAVE_U_INT16_T${ac_dB}HAVE_U_INT16_T${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UINT16_T${ac_dB}HAVE_UINT16_T${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LOG_PERROR${ac_dB}HAVE_LOG_PERROR${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_FORK${ac_dB}HAVE_FORK${ac_dC}1${ac_dD}
+${ac_dA}HAVE_VFORK${ac_dB}HAVE_VFORK${ac_dC}1${ac_dD}
+CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  cat >$tmp/defines.sed <<CEOF
+/^[	 ]*#[	 ]*define/!b
+t clr
+: clr
+${ac_dA}HAVE_WORKING_VFORK${ac_dB}HAVE_WORKING_VFORK${ac_dC}1${ac_dD}
+${ac_dA}HAVE_WORKING_FORK${ac_dB}HAVE_WORKING_FORK${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MALLOC${ac_dB}HAVE_MALLOC${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_REALLOC${ac_dB}HAVE_REALLOC${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SELECT_H${ac_dB}HAVE_SYS_SELECT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SOCKET_H${ac_dB}HAVE_SYS_SOCKET_H${ac_dC}1${ac_dD}
+${ac_dA}SELECT_TYPE_ARG1${ac_dB}SELECT_TYPE_ARG1${ac_dC}int${ac_dD}
+${ac_dA}SELECT_TYPE_ARG234${ac_dB}SELECT_TYPE_ARG234${ac_dC}(fd_set *)${ac_dD}
+${ac_dA}SELECT_TYPE_ARG5${ac_dB}SELECT_TYPE_ARG5${ac_dC}(struct timeval *)${ac_dD}
+${ac_dA}HAVE_STRFTIME${ac_dB}HAVE_STRFTIME${ac_dC}1${ac_dD}
+${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD}
+${ac_dA}HAVE_ALARM${ac_dB}HAVE_ALARM${ac_dC}1${ac_dD}
+${ac_dA}HAVE_DAEMON${ac_dB}HAVE_DAEMON${ac_dC}1${ac_dD}
+${ac_dA}HAVE_DUP2${ac_dB}HAVE_DUP2${ac_dC}1${ac_dD}
+${ac_dA}HAVE_GETHOSTBYNAME${ac_dB}HAVE_GETHOSTBYNAME${ac_dC}1${ac_dD}
+${ac_dA}HAVE_GETTIMEOFDAY${ac_dB}HAVE_GETTIMEOFDAY${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMMOVE${ac_dB}HAVE_MEMMOVE${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMSET${ac_dB}HAVE_MEMSET${ac_dC}1${ac_dD}
+${ac_dA}HAVE_POLL${ac_dB}HAVE_POLL${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SELECT${ac_dB}HAVE_SELECT${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SETPROCTITLE${ac_dB}HAVE_SETPROCTITLE${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SOCKET${ac_dB}HAVE_SOCKET${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRCHR${ac_dB}HAVE_STRCHR${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRERROR${ac_dB}HAVE_STRERROR${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRNCASECMP${ac_dB}HAVE_STRNCASECMP${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRTOUL${ac_dB}HAVE_STRTOUL${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNAME${ac_dB}HAVE_UNAME${ac_dC}1${ac_dD}
+${ac_dA}HAVE_VSYSLOG${ac_dB}HAVE_VSYSLOG${ac_dC}1${ac_dD}
+CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  fi # grep
+
+  # Handle all the #undef templates
+  cat >$tmp/undefs.sed <<CEOF
+/^[	 ]*#[	 ]*undef/!b
+t clr
+: clr
+${ac_uA}PACKAGE_NAME${ac_uB}PACKAGE_NAME${ac_uC}"autossh"${ac_uD}
+${ac_uA}PACKAGE_TARNAME${ac_uB}PACKAGE_TARNAME${ac_uC}"autossh"${ac_uD}
+${ac_uA}PACKAGE_VERSION${ac_uB}PACKAGE_VERSION${ac_uC}"1.4"${ac_uD}
+${ac_uA}PACKAGE_STRING${ac_uB}PACKAGE_STRING${ac_uC}"autossh 1.4"${ac_uD}
+${ac_uA}PACKAGE_BUGREPORT${ac_uB}PACKAGE_BUGREPORT${ac_uC}"Carson Harding <[email protected]>"${ac_uD}
+${ac_uA}PATH_SSH${ac_uB}PATH_SSH${ac_uC}"/usr/bin/ssh"${ac_uD}
+${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_WAIT_H${ac_uB}HAVE_SYS_WAIT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_STAT_H${ac_uB}HAVE_SYS_STAT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ARPA_INET_H${ac_uB}HAVE_ARPA_INET_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LIMITS_H${ac_uB}HAVE_LIMITS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_NETDB_H${ac_uB}HAVE_NETDB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_NETINET_IN_H${ac_uB}HAVE_NETINET_IN_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_PATHS_H${ac_uB}HAVE_PATHS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SOCKET_H${ac_uB}HAVE_SYS_SOCKET_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TIME_H${ac_uB}HAVE_SYS_TIME_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYSLOG_H${ac_uB}HAVE_SYSLOG_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}TIME_WITH_SYS_TIME${ac_uB}TIME_WITH_SYS_TIME${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SOCKLEN_T${ac_uB}HAVE_SOCKLEN_T${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ADDRINFO${ac_uB}HAVE_ADDRINFO${ac_uC}1${ac_uD}
+${ac_uA}HAVE_U_INT16_T${ac_uB}HAVE_U_INT16_T${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UINT16_T${ac_uB}HAVE_UINT16_T${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LOG_PERROR${ac_uB}HAVE_LOG_PERROR${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_FORK${ac_uB}HAVE_FORK${ac_uC}1${ac_uD}
+${ac_uA}HAVE_VFORK${ac_uB}HAVE_VFORK${ac_uC}1${ac_uD}
+CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  cat >$tmp/undefs.sed <<CEOF
+/^[	 ]*#[	 ]*undef/!b
+t clr
+: clr
+${ac_uA}HAVE_WORKING_VFORK${ac_uB}HAVE_WORKING_VFORK${ac_uC}1${ac_uD}
+${ac_uA}HAVE_WORKING_FORK${ac_uB}HAVE_WORKING_FORK${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MALLOC${ac_uB}HAVE_MALLOC${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_REALLOC${ac_uB}HAVE_REALLOC${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SELECT_H${ac_uB}HAVE_SYS_SELECT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SOCKET_H${ac_uB}HAVE_SYS_SOCKET_H${ac_uC}1${ac_uD}
+${ac_uA}SELECT_TYPE_ARG1${ac_uB}SELECT_TYPE_ARG1${ac_uC}int${ac_uD}
+${ac_uA}SELECT_TYPE_ARG234${ac_uB}SELECT_TYPE_ARG234${ac_uC}(fd_set *)${ac_uD}
+${ac_uA}SELECT_TYPE_ARG5${ac_uB}SELECT_TYPE_ARG5${ac_uC}(struct timeval *)${ac_uD}
+${ac_uA}HAVE_STRFTIME${ac_uB}HAVE_STRFTIME${ac_uC}1${ac_uD}
+${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD}
+${ac_uA}HAVE_ALARM${ac_uB}HAVE_ALARM${ac_uC}1${ac_uD}
+${ac_uA}HAVE_DAEMON${ac_uB}HAVE_DAEMON${ac_uC}1${ac_uD}
+${ac_uA}HAVE_DUP2${ac_uB}HAVE_DUP2${ac_uC}1${ac_uD}
+${ac_uA}HAVE_GETHOSTBYNAME${ac_uB}HAVE_GETHOSTBYNAME${ac_uC}1${ac_uD}
+${ac_uA}HAVE_GETTIMEOFDAY${ac_uB}HAVE_GETTIMEOFDAY${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMMOVE${ac_uB}HAVE_MEMMOVE${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMSET${ac_uB}HAVE_MEMSET${ac_uC}1${ac_uD}
+${ac_uA}HAVE_POLL${ac_uB}HAVE_POLL${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SELECT${ac_uB}HAVE_SELECT${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SETPROCTITLE${ac_uB}HAVE_SETPROCTITLE${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SOCKET${ac_uB}HAVE_SOCKET${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRCHR${ac_uB}HAVE_STRCHR${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRNCASECMP${ac_uB}HAVE_STRNCASECMP${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRTOUL${ac_uB}HAVE_STRTOUL${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNAME${ac_uB}HAVE_UNAME${ac_uC}1${ac_uD}
+${ac_uA}HAVE_VSYSLOG${ac_uB}HAVE_VSYSLOG${ac_uC}1${ac_uD}
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+
+{ (exit 0); exit 0; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/autossh/configure	Sat Sep 17 14:35:37 2011 +0300
@@ -0,0 +1,7408 @@
+#! /bin/sh
+# From configure.ac Revision.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for autossh 1.4.
+#
+# Report bugs to <Carson Harding <[email protected]>>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"[email protected]"}'='"[email protected]"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"[email protected]"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='autossh'
+PACKAGE_TARNAME='autossh'
+PACKAGE_VERSION='1.4'
+PACKAGE_STRING='autossh 1.4'
+PACKAGE_BUGREPORT='Carson Harding <[email protected]>'
+
+ac_unique_file="daemon.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ssh path_ssh CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures autossh 1.4 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of autossh 1.4:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-ssh=ARG       specify path to ssh executable
+
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <Carson Harding <[email protected]>>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+autossh configure 1.4
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by autossh $as_me 1.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 [email protected]
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+          ac_config_files="$ac_config_files Makefile"
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}[email protected]"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Add -Wall for gcc
+if test "$ac_compiler_gnu" = "yes"; then
+	CFLAGS="$CFLAGS -Wall"
+fi
+
+
+# Check whether --with-ssh or --without-ssh was given.
+if test "${with_ssh+set}" = set; then
+  withval="$with_ssh"
+
+fi;
+if test -z "$ac_cv_path_ssh"; then
+	# Extract the first word of "ssh", so it can be a program name with args.
+set dummy ssh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ssh+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ssh in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ssh="$ssh" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ssh="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ssh=$ac_cv_path_ssh
+
+if test -n "$ssh"; then
+  echo "$as_me:$LINENO: result: $ssh" >&5
+echo "${ECHO_T}$ssh" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -n "$ac_cv_path_ssh"; then
+
+cat >>confdefs.h <<_ACEOF
+#define PATH_SSH "$ac_cv_path_ssh"
+_ACEOF
+
+else
+	{ { echo "$as_me:$LINENO: error: ssh program not found! Modify PATH, or use --with-ssh." >&5
+echo "$as_me: error: ssh program not found! Modify PATH, or use --with-ssh." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+path_ssh="$ac_cv_path_ssh"
+
+
+# Checks for libraries.
+
+# Checks for header files.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in arpa/inet.h fcntl.h limits.h netdb.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to Carson Harding <[email protected]> ##
+## ----------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in netinet/in.h paths.h stdlib.h string.h sys/socket.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to Carson Harding <[email protected]> ##
+## ----------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+for ac_header in sys/time.h syslog.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to Carson Harding <[email protected]> ##
+## ----------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_size_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_time=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_struct_tm=time.h
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
+if test "${ac_cv_c_volatile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_volatile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_volatile=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+echo "${ECHO_T}$ac_cv_c_volatile" >&6
+if test $ac_cv_c_volatile = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define volatile
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
+if test "${ac_cv_type_socklen_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#  include <arpa/inet.h>
+#endif
+
+
+
+int
+main ()
+{
+if ((socklen_t *) 0)
+  return 0;
+if (sizeof (socklen_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_socklen_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_socklen_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
+if test $ac_cv_type_socklen_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKLEN_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct addrinfo" >&5
+echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
+if test "${ac_cv_type_struct_addrinfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_NETDB_H
+#  include <netdb.h>
+#endif
+
+
+
+int
+main ()
+{
+if ((struct addrinfo *) 0)
+  return 0;
+if (sizeof (struct addrinfo))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_struct_addrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_struct_addrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
+echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
+if test $ac_cv_type_struct_addrinfo = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ADDRINFO 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for u_int16_t" >&5
+echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int16_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+
+
+
+int
+main ()
+{
+if ((u_int16_t *) 0)
+  return 0;
+if (sizeof (u_int16_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_u_int16_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int16_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6
+if test $ac_cv_type_u_int16_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_U_INT16_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for uint16_t" >&5
+echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6
+if test "${ac_cv_type_uint16_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+
+
+
+int
+main ()
+{
+if ((uint16_t *) 0)
+  return 0;
+if (sizeof (uint16_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_uint16_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uint16_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint16_t" >&6
+if test $ac_cv_type_uint16_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINT16_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether LOG_PERROR is declared" >&5
+echo $ECHO_N "checking whether LOG_PERROR is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_LOG_PERROR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef HAVE_SYSLOG_H
+#  include <syslog.h>
+#endif
+
+
+
+int
+main ()
+{
+#ifndef LOG_PERROR
+  char *p = (char *) LOG_PERROR;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_LOG_PERROR=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_LOG_PERROR=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_LOG_PERROR" >&5
+echo "${ECHO_T}$ac_cv_have_decl_LOG_PERROR" >&6
+if test $ac_cv_have_decl_LOG_PERROR = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOG_PERROR 1
+_ACEOF
+
+fi
+
+
+
+# Checks for library functions.
+echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+  return 0;
+if (sizeof (pid_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_pid_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_pid_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+
+
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to Carson Harding <[email protected]> ##
+## ----------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_func in fork vfork
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+  echo "$as_me:$LINENO: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_fork_works=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* By Ruediger Kuhlmann. */
+      #include <sys/types.h>
+      #if HAVE_UNISTD_H
+      # include <unistd.h>
+      #endif
+      /* Some systems only have a dummy stub for fork() */
+      int main ()
+      {
+	if (fork() < 0)
+	  exit (1);
+	exit (0);
+      }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fork_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fork_works=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+else
+  ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)<