]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - aclocal/kerberos5.m4
Add support for quoted mount options
[nfs-utils.git] / aclocal / kerberos5.m4
index 45e220f911e5a28ca7d17dea5d39b6f96051baee..b83e12236be86f3b9e06ee22b8b6feae9cc0e231 100644 (file)
@@ -36,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"
@@ -72,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)
@@ -88,6 +101,7 @@ AC_DEFUN([AC_KERBEROS_V5],[
   AC_SUBST([KRBDIR])
   AC_SUBST([KRBLIBS])
   AC_SUBST([KRBCFLAGS])
+  AC_SUBST([KRBLDFLAGS])
   AC_SUBST([K5VERS])
 
 ])