Commit | Line | Data |
2304df62 |
1 | ?RCS: $Id: libpth.U,v 3.0 1993/08/18 12:09:02 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: libpth.U,v $ |
12 | ?RCS: Revision 3.0 1993/08/18 12:09:02 ram |
13 | ?RCS: Baseline for dist 3.0 netwide release. |
14 | ?RCS: |
15 | ?X: |
16 | ?X: This unit initializes the path for C library lookup. |
17 | ?X: |
18 | ?MAKE:libpth xlibpth plibpth: mips incpath test cat Myread |
19 | ?MAKE: -pick add $@ %< |
20 | ?S:libpth: |
21 | ?S: This variable holds the general path used to find libraries. It is |
22 | ?S: intended to be used by other units. |
23 | ?S:. |
24 | ?S:plibpth: |
25 | ?S: Holds the private path used by Configure to find out the libraries. |
85e6fe83 |
26 | ?S: Its value is prepended to libpth. This variable takes care of special |
2304df62 |
27 | ?S: machines, like the mips. Usually, it should be empty. |
28 | ?S:. |
29 | ?T: xxx yyy |
30 | ?INIT:: change the next line if compiling for Xenix/286 on Xenix/386 |
31 | ?INIT:xlibpth='/usr/lib/386 /lib/386' |
32 | ?INIT: |
33 | ?INIT:: general looking path for locating libraries |
34 | ?INIT:libpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large" |
35 | ?INIT:libpth="$libpth /usr/lib/small /lib/small" |
36 | ?INIT:libpth="$libpth /usr/ccs/lib /usr/ucblib /usr/local/lib" |
37 | ?INIT: |
38 | ?INIT:: Private path used by Configure to find libraries. Its value |
39 | ?INIT:: is prepend to libpth. This variable takes care of special |
40 | ?INIT:: machines, like the mips. Usually, it should be empty. |
41 | ?INIT:plibpth='' |
42 | ?INIT: |
43 | ?LINT:describe xlibpth |
44 | ?LINT:use mips |
45 | : Set private lib path |
46 | case "$plibpth" in |
47 | '') if mips; then |
48 | ?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib |
49 | plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" |
50 | fi;; |
51 | esac |
52 | libpth="$plibpth $libpth" |
53 | : Now check and see which directories actually exist. |
54 | xxx='' |
55 | for yyy in $libpth |
56 | do |
57 | if $test -d $yyy; then |
58 | xxx="$xxx $yyy" |
59 | fi |
60 | done |
61 | libpth="$xxx" |
62 | $cat <<EOM |
63 | Some systems have incompatible or broken versions of libraries. Where |
64 | should I look for libraries? |
65 | EOM |
66 | |
67 | dflt="$libpth" |
68 | echo " " |
69 | rp="Directories to use for library searches?" |
70 | . ./myread |
71 | case "$ans" in |
72 | none) libpth=' ';; |
73 | *) libpth="$ans";; |
74 | esac |