llvm.org GIT mirror llvm / 6a7c0b7
Make the huge_val test run a C++ program not C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31422 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
2 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
33 #
44 AC_DEFUN([AC_HUGE_VAL_CHECK],[
55 AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
6 AC_LANG_PUSH(C)
7 CPPFLAGS=-pedantic
6 AC_LANG_PUSH([C++])
7 CXXFLAGS=-pedantic
88 AC_RUN_IFELSE(
99 AC_LANG_PROGRAM(
1010 [#include ],
1111 [double x = HUGE_VAL; return x != x; ]),
1212 [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
1313 [ac_cv_huge_val_sanity=yes])
14 AC_LANG_POP(C)
14 AC_LANG_POP([C++])
1515 ])
1616 AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
1717 ])
2918229182 echo $ECHO_N "(cached) $ECHO_C" >&6
2918329183 else
2918429184
29185 ac_ext=c
29186 ac_cpp='$CPP $CPPFLAGS'
29187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29190
29191 CPPFLAGS=-pedantic
29185 ac_ext=cpp
29186 ac_cpp='$CXXCPP $CPPFLAGS'
29187 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29188 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29189 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29190
29191 CXXFLAGS=-pedantic
2919229192 if test "$cross_compiling" = yes; then
2919329193 ac_cv_huge_val_sanity=yes
2919429194 else