summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-13 20:49:55 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-13 20:49:55 +0000
commit4d20abadde4f672afab51524d4ff00c7c65bbed7 (patch)
treefc44708cbe61dedec35d3a130d6755123901e905
parenta092d240526911dd8284a018cd9aceb03393940a (diff)
downloadperl-4d20abadde4f672afab51524d4ff00c7c65bbed7.tar.gz
First stab at rather shaky Configure support for relocatable @INC.
Seems to be installing rather more that it's supposed to be. p4raw-id: //depot/perl@27490
-rwxr-xr-xConfigure62
-rwxr-xr-xconfigpm25
2 files changed, 66 insertions, 21 deletions
diff --git a/Configure b/Configure
index 6326ffeece..56a05f9279 100755
--- a/Configure
+++ b/Configure
@@ -5993,6 +5993,49 @@ eval "${prefixvar}exp=\"\$ansexp\""
. ./installprefix
EOSC
+: determine where public executables go
+echo " "
+set dflt bin bin
+eval $prefixit
+fn=d~
+rp='Pathname where the public executables will reside?'
+. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+ installbin=''
+fi
+prefixvar=bin
+: XXX Bug? -- ignores Configure -Dinstallprefix setting.
+. ./setprefixvar
+
+case "$userelocatableinc" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+cat <<EOM
+
+Would you like to build Perl so that the installation is relocatable, so that
+library paths in @INC are determined relative to the path of the perl binary?
+This is not advised for system Perl installs, or if you need to run setid
+scripts or scripts under taint mode.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Use relocatable @INC?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set userelocatableinc
+eval $setvar
+
+: Default prefix is now "up one level from where the binaries are"
+case "$userelocatableinc" in
+$define|true|[yY]*) prefix=".../.."
+ prefixexp=".../..";;
+esac
+
+
: determine where private library files go
: Usual default is /usr/local/lib/perl5/$version.
: Also allow things like /opt/perl/lib/$version, since
@@ -6729,20 +6772,6 @@ EOM
;;
esac
-: determine where public executables go
-echo " "
-set dflt bin bin
-eval $prefixit
-fn=d~
-rp='Pathname where the public executables will reside?'
-. ./getfile
-if $test "X$ansexp" != "X$binexp"; then
- installbin=''
-fi
-prefixvar=bin
-: XXX Bug? -- ignores Configure -Dinstallprefix setting.
-. ./setprefixvar
-
echo " "
case "$extras" in
'') dflt='n';;
@@ -8946,11 +8975,6 @@ EOCP
;;
esac
-# probably will refer to
-# $archlib $privlib $sitearch $sitelib $vendorarch $vendorlib
-need_relocation=0
-userelocatableinc=undef
-
case "$vendorprefix" in
'') d_vendorbin="$undef"
vendorbin=''
diff --git a/configpm b/configpm
index ccf7816f29..de4a69445c 100755
--- a/configpm
+++ b/configpm
@@ -298,13 +298,34 @@ EOT
my @need_relocation;
if (fetch_string({},'userelocatableinc')) {
- foreach my $what (qw(archlibexp
+ foreach my $what (qw(prefixexp
+
+ archlibexp
+ html1direxp
+ html3direxp
+ man1direxp
+ man3direxp
privlibexp
+ scriptdirexp
sitearchexp
+ sitebinexp
+ sitehtml1direxp
+ sitehtml3direxp
sitelibexp
- sitelib_stem
+ siteman1direxp
+ siteman3direxp
+ sitescriptexp
vendorarchexp
+ vendorbinexp
+ vendorhtml1direxp
+ vendorhtml3direxp
vendorlibexp
+ vendorman1direxp
+ vendorman3direxp
+ vendorscriptexp
+
+ siteprefixexp
+ sitelib_stem
vendorlib_stem)) {
push @need_relocation, $what if fetch_string({}, $what) =~ m!^\.\.\./!;
}