$NetBSD: patch-aj,v 1.1.2.2 2009/10/22 14:51:26 tron Exp $

Make sure to use rpath if it's defined when linking C-language tests.

--- lib/Parrot/Test.pm.orig	2009-10-20 03:09:41.000000000 +0200
+++ lib/Parrot/Test.pm
@@ -1045,6 +1045,10 @@ sub _generate_test_functions {
                     . "$PConfig{ld_out}$exe_f "
                     . "$obj_f $cfg "
                     . "$PConfig{libparrot_linkflags} "
+		    # If rpath is defined (and therefore rpath_blib), use it to get at the build libraries
+		    . ( defined($PConfig{rpath_blib})
+			? (  $PConfig{rpath_blib} . " " )
+			: "" )
                     . "$PConfig{linkflags} $PConfig{ld_debug} "
                     . "$iculibs $PConfig{libs}";
                 my $exit_code = run_command(
