This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix .gitignore: only ignore 'perl' in root of repo, not U/perl subdir
[metaconfig.git] / dist / U / cc.U
1 ?RCS: $Id: cc.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: cc.U,v $
12 ?RCS: Revision 3.0.1.4  1995/05/12  12:06:47  ram
13 ?RCS: patch54: may now abort Configure when cc does not work
14 ?RCS:
15 ?RCS: Revision 3.0.1.3  1995/01/11  15:20:11  ram
16 ?RCS: patch45: changed gcc checking message to a more explicit one (WED)
17 ?RCS:
18 ?RCS: Revision 3.0.1.2  1994/10/29  16:04:29  ram
19 ?RCS: patch36: detect gcc even when not called as 'gcc' (ADO)
20 ?RCS: patch36: simplified gcc version checking (ADO)
21 ?RCS: patch36: added ?F: line for metalint file checking
22 ?RCS:
23 ?RCS: Revision 3.0.1.1  1994/05/06  14:26:06  ram
24 ?RCS: patch23: added support for gcc version (ADO)
25 ?RCS:
26 ?RCS: Revision 3.0  1993/08/18  12:05:30  ram
27 ?RCS: Baseline for dist 3.0 netwide release.
28 ?RCS:
29 ?MAKE:cc: Myread Oldconfig Checkcc test
30 ?MAKE:  -pick add $@ %<
31 ?S:cc:
32 ?S:     This variable holds the name of a command to execute a C compiler which
33 ?S:     can resolve multiple global references that happen to have the same
34 ?S:     name.  Usual values are 'cc' and 'gcc'.
35 ?S:     Fervent ANSI compilers may be called 'c89'.  AIX has xlc.
36 ?S:.
37 ?F:!cc.cbu
38 ?D:cc='cc'
39 : Determine the C compiler to be used
40 echo " "
41 case "$cc" in
42 '') dflt=cc;;
43 *) dflt="$cc";;
44 esac
45 rp="Use which C compiler?"
46 . ./myread
47 cc="$ans"
48
49 : See whether they have no cc but they do have gcc
50 . ./trygcc
51 ?X: Look for a hint-file generated 'call-back-unit'.  Now that the
52 ?X: user has specified the compiler, we may need to set or change some
53 ?X: other defaults.
54 if $test -f cc.cbu; then
55     . ./cc.cbu
56 fi
57 . ./checkcc
58