1 ?X: These units are based on the ones supplied with dist-3.0
2 ?X: patchlevel 22. They have been changed or enhanced to work with
3 ?X: perl5alpha. I would appreciate hearing about any changes,
4 ?X: corrections, or enhancements.
5 ?X: Andy Dougherty doughera@lafcol.lafayette.edu
8 ?X: Easton, PA 18042-1782
9 ?X: Sat Apr 2 15:45:17 EST 1994
10 ?RCS: $Id: libs.U,v 3.0.1.1 1993/08/25 14:02:31 ram Exp $
12 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
14 ?RCS: You may redistribute only under the terms of the Artistic Licence,
15 ?RCS: as specified in the README file that comes with the distribution.
16 ?RCS: You may reuse parts of this distribution only within the terms of
17 ?RCS: that same Artistic Licence; a copy of which may be found at the root
18 ?RCS: of the source tree for dist 3.0.
20 ?RCS: $Log: libs.U,v $
21 ?RCS: Revision 3.0.1.1 1993/08/25 14:02:31 ram
22 ?RCS: patch6: added default for libs
24 ?RCS: Revision 3.0 1993/08/18 12:09:03 ram
25 ?RCS: Baseline for dist 3.0 netwide release.
27 ?MAKE:libs: test cat Myread Oldconfig Loc libpth package xlibpth
28 ?MAKE: -pick add $@ %<
30 ?S: This variable holds the additional libraries we want to use.
31 ?S: It is up to the Makefile to deal with it.
33 ?T:xxx yyy zzz thislib thatlib libswanted
36 ?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
37 ?X: -lBSD, -lPW, and -lx only get used if there are unresolved
38 ?X: routines at link time. Usually, these are backwards compatability
39 ?X: libraries, and may not be as reliable as the standard c library.
40 ?X: The ordering of c_s, posix, and cposix is a guess and almost
41 ?X: certainly wrong on about half of all systems.
42 ?INIT:libswanted="net socket nsl inet nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x"
44 : Looking for optional libraries
46 echo "Checking for optional libraries..." >&4
52 '') libswanted='c_s';;
54 for thislib in $libswanted; do
58 *) thatlib="${thislib}_s";;
60 xxx=`./loc lib$thislib.a X $libpth`
61 yyy=`./loc lib$thatlib.a X $libpth`
62 zzz=`./loc lib$thislib.so.[0-9]'*' $libpth`
63 if $test -f $xxx; then
64 echo "Found -l$thislib."
66 "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
67 *) dflt="$dflt -l$thislib";;
69 elif $test -f $yyy; then
70 echo "Found -l$thatlib."
72 "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
73 *) dflt="$dflt -l$thatlib";;
75 elif $test -f $zzz; then
76 echo "Found -$thislib."
78 "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
79 *) dflt="$dflt -l$thislib";;
82 xxx=`./loc Slib$thislib.a X $xlibpth`
83 yyy=`./loc Slib$thatlib.a X $xlibpth`
84 if $test -f $xxx; then
85 echo "Found -l$thislib."
87 "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
88 *) dflt="$dflt -l$thislib";;
90 elif $test -f $yyy; then
91 echo "Found -l$thatlib."
93 "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
94 *) dflt="$dflt -l$thatlib";;
109 ' '|'') dflt='none';;
114 Some versions of Unix support shared libraries, which make executables smaller
115 but make load time slightly longer.
117 On some systems, mostly newer Unix System V's, the shared library is included
118 by putting the option "-lc_s" as the last thing on the cc command line when
119 linking. Other systems use shared libraries by default. There may be other
120 libraries needed to compile $package on your machine as well. If your system
121 needs the "-lc_s" option, include it here. Include any other special libraries
122 here as well. Say "none" for none.
126 rp="Any additional libraries?"