diff options
author | mdejong <mdejong@noemail.net> | 2003-01-27 02:19:55 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2003-01-27 02:19:55 (GMT) |
commit | 481122a741c93d3bef3e3f817135b99370cca085 (patch) | |
tree | 83788b8dece0b2e2e04f753732f38c93a6efa6e1 /win/configure.in | |
parent | d4605f45baeb54c6320117b98dfc2c5e6728d78a (diff) | |
download | tcl-481122a741c93d3bef3e3f817135b99370cca085.zip tcl-481122a741c93d3bef3e3f817135b99370cca085.tar.gz tcl-481122a741c93d3bef3e3f817135b99370cca085.tar.bz2 |
* win/configure: Regen.
* win/configure.in: Add test that checks to
see if the compiler can cast to a union type.
* win/tclWinTime.c: Squelch compiler warning
about union initializer by casting to union
type when compiling with gcc.
FossilOrigin-Name: 1acd5861be93cfb53cfbafefb3f668561513f6c5
Diffstat (limited to 'win/configure.in')
-rw-r--r-- | win/configure.in | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/win/configure.in b/win/configure.in index 16591e6..b195e2b 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.64 2003/01/25 12:48:12 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.65 2003/01/27 02:19:57 mdejong Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.13) @@ -224,6 +224,26 @@ if test "$tcl_cv_malloc_decl_alloca" = "no" && [Defined when gcc should use inline ASM to call alloca.]) fi +# See if the compiler supports casting to a union type. +# This is used to stop gcc from printing a compiler +# warning when initializing a union member. + +AC_CACHE_CHECK(for cast to union support, + tcl_cv_cast_to_union, +AC_TRY_COMPILE([], +[ + union foo { int i; double d; }; + union foo f = (union foo) (int) 0; +], + tcl_cv_cast_to_union=yes, + tcl_cv_cast_to_union=no) +) +if test "$tcl_cv_cast_to_union" = "yes"; then + AC_DEFINE(HAVE_CAST_TO_UNION, 1, + [Defined when compiler supports casting to union type.]) +fi + + #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- |