]> www.ginac.de Git - cln.git/blob - m4/fpu_control.m4
Extracted from aclocal.m4. Originally taken from GNU clisp.
[cln.git] / m4 / fpu_control.m4
1 dnl -*- Autoconf -*-
2 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License.  As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
8
9 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
10
11 AC_PREREQ(2.57)
12
13 AC_DEFUN([CL_FPU_CONTROL],
14 [dnl Check for Linux with <fpu_control.h> and fpu_control_t or __setfpucw().
15 dnl glibc versions since October 1998 define fpu_control_t. Earlier versions
16 dnl define and declare __setfpucw(). Very early Linux libc versions have none,
17 dnl and __fpu_control is of type `unsigned short'.
18 CL_COMPILE_CHECK([fpu_control_t], cl_cv_type_fpu_control_t,
19 [#include <fpu_control.h>], [fpu_control_t x;],
20 AC_DEFINE(HAVE_FPU_CONTROL_T,,[have <fpu_control.h> and it defines the fpu_control_t type]))
21 CL_COMPILE_CHECK([__setfpucw], cl_cv_func_setfpucw,
22 [#include <fpu_control.h>], [__setfpucw(_FPU_IEEE);],
23 AC_DEFINE(HAVE_SETFPUCW,,[have <fpu_control.h> and it declares the __setfpucw() function]))
24 ])