diff --git a/src/configure.in b/src/configure.in
index c37c48db76afb95bed74216e9af6984a5d119bc0..29fa3f132b9dabc53e4bcd42f0fb78af9b10db6d 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-AC_REVISION("$Id: configure.in,v 1.220 1998/07/22 23:23:40 hubbe Exp $")
+AC_REVISION("$Id: configure.in,v 1.221 1998/07/23 00:12:56 hubbe Exp $")
 AC_INIT(interpret.c)
 AC_CONFIG_HEADER(machine.h)
 
@@ -1076,7 +1076,6 @@ AC_CHECK_FUNCS( \
  finite \
  signbit \
  nice \
- fpsetmask \
 )
 
 if test x$pike_cv_sys_os = xWindows_NT ; then
@@ -1418,6 +1417,24 @@ if test [$]pike_cv_func_$1 = yes; then
 AC_DEFINE(translit(HAVE_$1,[a-z],[A-Z]))
 fi])
 
+########################################################################
+MY_CHECK_FUNCTION(fpsetmask,
+[
+#include <math.h>
+#ifdef HAVE_FLOATINGPOINT_H
+#include <floatingpoint.h>
+#endif
+
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
+
+int main()
+{
+  fpsetmask(0);
+  exit(0);
+}
+]);
 ########################################################################
 
 MY_CHECK_FUNCTION(dlopen,
@@ -1429,6 +1446,7 @@ int main()
   exit(0);
 }])
 
+########################################################################
 
 MY_CHECK_FUNCTION(ldexp,
 [
diff --git a/src/modules/math/configure.in b/src/modules/math/configure.in
index 6e837935f7113236df81427f3126a3c29afd93b9..82d9a86c44b887cd64004c8fa273daa1de2713f7 100644
--- a/src/modules/math/configure.in
+++ b/src/modules/math/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.5 1998/07/22 21:06:42 hubbe Exp $
+# $Id: configure.in,v 1.6 1998/07/23 00:13:12 hubbe Exp $
 AC_INIT(math.c)
 
 
@@ -11,7 +11,6 @@ if test "${ac_cv_lib_m}" = "no" -a "${pike_cv_sys_os}" = "Linux"; then
 fi
 
 AC_CHECK_HEADERS(ieeefp.h fp_class.h floatingpoint.h)
-AC_CHECK_FUNCS(fpsetmask)
 
 AC_OUTPUT(Makefile,echo FOO >stamp-h )