diff --git a/krb5-config.in b/krb5-config.in
index c950b36..fb6520e 100755
--- a/krb5-config.in
+++ b/krb5-config.in
@@ -31,7 +31,7 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 includedir=@includedir@
 libdir=@libdir@
-CC_LINK='@CC_LINK@'
+CC_LINK='$(PROG_LIBPATH) $(PROG_RPATH_FLAGS)'
 KDB5_DB_LIB=@KDB5_DB_LIB@
 LDFLAGS='@LDFLAGS@'
 RPATH_FLAG='@RPATH_FLAG@'