1 ?RCS: $Id: d_longdbl.U,v $
3 ?RCS: Copyright (c) 1998 Andy Dougherty
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.
8 ?RCS: $Log: d_longdbl.U,v $
10 ?MAKE:d_longdbl longdblsize: Compile Setvar Myread run \
11 cat rm_try test doublesize
12 ?MAKE: -pick add $@ %<
14 ?S: This variable conditionally defines HAS_LONG_DOUBLE if
15 ?S: the long double type is supported.
18 ?S: This variable contains the value of the LONG_DOUBLESIZE symbol, which
19 ?S: indicates to the C program how many bytes there are in a long double,
20 ?S: if this system supports long doubles.
23 ?C: This symbol will be defined if the C compiler supports long
27 ?C: This symbol contains the size of a long double, so that the
28 ?C: C preprocessor can make decisions based on it. It is only
29 ?C: defined if the system supports long doubles.
31 ?H:#$d_longdbl HAS_LONG_DOUBLE /**/
32 ?H:?LONG_DOUBLESIZE:#ifdef HAS_LONG_DOUBLE
33 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLESIZE $longdblsize /**/
34 ?H:?LONG_DOUBLESIZE:#endif
38 : check for long doubles
40 echo "Checking to see if you have long double..." >&4
41 echo 'int main() { long double x = 7.0; }' > try.c
43 if eval $compile; then
45 echo "You have long double."
48 echo "You do not have long double."
54 @if LONG_DOUBLESIZE || longdblsize
55 : check for length of long double
56 ?X: Check only if d_longdbl and if longdblsize is not already set.
57 case "${d_longdbl}${longdblsize}" in
60 echo "Checking to see how big your long doubles are..." >&4
65 printf("%d\n", sizeof(long double));
69 ?X: Don't use compile_ok because some compilers warn you that they have
70 ?X: 'long double' as just 'double'.
72 if eval $compile; then
73 longdblsize=`$run ./try`
74 echo "Your long doubles are $longdblsize bytes long."
78 echo "(I can't seem to compile the test program. Guessing...)" >&4
79 rp="What is the size of a long double (in bytes)?"
83 if $test "X$doublesize" = "X$longdblsize"; then
84 echo "That isn't any different from an ordinary double."
85 echo "I'll keep your setting anyway, but you may see some"
86 echo "harmless compilation warnings."