This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / ebcdic.U
CommitLineData
d8875586
MBT
1?RCS: $Id: ebcdic.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: Copyright (c) 1998 Andy Dougherty
12?RCS:
13?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
14?RCS: Merged into dist by Andy Dougherty July 13, 1998
15?RCS:
16?MAKE:ebcdic: Compile Setvar cat rm run
17?MAKE: -pick add $@ %<
18?S:ebcdic:
19?S: This variable conditionally defines EBCDIC if this
20?S: system uses EBCDIC encoding. Among other things, this
21?S: means that the character ranges are not contiguous.
22?S: See trnl.U
23?S:.
24?C:EBCDIC:
25?C: This symbol, if defined, indicates that this system uses
26?C: EBCDIC encoding.
27?C:.
28?H:#$ebcdic EBCDIC /**/
29?H:.
30?F:!try
31?LINT:set ebcdic
32: look whether system uses EBCDIC
33echo " "
34echo "Determining whether or not we are on an EBCDIC system..." >&4
35$cat >try.c <<'EOM'
36int main()
37{
38 if ('M'==0xd4) return 0;
39 return 1;
40}
41EOM
42val=$undef
43set try
44if eval $compile_ok; then
45 if $run ./try; then
46 echo "You seem to speak EBCDIC." >&4
47 val="$define"
48 else
49 echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
50 fi
51else
52 echo "I'm unable to compile the test program." >&4
53 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
54fi
55$rm -f try try.*
56set ebcdic
57eval $setvar
58