This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #127606) adjust dependency paths on installation on darwin
SIP (System Integrity Protection) on OS X prevents the
DYLD_LIBRARY_PATH environment variable from being propagated through
/bin/sh, causes many tests to fail (and some more recent build issues)
for -Duseshrplib builds.
To avoid that, we change the way libperl.dylib is linked to perl, so
for the initial build the library's id is at the build location rather
than the install location, and the generated executable also expects
to find libperl in that location.
This obviously won't work once we copy both to the installation
directory, so we adjust both the id of the library and the dependency
path in the executable to point to the new location of the library.
A previous attempt set -rpath and used @rpath in the id, but this made
the embedding test fail.