]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Only use -rpath for Kerberos libs when actually needed.
authorNeil Brown <neilb@suse.de>
Thu, 6 Jul 2006 03:05:11 +0000 (13:05 +1000)
committerNeil Brown <neilb@suse.de>
Thu, 6 Jul 2006 03:05:11 +0000 (13:05 +1000)
Avoid usage of -rpath is generally safer, and is required by Debian policy.

aclocal/kerberos5.m4
utils/gssd/Makefile.am

index 45e220f911e5a28ca7d17dea5d39b6f96051baee..1dac9f01aad0e0b27089152a3c92de7f70c3e7a6 100644 (file)
@@ -72,6 +72,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 +99,7 @@ AC_DEFUN([AC_KERBEROS_V5],[
   AC_SUBST([KRBDIR])
   AC_SUBST([KRBLIBS])
   AC_SUBST([KRBCFLAGS])
+  AC_SUBST([KRBLDFLAGS])
   AC_SUBST([K5VERS])
 
 ])
index d1dfe51f58fb0eb60775a759c5aa567b7bf01134..8d9fe8458861307408b393006033c52c75f47216 100644 (file)
@@ -38,7 +38,7 @@ gssd_SOURCES = \
        write_bytes.h
 
 gssd_LDADD = $(RPCSECGSS_LIBS) $(KRBLIBS)
-gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
+gssd_LDFLAGS = $(KRBLDFLAGS)
 
 gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
              $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)