Config_70-01: Remove default "/share"
[p5sagit/p5-mst-13.2.git] / Policy_sh.SH
index acac3ed..52a2c57 100644 (file)
@@ -19,13 +19,6 @@ $startsh
 #  platform-specific hints file.
 #
 
-#Credits:
-#   The original design for this Policy.sh file came from Wayne Davison,
-#   maintainer of trn.
-#   This version for Perl5.004_61 originally written by
-#   Andy Dougherty <doughera@lafcol.lafayette.edu>.
-#   This file may be distributed under the same terms as Perl itself.
-
 #  Allow Configure command-line overrides; usually these won't be
 #  needed, but something like -Dprefix=/test/location can be quite
 #  useful for testing out new versions.
@@ -46,7 +39,7 @@ esac
 # Installation directives.  Note that each one comes in three flavors.
 # For example, we have privlib, privlibexp, and installprivlib.
 # privlib is for private (to perl) library files.
-# privlibexp is the same, expcept any '~' the user gave to Configure
+# privlibexp is the same, except any '~' the user gave to Configure
 #     is expanded to the user's home directory.  This is figured
 #     out automatically by Configure, so you don't have to include it here.
 # installprivlib is for systems (such as those running AFS) that
@@ -57,22 +50,12 @@ esac
 # out.  That way, if you override prefix, all of these will be
 # automatically adjusted.
 #
-# NOTE:  Be especially careful about architecture-dependent and
+# WARNING:  Be especially careful about architecture-dependent and
 # version-dependent names, particularly if you reuse this file for
 # different versions of perl.
 
 !GROK!THIS!
 
-if test 0 -eq "$subversion"; then
-    version=`LC_ALL=C; export LC_ALL; \
-    echo $baserev $patchlevel |
-       $awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
-else
-    version=`LC_ALL=C; export LC_ALL; \
-       echo $baserev $patchlevel $subversion | \
-       $awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`
-fi
-
 for var in bin scriptdir privlib archlib \
        man1dir man3dir sitelib sitearch \
        installbin installscript installprivlib installarchlib \
@@ -82,22 +65,43 @@ for var in bin scriptdir privlib archlib \
     case "$var" in
     bin)       dflt=$prefix/bin ;;
     # The scriptdir test is more complex, but this is probably usually ok.
-    scriptdir) dflt=$prefix/script ;;
+    scriptdir)
+       if $test -d $prefix/script; then
+           dflt=$prefix/script
+       else
+           dflt=$bin
+       fi
+       ;;
     privlib)
        case "$prefix" in
-       *perl*) dflt=$prefix/lib ;;
-       *)      dflt=$prefix/lib/$package ;;
+       *perl*) dflt=$prefix/lib/$version ;;
+       *)      dflt=$prefix/lib/$package/$version ;;
+       esac
+       ;;
+    archlib)   
+       case "$prefix" in
+       *perl*) dflt=$prefix/lib/$version/$archname ;;
+       *)      dflt=$prefix/lib/$package/$version/$archname ;;
+       esac
+       ;;
+    sitelib)
+       case "$prefix" in
+       *perl*) dflt=$prefix/lib/site_perl/$apiversion ;;
+       *)      dflt=$prefix/lib/$package/site_perl/$apiversion ;;
+       esac
+       ;;
+    sitearch)  
+       case "$prefix" in
+       *perl*) dflt=$prefix/lib/site_perl/$apiversion/$archname ;;
+       *)      dflt=$prefix/lib/$package/site_perl/$apiversion/$archname ;;
        esac
        ;;
-    archlib)   dflt="$privlib/$archname/$version" ;;
-    sitelib)   dflt="$privlib/site_perl" ;;
-    sitearch)  dflt="$sitelib/$archname" ;;
     man1dir)   dflt="$prefix/man/man1" ;;
     man3dir)
        case "$prefix" in
        *perl*) dflt=`echo $man1dir |
                    sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
-       *)      dflt=$privlib/man3 ;;
+       *)      dflt=$privlib/man/man3 ;;
        esac
        ;;
 
@@ -122,7 +126,6 @@ for var in bin scriptdir privlib archlib \
        echo "# $var='$dflt'"
     else
        echo "# Preserving custom $var"
-       eval val=$var
        echo "$var='$val'"
     fi
 
@@ -140,3 +143,11 @@ $spitshell <<!GROK!THIS! >>Policy.sh
 #  Porting/Glossary.
 
 !GROK!THIS!
+
+#Credits:
+#   The original design for this Policy.sh file came from Wayne Davison,
+#   maintainer of trn.
+#   This version for Perl5.004_61 originally written by
+#   Andy Dougherty <doughera@lafcol.lafayette.edu>.
+#   This file may be distributed under the same terms as Perl itself.
+