specfiles-20060821
[openafs.git] / src / packaging / RedHat / afs-krb5-2.0-krb524.patch
1 --- afs-krb5/src/configure.in-orig      2003-03-16 20:13:34.000000000 -0500
2 +++ afs-krb5/src/configure.in   2005-09-14 17:20:46.000000000 -0400
3 @@ -179,14 +197,20 @@
4  [      EXTRA_INC="$EXTRA_INC -I$with_krb5_obj/include -I$with_krb5_obj/include/krb5"
5         KADM_LIBS=`echo $KADM_LIBS | sed -e "s#-ldb#$with_krb5_obj/lib/libdb.a#"`])
6  dnl
7 -dnl Sigh, why is this so complicated?  Right now, just assume that 
8 -dnl the 524 library is always called krb524 and will be picked up by the
9 -dnl Kerberos link line
10 -dnl
11 -dnl AC_CHECK_LIB(krb524, krb524_convert_princs, [KRB524LIB="-lkrb524"], [
12 -dnl    AC_MSG_ERROR([Cannot find 524 library, exiting])
13 -dnl ])
14 -KRB524LIB=-lkrb524
15 +dnl The krb524 functions may be included in libkrb5 itself, or else in a 
16 +dnl separate library named libkrb524
17 +dnl
18 +ac_save_LIBS="$LIBS"
19 +KRB524LIB=
20 +AC_MSG_CHECKING([for krb524 library])
21 +AC_CHECK_FUNC(krb524_init_ets, have_krb524=yes, have_krb524=no)
22 +
23 +if test "$have_krb524" = no; then
24 +       LIBS="$LIBS -lkrb524"
25 +       AC_CHECK_LIB(krb524, krb524_init_ets, [KRB524LIB="-lkrb524"],
26 +                            [AC_MSG_ERROR([Unable to find krb524 library])])
27 +fi
28 +LIBS="$ac_save_LIBS"
29  
30  dnl AC_CHECK_LIB(kdb5, krb5_db_fetch_mkey, [KD_LIBS="-lkdb5"],[
31  dnl    AC_MSG_WARN([Cannot find Kerberos 5 DB library, will not be able to build DB utilities])