~ubuntu-branches/debian/squeeze/alpine/squeeze

« back to all changes in this revision

Viewing changes to pico/cc5.sol

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/sbin/sh
 
2
#       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
 
3
#         All Rights Reserved
 
4
 
 
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.
 
8
 
 
9
#ident  "@(#)cc.sh      1.8     92/05/26 SMI"   /* SVr4.0 1.4   */
 
10
 
 
11
#               PROPRIETARY NOTICE (Combined)
 
12
#
 
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
 
17
#California.
 
18
#
 
19
#
 
20
#
 
21
#               Copyright Notice 
 
22
#
 
23
#Notice of copyright on this source code product does not indicate 
 
24
#publication.
 
25
#
 
26
#       (c) 1986,1987,1988,1989  Sun Microsystems, Inc
 
27
#       (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
 
28
#                 All rights reserved.
 
29
 
 
30
# cc command for BSD compatibility package:
 
31
#
 
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.
 
37
#       
 
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
 
41
#
 
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.
 
51
#
 
52
#       NOTE: the -Y L, and -Y U, options of cc are not valid 
 
53
 
 
54
if [ "$CC" ] ; then
 
55
        $CC "$@"
 
56
        exit 0
 
57
fi
 
58
 
 
59
if [ -f /usr/ccs/bin/ucbcc ]
 
60
then
 
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`
 
65
 
 
66
        /usr/ccs/bin/ucbcc \
 
67
        -YP,:$ccdir:/usr/ccs/lib:/usr/lib "$@" \
 
68
        -lsocket -lnsl -lelf -laio
 
69
        ret=$?
 
70
        exit $ret
 
71
else
 
72
        echo "/usr/ucb/cc:  language optional software package not installed"
 
73
        exit 1
 
74
fi