llvm.org GIT mirror llvm / b2ed052
Add a check to see if HUGE_VAL is sane or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31416 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
4 changed file(s) with 128 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
239239 # available to those loadable modules.
240240 LINKALL := @LINKALL@
241241 NOLINKALL := @NOLINKALL@
242
243 # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
244 # on the check.
245 HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
629629 dnl===
630630 dnl===-----------------------------------------------------------------------===
631631
632 AC_HUGE_VAL_CHECK
632633 AC_TYPE_PID_T
633634 AC_TYPE_SIZE_T
634635 AC_TYPE_SIGNAL
0 #
1 # This function determins if the the HUGE_VAL macro is compilable with the
2 # -pedantic switch or not. XCode < 2.4.1 doesn't get it right.
3 #
4 AC_DEFUN([AC_HUGE_VAL_CHECK],[
5 AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
6 AC_LANG_PUSH(C)
7 CPPFLAGS=-pedantic
8 AC_RUN_IFELSE(
9 AC_LANG_PROGRAM(
10 [#include ],
11 [double x = HUGE_VAL; return x != x; ]),
12 [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
13 [ac_cv_huge_val_sanity=yes])
14 AC_LANG_POP(C)
15 ])
16 AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
17 ])
894894 ETAGSFLAGS
895895 LLVMGCC
896896 LLVMGXX
897 HUGE_VAL_SANITY
897898 ALLOCA
898899 MMAP_FILE
899900 LLVMCC1
1026710268 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1026810269 lt_status=$lt_dlunknown
1026910270 cat > conftest.$ac_ext <
10270 #line 10271 "configure"
10271 #line 10272 "configure"
1027110272 #include "confdefs.h"
1027210273
1027310274 #if HAVE_DLFCN_H
1241112412 ;;
1241212413 *-*-irix6*)
1241312414 # Find out which ABI we are using.
12414 echo '#line 12415 "configure"' > conftest.$ac_ext
12415 echo '#line 12416 "configure"' > conftest.$ac_ext
1241512416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1241612417 (eval $ac_compile) 2>&5
1241712418 ac_status=$?
1412914130 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1413014131 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1413114132 -e 's:$: $lt_compiler_flag:'`
14132 (eval echo "\"\$as_me:14133: $lt_compile\"" >&5)
14133 (eval echo "\"\$as_me:14134: $lt_compile\"" >&5)
1413314134 (eval "$lt_compile" 2>conftest.err)
1413414135 ac_status=$?
1413514136 cat conftest.err >&5
14136 echo "$as_me:14137: \$? = $ac_status" >&5
14137 echo "$as_me:14138: \$? = $ac_status" >&5
1413714138 if (exit $ac_status) && test -s "$ac_outfile"; then
1413814139 # The compiler can only warn and ignore the option if not recognized
1413914140 # So say no if there are warnings other than the usual output.
1439714398 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1439814399 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1439914400 -e 's:$: $lt_compiler_flag:'`
14400 (eval echo "\"\$as_me:14401: $lt_compile\"" >&5)
14401 (eval echo "\"\$as_me:14402: $lt_compile\"" >&5)
1440114402 (eval "$lt_compile" 2>conftest.err)
1440214403 ac_status=$?
1440314404 cat conftest.err >&5
14404 echo "$as_me:14405: \$? = $ac_status" >&5
14405 echo "$as_me:14406: \$? = $ac_status" >&5
1440514406 if (exit $ac_status) && test -s "$ac_outfile"; then
1440614407 # The compiler can only warn and ignore the option if not recognized
1440714408 # So say no if there are warnings other than the usual output.
1450114502 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1450214503 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1450314504 -e 's:$: $lt_compiler_flag:'`
14504 (eval echo "\"\$as_me:14505: $lt_compile\"" >&5)
14505 (eval echo "\"\$as_me:14506: $lt_compile\"" >&5)
1450514506 (eval "$lt_compile" 2>out/conftest.err)
1450614507 ac_status=$?
1450714508 cat out/conftest.err >&5
14508 echo "$as_me:14509: \$? = $ac_status" >&5
14509 echo "$as_me:14510: \$? = $ac_status" >&5
1450914510 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1451014511 then
1451114512 # The compiler can only warn and ignore the option if not recognized
1695316954 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1695416955 lt_status=$lt_dlunknown
1695516956 cat > conftest.$ac_ext <
16956 #line 16957 "configure"
16957 #line 16958 "configure"
1695716958 #include "confdefs.h"
1695816959
1695916960 #if HAVE_DLFCN_H
1705317054 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1705417055 lt_status=$lt_dlunknown
1705517056 cat > conftest.$ac_ext <
17056 #line 17057 "configure"
17057 #line 17058 "configure"
1705717058 #include "confdefs.h"
1705817059
1705917060 #if HAVE_DLFCN_H
1942119422 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1942219423 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1942319424 -e 's:$: $lt_compiler_flag:'`
19424 (eval echo "\"\$as_me:19425: $lt_compile\"" >&5)
19425 (eval echo "\"\$as_me:19426: $lt_compile\"" >&5)
1942519426 (eval "$lt_compile" 2>conftest.err)
1942619427 ac_status=$?
1942719428 cat conftest.err >&5
19428 echo "$as_me:19429: \$? = $ac_status" >&5
19429 echo "$as_me:19430: \$? = $ac_status" >&5
1942919430 if (exit $ac_status) && test -s "$ac_outfile"; then
1943019431 # The compiler can only warn and ignore the option if not recognized
1943119432 # So say no if there are warnings other than the usual output.
1952519526 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1952619527 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1952719528 -e 's:$: $lt_compiler_flag:'`
19528 (eval echo "\"\$as_me:19529: $lt_compile\"" >&5)
19529 (eval echo "\"\$as_me:19530: $lt_compile\"" >&5)
1952919530 (eval "$lt_compile" 2>out/conftest.err)
1953019531 ac_status=$?
1953119532 cat out/conftest.err >&5
19532 echo "$as_me:19533: \$? = $ac_status" >&5
19533 echo "$as_me:19534: \$? = $ac_status" >&5
1953319534 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1953419535 then
1953519536 # The compiler can only warn and ignore the option if not recognized
2109521096 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2109621097 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2109721098 -e 's:$: $lt_compiler_flag:'`
21098 (eval echo "\"\$as_me:21099: $lt_compile\"" >&5)
21099 (eval echo "\"\$as_me:21100: $lt_compile\"" >&5)
2109921100 (eval "$lt_compile" 2>conftest.err)
2110021101 ac_status=$?
2110121102 cat conftest.err >&5
21102 echo "$as_me:21103: \$? = $ac_status" >&5
21103 echo "$as_me:21104: \$? = $ac_status" >&5
2110321104 if (exit $ac_status) && test -s "$ac_outfile"; then
2110421105 # The compiler can only warn and ignore the option if not recognized
2110521106 # So say no if there are warnings other than the usual output.
2119921200 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2120021201 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2120121202 -e 's:$: $lt_compiler_flag:'`
21202 (eval echo "\"\$as_me:21203: $lt_compile\"" >&5)
21203 (eval echo "\"\$as_me:21204: $lt_compile\"" >&5)
2120321204 (eval "$lt_compile" 2>out/conftest.err)
2120421205 ac_status=$?
2120521206 cat out/conftest.err >&5
21206 echo "$as_me:21207: \$? = $ac_status" >&5
21207 echo "$as_me:21208: \$? = $ac_status" >&5
2120721208 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2120821209 then
2120921210 # The compiler can only warn and ignore the option if not recognized
2343423435 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2343523436 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2343623437 -e 's:$: $lt_compiler_flag:'`
23437 (eval echo "\"\$as_me:23438: $lt_compile\"" >&5)
23438 (eval echo "\"\$as_me:23439: $lt_compile\"" >&5)
2343823439 (eval "$lt_compile" 2>conftest.err)
2343923440 ac_status=$?
2344023441 cat conftest.err >&5
23441 echo "$as_me:23442: \$? = $ac_status" >&5
23442 echo "$as_me:23443: \$? = $ac_status" >&5
2344223443 if (exit $ac_status) && test -s "$ac_outfile"; then
2344323444 # The compiler can only warn and ignore the option if not recognized
2344423445 # So say no if there are warnings other than the usual output.
2370223703 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2370323704 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2370423705 -e 's:$: $lt_compiler_flag:'`
23705 (eval echo "\"\$as_me:23706: $lt_compile\"" >&5)
23706 (eval echo "\"\$as_me:23707: $lt_compile\"" >&5)
2370623707 (eval "$lt_compile" 2>conftest.err)
2370723708 ac_status=$?
2370823709 cat conftest.err >&5
23709 echo "$as_me:23710: \$? = $ac_status" >&5
23710 echo "$as_me:23711: \$? = $ac_status" >&5
2371023711 if (exit $ac_status) && test -s "$ac_outfile"; then
2371123712 # The compiler can only warn and ignore the option if not recognized
2371223713 # So say no if there are warnings other than the usual output.
2380623807 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2380723808 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2380823809 -e 's:$: $lt_compiler_flag:'`
23809 (eval echo "\"\$as_me:23810: $lt_compile\"" >&5)
23810 (eval echo "\"\$as_me:23811: $lt_compile\"" >&5)
2381023811 (eval "$lt_compile" 2>out/conftest.err)
2381123812 ac_status=$?
2381223813 cat out/conftest.err >&5
23813 echo "$as_me:23814: \$? = $ac_status" >&5
23814 echo "$as_me:23815: \$? = $ac_status" >&5
2381423815 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2381523816 then
2381623817 # The compiler can only warn and ignore the option if not recognized
2917229173 done
2917329174
2917429175 fi
29176
29177
29178
29179 { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5
29180 echo $ECHO_N "checking for HUGE_VAL sanity... $ECHO_C" >&6; }
29181 if test "${ac_cv_huge_val_sanity+set}" = set; then
29182 echo $ECHO_N "(cached) $ECHO_C" >&6
29183 else
29184
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
29192 if test "$cross_compiling" = yes; then
29193 ac_cv_huge_val_sanity=yes
29194 else
29195 cat >conftest.$ac_ext <<_ACEOF
29196 /* confdefs.h. */
29197 _ACEOF
29198 cat confdefs.h >>conftest.$ac_ext
29199 cat >>conftest.$ac_ext <<_ACEOF
29200 /* end confdefs.h. */
29201 #include
29202 int
29203 main ()
29204 {
29205 double x = HUGE_VAL; return x != x;
29206 ;
29207 return 0;
29208 }
29209 _ACEOF
29210 rm -f conftest$ac_exeext
29211 if { (ac_try="$ac_link"
29212 case "(($ac_try" in
29213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29214 *) ac_try_echo=$ac_try;;
29215 esac
29216 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29217 (eval "$ac_link") 2>&5
29218 ac_status=$?
29219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29221 { (case "(($ac_try" in
29222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29223 *) ac_try_echo=$ac_try;;
29224 esac
29225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29226 (eval "$ac_try") 2>&5
29227 ac_status=$?
29228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29229 (exit $ac_status); }; }; then
29230 ac_cv_huge_val_sanity=yes
29231 else
29232 echo "$as_me: program exited with status $ac_status" >&5
29233 echo "$as_me: failed program was:" >&5
29234 sed 's/^/| /' conftest.$ac_ext >&5
29235
29236 ( exit $ac_status )
29237 ac_cv_huge_val_sanity=no
29238 fi
29239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29240 fi
29241
29242
29243 ac_ext=c
29244 ac_cpp='$CPP $CPPFLAGS'
29245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29248
29249
29250 fi
29251 { echo "$as_me:$LINENO: result: $ac_cv_huge_val_sanity" >&5
29252 echo "${ECHO_T}$ac_cv_huge_val_sanity" >&6; }
29253 HUGE_VAL_SANITY=$ac_cv_huge_val_sanity
2917529254
2917629255
2917729256 { echo "$as_me:$LINENO: checking for pid_t" >&5
3416634245 ETAGSFLAGS!$ETAGSFLAGS$ac_delim
3416734246 LLVMGCC!$LLVMGCC$ac_delim
3416834247 LLVMGXX!$LLVMGXX$ac_delim
34248 HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
3416934249 ALLOCA!$ALLOCA$ac_delim
3417034250 MMAP_FILE!$MMAP_FILE$ac_delim
3417134251 LLVMCC1!$LLVMCC1$ac_delim
3418834268 LTLIBOBJS!$LTLIBOBJS$ac_delim
3418934269 _ACEOF
3419034270
34191 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then
34271 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
3419234272 break
3419334273 elif $ac_last_try; then
3419434274 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5