[llvm-commits] CVS: llvm/autoconf/m4/huge_val.m4

Reid Spencer reid at x10sys.com
Fri Nov 3 10:04:25 PST 2006



Changes in directory llvm/autoconf/m4:

huge_val.m4 added (r1.1)
---
Log message:

Add a check to see if HUGE_VAL is sane or not.


---
Diffs of the changes:  (+18 -0)

 huge_val.m4 |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)


Index: llvm/autoconf/m4/huge_val.m4
diff -c /dev/null llvm/autoconf/m4/huge_val.m4:1.1
*** /dev/null	Fri Nov  3 12:04:18 2006
--- llvm/autoconf/m4/huge_val.m4	Fri Nov  3 12:04:08 2006
***************
*** 0 ****
--- 1,18 ----
+ #
+ # This function determins if the the HUGE_VAL macro is compilable with the 
+ # -pedantic switch or not. XCode < 2.4.1 doesn't get it right.
+ #
+ AC_DEFUN([AC_HUGE_VAL_CHECK],[
+   AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
+     AC_LANG_PUSH(C)
+     CPPFLAGS=-pedantic
+     AC_RUN_IFELSE(
+       AC_LANG_PROGRAM(
+         [#include <math.h>],
+         [double x = HUGE_VAL; return x != x; ]),
+       [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
+       [ac_cv_huge_val_sanity=yes])
+     AC_LANG_POP(C)
+     ])
+   AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
+ ])






More information about the llvm-commits mailing list