summaryrefslogtreecommitdiff
path: root/mcon/U/archlib.U
blob: 7c6b344ea4a3dff9b9107afb3f25c9b084b80a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
?RCS: $Id: archlib.U 1 2006-08-24 12:32:52Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
?RCS:
?RCS: $Log: archlib.U,v $
?RCS: Revision 3.0.1.5  1997/02/28  15:23:38  ram
?RCS: patch61: skip existence checks for archlib
?RCS:
?RCS: Revision 3.0.1.4  1995/09/25  09:15:18  ram
?RCS: patch59: unit is now forced to the top of Configure, if possible
?RCS:
?RCS: Revision 3.0.1.3  1995/02/15  14:14:14  ram
?RCS: patch51: architecture name is now computed by a separate unit
?RCS:
?RCS: Revision 3.0.1.2  1995/01/30  14:32:22  ram
?RCS: patch49: archname is now systematically recomputed
?RCS: patch49: can now handle installation prefix changes (from WED)
?RCS:
?RCS: Revision 3.0.1.1  1994/10/29  16:02:36  ram
?RCS: patch36: created by ADO
?RCS:
?MAKE:d_archlib archlib archlibexp installarchlib: archname afs spackage \
	cat Getfile Loc Oldconfig prefixexp privlib test Prefixit Prefixup
?MAKE:	-pick add $@ %<
?Y:TOP
?S:d_archlib:
?S:	This variable conditionally defines ARCHLIB to hold the pathname
?S:	of architecture-dependent library files for $package.  If
?S:	$archlib is the same as $privlib, then this is set to undef.
?S:.
?S:archlib:
?S:	This variable holds the name of the directory in which the user wants
?S:	to put architecture-dependent public library files for $package.
?S:	It is most often a local directory such as /usr/local/lib.
?S:	Programs using this variable must be prepared to deal 
?S:	with filename expansion.
?S:.
?S:archlibexp:
?S:	This variable is the same as the archlib variable, but is 
?S:	filename expanded at configuration time, for convenient use.
?S:.
?S:installarchlib:
?S:	This variable is really the same as archlibexp but may differ on
?S:	those systems using AFS. For extra portability, only this variable
?S:	should be used in makefiles.
?S:.
?C:ARCHLIB:
?C:	This variable, if defined, holds the name of the directory in
?C:	which the user wants to put architecture-dependent public
?C:	library files for $package.  It is most often a local directory
?C:	such as /usr/local/lib.  Programs using this variable must be
?C:	prepared to deal with filename expansion.  If ARCHLIB is the
?C:	same as PRIVLIB, it is not defined, since presumably the
?C:	program already searches PRIVLIB.
?C:.
?C:ARCHLIB_EXP:
?C:	This symbol contains the ~name expanded version of ARCHLIB, to be used
?C:	in programs that are not prepared to deal with ~ expansion at run-time.
?C:.
?H:#$d_archlib ARCHLIB "$archlib"		/**/
?H:#$d_archlib ARCHLIB_EXP "$archlibexp"		/**/
?H:.
: determine where public architecture dependent libraries go
set archlib archlib
eval $prefixit
case "$archlib" in
'')
	case "$privlib" in
	'')
		dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
		set dflt
		eval $prefixup
		;;
	*)  dflt="$privlib/$archname";;
	esac
	;;
*) dflt="$archlib";;
esac
cat <<EOM

$spackage contains architecture-dependent library files.  If you are
sharing libraries in a heterogeneous environment, you might store
these files in a separate location.  Otherwise, you can just include
them with the rest of the public library files.

EOM
fn=d+~
rp='Where do you want to put the public architecture-dependent libraries?'
. ./getfile
archlib="$ans"
archlibexp="$ansexp"

if $afs; then
	$cat <<EOM

Since you are running AFS, I need to distinguish the directory in which
private files reside from the directory in which they are installed (and from
which they are presumably copied to the former directory by occult means).

EOM
	case "$installarchlib" in
	'') dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;;
	*) dflt="$installarchlib";;
	esac
	fn=de~
	rp='Where will architecture-dependent library files be installed?'
	. ./getfile
	installarchlib="$ans"
else
	installarchlib="$archlibexp"
fi
if $test X"$archlib" = X"$privlib"; then
	d_archlib="$undef"
else
	d_archlib="$define"
fi