Commit | Line | Data |
---|---|---|
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 |
29 | case "$ccflags" in |
30 | *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; | |
31 | esac | |
32 | ||
04664e5e JH |
33 | case "$uselongdouble" in |
34 | $define|true|[yY]*) dflt='y';; | |
35 | *) dflt='n';; | |
36 | esac | |
635fdf3e JH |
37 | cat <<EOM |
38 | ||
39 | Perl can be built to take advantage of long doubles which | |
40 | (if available) may give more accuracy and range for floating point numbers. | |
41 | ||
42 | If this doesn't make any sense to you, just accept the default '$dflt'. | |
43 | EOM | |
04664e5e JH |
44 | rp='Try to use long doubles if available?' |
45 | . ./myread | |
46 | case "$ans" in | |
144ac13f JH |
47 | y|Y) val="$define" ;; |
48 | *) val="$undef" ;; | |
04664e5e JH |
49 | esac |
50 | set uselongdouble | |
51 | eval $setvar | |
52 | ||
9a9edc35 | 53 | case "$uselongdouble" in |
a38738d1 JH |
54 | true|[yY]*) uselongdouble="$define" ;; |
55 | esac | |
56 | ||
57 | case "$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.) | |
68 | EOM | |
69 | fi | |
70 | ;; | |
71 | esac | |
04664e5e | 72 | |
d088635c JH |
73 | case "$uselongdouble:$d_sqrtl" in |
74 | $define:$undef) | |
75 | $cat <<EOM >&4 | |
76 | ||
77 | You requested the use of long doubles but you do not seem to have | |
78 | the mathematic functions for long doubles. I'm disabling the use | |
79 | of long doubles. | |
80 | EOM | |
81 | uselongdouble=$undef | |
82 | ;; | |
83 | esac | |
84 |