diff options
author | mdejong <mdejong> | 2003-01-13 07:01:04 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2003-01-13 07:01:04 (GMT) |
commit | b697c7922f1ca98c8c68a6a8c1e7f738a4a8667f (patch) | |
tree | ecc693efc09e654dadea6aa7a3df8c882e5b75ae /win/configure.in | |
parent | 6638ab2cc75d41465a5191828f2c9acbab86af6b (diff) | |
download | tcl-b697c7922f1ca98c8c68a6a8c1e7f738a4a8667f.zip tcl-b697c7922f1ca98c8c68a6a8c1e7f738a4a8667f.tar.gz tcl-b697c7922f1ca98c8c68a6a8c1e7f738a4a8667f.tar.bz2 |
* generic/tcl.h: Skip Tcl's define of CHAR,
SHORT, and LONG when HAVE_WINNT_IGNORE_VOID
is defined. This avoids a bunch of compiler
warnings when building with Cygwin or Mingw.
* win/configure: Regen.
* win/configure.in: Define HAVE_WINNT_IGNORE_VOID
when we detect a winnt.h that still defines
CHAR, SHORT, and LONG when VOID has already
been defined.
* win/tcl.m4 (SC_LOAD_TCLCONFIG): Subst the
TCL_DEFS loaded from tclConfig.sh so that
Tcl defines can make it into the Tk Makefile.
Diffstat (limited to 'win/configure.in')
-rw-r--r-- | win/configure.in | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/win/configure.in b/win/configure.in index 9dfaebe..b641255 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.61 2003/01/13 01:27:51 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.62 2003/01/13 07:01:06 mdejong Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.13) @@ -169,6 +169,31 @@ if test "$tcl_cv_lpfn_decls" = "no" ; then [Defined when cygwin/mingw does not support LPFN_ACCEPT and friends.]) fi +# Check to see if winnt.h defines CHAR, SHORT, and LONG +# even if VOID has already been #defined. The win32api +# used by mingw and cygwin is known to do this. + +AC_CACHE_CHECK(for winnt.h that ignores VOID define, + tcl_cv_winnt_ignore_void, +AC_TRY_COMPILE([ +#define VOID void +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#undef WIN32_LEAN_AND_MEAN +], +[ + CHAR c; + SHORT s; + LONG l; +], + tcl_cv_winnt_ignore_void=yes, + tcl_cv_winnt_ignore_void=no) +) +if test "$tcl_cv_winnt_ignore_void" = "yes" ; then + AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1, + [Defined when cygwin/mingw ignores VOID define in winnt.h]) +fi + #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- |