--- configure.in.old	2006-05-17 23:04:39.000000000 +0200
+++ configure.in	2006-05-17 23:05:49.000000000 +0200
@@ -1471,263 +1471,7 @@
 ERL_TIME_CORRECTION
 
 AC_MSG_CHECKING([for unreliable floating point execptions])
-AC_TRY_RUN([
-/* fpe-test.c */
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
-
-volatile int erl_fp_exception;
-
-/* Is there no standard identifier for Darwin/MacOSX ? */
-#if defined(__ppc__) && defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
-#define __DARWIN__ 1
-#endif
-
-#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__) && !defined(__CYGWIN__)
-
-static void unmask_x87(void)
-{
-    unsigned short cw;
-    __asm__ __volatile__("fstcw %0" : "=m"(cw));
-    cw &= ~(0x01|0x04|0x08);   /* unmask IM, ZM, OM */
-    __asm__ __volatile__("fldcw %0" : : "m"(cw));
-}
-
-#if defined(__x86_64__)
-static void unmask_sse2(void)
-{
-    unsigned int mxcsr;
-    __asm__ __volatile__("stmxcsr %0" : "=m"(mxcsr));
-    mxcsr &= ~(0x003F|0x0680); /* clear exn flags, unmask exns (not PM, UM, DM) */
-    __asm__ __volatile__("ldmxcsr %0" : : "m"(mxcsr));
-}
-#else
-#define unmask_sse2()	do{}while(0)
-#endif
-
-static void unmask_fpe(void)
-{
-    unmask_x87();
-    unmask_sse2();
-}
-
-static __inline__ int check_fpe(double f)
-{
-    __asm__ __volatile__("fwait" : "=m"(erl_fp_exception) : "m"(f));
-    if (!erl_fp_exception)
-       return 0;
-    __asm__ __volatile__("fninit");
-    unmask_fpe();
-    return 1;
-}
-
-#elif (defined(__powerpc__) && defined(__linux__)) || defined(__DARWIN__)
-
-#if defined(__linux__)
-#include <sys/prctl.h>
-
-static void set_fpexc_precise(void)
-{
-    if( prctl(PR_SET_FPEXC, PR_FP_EXC_PRECISE) < 0 ) {
-	perror("PR_SET_FPEXC");
-	exit(1);
-    }
-}
-
-#elif defined(__DARWIN__)
-
-#include <mach/mach.h>
-#include <pthread.h>
-
-/*
- * FE0 FE1	MSR bits
- *  0   0	floating-point exceptions disabled
- *  0   1	floating-point imprecise nonrecoverable
- *  1   0	floating-point imprecise recoverable
- *  1   1	floating-point precise mode
- *
- * Apparently:
- * - Darwin 5.5 (MacOS X <= 10.1) starts with FE0 == FE1 == 0,
- *   and resets FE0 and FE1 to 0 after each SIGFPE.
- * - Darwin 6.0 (MacOS X 10.2) starts with FE0 == FE1 == 1,
- *   and does not reset FE0 or FE1 after a SIGFPE.
- */
-#define FE0_MASK	(1<<11)
-#define FE1_MASK	(1<<8)
-
-/* a thread cannot get or set its own MSR bits */
-static void *fpu_fpe_enable(void *arg)
-{
-    thread_t t = *(thread_t*)arg;
-    struct ppc_thread_state state;
-    unsigned int state_size = PPC_THREAD_STATE_COUNT;
-
-    if (thread_get_state(t, PPC_THREAD_STATE, (natural_t*)&state, &state_size) != KERN_SUCCESS) {
-	perror("thread_get_state");
-	exit(1);
-    }
-    if ((state.srr1 & (FE1_MASK|FE0_MASK)) != (FE1_MASK|FE0_MASK)) {
-#if 0
-	/* This would also have to be performed in the SIGFPE handler
-	   to work around the MSR reset older Darwin releases do. */
-	state.srr1 |= (FE1_MASK|FE0_MASK);
-	thread_set_state(t, PPC_THREAD_STATE, (natural_t*)&state, state_size);
-#else
-	fprintf(stderr, "srr1 == 0x%08x, your Darwin is too old\n", state.srr1);
-	exit(1);
-#endif
-    }
-    return NULL; /* Ok, we appear to be on Darwin 6.0 or later */
-}
-
-static void set_fpexc_precise(void)
-{
-    thread_t self = mach_thread_self();
-    pthread_t enabler;
-
-    if (pthread_create(&enabler, NULL, fpu_fpe_enable, &self)) {
-	perror("pthread_create");
-    } else if (pthread_join(enabler, NULL)) {
-	perror("pthread_join");
-    }
-}
-
-#endif
-
-static void set_fpscr(unsigned int fpscr)
-{
-    union {
-	double d;
-	unsigned int fpscr[2];
-    } u;
-    u.fpscr[0] = 0xFFF80000;
-    u.fpscr[1] = fpscr;
-    __asm__ __volatile__("mtfsf 255,%0" : : "f"(u.d));
-}
-
-static void unmask_fpe(void)
-{
-    set_fpexc_precise();
-    set_fpscr(0x80|0x40|0x10);	/* VE, OE, ZE; not UE or XE */
-}
-
-static __inline__ int check_fpe(double f)
-{
-    __asm__ __volatile__("" : "=m"(erl_fp_exception) : "fm"(f));
-    return erl_fp_exception;
-}
-
-#else
-
-#include <ieeefp.h>
-#define unmask_fpe()   fpsetmask(FP_X_INV | FP_X_OFL | FP_X_DZ)
-static __inline__ int check_fpe(double f)
-{
-    __asm__ __volatile__("" : "=m"(erl_fp_exception) : "g"(f));
-    return erl_fp_exception;
-}
-
-#endif
-
-#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__powerpc__))) || defined(__DARWIN__)
-
-#include <ucontext.h>
-
-static void fpe_sig_action(int sig, siginfo_t *si, void *puc)
-{
-    ucontext_t *uc = puc;
-#if defined(__linux__)
-#if defined(__x86_64__)
-    mcontext_t *mc = &uc->uc_mcontext;
-    fpregset_t fpstate = mc->fpregs;
-    fpstate->mxcsr = 0x1F80;
-    fpstate->swd &= ~0xFF;
-#elif defined(__i386__)
-    mcontext_t *mc = &uc->uc_mcontext;
-    fpregset_t fpstate = mc->fpregs;
-    fpstate->sw &= ~0xFF;
-#elif defined(__powerpc__)
-#if defined(__powerpc64__)
-    mcontext_t *mc = &uc->uc_mcontext;
-    unsigned long *regs = &mc->gp_regs[0];
-#else
-    mcontext_t *mc = uc->uc_mcontext.uc_regs;
-    unsigned long *regs = &mc->gregs[0];
-#endif
-    regs[PT_NIP] += 4;
-    regs[PT_FPSCR] = 0x80|0x40|0x10;	/* VE, OE, ZE; not UE or XE */
-#endif
-#elif defined(__DARWIN__)
-    mcontext_t mc = uc->uc_mcontext;
-    mc->ss.srr0 += 4;
-    mc->fs.fpscr = 0x80|0x40|0x10;
-#endif
-    erl_fp_exception = 1;
-}
-
-static void do_init(void)
-{
-    struct sigaction act;
-    memset(&act, 0, sizeof act);
-    act.sa_sigaction = fpe_sig_action;
-    act.sa_flags = SA_SIGINFO;
-    sigaction(SIGFPE, &act, NULL);
-    unmask_fpe();
-}
-
-#else
-
-static void fpe_sig_handler(int sig)
-{
-    erl_fp_exception = 1;
-}
-
-static void do_init(void)
-{
-    signal(SIGFPE, fpe_sig_handler);
-    unmask_fpe();
-}
-
-#endif
-
-double a = 3.23e133;
-double b = 3.57e257;
-double res;
-
-void do_fmul(void)
-{
-    res = a * b;
-}
-
-int do_check(void)
-{
-    if (check_fpe(res)) {
-       fprintf(stderr, "res = %g, FPE worked\n", res);
-       return 0;
-    } else {
-       fprintf(stderr, "res = %g, FPE failed\n", res);
-       return 1;
-    }
-}
-
-int main(int argc, const char **argv)
-{
-    if (argc == 3) {
-       a = atof(argv[1]);
-       b = atof(argv[2]);
-    }
-    do_init();
-    do_fmul();
-    return do_check();
-}
-], erl_ok=reliable, erl_ok=unreliable, erl_ok=unreliable)
-if test $erl_ok = unreliable; then
-    AC_DEFINE(NO_FPE_SIGNALS)
-    AC_MSG_RESULT([unreliable; testing in software instead])
-else
-    AC_MSG_RESULT(reliable)
-fi
+AC_MSG_RESULT(reliable)
 
 dnl
 dnl Check if gethrvtime is working, and if to use procfs ioctl
