diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-02-26 21:23:21 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-02-26 21:23:21 (GMT) |
commit | d35b622cd0673d2cd2579942974aa71df9176c3a (patch) | |
tree | d20b7ae61f1d10e38e101b8aebaa4e3f45efce3c /win | |
parent | c46532fc4c946a46b96f31fc069c96f93c3bb476 (diff) | |
download | tk-d35b622cd0673d2cd2579942974aa71df9176c3a.zip tk-d35b622cd0673d2cd2579942974aa71df9176c3a.tar.gz tk-d35b622cd0673d2cd2579942974aa71df9176c3a.tar.bz2 |
Provide fallback for _strtoi64
FossilOrigin-Name: 2f32e4e804e97fd140bdc30c86952709409e6997
Diffstat (limited to 'win')
-rwxr-xr-x | win/configure | 54 | ||||
-rw-r--r-- | win/configure.in | 14 |
2 files changed, 59 insertions, 9 deletions
diff --git a/win/configure b/win/configure index 211b35c..2dc6186 100755 --- a/win/configure +++ b/win/configure @@ -1748,15 +1748,53 @@ fi +#------------------------------------------- +# Check for _strtoi64 +#------------------------------------------- + +echo $ac_n "checking availability of _strtoi64""... $ac_c" 1>&6 +echo "configure:1757: checking availability of _strtoi64" >&5 +if eval "test \"`echo '$''{'tcl_have_strtoi64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 1763 "configure" +#include "confdefs.h" +#include <stdlib.h> +int main() { +_strtoi64(0,0,0) +; return 0; } +EOF +if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + tcl_have_strtoi64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_have_strtoi64=no +fi +rm -f conftest* +fi + +echo "$ac_t""$tcl_have_strtoi64" 1>&6 +if test $tcl_have_strtoi64 = no; then + cat >> confdefs.h <<\EOF +#define NO_STRTOI64 1 +EOF + +fi + #-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols +# Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1760: checking for build with symbols" >&5 +echo "configure:1798: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1817,7 +1855,7 @@ TK_DBGX=${DBGX} echo $ac_n "checking whether to embed manifest""... $ac_c" 1>&6 -echo "configure:1821: checking whether to embed manifest" >&5 +echo "configure:1859: checking whether to embed manifest" >&5 # Check whether --enable-embedded-manifest or --disable-embedded-manifest was given. if test "${enable_embedded_manifest+set}" = set; then enableval="$enable_embedded_manifest" @@ -1834,7 +1872,7 @@ fi -a "$GCC" != "yes" ; then # Add the magic to embed the manifest into the dll/exe cat > conftest.$ac_ext <<EOF -#line 1838 "configure" +#line 1876 "configure" #include "confdefs.h" #if defined(_MSC_VER) && _MSC_VER >= 1400 @@ -1871,7 +1909,7 @@ rm -f conftest* echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1875: checking the location of tclConfig.sh" >&5 +echo "configure:1913: checking the location of tclConfig.sh" >&5 if test -d ../../tcl8.4$TK_PATCH_LEVEL/win; then TCL_BIN_DIR_DEFAULT=../../tcl8.4$TK_PATCH_LEVEL/win @@ -1899,7 +1937,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1903: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1941: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1952,14 +1990,14 @@ echo "configure:1903: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6 -echo "configure:1956: checking for tclsh in Tcl build directory" >&5 +echo "configure:1994: checking for tclsh in Tcl build directory" >&5 BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT} echo "$ac_t""$BUILD_TCLSH" 1>&6 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:1963: checking for tclsh" >&5 +echo "configure:2001: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/win/configure.in b/win/configure.in index f7b0f33..f6f71ca 100644 --- a/win/configure.in +++ b/win/configure.in @@ -110,8 +110,20 @@ SC_CONFIG_CFLAGS AC_CHECK_HEADER(errno.h, , MAN2TCLFLAGS="-DNO_ERRNO_H") AC_SUBST(MAN2TCLFLAGS) +#------------------------------------------- +# Check for _strtoi64 +#------------------------------------------- + +AC_CACHE_CHECK([availability of _strtoi64], tcl_have_strtoi64, [ + AC_TRY_LINK([#include <stdlib.h>], + [_strtoi64(0,0,0)], + tcl_have_strtoi64=yes, tcl_have_strtoi64=no)]) +if test $tcl_have_strtoi64 = no; then + AC_DEFINE(NO_STRTOI64, 1, [Is _strtoi64 function available?]) +fi + #-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols +# Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- |