- Added autoconf option to enable Kerberos 4 support (untested)
 - Added autoconf option to enable AFS support (untested)
 - Added autoconf option to enable S/Key support (untested)
 - Added autoconf option to enable TCP wrappers support (compiles OK)
diff --git a/ChangeLog b/ChangeLog
index 657842b..6b02ba1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,5 @@
 19991119
  - Merged PAM buffer overrun patch from Chip Salzenberg <chip@valinux.com>
-   (off-by-one error - doesn't appear to be easily exploitable)
  - Merged OpenBSD CVS changes
    - [auth-rhosts.c auth-rsa.c ssh-agent.c sshconnect.c sshd.c]
      more %d vs. %s in fmt-strings
@@ -11,6 +10,10 @@
  - Fix scp progress bar bug again.
  - Move scp from ${libdir}/ssh to ${libexecdir}/ssh at request of 
    David Rankin <drankin@bohemians.lexington.ky.us>
+ - Added autoconf option to enable Kerberos 4 support (untested)
+ - Added autoconf option to enable AFS support (untested)
+ - Added autoconf option to enable S/Key support (untested)
+ - Added autoconf option to enable TCP wrappers support (compiles OK)
 
 19991118
  - Merged OpenBSD CVS changes
diff --git a/Makefile.in b/Makefile.in
index 73c4db7..4daa810 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,10 +22,10 @@
 GNOME_LIBS=`gnome-config --libs gnome gnomeui`
 
 OBJS=	authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
-		auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \
-		clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \
-		log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \
-		readconf.o readpass.o rsa.o servconf.o serverloop.o \
+		auth-rsa.o auth-skey.o bufaux.o buffer.o canohost.o channels.o \
+		cipher.o clientloop.o compress.o crc32.o deattack.o helper.o \
+		hostfile.o log-client.o login.o log-server.o match.o mpaux.o \
+		packet.o pty.o readconf.o readpass.o rsa.o servconf.o serverloop.o \
 		sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
 		helper.o mktemp.o strlcpy.o rc4.o
 
diff --git a/acconfig.h b/acconfig.h
index 05296f9..44c5c1a 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -30,6 +30,18 @@
 /* Define if libc defines __progname */
 #undef HAVE___PROGNAME
 
+/* Define if you want Kerberos 4 support */
+#undef KRB4
+
+/* Define if you want AFS support */
+#undef AFS
+
+/* Define if you want S/Key support */
+#undef SKEY
+
+/* Define if you want TCP Wrappers support */
+#undef LIBWRAP
+
 @BOTTOM@
 
 /* ******************* Shouldn't need to edit below this line ************** */
diff --git a/auth-skey.c b/auth-skey.c
index 9ec1704..66e09bb 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,3 +1,5 @@
+#ifdef SKEY
+
 #include "includes.h"
 RCSID("$Id: auth-skey.c,v 1.2 1999/10/16 20:57:52 deraadt Exp $");
 
@@ -147,3 +149,5 @@
 	}
 	return skeyprompt;
 }
+
+#endif SKEY
diff --git a/configure.in b/configure.in
index 05a354d..0b54fd5 100644
--- a/configure.in
+++ b/configure.in
@@ -166,4 +166,41 @@
 	]
 )
 
+dnl Check whether user wants Kerberos support
+AC_ARG_WITH(kerberos4,
+	[  --with-kerberos4        Enable Kerberos 4 support],
+	[
+		AC_DEFINE(KRB4)
+		LIBS="$LIBS -lkrb"
+		CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
+	]
+)
+
+dnl Check whether user wants AFS support
+AC_ARG_WITH(kerberos4,
+	[  --with-afs              Enable AFS support],
+	[
+		AC_DEFINE(AFS)
+		LIBS="$LIBS -lkafs"
+	]
+)
+
+dnl Check whether user wants S/Key support
+AC_ARG_WITH(skey,
+	[  --with-skey             Enable S/Key support],
+	[
+		AC_DEFINE(SKEY)
+		LIBS="$LIBS -lskey"
+	]
+)
+
+dnl Check whether user wants TCP wrappers support
+AC_ARG_WITH(skey,
+	[  --with-tcp-wrappers     Enable tcpwrappers support],
+	[
+		AC_DEFINE(LIBWRAP)
+		LIBS="$LIBS -lwrap"
+	]
+)
+
 AC_OUTPUT(Makefile)