diff -uNr afs-krb5.orig/src/configure.in afs-krb5/src/configure.in --- afs-krb5.orig/src/configure.in 2004-07-23 16:00:52.000000000 -0400 +++ afs-krb5/src/configure.in 2004-07-23 16:05:39.000000000 -0400 @@ -192,14 +192,25 @@ [ EXTRA_INC="$EXTRA_INC -I$with_krb5_obj/include -I$with_krb5_obj/include/krb5" KADM_LIBS=`echo $KADM_LIBS | sed -e "s#-ldb#$with_krb5_obj/lib/libdb.a#"`]) dnl -dnl Sigh, why is this so complicated? Right now, just assume that -dnl the 524 library is always called krb524 and will be picked up by the -dnl Kerberos link line -dnl -dnl AC_CHECK_LIB(krb524, krb524_convert_princs, [KRB524LIB="-lkrb524"], [ -dnl AC_MSG_ERROR([Cannot find 524 library, exiting]) -dnl ]) -KRB524LIB=-lkrb524 +dnl The krb524 functions may be included in libkrb5 itself, or else in a +dnl separate library named libkrb524 +dnl +ac_save_LIBS="$LIBS" +KRB524LIB= +AC_MSG_CHECKING([for krb524 library]) +AC_CHECK_FUNC(krb524_init_ets, have_krb524=yes, have_krb524=no) + +if test "$have_krb524" = no; then + LIBS="$LIBS -lkrb524" + AC_CHECK_FUNC(krb524_init_ets, have_krb524=yes, have_krb524=no) + + if test "$have_krb524" = yes; then + KRB524LIB=-lkrb524 + else + AC_MSG_ERROR([Unable to find krb524 library]) + fi +fi +LIBS="$ac_save_LIBS" dnl AC_CHECK_LIB(kdb5, krb5_db_fetch_mkey, [KD_LIBS="-lkdb5"],[ dnl AC_MSG_WARN([Cannot find Kerberos 5 DB library, will not be able to build DB utilities])