This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Major *try* cleanup: introduce $rm_try
[metaconfig.git] / U / perl / i_inttypes.U
CommitLineData
959f3c4c
JH
1?RCS: $Id$
2?RCS:
3?RCS: Copyright (c) 1998, Jarkko Hietaniemi
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 3.0.
10?RCS:
2cb64bf6 11?MAKE:i_inttypes: Inhdr cat rm_try Setvar Compile
959f3c4c
JH
12?MAKE: -pick add $@ %<
13?S:i_inttypes:
14?S: This variable conditionally defines the I_INTTYPES symbol,
15?S: and indicates whether a C program should include <inttypes.h>.
16?S:.
959f3c4c
JH
17?C:I_INTTYPES:
18?C: This symbol, if defined, indicates to the C program that it should
19?C: include <inttypes.h>.
20?C:.
959f3c4c 21?H:#$i_inttypes I_INTTYPES /**/
959f3c4c
JH
22?H:.
23?LINT:set i_inttypes
959f3c4c
JH
24: see if inttypes.h is available
25: we want a real compile instead of Inhdr because some systems
26: have an inttypes.h which includes non-existent headers
27echo " "
28$cat >try.c <<EOCP
29#include <inttypes.h>
30int main() {
31 static int32_t foo32 = 0x12345678;
32}
33EOCP
34set try
35if eval $compile; then
36 echo "<inttypes.h> found." >&4
37 val="$define"
38else
39 echo "<inttypes.h> NOT found." >&4
40 val="$undef"
41fi
2cb64bf6 42$rm_try
959f3c4c
JH
43set i_inttypes
44eval $setvar
45