2
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
5
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
6
# The copyright notice above does not evidence any
7
# actual or intended publication of such source code.
9
#ident "@(#)cc.sh 1.8 92/05/26 SMI" /* SVr4.0 1.4 */
11
# PROPRIETARY NOTICE (Combined)
13
#This source code is unpublished proprietary information
14
#constituting, or derived under license from AT&T's UNIX(r) System V.
15
#In addition, portions of such source code were derived from Berkeley
16
#4.3 BSD under license from the Regents of the University of
23
#Notice of copyright on this source code product does not indicate
26
# (c) 1986,1987,1988,1989 Sun Microsystems, Inc
27
# (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
28
# All rights reserved.
30
# cc command for BSD compatibility package:
32
# BSD compatibility package header files (/usr/ucbinclude)
33
# are included before SVr4 default (/usr/include) files but
34
# after any directories specified on the command line via
35
# the -I option. Thus, the BSD header files are included
36
# next to last, and SVr4 header files are searched last.
38
# BSD compatibility package libraries (/usr/ucblib) are
39
# searched next to third to last. SVr4 default libraries
40
# (/usr/ccs/lib and /usr/lib) are searched next to last
42
# Because the BSD compatibility package C library does not
43
# contain all the C library routines of /usr/ccs/lib/libc.a,
44
# the BSD package C library is named /usr/ucblib/libucb.a
45
# and is passed explicitly to cc. This ensures that libucb.a
46
# will be searched first for routines and that
47
# /usr/ccs/lib/libc.a will be searched afterwards for routines
48
# not found in /usr/ucblib/libucb.a. Also because sockets is
49
# provided in libc under BSD, /usr/lib/libsocket and /usr/lib/nsl
50
# are also included as default libraries.
52
# NOTE: the -Y L, and -Y U, options of cc are not valid
59
if [ -f /usr/ccs/bin/ucbcc ]
61
# get the directory where ucbcc points to and set the LD_LIBRARY_PATH
62
# to that directory so as to get the necessary libraries.
63
cclink=`/usr/bin/ls -ln /usr/ccs/bin/ucbcc | awk '{print $11}'`
64
ccdir=`/usr/bin/dirname $cclink`
67
-YP,:$ccdir:/usr/ccs/lib:/usr/lib "$@" \
68
-lsocket -lnsl -lelf -laio
72
echo "/usr/ucb/cc: language optional software package not installed"