- AC_CHECK_LIB(krb, krb_get_pw_in_tkt, [with_krb4=yes],
- [with_krb4=no
- KRB4_CPPFLAGS=""
- KRB4_LDFLAGS=""])
+ KRB4_CPPFLAGS="$KRB4_CPPFLAGS ${KRB4_CPPFLAGS}/kerberosIV"
+# second run of AC_CHECK_HEADER for the same library returns the cached
+# result created by previous run :-(
+ AC_CHECK_HEADER(kerberosIV/krb.h, with_krb4=yes,
+ [ with_krb4=no
+ KRB4_CPPFLAGS=""
+ KRB4_LDFLAGS=""])
+ fi
+
+ if test "x$with_krb4" != "xno"; then
+ AC_CHECK_LIB(krb4, krb_get_pw_in_tkt, [], [with_krb4=no])
+ if test "x$with_krb4" = "xno"; then
+ AC_CHECK_LIB(krb, krb_get_pw_in_tkt, [with_krb4=yes],
+ [with_krb4=no
+ KRB4_CPPFLAGS=""
+ KRB4_LDFLAGS=""])
+ fi