Blame m4/longdouble.m4

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