Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.247
diff -u -p -r1.247 configure.ac
--- configure.ac	24 Feb 2005 01:12:35 -0000	1.247
+++ configure.ac	24 Feb 2005 22:35:58 -0000
@@ -225,6 +225,7 @@ main() { if (NSVersionOfRunTimeLibrary("
 	AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
 	check_for_hpux_broken_getaddrinfo=1
 	check_for_conflicting_getspnam=1
+	check_gssapi_gssapi_h_first=1
 	LIBS="$LIBS -lsec"
 	AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
 	;;
@@ -2490,7 +2491,13 @@ AC_ARG_WITH(kerberos5,
 		fi
 	fi
 
-	AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
+	if test "x$check_gssapi_gssapi_h_first" = "x1"; then
+		AC_CHECK_HEADERS(gssapi/gssapi.h, ,
+		    [ AC_CHECK_HEADERS(gssapi.h) ])
+	else
+		AC_CHECK_HEADERS(gssapi.h, ,
+		    [ AC_CHECK_HEADERS(gssapi/gssapi.h) ])
+	fi
 	AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
 	AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
 
