$NetBSD$

--- configure.orig	2009-01-12 21:09:45.000000000 +0100
+++ configure
@@ -4405,7 +4405,7 @@ if test "${with_mpfr_lib+set}" = set; th
 fi;
 
 if test "x$with_mpfr" != x; then
-  gmplibs="-L$with_mpfr/lib $gmplibs"
+  gmplibs="-L$with_mpfr/lib -Wl,-R${PREFIX}/lib $gmplibs"
   gmpinc="-I$with_mpfr/include"
 fi
 if test "x$with_mpfr_include" != x; then
