3 case $PERL_CONFIG_SH in
6 echo "Extracting Policy.sh (with variable substitutions)"
7 $spitshell <<!GROK!THIS! >Policy.sh
10 # This file was produced by running the Policy_sh.SH script, which
11 # gets its values from config.sh, which is generally produced by
14 # The idea here is to distill in one place the common site-wide
15 # "policy" answers (such as installation directories) that are
16 # to be "sticky". If you keep the file Policy.sh around in
17 # the same directory as you are building Perl, then Configure will
18 # (by default) load up the Policy.sh file just before the
19 # platform-specific hints file and rewrite it at the end.
21 # The sequence of events is as follows:
22 # A: If you are NOT re-using an old config.sh:
23 # 1. At start-up, Configure loads up the defaults from the
24 # os-specific hints/osname_osvers.sh file and any previous
26 # 2. At the end, Configure runs Policy_sh.SH, which creates
27 # Policy.sh, overwriting a previous Policy.sh if necessary.
29 # B: If you are re-using an old config.sh:
30 # 1. At start-up, Configure loads up the defaults from config.sh,
31 # ignoring any previous Policy.sh file.
32 # 2. At the end, Configure runs Policy_sh.SH, which creates
33 # Policy.sh, overwriting a previous Policy.sh if necessary.
35 # Thus the Policy.sh file gets overwritten each time
36 # Configure is run. Any variables you add to Policy.sh will be lost
37 # unless you copy Policy.sh somewhere else before running Configure.
39 # Allow Configure command-line overrides; usually these won't be
40 # needed, but something like -Dprefix=/test/location can be quite
41 # useful for testing out new versions.
43 #Site-specific values:
46 '') perladmin='$perladmin' ;;
49 # Installation prefixes. Allow a Configure -D override. You
50 # may wish to reinstall perl under a different prefix, perhaps
51 # in order to test a different configuration.
52 # For an explanation of the installation directories, see the
53 # INSTALL file section on "Installation Directories".
55 '') prefix='$prefix' ;;
58 # By default, the next three are the same as \$prefix.
59 # If the user changes \$prefix, and previously \$siteprefix was the
60 # same as \$prefix, then change \$siteprefix as well.
61 # Use similar logic for \$vendorprefix and \$installprefix.
63 case "\$siteprefix" in
64 '') if test "$siteprefix" = "$prefix"; then
67 siteprefix='$siteprefix'
71 case "\$vendorprefix" in
72 '') if test "$vendorprefix" = "$prefix"; then
73 vendorprefix="\$prefix"
75 vendorprefix='$vendorprefix'
80 # Where installperl puts things.
81 case "\$installprefix" in
82 '') if test "$installprefix" = "$prefix"; then
83 installprefix="\$prefix"
85 installprefix='$installprefix'
90 # Installation directives. Note that each one comes in three flavors.
91 # For example, we have privlib, privlibexp, and installprivlib.
92 # privlib is for private (to perl) library files.
93 # privlibexp is the same, except any '~' the user gave to Configure
94 # is expanded to the user's home directory. This is figured
95 # out automatically by Configure, so you don't have to include it here.
96 # installprivlib is for systems (such as those running AFS) that
97 # need to distinguish between the place where things
98 # get installed and where they finally will reside. As of 5.005_6x,
99 # this too is handled automatically by Configure based on
100 # $installprefix, so it isn't included here either.
102 # Note also that there are three broad hierarchies of installation
103 # directories, as discussed in the INSTALL file under
104 # "Installation Directories":
106 # =item Directories for the perl distribution
108 # =item Directories for site-specific add-on files
110 # =item Directories for vendor-supplied add-on files
112 # See Porting/Glossary for the definitions of these names, and see the
113 # INSTALL file for further explanation and some examples.
115 # In each case, if your previous value was the default, leave it commented
116 # out. That way, if you override prefix, all of these will be
117 # automatically adjusted.
119 # WARNING: Be especially careful about architecture-dependent and
120 # version-dependent names, particularly if you reuse this file for
121 # different versions of perl.
125 # Set the following variables. Mention them here so metaconfig
126 # includes the appropriate code in Configure
127 # $bin $scriptdir $privlib $archlib
128 # $man1dir $man3dir $html1dir $html3dir
129 # $sitebin $sitescript $sitelib $sitearch
130 # $siteman1dir $siteman3dir $sitehtml1dir $sitehtml3dir
131 # $vendorbin $vendorscript $vendorlib $vendorarch
132 # $vendorman1dir $vendorman3dir $vendorhtml1dir $vendorhtml3dir
135 bin scriptdir privlib archlib man1dir man3dir man1ext man3ext \
137 sitebin sitescript sitelib sitearch \
138 siteman1dir siteman3dir sitehtml1dir sitehtml3dir \
139 vendorbin vendorscript vendorlib vendorarch \
140 vendorman1dir vendorman3dir vendorhtml1dir vendorhtml3dir
145 # Directories for the core perl components
146 bin) dflt=$prefix/bin ;;
147 # The scriptdir test is more complex, but this is probably usually ok.
149 if $test -d $prefix/script; then
157 *perl*) dflt=$prefix/lib/$version ;;
158 *) dflt=$prefix/lib/$package/$version ;;
161 archlib) dflt="$privlib/$archname" ;;
163 man1dir) dflt="$prefix/man/man1" ;;
164 man3dir) dflt="$prefix/man/man3" ;;
165 # Can we assume all sed's have greedy matching?
166 man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
167 man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
169 # We don't know what to do with these yet.
173 # Directories for site-specific add-on files
174 sitebin) dflt=$siteprefix/bin ;;
176 if $test -d $siteprefix/script; then
177 dflt=$siteprefix/script
183 case "$siteprefix" in
184 *perl*) dflt=$prefix/lib/site_perl/$version ;;
185 *) dflt=$prefix/lib/$package/site_perl/$version ;;
188 sitearch) dflt="$sitelib/$archname" ;;
190 siteman1dir) dflt="$siteprefix/man/man1" ;;
191 siteman3dir) dflt="$siteprefix/man/man3" ;;
192 # We don't know what to do with these yet.
193 sitehtml1dir) dflt='' ;;
194 sitehtml3dir) dflt='' ;;
196 # Directories for vendor-supplied add-on files
197 # These are all usually empty.
199 if test X"$vendorprefix" = X""; then
203 vendorbin) dflt=$vendorprefix/bin ;;
205 if $test -d $vendorprefix/script; then
206 dflt=$vendorprefix/script
212 case "$vendorprefix" in
213 *perl*) dflt=$prefix/lib/vendor_perl/$version ;;
214 *) dflt=$prefix/lib/$package/vendor_perl/$version ;;
217 vendorarch) dflt="$vendorlib/$archname" ;;
219 vendorman1dir) dflt="$vendorprefix/man/man1" ;;
220 vendorman3dir) dflt="$vendorprefix/man/man3" ;;
221 # We don't know what to do with these yet.
222 vendorhtml1dir) dflt='' ;;
223 vendorhtml3dir) dflt='' ;;
225 esac # End of vendorprefix != ''
231 if test X"$val" = X"$dflt"; then
232 echo "# $var='$dflt'"
234 echo "# Preserving custom $var"
240 $spitshell <<!GROK!THIS! >>Policy.sh
242 # Lastly, you may add additional items here. For example, to set the
243 # pager to your local favorite value, uncomment the following line in
244 # the original Policy_sh.SH file and re-run sh Policy_sh.SH.
248 # A full Glossary of all the config.sh variables is in the file
254 # The original design for this Policy.sh file came from Wayne Davison,
256 # This version for Perl5.004_61 originally written by
257 # Andy Dougherty <doughera@lafayette.edu>.
258 # This file may be distributed under the same terms as Perl itself.