| 1 | ?RCS: $Id: libpth.U 1 2006-08-24 12:32:52Z rmanfredi $ |
| 2 | ?RCS: |
| 3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, 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 4.0. |
| 10 | ?RCS: |
| 11 | ?RCS: $Log: libpth.U,v $ |
| 12 | ?RCS: Revision 3.0.1.6 1997/02/28 16:08:49 ram |
| 13 | ?RCS: patch61: new loclibpth variable |
| 14 | ?RCS: |
| 15 | ?RCS: Revision 3.0.1.5 1995/01/11 15:31:30 ram |
| 16 | ?RCS: patch45: call ./mips instead of just mips (WED) |
| 17 | ?RCS: |
| 18 | ?RCS: Revision 3.0.1.4 1994/08/29 16:29:15 ram |
| 19 | ?RCS: patch32: added /lib/pa1.1 for HP-UX specially tuned PA-RISC libs (ADO) |
| 20 | ?RCS: patch32: fixed information message, making it clearer (ADO) |
| 21 | ?RCS: |
| 22 | ?RCS: Revision 3.0.1.3 1994/06/20 07:03:54 ram |
| 23 | ?RCS: patch30: added /usr/shlib to glibpth for shared-only libraries |
| 24 | ?RCS: |
| 25 | ?RCS: Revision 3.0.1.2 1994/05/13 15:26:57 ram |
| 26 | ?RCS: patch27: fixed a typo (libpth -> glibpth) |
| 27 | ?RCS: |
| 28 | ?RCS: Revision 3.0.1.1 1994/05/06 15:07:53 ram |
| 29 | ?RCS: patch23: now asks for library directories to be searched (ADO) |
| 30 | ?RCS: |
| 31 | ?RCS: Revision 3.0 1993/08/18 12:09:02 ram |
| 32 | ?RCS: Baseline for dist 3.0 netwide release. |
| 33 | ?RCS: |
| 34 | ?X: |
| 35 | ?X: This unit initializes the path for C library lookup. |
| 36 | ?X: |
| 37 | ?MAKE:libpth glibpth xlibpth plibpth loclibpth: \ |
| 38 | usrinc incpath test cat Myread Oldconfig |
| 39 | ?MAKE: -pick add $@ %< |
| 40 | ?S:libpth: |
| 41 | ?S: This variable holds the general path (space-separated) used to find |
| 42 | ?S: libraries. It is intended to be used by other units. |
| 43 | ?S:. |
| 44 | ?S:glibpth: |
| 45 | ?S: This variable holds the general path (space-separated) used to |
| 46 | ?S: find libraries. It may contain directories that do not exist on |
| 47 | ?S: this platform, libpth is the cleaned-up version. |
| 48 | ?S:. |
| 49 | ?S:xlibpth: |
| 50 | ?S: This variable holds extra path (space-separated) used to find |
| 51 | ?S: libraries on this platform, for example CPU-specific libraries |
| 52 | ?S: (on multi-CPU platforms) may be listed here. |
| 53 | ?S:. |
| 54 | ?S:loclibpth: |
| 55 | ?S: This variable holds the paths (space-separated) used to find local |
| 56 | ?S: libraries. It is prepended to libpth, and is intended to be easily |
| 57 | ?S: set from the command line. |
| 58 | ?S:. |
| 59 | ?S:plibpth: |
| 60 | ?S: Holds the private path used by Configure to find out the libraries. |
| 61 | ?S: Its value is prepend to libpth. This variable takes care of special |
| 62 | ?S: machines, like the mips. Usually, it should be empty. |
| 63 | ?S:. |
| 64 | ?T: xxx dlist |
| 65 | ?LINT:use usrinc |
| 66 | ?INIT:: change the next line if compiling for Xenix/286 on Xenix/386 |
| 67 | ?INIT:xlibpth='/usr/lib/386 /lib/386' |
| 68 | ?INIT:: Possible local library directories to search. |
| 69 | ?INIT:loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" |
| 70 | ?INIT:loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" |
| 71 | ?INIT: |
| 72 | ?INIT:: general looking path for locating libraries |
| 73 | ?INIT:glibpth="/lib /usr/lib $xlibpth" |
| 74 | ?INIT:glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" |
| 75 | ?X: /shlib is for Digital Unix 4.0 |
| 76 | ?X: /usr/shlib is for OSF/1 systems. |
| 77 | ?INIT:test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" |
| 78 | ?INIT:test -f /shlib/libc.so && glibpth="/shlib $glibpth" |
| 79 | ?INIT:test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" |
| 80 | ?INIT: |
| 81 | ?INIT:: Private path used by Configure to find libraries. Its value |
| 82 | ?INIT:: is prepended to libpth. This variable takes care of special |
| 83 | ?INIT:: machines, like the mips. Usually, it should be empty. |
| 84 | ?INIT:plibpth='' |
| 85 | ?INIT: |
| 86 | : Set private lib path |
| 87 | case "$plibpth" in |
| 88 | '') if ./mips; then |
| 89 | ?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib |
| 90 | plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" |
| 91 | fi;; |
| 92 | esac |
| 93 | case "$libpth" in |
| 94 | ' ') dlist='';; |
| 95 | '') dlist="$loclibpth $plibpth $glibpth";; |
| 96 | *) dlist="$libpth";; |
| 97 | esac |
| 98 | |
| 99 | : Now check and see which directories actually exist, avoiding duplicates |
| 100 | libpth='' |
| 101 | for xxx in $dlist |
| 102 | do |
| 103 | if $test -d $xxx; then |
| 104 | case " $libpth " in |
| 105 | *" $xxx "*) ;; |
| 106 | *) libpth="$libpth $xxx";; |
| 107 | esac |
| 108 | fi |
| 109 | done |
| 110 | $cat <<'EOM' |
| 111 | |
| 112 | Some systems have incompatible or broken versions of libraries. Among |
| 113 | the directories listed in the question below, please remove any you |
| 114 | know not to be holding relevant libraries, and add any that are needed. |
| 115 | Say "none" for none. |
| 116 | |
| 117 | EOM |
| 118 | case "$libpth" in |
| 119 | '') dflt='none';; |
| 120 | *) |
| 121 | ?X: strip leading space |
| 122 | set X $libpth |
| 123 | shift |
| 124 | dflt=${1+"$@"} |
| 125 | ;; |
| 126 | esac |
| 127 | rp="Directories to use for library searches?" |
| 128 | . ./myread |
| 129 | case "$ans" in |
| 130 | none) libpth=' ';; |
| 131 | *) libpth="$ans";; |
| 132 | esac |
| 133 | |