summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-29 07:26:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-29 07:26:57 (GMT)
commit359e93499d8780f313dd4d1010c25c884b9658cf (patch)
tree16a42f8a62df1d5cad69a2b51222d0b5b7903cc2 /unix/tcl.m4
parent399c41a0f08c867677ef3030a98c6ba9f3a0503f (diff)
downloadtcl-359e93499d8780f313dd4d1010c25c884b9658cf.zip
tcl-359e93499d8780f313dd4d1010c25c884b9658cf.tar.gz
tcl-359e93499d8780f313dd4d1010c25c884b9658cf.tar.bz2
now ready for further field testsbug_3511806
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m422
1 files changed, 20 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d063dc6..8ff420a 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1203,7 +1203,7 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*)
+ CYGWIN_*|MINGW32*)
SHLIB_CFLAGS=""
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -2179,7 +2179,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*) ;;
+ CYGWIN_*|MINGW32_*) ;;
IRIX*) ;;
NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
Darwin-*) ;;
@@ -2223,6 +2223,24 @@ dnl # preprocessing tests use only CPPFLAGS.
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
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
AC_SUBST(DL_LIBS)