--- microcode/configure.ac.orig 2011-06-27 05:16:57.000000000 +0200 +++ microcode/configure.ac 2012-01-11 22:13:02.449002000 +0100 @@ -371,6 +371,108 @@ if test "x$ac_cv_header_fenv_h" = "xyes"; then AC_CHECK_TYPES([fenv_t], [], [], [SCM_INC_FENV]) AC_CHECK_TYPES([fexcept_t], [], [], [SCM_INC_FENV]) + + ac_cv_func_feclearexcept=no; + AC_MSG_CHECKING([for feclearexcept in fenv.h]) + AC_TRY_COMPILE([#include ], + [int except, ret; + ret = feclearexcept(except); + ],[ac_cv_func_feclearexcept=yes], [ac_cv_func_feclearexcept=no]) + AC_MSG_RESULT($ac_cv_func_feclearexcept) + if test x"$ac_cv_func_feclearexcept" = x"yes"; then + AC_DEFINE([HAVE_FECLEAREXCEPT], [1], + [Define to 1 if you have the feclearexcept function.]) + fi + + ac_cv_func_fegetexcept=no; + AC_MSG_CHECKING([for fegetexcept in fenv.h]) + AC_TRY_COMPILE([#include ], + [int ret; + ret = fegetexcept(); + ],[ac_cv_func_fegetexcept=yes], [ac_cv_func_fegetexcept=no]) + AC_MSG_RESULT($ac_cv_func_fegetexcept) + if test x"$ac_cv_func_fegetexcept" = x"yes"; then + AC_DEFINE([HAVE_FEGETEXCEPT], [1], + [Define to 1 if you have the fegetexcept function.]) + fi + + ac_cv_func_fegetexceptflag=no; + AC_MSG_CHECKING([for fegetexceptflag in fenv.h]) + AC_TRY_COMPILE([#include ], + [int except; + fexcept_t* pflag; + int ret; + ret = fegetexceptflag(pflag, except); + ],[ac_cv_func_fegetexceptflag=yes], [ac_cv_func_fegetexceptflag=no]) + AC_MSG_RESULT($ac_cv_func_fegetexceptflag) + if test x"$ac_cv_func_fegetexceptflag" = x"yes"; then + AC_DEFINE([HAVE_FEGETEXCEPTFLAG], [1], + [Define to 1 if you have the fegetexceptflag function.]) + fi + + ac_cv_func_fegetround=no; + AC_MSG_CHECKING([for fegetround in fenv.h]) + AC_TRY_COMPILE([#include ], + [int ret; + ret = fegetround(); + ],[ac_cv_func_fegetround=yes], [ac_cv_func_fegetround=no]) + AC_MSG_RESULT($ac_cv_func_fegetround) + if test x"$ac_cv_func_fegetround" = x"yes"; then + AC_DEFINE([HAVE_FEGETROUND], [1], + [Define to 1 if you have the fegetround function.]) + fi + + ac_cv_func_fesetenv=no; + AC_MSG_CHECKING([for fesetenv in fenv.h]) + AC_TRY_COMPILE([#include ], + [fenv_t* penv; + int ret; + ret = fesetenv(penv); + ],[ac_cv_func_fesetenv=yes], [ac_cv_func_fesetenv=no]) + AC_MSG_RESULT($ac_cv_func_fesetenv) + if test x"$ac_cv_func_fesetenv" = x"yes"; then + AC_DEFINE([HAVE_FESETENV], [1], + [Define to 1 if you have the fesetenv function.]) + fi + + ac_cv_func_fesetexceptflag=no; + AC_MSG_CHECKING([for fesetexceptflag in fenv.h]) + AC_TRY_COMPILE([#include ], + [int except; + fexcept_t* pflag; + int ret; + ret = fesetexceptflag(pflag, except); + ],[ac_cv_func_fesetexceptflag=yes], [ac_cv_func_fesetexceptflag=no]) + AC_MSG_RESULT($ac_cv_func_fesetexceptflag) + if test x"$ac_cv_func_fesetexceptflag" = x"yes"; then + AC_DEFINE([HAVE_FESETEXCEPTFLAG], [1], + [Define to 1 if you have the fesetexceptflag function.]) + fi + + ac_cv_func_fesetround=no; + AC_MSG_CHECKING([for fesetround in fenv.h]) + AC_TRY_COMPILE([#include ], + [int mode, ret; + ret = fesetround(mode); + ],[ac_cv_func_fesetround=yes], [ac_cv_func_fesetround=no]) + AC_MSG_RESULT($ac_cv_func_fesetround) + if test x"$ac_cv_func_fesetround" = x"yes"; then + AC_DEFINE([HAVE_FESETROUND], [1], + [Define to 1 if you have the fesetround function.]) + fi + + ac_cv_func_fetestexcept=no; + AC_MSG_CHECKING([for fetestexcept in fenv.h]) + AC_TRY_COMPILE([#include ], + [int except, ret; + ret = fetestexcept(except); + ],[ac_cv_func_fetestexcept=yes], [ac_cv_func_fetestexcept=no]) + AC_MSG_RESULT($ac_cv_func_fetestexcept) + if test x"$ac_cv_func_fetestexcept" = x"yes"; then + AC_DEFINE([HAVE_FETESTEXCEPT], [1], + [Define to 1 if you have the fetestexcept function.]) + fi + fi AC_CHECK_SIZEOF([time_t]) @@ -516,10 +618,9 @@ AC_CHECK_FUNCS([clock_gettime closefrom ctermid]) AC_CHECK_FUNCS([dup2]) AC_CHECK_FUNCS([expm1]) -AC_CHECK_FUNCS([fcntl fdatasync feclearexcept fedisableexcept feenableexcept]) -AC_CHECK_FUNCS([fegetenv fegetexcept fegetexceptflag fegetround feholdexcept]) -AC_CHECK_FUNCS([feraiseexcept fesetenv fesetexceptflag fesetround]) -AC_CHECK_FUNCS([fetestexcept feupdateenv floor fpathconf frexp fpgetround]) +AC_CHECK_FUNCS([fcntl fdatasync fedisableexcept feenableexcept]) +AC_CHECK_FUNCS([fegetenv feholdexcept feraiseexcept]) +AC_CHECK_FUNCS([feupdateenv floor fpathconf frexp fpgetround]) AC_CHECK_FUNCS([fpsetround fsync fsync_range ftruncate]) AC_CHECK_FUNCS([getcwd gethostbyname gethostname getlogin getpagesize getpgrp]) AC_CHECK_FUNCS([getpt gettimeofday getwd grantpt])