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: cc.U,v 3.0 1993/08/18 12:05:30 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.
21 ?RCS: Revision 3.0 1993/08/18 12:05:30 ram
22 ?RCS: Baseline for dist 3.0 netwide release.
24 ?MAKE:gccversion cc: cat contains sysman +large cpp \
25 Mcc Myread Guess Oldconfig Loc
26 ?MAKE: -pick add $@ %<
28 ?S: This variable holds the name of a command to execute a C compiler which
29 ?S: can resolve multiple global references that happen to have the same
30 ?S: name. Usual values are "cc", "Mcc", "cc -M", and "gcc".
33 ?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
34 ?S: indicate whether the compiler is version 1 or 2. This is used in
35 ?S: setting some of the default cflags.
39 : see if we need a special compiler
47 *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
48 if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
61 On some systems the default C compiler will not resolve multiple global
62 references that happen to have the same name. On some such systems the "Mcc"
63 command may be used to force these to be resolved. On other systems a "cc -M"
64 command is required. (Note that the -M flag on other systems indicates a
65 memory model to use!) If you have the Gnu C compiler, you might wish to use
69 rp="What command will force resolution on this system?"
77 rp="Use which C compiler?"
82 gcc*) echo "Checking out which version of gcc"
96 case '1': printf("1\n"); break;
97 case '2': printf("2\n"); break;
98 case '3': printf("3\n"); break;
108 if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then
109 gccversion=`./gccvers`
110 echo "You appear to have version $gccversion."
112 echo "Doesn't appear to be GNU cc."
115 if $test "$gccversion" = '1'; then
116 cpp=`./loc gcc-cpp $cpp $pth`