Commit | Line | Data |
fed7345c |
1 | ?RCS: $Id: archlib.U,v 3.0.1.2 1995/01/30 14:32:22 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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu> |
12 | ?RCS: |
13 | ?RCS: $Log: archlib.U,v $ |
14 | ?RCS: Revision 3.0.1.2 1995/01/30 14:32:22 ram |
15 | ?RCS: patch49: archname is now systematically recomputed |
16 | ?RCS: patch49: can now handle installation prefix changes (from WED) |
17 | ?RCS: |
18 | ?RCS: Revision 3.0.1.1 1994/10/29 16:02:36 ram |
19 | ?RCS: patch36: created by ADO |
20 | ?RCS: |
21 | ?MAKE:d_archlib archlib archlibexp installarchlib archname: afs spackage \ |
22 | cat Getfile Loc Oldconfig prefixexp privlib osname test Prefixit rm \ |
23 | Prefixup |
24 | ?MAKE: -pick add $@ %< |
25 | ?S:d_archlib: |
26 | ?S: This variable conditionally defines ARCHLIB to hold the pathname |
27 | ?S: of architecture-dependent library files for $package. If |
28 | ?S: $archlib is the same as $privlib, then this is set to undef. |
29 | ?S:. |
30 | ?S:archname: |
31 | ?S: This variable is a short name to characterize the current |
32 | ?S: architecture. It is used to construct the default archlib. |
33 | ?S:. |
34 | ?S:archlib: |
35 | ?S: This variable holds the name of the directory in which the user wants |
36 | ?S: to put architecture-dependent public library files for $package. |
37 | ?S: It is most often a local directory such as /usr/local/lib. |
38 | ?S: Programs using this variable must be prepared to deal |
39 | ?S: with filename expansion. |
40 | ?S:. |
41 | ?S:archlibexp: |
42 | ?S: This variable is the same as the archlib variable, but is |
43 | ?S: filename expanded at configuration time, for convenient use. |
44 | ?S:. |
45 | ?S:installarchlib: |
46 | ?S: This variable is really the same as archlibexp but may differ on |
47 | ?S: those systems using AFS. For extra portability, only this variable |
48 | ?S: should be used in makefiles. |
49 | ?S:. |
50 | ?C:ARCHLIB: |
51 | ?C: This variable, if defined, holds the name of the directory in |
52 | ?C: which the user wants to put architecture-dependent public |
53 | ?C: library files for $package. It is most often a local directory |
54 | ?C: such as /usr/local/lib. Programs using this variable must be |
55 | ?C: prepared to deal with filename expansion. If ARCHLIB is the |
56 | ?C: same as PRIVLIB, it is not defined, since presumably the |
57 | ?C: program already searches PRIVLIB. |
58 | ?C:. |
59 | ?C:ARCHLIB_EXP: |
60 | ?C: This symbol contains the ~name expanded version of ARCHLIB, to be used |
61 | ?C: in programs that are not prepared to deal with ~ expansion at run-time. |
62 | ?C:. |
63 | ?H:#$d_archlib ARCHLIB "$archlib" /**/ |
64 | ?H:#$d_archlib ARCHLIB_EXP "$archlibexp" /**/ |
65 | ?H:. |
66 | ?T:xxx tarchname |
67 | : determine where public architecture dependent libraries go |
68 | ?X: Always recompute archname in case osname changes -- RAM |
69 | ?X: But this prevents us from setting a sensible value in a hints file |
70 | ?X: or on the command line. -- ADO. |
71 | case "$archname" in |
72 | '') |
73 | if xxx=`./loc arch blurfl $pth`; test -f "$xxx"; then |
74 | tarchname=`arch` |
75 | archname="${tarchname}-$osname" |
76 | elif xxx=`./loc uname blurfl $pth`; test -f "$xxx" ; then |
77 | if uname -m > tmparch 2>&1 ; then |
78 | tarchname=`cat tmparch` |
79 | archname="${tarchname}-$osname" |
80 | fi |
81 | $rm -f tmparch |
82 | else |
83 | archname="$osname" |
84 | fi |
85 | ;; |
86 | esac |
87 | set archlib archlib |
88 | eval $prefixit |
89 | case "$archlib" in |
90 | '') |
91 | case "$privlib" in |
92 | '') |
93 | dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib` |
94 | set dflt |
95 | eval $prefixup |
96 | ;; |
97 | *) dflt="$privlib/$archname";; |
98 | esac |
99 | ;; |
100 | *) dflt="$archlib";; |
101 | esac |
102 | cat <<EOM |
103 | |
104 | $spackage contains architecture-dependent library files. If you are |
105 | sharing libraries in a heterogeneous environment, you might store |
106 | these files in a separate location. Otherwise, you can just include |
107 | them with the rest of the public library files. |
108 | |
109 | EOM |
110 | fn=d~ |
111 | rp='Where do you want to put the public architecture-dependent libraries?' |
112 | . ./getfile |
113 | archlib="$ans" |
114 | archlibexp="$ansexp" |
115 | |
116 | if $afs; then |
117 | $cat <<EOM |
118 | |
119 | Since you are running AFS, I need to distinguish the directory in which |
120 | private files reside from the directory in which they are installed (and from |
121 | which they are presumably copied to the former directory by occult means). |
122 | |
123 | EOM |
124 | case "$installarchlib" in |
125 | '') dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;; |
126 | *) dflt="$installarchlib";; |
127 | esac |
128 | fn=de~ |
129 | rp='Where will architecture-dependent library files be installed?' |
130 | . ./getfile |
131 | installarchlib="$ans" |
132 | else |
133 | installarchlib="$archlibexp" |
134 | fi |
135 | if $test X"$archlib" = X"$privlib"; then |
136 | d_archlib="$undef" |
137 | else |
138 | d_archlib="$define" |
139 | fi |
140 | |