# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
if (copy_if_diff($_, "$installlib/$name")) {
- if ($name =~ /\.(so|$dlext)$/o) {
- strip("-S", "$installlib/$name") if $^O =~ /^(rhapsody|darwin)$/;
- chmod(0555, "$installlib/$name");
- } else {
- strip("-S", "$installlib/$name")
- if ($name =~ /\.a$/o and $^O =~ /^(rhapsody|darwin)$/);
- chmod(0444, "$installlib/$name");
- }
+ strip("-S", "$installlib/$name")
+ if $^O =~ /^(rhapsody|darwin)$/ and /\.(?:so|$dlext|a)$/;
+ chmod(/\.(so|$dlext)$/ ? 0555 : 0444, "$installlib/$name");
}
}
}