diff -r -u parrot-current/config/init/defaults.pm parrot-andy/config/init/defaults.pm --- parrot-current/config/init/defaults.pm 2009-03-21 21:02:56.000000000 -0400 +++ parrot-andy/config/init/defaults.pm 2009-03-25 00:10:33.701938937 -0400 @@ -129,6 +129,21 @@ # -shared for GNU ld. ld_load_flags => $Config{lddlflags}, + # Set -rpath (or equivalent) to append to $linkflags (and + # $ldflags) for executables to find the shared libparrot in + # the build directory. + # This is often something like -R $builddir/blib/lib + # (This is initialized to undef so that later parts of + # Configure.pl can distinguish between the variable being + # unset and being set (on the command line) to the empty + # string.) + rpath_blib => undef, + + # Set -rpath (or equivalent) for the installed executables to + # find the installed shared libparrot. + # This is often something like -R /usr/local/lib + rpath_lib => undef, + libs => $Config{libs}, cc_inc => "-I./include", diff -r -u parrot-current/config/inter/libparrot.pm parrot-andy/config/inter/libparrot.pm --- parrot-current/config/inter/libparrot.pm 2009-03-21 21:02:56.000000000 -0400 +++ parrot-andy/config/inter/libparrot.pm 2009-03-25 00:49:53.213944808 -0400 @@ -97,22 +97,30 @@ # Set -rpath (or equivalent) for executables to find the # shared libparrot in the build directory. - $conf->data->set( - rpath_blib => ( $parrot_is_shared && $conf->data->get('rpath') ) - ? $conf->data->get('rpath') - . $conf->data->get('build_dir') - . $conf->data->get('slash') - . $conf->data->get('blib_dir') - : '' - ); + # Respect a hint file or command-line override. + my $rpath_blib = $conf->option_or_data('rpath_blib'); + if (!defined($rpath_blib)) { + $rpath_blib = ( $parrot_is_shared && $conf->data->get('rpath') ) + ? $conf->data->get('rpath') + . $conf->data->get('build_dir') + . $conf->data->get('slash') + . $conf->data->get('blib_dir') + : ''; + } # Set -rpath (or equivalent) for the installed executables to find the # installed shared libparrot. + my $rpath_lib = $conf->option_or_data('rpath_lib'); + if (!defined($rpath_lib)) { + $rpath_lib = ( $parrot_is_shared && $conf->data->get('rpath') ) + ? $conf->data->get('rpath') + . $conf->data->get('libdir') + : ''; + } + $conf->data->set( - rpath_lib => ( $parrot_is_shared && $conf->data->get('rpath') ) - ? $conf->data->get('rpath') - . $conf->data->get('libdir') - : '' + rpath_blib => $rpath_blib, + rpath_lib => $rpath_lib ); unless ( defined( $conf->data->get('libparrot_ldflags') ) ) { diff -r -u parrot-current/lib/Parrot/Configure/Options/Conf/Shared.pm parrot-andy/lib/Parrot/Configure/Options/Conf/Shared.pm --- parrot-current/lib/Parrot/Configure/Options/Conf/Shared.pm 2009-03-21 21:02:48.000000000 -0400 +++ parrot-andy/lib/Parrot/Configure/Options/Conf/Shared.pm 2009-03-25 00:17:38.418939204 -0400 @@ -58,6 +58,7 @@ parrot_is_shared prefix profile + rpath_lib sbindir sharedstatedir silent diff -r -u parrot-current/lib/Parrot/Configure/Options/Conf.pm parrot-andy/lib/Parrot/Configure/Options/Conf.pm --- parrot-current/lib/Parrot/Configure/Options/Conf.pm 2009-03-21 21:02:48.000000000 -0400 +++ parrot-andy/lib/Parrot/Configure/Options/Conf.pm 2009-03-25 00:18:04.834939494 -0400 @@ -133,6 +133,9 @@ [/usr/local] --exec-prefix=EPREFIX Install architecture-dependent files in EPREFIX [PREFIX] + --rpath_lib=RPATH add RPATH into link flags to tell the + installed parrot how to find the installed + version of libparrot.so (if appropriate). By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify