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 / 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
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:extern ccflags
24 ?LINT:use usemorebits
25 ?F:!uselongdouble.cbu
26 : Check for uselongdouble support
27 case "$ccflags" in
28 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
29 esac
30
31 case "$uselongdouble" in
32 $define|true|[yY]*)     dflt='y';;
33 *) dflt='n';;
34 esac
35 cat <<EOM
36
37 Perl can be built to take advantage of long doubles which
38 (if available) may give more accuracy and range for floating point numbers.
39
40 If this doesn't make any sense to you, just accept the default '$dflt'.
41 EOM
42 rp='Try to use long doubles if available?'
43 . ./myread
44 case "$ans" in
45 y|Y)    val="$define"   ;;
46 *)      val="$undef"    ;;
47 esac
48 set uselongdouble
49 eval $setvar
50
51 case "$uselongdouble" in
52 true|[yY]*) uselongdouble="$define" ;;
53 esac
54
55 : Look for a hint-file generated 'call-back-unit'.  If the
56 : user has specified that long doubles should be used,
57 : we may need to set or change some other defaults.
58 if $test -f uselongdouble.cbu; then
59     echo "Your platform has some specific hints regarding long doubles, using them..."
60     . ./uselongdouble.cbu
61 else
62     case "$uselongdouble" in
63         $define)
64                 $cat <<EOM
65 (Your platform does not have any specific hints for long doubles.)
66 EOM
67         ;;
68     esac
69 fi
70