This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Even better use64bitall logic.
[metaconfig.git] / U / perl / uselongdbl.U
CommitLineData
04664e5e
JH
1?RCS: $Id$
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:
d088635c 8?MAKE:uselongdouble: Myread Oldconfig Setvar cat test usemorebits d_sqrtl
04664e5e
JH
9?MAKE: -pick add $@ %<
10?Y:TOP
11?S:uselongdouble:
12?S: This variable conditionally defines the USE_LONG_DOUBLE symbol,
13?S: and indicates that long doubles should be used when available.
14?S:.
15?C:USE_LONG_DOUBLE:
16?C: This symbol, if defined, indicates that long doubles should
17?C: be used when available.
18?C:.
a38738d1
JH
19?H:?%<:#ifndef USE_LONG_DOUBLE
20?H:?%<:#$uselongdouble USE_LONG_DOUBLE /**/
21?H:?%<:#endif
04664e5e
JH
22?H:.
23?LINT:set uselongdouble
24?LINT:extern ccflags
25?LINT:change ccflags
70674189 26?LINT:use usemorebits
313cb6b3 27?LINT:use uselargefiles
9a9edc35 28?F:!uselongdouble.cbu
a38738d1
JH
29case "$ccflags" in
30*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
31esac
32
04664e5e
JH
33case "$uselongdouble" in
34$define|true|[yY]*) dflt='y';;
35*) dflt='n';;
36esac
635fdf3e
JH
37cat <<EOM
38
39Perl can be built to take advantage of long doubles which
40(if available) may give more accuracy and range for floating point numbers.
41
42If this doesn't make any sense to you, just accept the default '$dflt'.
43EOM
04664e5e
JH
44rp='Try to use long doubles if available?'
45. ./myread
46case "$ans" in
144ac13f
JH
47y|Y) val="$define" ;;
48*) val="$undef" ;;
04664e5e
JH
49esac
50set uselongdouble
51eval $setvar
52
9a9edc35 53case "$uselongdouble" in
a38738d1
JH
54true|[yY]*) uselongdouble="$define" ;;
55esac
56
57case "$uselongdouble" in
58$define)
9a9edc35
JH
59: Look for a hint-file generated 'call-back-unit'. If the
60: user has specified that long doubles should be used,
61: we may need to set or change some other defaults.
62 if $test -f uselongdouble.cbu; then
63 echo "Your platform has some specific hints for long doubles, using them..."
64 . ./uselongdouble.cbu
65 else
66 $cat <<EOM
67(Your platform doesn't have any specific hints for long doubles.)
68EOM
69 fi
70 ;;
71esac
04664e5e 72
d088635c
JH
73case "$uselongdouble:$d_sqrtl" in
74$define:$undef)
75 $cat <<EOM >&4
76
77You requested the use of long doubles but you do not seem to have
78the mathematic functions for long doubles. I'm disabling the use
79of long doubles.
80EOM
81 uselongdouble=$undef
82 ;;
83esac
84