This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
e328a9aef20f055fb89b3f973dfe06fed091ff55
[metaconfig.git] / U / modified / d_csh.U
1 ?RCS: $Id: d_csh.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: d_csh.U,v $
12 ?RCS: Revision 3.0.1.1  1997/02/28  15:32:18  ram
13 ?RCS: patch61: added full_csh to preserve the full path even when portable
14 ?RCS:
15 ?RCS: Revision 3.0  1993/08/18  12:05:53  ram
16 ?RCS: Baseline for dist 3.0 netwide release.
17 ?RCS:
18 ?MAKE:d_csh full_csh: csh Setvar
19 ?MAKE:  -pick add $@ %<
20 ?S:d_csh:
21 ?S:     This variable conditionally defines the CSH symbol, which
22 ?S:     indicates to the C program that the C-shell exists.
23 ?S:.
24 ?S:full_csh:
25 ?S:     This variable contains the full pathname to 'csh', whether or
26 ?S:     not the user has specified 'portability'.  This is only used
27 ?S:     in the compiled C program, and we assume that all systems which
28 ?S:     can share this executable will have the same full pathname to
29 ?S:     'csh.'
30 ?S:.
31 ?X:     Yes, I know about the C symbol PORTABLE, but I think csh
32 ?X:     is unlikely to move, and I'm too lazy to add all the
33 ?X:     #ifdef PORTABLE sections to the perl source.
34 ?X:
35 ?C:HAS_CSH:
36 ?C:     This symbol, if defined, indicates that the C-shell exists.
37 ?C:.
38 ?C:CSH:
39 ?C:     This symbol, if defined, contains the full pathname of csh.
40 ?C:.
41 ?X: Previously, I just did $d_csh CSH "$full_csh", but that caused
42 ?X: problems on VMS where the config.sh extraction program changes
43 ?X: $undef to a real cpp undef, and they then had  #undef CSH ""
44 ?X: which the compiler didn't like.  It's easy to work around this,
45 ?X: so I did.  --AD  3/1998.
46 ?X: And we don't want to define CSH if !HAS_CSH, but we don't want
47 ?X: those lines in config.h if they don't need CSH, so protect with ?CSH
48 ?X: and not ?%<. --RAM, 15/02/2004
49 ?H:?%<:#$d_csh HAS_CSH          /**/
50 ?H:?CSH:#ifdef HAS_CSH
51 ?H:?CSH:#define CSH "$full_csh" /**/
52 ?H:?CSH:#endif
53 ?H:.
54 ?LINT:set d_csh
55 : get csh whereabouts
56 case "$csh" in
57 'csh') val="$undef" ;;
58 *) val="$define" ;;
59 esac
60 set d_csh
61 eval $setvar
62 : Respect a hint or command line value for full_csh.
63 case "$full_csh" in
64 '') full_csh=$csh ;;
65 esac
66