* configure (regened):
authorJeff Hobbs <hobbs@users.sourceforge.net>
Mon, 26 Apr 2004 16:28:44 +0000 (16:28 +0000)
committerJeff Hobbs <hobbs@users.sourceforge.net>
Mon, 26 Apr 2004 16:28:44 +0000 (16:28 +0000)
* tclconfig/tcl.m4 (TEA_TCL_64BIT_FLAGS): update to define
TCL_WIDE_INT_IS_LONG when 'using long'.

configure
tclconfig/tcl.m4

index 925dd472fa17c928ee4a1674db0b28a0958e05b8..82951813b715daff6522491735cdeb020fbe1f67 100755 (executable)
--- a/configure
+++ b/configure
@@ -3379,6 +3379,8 @@ echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
+       tcl_cv_type_64bit=none
+       # See if the compiler knows natively about __int64
        cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -3407,18 +3409,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  tcl_cv_type_64bit=__int64
+  tcl_type_64bit=__int64
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_type_64bit=none
-           if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+tcl_type_64bit="long long"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       # See if we should use long anyway  Note that we substitute in the
+       # type that is our current guess for a 64-bit type inside this check
+       # program, so it should be modified only carefully...
+       if test "$cross_compiling" = yes; then
+  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
@@ -3428,7 +3431,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <unistd.h>
-               int main() {exit(!(sizeof(long long) > sizeof(long)));}
+           int main() {exit(!(sizeof(${tcl_type_64bit}) > sizeof(long)));}
 
 _ACEOF
 rm -f conftest$ac_exeext
@@ -3442,20 +3445,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  tcl_cv_type_64bit="long long"
+  tcl_cv_type_64bit=${tcl_type_64bit}
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+:
 fi
 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
     if test "${tcl_cv_type_64bit}" = none ; then
+       cat >>confdefs.h <<\_ACEOF
+#define TCL_WIDE_INT_IS_LONG 1
+_ACEOF
+
        echo "$as_me:$LINENO: result: using long" >&5
 echo "${ECHO_T}using long" >&6
     elif test "${tcl_cv_type_64bit}" = "__int64" ; then
index dd506bc22a27fa2e65e5967ecd995ef79b089b6a..e443b999f77791aa08c5e905c036498f29beb1c9 100644 (file)
@@ -2418,12 +2418,18 @@ AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
 AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
     AC_MSG_CHECKING([for 64-bit integer type])
     AC_CACHE_VAL(tcl_cv_type_64bit,[
+       tcl_cv_type_64bit=none
+       # See if the compiler knows natively about __int64
        AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
-           tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
-           AC_TRY_RUN([#include <unistd.h>
-               int main() {exit(!(sizeof(long long) > sizeof(long)));}
-               ], tcl_cv_type_64bit="long long"))])
+           tcl_type_64bit=__int64, tcl_type_64bit="long long")
+       # See if we should use long anyway  Note that we substitute in the
+       # type that is our current guess for a 64-bit type inside this check
+       # program, so it should be modified only carefully...
+       AC_TRY_RUN([#include <unistd.h>
+           int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));}
+           ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)])
     if test "${tcl_cv_type_64bit}" = none ; then
+       AC_DEFINE(TCL_WIDE_INT_IS_LONG)
        AC_MSG_RESULT([using long])
     elif test "${tcl_cv_type_64bit}" = "__int64" ; then
        # We actually want to use the default tcl.h checks in this