Blame m4/longdouble.m4

Packit Service 9f2c4a
# longdouble.m4 serial 1 (gettext-0.12)
Packit Service 9f2c4a
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
Packit Service 9f2c4a
dnl This file is free software, distributed under the terms of the GNU
Packit Service 9f2c4a
dnl General Public License.  As a special exception to the GNU General
Packit Service 9f2c4a
dnl Public License, this file may be distributed as part of a program
Packit Service 9f2c4a
dnl that contains a configuration script generated by Autoconf, under
Packit Service 9f2c4a
dnl the same distribution terms as the rest of that program.
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl From Bruno Haible.
Packit Service 9f2c4a
dnl Test whether the compiler supports the 'long double' type.
Packit Service 9f2c4a
dnl Prerequisite: AC_PROG_CC
Packit Service 9f2c4a
Packit Service 9f2c4a
AC_DEFUN([gt_TYPE_LONGDOUBLE],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
Packit Service 9f2c4a
    [if test "$GCC" = yes; then
Packit Service 9f2c4a
       gt_cv_c_long_double=yes
Packit Service 9f2c4a
     else
Packit Service 9f2c4a
       AC_TRY_COMPILE([
Packit Service 9f2c4a
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
Packit Service 9f2c4a
         long double foo = 0.0;
Packit Service 9f2c4a
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
Packit Service 9f2c4a
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
Packit Service 9f2c4a
         ], ,
Packit Service 9f2c4a
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
Packit Service 9f2c4a
     fi])
Packit Service 9f2c4a
  if test $gt_cv_c_long_double = yes; then
Packit Service 9f2c4a
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
])