X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=aclocal%2Fkerberos5.m4;h=dfa5738c468989ea62bb5909730e83ab5bf059bf;hp=44e99b00847015e5de8cbcf5f83b309f3bc23f23;hb=767773f33c10dfeaf44ef7d6aea0946f5d9d248f;hpb=ac5b03be829b4c9369ebfb07a688308721103228 diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4 index 44e99b0..dfa5738 100644 --- a/aclocal/kerberos5.m4 +++ b/aclocal/kerberos5.m4 @@ -26,6 +26,8 @@ AC_DEFUN([AC_KERBEROS_V5],[ K5CONFIG=$dir/bin/krb5-config elif test -f "/usr/kerberos/bin/krb5-config"; then K5CONFIG="/usr/kerberos/bin/krb5-config" + elif test -f "/usr/lib/mit/bin/krb5-config"; then + K5CONFIG="/usr/lib/mit/bin/krb5-config" fi if test "$K5CONFIG" != ""; then KRBCFLAGS=`$K5CONFIG --cflags` @@ -34,6 +36,8 @@ AC_DEFUN([AC_KERBEROS_V5],[ AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number]) if test -f $dir/include/gssapi/gssapi_krb5.h -a \ \( -f $dir/lib/libgssapi_krb5.a -o \ + -f $dir/lib64/libgssapi_krb5.a -o \ + -f $dir/lib64/libgssapi_krb5.so -o \ -f $dir/lib/libgssapi_krb5.so \) ; then AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries]) KRBDIR="$dir" @@ -70,6 +74,17 @@ AC_DEFUN([AC_KERBEROS_V5],[ fi AC_MSG_RESULT($KRBDIR) + dnl Check if -rpath=$(KRBDIR)/lib is needed + echo "The current KRBDIR is $KRBDIR" + if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \ + -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then + KRBLDFLAGS=""; + elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then + KRBLDFLAGS=""; + else + KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib" + fi + dnl Now check for functions within gssapi library AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS) @@ -78,6 +93,14 @@ AC_DEFUN([AC_KERBEROS_V5],[ AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS) + dnl Check for newer error message facility + AC_CHECK_LIB($gssapi_lib, krb5_get_error_message, + AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS) + + dnl Check for function to specify addressless tickets + AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless, + AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS) + dnl If they specified a directory and it didn't work, give them a warning if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!) @@ -86,6 +109,7 @@ AC_DEFUN([AC_KERBEROS_V5],[ AC_SUBST([KRBDIR]) AC_SUBST([KRBLIBS]) AC_SUBST([KRBCFLAGS]) + AC_SUBST([KRBLDFLAGS]) AC_SUBST([K5VERS]) ])