This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / U / ebcdic / ebcdic.U
CommitLineData
959f3c4c
JH
1?RCS: $Id: ebcdic.U,v 3.0.1.3 1994/05/06 15:11:49 doughera Exp $
2?RCS:
3?RCS: Copyright (c) 1998 Andy Dougherty
4?RCS:
5?RCS: You may distribute under the terms of either the GNU General Public
6?RCS: License or the Artistic License, as specified in the README file.
7?RCS:
8?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
9?RCS: Merged into dist by Andy Dougherty July 13, 1998
10?RCS:
11?MAKE:ebcdic: Compile Setvar cat rm
12?MAKE: -pick add $@ %<
13?S:ebcdic:
14?S: This variable conditionally defines EBCDIC if this
15?S: system uses EBCDIC encoding. Among other things, this
16?S: means that the character ranges are not contiguous.
17?S: See trnl.U
18?S:.
19?C:EBCDIC:
20?C: This symbol, if defined, indicates that this system uses
21?C: EBCDIC encoding.
22?C:.
23?H:#$ebcdic EBCDIC /**/
24?H:.
25?LINT:set ebcdic
26?F:!tebcdic tebcdic.c
27echo " "
28echo "Determining whether or not we are on an EBCDIC system..." >&4
29$cat >tebcdic.c <<'EOM'
30int main()
31{
32 if ('M'==0xd4) return 0;
33 return 1;
34}
35EOM
36
37val=$undef
38set tebcdic
39if eval $compile_ok; then
40 if ./tebcdic; then
41 echo "You have EBCDIC." >&4
42 val="$define"
43 else
44 echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin, or UTF." >&4
45 fi
46else
47 echo "I'm unable to compile the test program." >&4
48 echo "I'll assume ASCII or some ISO Latin." >&4
49fi
50$rm -f tebcdic.c tebcdic
51set ebcdic
52eval $setvar
53