Home | History | Annotate | Line # | Download | only in m4
      1  1.1  christos # longdouble.m4 serial 2 (gettext-0.15)
      2  1.1  christos dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
      3  1.1  christos dnl This file is free software; the Free Software Foundation
      4  1.1  christos dnl gives unlimited permission to copy and/or distribute it,
      5  1.1  christos dnl with or without modifications, as long as this notice is preserved.
      6  1.1  christos 
      7  1.1  christos dnl From Bruno Haible.
      8  1.1  christos dnl Test whether the compiler supports the 'long double' type.
      9  1.1  christos dnl Prerequisite: AC_PROG_CC
     10  1.1  christos 
     11  1.1  christos dnl This file is only needed in autoconf <= 2.59.  Newer versions of autoconf
     12  1.1  christos dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
     13  1.1  christos 
     14  1.1  christos AC_DEFUN([gt_TYPE_LONGDOUBLE],
     15  1.1  christos [
     16  1.1  christos   AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
     17  1.1  christos     [if test "$GCC" = yes; then
     18  1.1  christos        gt_cv_c_long_double=yes
     19  1.1  christos      else
     20  1.1  christos        AC_TRY_COMPILE([
     21  1.1  christos          /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
     22  1.1  christos          long double foo = 0.0;
     23  1.1  christos          /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
     24  1.1  christos          int array [2*(sizeof(long double) >= sizeof(double)) - 1];
     25  1.1  christos          ], ,
     26  1.1  christos          gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
     27  1.1  christos      fi])
     28  1.1  christos   if test $gt_cv_c_long_double = yes; then
     29  1.1  christos     AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
     30  1.1  christos   fi
     31  1.1  christos ])
     32