Change 27490 by [EMAIL PROTECTED] on 2006/03/13 20:49:55

        First stab at rather shaky Configure support for relocatable @INC.
        Seems to be installing rather more that it's supposed to be.

Affected files ...

... //depot/perl/Configure#611 edit
... //depot/perl/configpm#76 edit

Differences ...

==== //depot/perl/Configure#611 (xtext) ====
Index: perl/Configure
--- perl/Configure#610~27489~   2006-03-13 10:59:27.000000000 -0800
+++ perl/Configure      2006-03-13 12:49:55.000000000 -0800
@@ -5993,6 +5993,49 @@
 . ./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 @@
        ;;
 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 @@
        ;;
 esac
 
-# probably will refer to
-#   $archlib $privlib $sitearch $sitelib $vendorarch $vendorlib
-need_relocation=0
-userelocatableinc=undef
-
 case "$vendorprefix" in
 '')    d_vendorbin="$undef"
        vendorbin=''

==== //depot/perl/configpm#76 (xtext) ====
Index: perl/configpm
--- perl/configpm#75~26072~     2005-11-10 02:37:42.000000000 -0800
+++ perl/configpm       2006-03-13 12:49:55.000000000 -0800
@@ -298,13 +298,34 @@
 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!^\.\.\./!;
     }
End of Patch.

Reply via email to