summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-07-31 10:45:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-07-31 10:45:07 (GMT)
commitabcbe870af858ae106278830f01d027d6662e8fc (patch)
tree70e0a6431c9e5adb3aafbebed33d1a76cf3ff81e /unix/tcl.m4
parent4f61af05f05fd5612f7d7d3f267402efeb609359 (diff)
downloadtcl-abcbe870af858ae106278830f01d027d6662e8fc.zip
tcl-abcbe870af858ae106278830f01d027d6662e8fc.tar.gz
tcl-abcbe870af858ae106278830f01d027d6662e8fc.tar.bz2
* unix/tcl.m4 (SC_BUGGY_STRTOD): Enabled caching of test results.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m443
1 files changed, 22 insertions, 21 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0ab81b2..0816067 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2079,27 +2079,28 @@ AC_DEFUN(SC_BUGGY_STRTOD, [
AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
if test "$tcl_strtod" = 1; then
AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
- AC_TRY_RUN([
- extern double strtod();
- int main() {
- char *infString="Inf", *nanString="NaN", *spaceString=" ";
- char *term;
- double value;
- value = strtod(infString, &term);
- if ((term != infString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(nanString, &term);
- if ((term != nanString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(spaceString, &term);
- if (term == (spaceString+1)) {
- exit(1);
- }
- exit(0);
- }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
- if test "$tcl_ok" = 1; then
+ AC_CACHE_VAL(tcl_cv_strtod_buggy,[
+ AC_TRY_RUN([
+ extern double strtod();
+ int main() {
+ char *infString="Inf", *nanString="NaN", *spaceString=" ";
+ char *term;
+ double value;
+ value = strtod(infString, &term);
+ if ((term != infString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(nanString, &term);
+ if ((term != nanString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(spaceString, &term);
+ if (term == (spaceString+1)) {
+ exit(1);
+ }
+ exit(0);
+ }], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)])
+ if test "$tcl_cv_strtod_buggy" = 1; then
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT(buggy)