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