/[autoconf]/autoconf/lib/autoconf/c.m4
ViewVC logotype

Diff of /autoconf/lib/autoconf/c.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.158 by eggert, Mon Nov 12 18:46:44 2001 UTC revision 1.159 by eggert, Fri Nov 16 20:09:58 2001 UTC
# Line 197  f = $1; Line 197  f = $1;
197  # Be sure to use this array to avoid `unused' warnings, which are even  # Be sure to use this array to avoid `unused' warnings, which are even
198  # errors with `-W error'.  # errors with `-W error'.
199  m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],  m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
200  [AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@;  [AC_LANG_PROGRAM([$1], [static int test_array @<:@1 - 2 * !($2)@:>@;
201  _array_ @<:@0@:>@ = 0  test_array @<:@0@:>@ = 0
202  ])])  ])])
203    
204    
# Line 828  fi Line 828  fi
828  # AC_C_LONG_DOUBLE  # AC_C_LONG_DOUBLE
829  # ----------------  # ----------------
830  AC_DEFUN([AC_C_LONG_DOUBLE],  AC_DEFUN([AC_C_LONG_DOUBLE],
831  [AC_CACHE_CHECK(for long double, ac_cv_c_long_double,  [AC_CACHE_CHECK(
832  [if test "$GCC" = yes; then     [for working long double with more range or precision than double],
833    ac_cv_c_long_double=yes     [ac_cv_c_long_double],
834  else     [AC_COMPILE_IFELSE(
835  AC_TRY_RUN(        [AC_LANG_BOOL_COMPILE_TRY(
836  [int           [#include <float.h>
837  main ()            long double foo = 0.0;],
838  {           [/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug.  */
839    /* The Stardent Vistra knows sizeof(long double), but does not            (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON)
840       support it.  */            | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG)])],
841    long double foo = 0.0;        ac_cv_c_long_double=yes,
842    /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */        ac_cv_c_long_double=no)])
   exit (sizeof (long double) < sizeof (double));  
 }],  
 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)  
 fi])  
843  if test $ac_cv_c_long_double = yes; then  if test $ac_cv_c_long_double = yes; then
844    AC_DEFINE(HAVE_LONG_DOUBLE, 1,    AC_DEFINE(HAVE_LONG_DOUBLE, 1,
845              [Define to 1 if the `long double' type works.])              [Define to 1 if long double works and has more range or precision than double.])
846  fi  fi
847  ])# AC_C_LONG_DOUBLE  ])# AC_C_LONG_DOUBLE
848    

Legend:
Removed from v.1.158  
changed lines
  Added in v.1.159

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26