- if test $ac_cv_header_krb5_h = yes ; then
- dnl lazy check for Heimdal Kerberos
- AC_CHECK_HEADERS(heim_err.h)
- if test $ac_cv_header_heim_err_h = yes ; then
- krb5_impl=heimdal
- else
- krb5_impl=mit
- fi
-
- if test $krb5_impl = mit; then
- AC_CHECK_LIB(k5crypto, main,
- [krb5crypto=k5crypto],
- [krb5crypto=crypto])
-
- AC_CHECK_LIB(krb5, main,
- [have_krb5=yes
- KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"],
- [have_krb5=no],
- [-l$krb5crypto -lcom_err])
-
- elif test $krb5_impl = heimdal; then
- AC_CHECK_LIB(des, main,
- [krb5crypto=des],
- [krb5crypto=crypto])
-
- AC_CHECK_LIB(krb5, main,
- [have_krb5=yes
- KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"],
- [have_krb5=no],
- [-l$krb5crypto -lasn1 -lroken -lcom_err])
-
- AC_DEFINE(HAVE_HEIMDAL_KERBEROS, 1,
- [define if you have HEIMDAL Kerberos])
-
- else
- have_krb5=no
- AC_MSG_WARN([Unrecognized Kerberos5 Implementation])
- fi
-
- if test $have_krb5 = yes ; then
- ol_link_krb5=yes
-
- AC_DEFINE(HAVE_KRB5, 1,
- [define if you have Kerberos V])
-
- if test $ol_with_kerberos = k5only ; then
- ol_with_kerberos=found
- fi
-
- elif test $ol_with_kerberos != auto ; then
- AC_MSG_ERROR([Required Kerberos 5 support not available])
- fi
-
- fi
- ;;
-esac
-
-if test $ol_link_krb5 = yes &&
- { test $ol_with_kerberos = yes ||
- test $ol_with_kerberos = auto ||
- test $ol_with_kerberos = k425; }; then
-
- AC_CHECK_HEADERS(kerberosIV/krb.h kerberosIV/des.h)
-
- if test $ac_cv_header_kerberosIV_krb_h = yes ; then
- if test $krb5_impl = mit; then
- AC_CHECK_LIB(krb4, main, [have_k425=yes
- KRB4_LIBS="-lkrb4 -ldes425"], [have_k425=no],
- [-ldes425 -lkrb5 -l$krb5crypto -lcom_err])
-
- elif test $krb5_impl = heimdal; then
- AC_CHECK_LIB(krb4, main, [have_k425=yes
- KRB4_LIBS="-lkrb4"], [have_k425=no],
- [-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err])
-
- else
- have_425=no
- AC_MSG_WARN([Unrecongized Kerberos V Implementation])