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