Blame m4/longdouble.m4

Packit 8a864e
# longdouble.m4 serial 1 (gettext-0.12)
Packit 8a864e
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
Packit 8a864e
dnl This file is free software; the Free Software Foundation
Packit 8a864e
dnl gives unlimited permission to copy and/or distribute it,
Packit 8a864e
dnl with or without modifications, as long as this notice is preserved.
Packit 8a864e
Packit 8a864e
dnl From Bruno Haible.
Packit 8a864e
dnl Test whether the compiler supports the 'long double' type.
Packit 8a864e
dnl Prerequisite: AC_PROG_CC
Packit 8a864e
Packit 8a864e
AC_DEFUN([gt_TYPE_LONGDOUBLE],
Packit 8a864e
[
Packit 8a864e
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
Packit 8a864e
    [if test "$GCC" = yes; then
Packit 8a864e
       gt_cv_c_long_double=yes
Packit 8a864e
     else
Packit 8a864e
       AC_TRY_COMPILE([
Packit 8a864e
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
Packit 8a864e
         long double foo = 0.0;
Packit 8a864e
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
Packit 8a864e
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
Packit 8a864e
         ], ,
Packit 8a864e
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
Packit 8a864e
     fi])
Packit 8a864e
  if test $gt_cv_c_long_double = yes; then
Packit 8a864e
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
Packit 8a864e
  fi
Packit 8a864e
])