This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
IRIX 64-bitness fixes.
[metaconfig.git] / U / modified / Config_sh.U
CommitLineData
959f3c4c
JH
1?RCS: $Id: Config_sh.U,v 3.0.1.3 1997/02/28 14:57:53 ram Exp $
2?RCS:
3?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
6?RCS: as specified in the README file that comes with the distribution.
7?RCS: You may reuse parts of this distribution only within the terms of
8?RCS: that same Artistic Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 3.0.
10?RCS:
11?RCS: $Log: Config_sh.U,v $
12?RCS: Revision 3.0.1.3 1997/02/28 14:57:53 ram
13?RCS: patch61: added support for src.U
14?RCS:
15?RCS: Revision 3.0.1.2 1995/01/11 14:53:31 ram
16?RCS: patch45: moved path stripping from d_portable.U to end of Configure
17?RCS:
18?RCS: Revision 3.0.1.1 1994/10/29 15:50:37 ram
19?RCS: patch36: added ?F: line for metalint file checking
20?RCS:
21?RCS: Revision 3.0 1993/08/18 12:04:48 ram
22?RCS: Baseline for dist 3.0 netwide release.
23?RCS:
24?X:
25?X: This unit ends up producing the config.sh script, which contains all the
26?X: definitions figured out by Configure. The add.Config_sh command knows
27?X: which variables need to be remembered. It also adds the EOT (ends the
28?X: here document redirection with variable substitution).
29?X:
30?MAKE:Config_sh: cf_time cf_by test spitshell startsh myuname Myread \
61bda305 31 End Obsol_sh Loc +d_portable package src
959f3c4c
JH
32?MAKE: -pick add.Config_sh $@ %<
33?MAKE: -pick add $@ ./Obsol_sh
34?MAKE: -pick close.Config_sh $@ %<
35?F:!config.over
61bda305 36?T:file temp
959f3c4c
JH
37: back to where it started
38if test -d ../UU; then
39 cd ..
40fi
41
42: configuration may be patched via a 'config.over' file
43if $test -f config.over; then
44 echo " "
45 dflt=y
46 rp='I see a config.over file. Do you wish to load it?'
47 . UU/myread
48 case "$ans" in
49 n*) echo "OK, I'll ignore it.";;
50 *) . ./config.over
51 echo "Configuration override changes have been loaded."
52 ;;
53 esac
54fi
55
56@if d_portable
57: in case they want portability, strip down executable paths
58?X:
59?X: Strip down paths in located executables. For each file, e.g. vi, there
60?X: is a $vi variable whose value is for instance '/usr/bin/vi'. By resetting
61?X: $vi to 'vi', we rely on the PATH variable to locate the executable...
62?X:
63case "$d_portable" in
64"$define")
65 echo " "
66 echo "Stripping down executable paths..." >&4
61bda305
JH
67?X:
68?X: Previously, we used to do eval $file="\$file" but in order
69?X: to handle things like sh Configure -Dmake=gmake, we can't do
70?X: that. What we *really* want is to strip away the absolute path
71?X: and rely on the end user's $PATH to correctly find the executable.
72?X: This method assumes there is a "basename" command available. If
73?X: not, replace it with the following expr-based command:
74?X: expr $temp : '.*/\(.*\)' \| $temp
75?X: Since this preserves the actual command name, we can now drop the
76?X: OS/2 specific code.
77?X: --Andy Dougherty August 1999
78?X:
959f3c4c
JH
79?X: On OS/2, a special $ar command not even named 'ar' is required,
80?X: so we don't strip that name.
81?X: Also, on DOSish systems, there might not be a ln command, but we
82?X: might have ln='cp'.
83?X: However, we can't set d_portable=undef on such systems since
84?X: Unix-ish tools don't have standard locations there. Thus we
85?X: MUST rely on the user's $PATH.
86?X: --Andy Dougherty 4/1998
61bda305 87?X:
959f3c4c 88 for file in $loclist $trylist; do
61bda305
JH
89 eval temp=\$$file
90 eval $file=`basename $temp`
959f3c4c
JH
91 done
92 ;;
93esac
94
95@end
96: create config.sh file
97echo " "
98echo "Creating config.sh..." >&4
99$spitshell <<EOT >config.sh
100$startsh
101#
102# This file was produced by running the Configure script. It holds all the
103# definitions figured out by Configure. Should you modify one of these values,
104# do not forget to propagate your changes by running "Configure -der". You may
105# instead choose to run each of the .SH files by yourself, or "Configure -S".
106#
107
108# Package name : $package
109# Source directory : $src
110# Configuration time: $cf_time
111# Configured by : $cf_by
112# Target system : $myuname
113