This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix .gitignore: only ignore 'perl' in root of repo, not U/perl subdir
[metaconfig.git] / U / perl / uselonglong.U
CommitLineData
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
26case "$uselonglong" in
27''|true|[yY]*) uselonglong="$define" ;;
28*) case "$ccflags" in
29 *-DUSE_LONG_LONG*) uselonglong="$define" ;;
30 *) uselonglong="$undef" ;;
31 esac
32 ;;
33esac
34case "$uselonglong" in
35$define) dflt='y';;
36*) dflt='n';;
37esac
a38738d1
JH
38cat <<EOM
39
40Perl can be built to take advantage of long longs which
41(if available) may give more range for integer numbers.
42
7d402884 43If this doesn't make any sense to you, just accept the default '$dflt'.
a38738d1 44EOM
a38738d1
JH
45rp='Try to use long longs if available?'
46. ./myread
47case "$ans" in
48y|Y) val="$define" ;;
49*) val="$undef" ;;
50esac
51set uselonglong
52eval $setvar
a38738d1
JH
53case "$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.)
64EOM
65 fi
66 ;;
67esac
68