Commit | Line | Data |
---|---|---|
d5e0373c JH |
1 | ?RCS: $Id$ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 2000 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: | |
96c4bd19 | 8 | ?MAKE:d_modfl d_modflproto: Inlibc Compile Hasproto cat \ |
d2b62e58 | 9 | test ccflags uselongdouble \ |
7668538f MBT |
10 | d_sqrtl d_aintl d_copysignl d_ilogbl d_scalbnl d_frexpl d_ldexpl \ |
11 | d_truncl | |
d5e0373c JH |
12 | ?MAKE: -pick add $@ %< |
13 | ?S:d_modfl: | |
14 | ?S: This variable conditionally defines the HAS_MODFL symbol, which | |
15 | ?S: indicates to the C program that the modfl() routine is available. | |
16 | ?S:. | |
a7eb1db8 | 17 | ?S:d_modflproto: |
554af3fc MB |
18 | ?S: This symbol, if defined, indicates that the system provides |
19 | ?S: a prototype for the modfl() function. Otherwise, it is up | |
20 | ?S: to the program to supply one. C99 says it should be | |
21 | ?S: long double modfl(long double, long double *); | |
a7eb1db8 | 22 | ?S:. |
d5e0373c JH |
23 | ?C:HAS_MODFL: |
24 | ?C: This symbol, if defined, indicates that the modfl routine is | |
25 | ?C: available to split a long double x into a fractional part f and | |
26 | ?C: an integer part i such that |f| < 1.0 and (f + i) = x. | |
27 | ?C:. | |
a7eb1db8 | 28 | ?C:HAS_MODFL_PROTO: |
554af3fc MB |
29 | ?C: This symbol, if defined, indicates that the system provides |
30 | ?C: a prototype for the modfl() function. Otherwise, it is up | |
31 | ?C: to the program to supply one. | |
a7eb1db8 | 32 | ?C:. |
d5e0373c | 33 | ?H:#$d_modfl HAS_MODFL /**/ |
554af3fc | 34 | ?H:#$d_modflproto HAS_MODFL_PROTO /**/ |
d5e0373c | 35 | ?H:. |
96c4bd19 AC |
36 | ?T:message |
37 | ?LINT:set d_modfl | |
bf7497fb | 38 | ?LINT:set d_modflproto |
a4f5ff76 | 39 | ?LINT:change ccflags |
d5e0373c JH |
40 | : see if modfl exists |
41 | set modfl d_modfl | |
42 | eval $inlibc | |
43 | ||
a7eb1db8 MB |
44 | : see if prototype for modfl is available |
45 | echo " " | |
d2b62e58 | 46 | set d_modflproto modfl define math.h |
a7eb1db8 MB |
47 | eval $hasproto |
48 | ||
b21b2cb6 | 49 | if $test "$uselongdouble" = "$define"; then |
1fbd636f JH |
50 | message="" |
51 | if $test "$d_sqrtl" != "$define"; then | |
52 | message="$message sqrtl" | |
53 | fi | |
54 | if $test "$d_modfl" != "$define"; then | |
7668538f MBT |
55 | if $test "$d_truncl:$d_copysignl" = "$define:$define"; then |
56 | echo "You have both truncl and copysignl, so I can emulate modfl." | |
b21b2cb6 | 57 | else |
7668538f MBT |
58 | if $test "$d_aintl:$d_copysignl" = "$define:$define"; then |
59 | echo "You have both aintl and copysignl, so I can emulate modfl." | |
60 | else | |
61 | message="$message modfl" | |
62 | fi | |
b21b2cb6 | 63 | fi |
1fbd636f JH |
64 | fi |
65 | if $test "$d_frexpl" != "$define"; then | |
66 | if $test "$d_ilogbl:$d_scalbnl" = "$define:$define"; then | |
67 | echo "You have both ilogbl and scalbnl, so I can emulate frexpl." | |
68 | else | |
69 | message="$message frexpl" | |
70 | fi | |
71 | fi | |
6cbd82a3 MBT |
72 | if $test "$d_ldexpl" != "$define"; then |
73 | message="$message ldexpl" | |
74 | fi | |
b21b2cb6 | 75 | |
1fbd636f | 76 | if $test "$message" != ""; then |
b21b2cb6 JH |
77 | $cat <<EOM >&4 |
78 | ||
79 | *** You requested the use of long doubles but you do not seem to have | |
1fbd636f JH |
80 | *** the following mathematical functions needed for long double support: |
81 | *** $message | |
4b62dc2e JH |
82 | *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits. |
83 | *** Cannot continue, aborting. | |
b21b2cb6 JH |
84 | |
85 | EOM | |
86 | ||
4b62dc2e | 87 | exit 1 |
b21b2cb6 JH |
88 | fi |
89 | fi | |
90 |