diff --git a/program/acinclude.m4 b/program/acinclude.m4
index 936739577c05fdafaa20a1d7928c0655bfc48733..b71fe8e8058dd75b7414fcbcf3b37b18739c8ed1 100644 (file)
--- a/program/acinclude.m4
+++ b/program/acinclude.m4
# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
#endif
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+# undef isnan
+# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
/* Digital UNIX */
#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
# define HAVE_ISINF 1
#include <stdio.h>
int main(void){
- double nan,inf,c,zero;
+ double rrdnan,rrdinf,rrdc,rrdzero;
$4;
/* some math to see if we get a floating point exception */
- zero=sin(0.0); /* don't let the compiler optimize us away */
- nan=0.0/zero; /* especially here */
- inf=1.0/zero; /* and here. I want to know if it can do the magic */
+ rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+ rrdnan=0.0/rrdzero; /* especially here */
+ rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
/* at run time without sig fpe */
- c = inf + nan;
- c = inf / nan;
- if (! isnan(nan)) {printf ("not isnan(NaN) ... "); return 1;}
- if (nan == nan) {printf ("nan == nan ... "); return 1;}
- if (! isinf(inf)) {printf ("not isinf(oo) ... "); return 1;}
- if (! isinf(-inf)) {printf ("not isinf(-oo) ... "); return 1;}
- if (! inf > 0) {printf ("not inf > 0 ... "); return 1;}
- if (! -inf < 0) {printf ("not -inf < 0 ... "); return 1;}
+ rrdc = rrdinf + rrdnan;
+ rrdc = rrdinf / rrdnan;
+ if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+ if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+ if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+ if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+ if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+ if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
return 0;
}]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])])
dnl these we run regardles is cached or not
])
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11
+dnl ---------------
+dnl stolen from xterm aclocal.m4
+dnl
+dnl You can always use "make -n" to see the actual options, but it's hard to
+dnl pick out/analyze warning messages when the compile-line is long.
+dnl
+dnl Sets:
+dnl ECHO_LT - symbol to control if libtool is verbose
+dnl ECHO_LD - symbol to prefix "cc -o" lines
+dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
+dnl SHOW_CC - symbol to put before explicit "cc -c" lines
+dnl ECHO_CC - symbol to put before any "cc" line
+dnl
+AC_DEFUN([CF_DISABLE_ECHO],[
+AC_MSG_CHECKING(if you want to see long compiling messages)
+CF_ARG_DISABLE(echo,
+ [ --disable-echo display "compiling" commands],
+ [
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking [$]@;'
+ RULE_CC=' @echo compiling [$]<'
+ SHOW_CC=' @echo compiling [$]@'
+ ECHO_CC='@'
+],[
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC='# compiling'
+ SHOW_CC='# compiling'
+ ECHO_CC=''
+])
+AC_MSG_RESULT($enableval)
+AC_SUBST(ECHO_LT)
+AC_SUBST(ECHO_LD)
+AC_SUBST(RULE_CC)
+AC_SUBST(SHOW_CC)
+AC_SUBST(ECHO_CC)
+])dnl