Commit | Line | Data |
---|---|---|
a38738d1 JH |
1 | ?RCS: $Id$ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1999 Jarkko Hietaniemi | |
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: | |
41322e17 | 8 | ?MAKE:uselonglong: Myread Oldconfig Setvar cat test ccflags |
a38738d1 JH |
9 | ?MAKE: -pick add $@ %< |
10 | ?Y:TOP | |
11 | ?S:uselonglong: | |
12 | ?S: This variable conditionally defines the USE_LONG_LONG symbol, | |
13 | ?S: and indicates that long longs should be used when available. | |
14 | ?S:. | |
15 | ?C:USE_LONG_LONG: | |
16 | ?C: This symbol, if defined, indicates that long longs should | |
17 | ?C: be used when available. | |
18 | ?C:. | |
19 | ?H:?%<:#ifndef USE_LONG_LONG | |
20 | ?H:?%<:#$uselonglong USE_LONG_LONG /**/ | |
21 | ?H:?%<:#endif | |
22 | ?H:. | |
a38738d1 | 23 | ?LINT:extern ccflags |
a38738d1 | 24 | ?F:!uselonglong.cbu |
2f125bce | 25 | : Check for longlong support |
7d402884 JH |
26 | case "$uselonglong" in |
27 | ''|true|[yY]*) uselonglong="$define" ;; | |
28 | *) case "$ccflags" in | |
29 | *-DUSE_LONG_LONG*) uselonglong="$define" ;; | |
30 | *) uselonglong="$undef" ;; | |
31 | esac | |
32 | ;; | |
33 | esac | |
34 | case "$uselonglong" in | |
35 | $define) dflt='y';; | |
36 | *) dflt='n';; | |
37 | esac | |
a38738d1 JH |
38 | cat <<EOM |
39 | ||
40 | Perl can be built to take advantage of long longs which | |
41 | (if available) may give more range for integer numbers. | |
42 | ||
7d402884 | 43 | If this doesn't make any sense to you, just accept the default '$dflt'. |
a38738d1 | 44 | EOM |
a38738d1 JH |
45 | rp='Try to use long longs if available?' |
46 | . ./myread | |
47 | case "$ans" in | |
48 | y|Y) val="$define" ;; | |
49 | *) val="$undef" ;; | |
50 | esac | |
51 | set uselonglong | |
52 | eval $setvar | |
a38738d1 JH |
53 | case "$uselonglong" in |
54 | $define) | |
55 | : Look for a hint-file generated 'call-back-unit'. If the | |
56 | : user has specified that long longs should be used, | |
57 | : we may need to set or change some other defaults. | |
58 | if $test -f uselonglong.cbu; then | |
59 | echo "Your platform has some specific hints for long longs, using them..." | |
60 | . ./uselonglong.cbu | |
61 | else | |
62 | $cat <<EOM | |
63 | (Your platform doesn't have any specific hints for long longs.) | |
64 | EOM | |
65 | fi | |
66 | ;; | |
67 | esac | |
68 |