$NetBSD: patch-ah,v 1.5 2008/06/21 17:17:51 joerg Exp $

--- configure.ac.orig	2008-06-21 10:32:46.000000000 +0000
+++ configure.ac
@@ -614,7 +614,7 @@ if test "$try_rpath" = "yes"; then
                    ac_cv_linker_rpath_flag=no)])
   CFLAGS="$cflags_save"
   if test "$ac_cv_linker_rpath_flag" = "yes"; then
-    RPATH_TMP='-Wl,--rpath "-Wl,`pwd`"'
+    RPATH_TMP='-Wl,--rpath-link "-Wl,`pwd`"'
     RPATH_REAL='-Wl,--rpath "-Wl,$(LIB_INSTALL_DIR)"'
   else
     # solaris' ld uses -R instead of --rpath
