You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.1 KiB

  1. dnl Copyright (C) 1993-2005 Free Software Foundation, Inc.
  2. dnl This file is free software, distributed under the terms of the GNU
  3. dnl General Public License. As a special exception to the GNU General
  4. dnl Public License, this file may be distributed as part of a program
  5. dnl that contains a configuration script generated by Autoconf, under
  6. dnl the same distribution terms as the rest of that program.
  7. dnl From Bruno Haible, Marcus Daniels, Paul Eggert.
  8. AC_PREREQ(2.13)
  9. AC_DEFUN([CL_LONGDOUBLE],
  10. [AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
  11. AC_TRY_RUN([int main()
  12. { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }],
  13. cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no, [
  14. dnl When cross-compiling, use the test from gnulib.
  15. AC_TRY_COMPILE([
  16. /* The Stardent Vistra knows sizeof(long double), but does not support it. */
  17. long double foo = 0.0;
  18. /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
  19. int array [2*(sizeof(long double) >= sizeof(double)) - 1];
  20. ], , cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no)])
  21. ])
  22. if test $cl_cv_c_longdouble = yes; then
  23. AC_DEFINE(HAVE_LONGDOUBLE)
  24. fi
  25. ])