diff options
author | nijtmans <nijtmans> | 2010-12-13 21:18:48 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-12-13 21:18:48 (GMT) |
commit | 358e19e975dc6c8a25b8ff6cd4c5188ba3dae00e (patch) | |
tree | df0987bfd3e70af07c61d0ed2ca02a54c3962d6b /win/configure.in | |
parent | 28b289525dc0521894d68c247e18e96d3ab5f6c5 (diff) | |
download | tcl-358e19e975dc6c8a25b8ff6cd4c5188ba3dae00e.zip tcl-358e19e975dc6c8a25b8ff6cd4c5188ba3dae00e.tar.gz tcl-358e19e975dc6c8a25b8ff6cd4c5188ba3dae00e.tar.bz2 |
Cross-compile support for Win and UNIX (backported)
Diffstat (limited to 'win/configure.in')
-rw-r--r-- | win/configure.in | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/win/configure.in b/win/configure.in index 55862e4..b6299fd 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.104.2.12 2010/11/19 21:37:13 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.104.2.13 2010/12/13 21:18:50 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -322,6 +322,37 @@ SC_ENABLE_SHARED SC_CONFIG_CFLAGS +AC_CHECK_TYPE([intptr_t], [ + AC_DEFINE([HAVE_INTPTR_T], 1, [Do we have the intptr_t type?])], [ + AC_CACHE_CHECK([for pointer-size signed integer type], tcl_cv_intptr_t, [ + for tcl_cv_intptr_t in "int" "long" "long long" none; do + if test "$tcl_cv_intptr_t" != none; then + AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT], + [[sizeof (void *) <= sizeof ($tcl_cv_intptr_t)]])], + [tcl_ok=yes], [tcl_ok=no]) + test "$tcl_ok" = yes && break; fi + done]) + if test "$tcl_cv_intptr_t" != none; then + AC_DEFINE_UNQUOTED([intptr_t], [$tcl_cv_intptr_t], [Signed integer + type wide enough to hold a pointer.]) + fi +]) +AC_CHECK_TYPE([uintptr_t], [ + AC_DEFINE([HAVE_UINTPTR_T], 1, [Do we have the uintptr_t type?])], [ + AC_CACHE_CHECK([for pointer-size unsigned integer type], tcl_cv_uintptr_t, [ + for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ + none; do + if test "$tcl_cv_uintptr_t" != none; then + AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT], + [[sizeof (void *) <= sizeof ($tcl_cv_uintptr_t)]])], + [tcl_ok=yes], [tcl_ok=no]) + test "$tcl_ok" = yes && break; fi + done]) + if test "$tcl_cv_uintptr_t" != none; then + AC_DEFINE_UNQUOTED([uintptr_t], [$tcl_cv_uintptr_t], [Unsigned integer + type wide enough to hold a pointer.]) + fi +]) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called |