diff -uNr afs-krb5.orig/src/configure.in afs-krb5/src/configure.in
--- afs-krb5.orig/src/configure.in	2003-03-16 20:13:34.000000000 -0500
+++ afs-krb5/src/configure.in	2003-07-30 11:52:55.000000000 -0400
@@ -44,14 +44,6 @@
 if test $retval -ne 0; then
 	AC_MSG_ERROR($krb5_config failed with error code of $retval)
 fi
-AC_MSG_RESULT([Adding $krb5_cflags to CFLAGS])
-AC_MSG_RESULT([Adding $krb5_libs to LIBS])
-AC_MSG_RESULT([Setting KADM_CFLAGS to $krb5_cflags_kadm])
-AC_MSG_RESULT([Setting KADM_LIBS to $krb5_libs_kadm])
-CFLAGS="$CFLAGS $krb5_cflags"
-LIBS="$LIBS $krb5_libs"
-KADM_CFLAGS="$krb5_cflags_kadm"
-KADM_LIBS="$krb5_libs_kadm"
 dnl
 dnl Check for various network libraries
 dnl
@@ -105,6 +97,20 @@
 	AC_MSG_ERROR([Unable to find res_search function])
 fi
 LIBS="$save_LIBS"
+
+dnl
+dnl Don't add these to LIBS until after we've already looked for 
+dnl libsocket, etc. Otherwise ka-forwarder won't build properly
+dnl
+AC_MSG_RESULT([Adding $krb5_cflags to CFLAGS])
+AC_MSG_RESULT([Adding $krb5_libs to LIBS])
+AC_MSG_RESULT([Setting KADM_CFLAGS to $krb5_cflags_kadm])
+AC_MSG_RESULT([Setting KADM_LIBS to $krb5_libs_kadm])
+CFLAGS="$CFLAGS $krb5_cflags"
+LIBS="$LIBS $krb5_libs"
+KADM_CFLAGS="$krb5_cflags_kadm"
+KADM_LIBS="$krb5_libs_kadm"
+
 dnl
 dnl Optional support for AFS
 dnl
