1 Add a check for FE_DIVBYZERO
3 Some architectures (namely Microblaze) do have fenv.h and
4 feenableexcept, but they don't have the FE_DIVBYZERO definition. This
5 patch adds a configure check for FE_DIVBYZERO, and only uses it if
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 ===================================================================
15 AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()])
18 +AC_CHECK_DECL([FE_DIVBYZERO], [], [], [[#include <fenv.h>]])
19 +if test x$ac_cv_have_decl_FE_DIVBYZERO = xyes; then
20 + AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO])
23 AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no)
24 AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no)
25 if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then
27 ===================================================================
33 #ifdef HAVE_FEENABLEEXCEPT
34 +#ifdef HAVE_FE_DIVBYZERO
35 feenableexcept (FE_DIVBYZERO);