Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.259
diff -u -p -r1.259 configure.ac
--- configure.ac	12 Apr 2005 02:00:18 -0000	1.259
+++ configure.ac	13 Apr 2005 08:49:39 -0000
@@ -2410,9 +2410,16 @@ AC_ARG_WITH(kerberos5,
 		AC_DEFINE(KRB5)
 		KRB5_MSG="yes"
 
-		AC_MSG_CHECKING(for krb5-config)
-		if test -x  $KRB5ROOT/bin/krb5-config ; then
-			KRB5CONF=$KRB5ROOT/bin/krb5-config
+		AC_PATH_PROG(KRB5CONFPATH, krb5-config)
+
+		AC_MSG_CHECKING(for $KRB5ROOT/bin/krb5-config)
+		if test -x $KRB5ROOT/bin/krb5-config -o -x $KRB5CONFPATH; then
+			# --with-kerberos=path takes precedence
+			if test -x $KRB5ROOT/bin/krb5-config; then
+				KRB5CONF=$KRB5ROOT/bin/krb5-config
+			elif test -x $KRB5CONFPATH; then
+				KRB5CONF=$KRB5CONFPATH
+			fi
 			AC_MSG_RESULT($KRB5CONF)
 
 			AC_MSG_CHECKING(for gssapi support)

