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`
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)
AC_SUBST([KRBDIR])
AC_SUBST([KRBLIBS])
AC_SUBST([KRBCFLAGS])
+ AC_SUBST([KRBLDFLAGS])
AC_SUBST([K5VERS])
])