From 28ab7305af256228eaf9c65a56e7539826045fb1 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 7 Nov 2018 16:28:59 +0000 Subject: [PATCH] Check for fenv.h and ieeefp.h functions only if the header is there. Makes it easier to disable these and test our own version by just setting ac_cv_header_fenv_h=no ac_cv_header_ieeefp_h=no. --- src/microcode/configure.ac | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 31fd4af50..895bab4c9 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -538,6 +538,14 @@ define([SCM_INC_FENV], 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_CHECK_FUNCS([feclearexcept fedisableexcept feenableexcept]) + AC_CHECK_FUNCS([fegetenv fegetexcept fegetexceptflag fegetround feholdexcept]) + AC_CHECK_FUNCS([feraiseexcept fesetenv fesetexceptflag fesetround]) + AC_CHECK_FUNCS([fetestexcept feupdateenv]) +fi + +if test "x$ac_cv_header_ieeefp_h" = "xyes"; then + AC_CHECK_TYPES([fpgetround fpsetround]) fi AC_CHECK_SIZEOF([time_t]) @@ -683,11 +691,9 @@ AC_FUNC_WAIT3 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 fmod fpathconf fpgetround]) -AC_CHECK_FUNCS([fpsetround frexp fsync fsync_range ftruncate]) +AC_CHECK_FUNCS([fcntl fdatasync]) +AC_CHECK_FUNCS([floor fmod fpathconf]) +AC_CHECK_FUNCS([frexp fsync fsync_range ftruncate]) AC_CHECK_FUNCS([getcwd gethostbyname gethostname getlogin getpagesize getpgrp]) AC_CHECK_FUNCS([getpt gettimeofday getwd grantpt]) AC_CHECK_FUNCS([kill]) -- 2.25.1