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 \
11 echo n c cat rm test doublesize exe_ext
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 $n "Checking to see if your system supports long double..." $c >&4
41 echo 'int main() { long double x = 7.0; }' > try.c
43 if eval $compile; then
46 echo "You have long double."
50 echo "You do not have long double."
56 @if LONG_DOUBLESIZE || longdblsize
57 : check for length of long double
58 ?X: Check only if d_longdbl and if longdblsize is not already set.
59 case "${d_longdbl}${longdblsize}" in
62 $echo $n "Checking to see how big your long doubles are..." $c >&4
67 printf("%d\n", sizeof(long double));
71 ?X: Don't use compile_ok because some compilers warn you that they have
72 ?X: 'long double' as just 'double'.
74 if eval $compile; then
75 longdblsize=`./try$exe_ext`
76 $echo " $longdblsize bytes." >&4
80 echo "(I can't seem to compile the test program. Guessing...)" >&4
81 rp="What is the size of a long double (in bytes)?"
85 if $test "X$doublesize" = "X$longdblsize"; then
86 echo "(That isn't any different from an ordinary double.)"