Commit | Line | Data |
---|---|---|
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 | |
27 | echo " " | |
28 | $cat >try.c <<EOCP | |
29 | #include <inttypes.h> | |
30 | int main() { | |
31 | static int32_t foo32 = 0x12345678; | |
32 | } | |
33 | EOCP | |
34 | set try | |
35 | if eval $compile; then | |
36 | echo "<inttypes.h> found." >&4 | |
37 | val="$define" | |
38 | else | |
39 | echo "<inttypes.h> NOT found." >&4 | |
40 | val="$undef" | |
41 | fi | |
2cb64bf6 | 42 | $rm_try |
959f3c4c JH |
43 | set i_inttypes |
44 | eval $setvar | |
45 |