- ;;
-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])
- fi
-
- if test $have_k425 = yes ; then
- ol_with_kerberos=found
- ol_link_krb4=yes
-
- AC_DEFINE(HAVE_KRB425, 1,
- [define if you have Kerberos V with IV support])
- AC_DEFINE(HAVE_KRB4, 1,
- [define if you have Kerberos IV])
-
- AC_CACHE_CHECK([for des_debug in Kerberos libraries],
- [ol_cv_var_des_debug], [
- dnl save the flags
- save_LIBS="$LIBS"
- LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <kerberosIV/krb.h>
-#include <kerberosIV/des.h>
-extern int des_debug;
-]], [[
-des_debug = 1;
-]])],[ol_cv_var_des_debug=yes],[ol_cv_var_des_debug=no])
- dnl restore the LIBS
- LIBS="$save_LIBS"
- ])
-
- if test $ol_cv_var_des_debug = yes ; then
- AC_DEFINE(HAVE_DES_DEBUG,1,
- [define if you have Kerberos des_debug])
- fi
-
- LIBS="$save_LIBS"
- fi
- fi
-fi
-
-if test $ol_link_krb5 = yes ; then
- ol_with_kerberos=found
-fi
-
-case $ol_with_kerberos in yes | auto | k4 | kth)
-
- AC_CHECK_HEADERS(krb.h des.h krb-archaeology.h )
-
- if test $ac_cv_header_krb_h = yes ; then
- AC_CHECK_LIB(krb, main, [have_k4=yes], [have_k4=no], [-ldes])
-
- if test $have_k4 = yes ; then
- ol_with_kerberos=found
- ol_link_krb4=yes
-
- AC_DEFINE(HAVE_KRB4, 1,
- [define if you have Kerberos IV])
-
- KRB4_LIBS="-lkrb -ldes"