summaryrefslogtreecommitdiffstats
path: root/win/configure.in
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-30 09:49:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-30 09:49:25 (GMT)
commit59c52ee2fb7fcc819a92861101a8dd4b77c9f606 (patch)
treeae1366468409076e10cf9e8952fe77bd51012e4e /win/configure.in
parente4e0688230bab9b433d43f26f6a9e36b0a32b083 (diff)
parent3a73c145323d7a85af7f9e5ad7de9e601cbaf903 (diff)
downloadtcl-59c52ee2fb7fcc819a92861101a8dd4b77c9f606.zip
tcl-59c52ee2fb7fcc819a92861101a8dd4b77c9f606.tar.gz
tcl-59c52ee2fb7fcc819a92861101a8dd4b77c9f606.tar.bz2
[Bug 3511806] Compiler checks too early
(autoconf still to be run!)
Diffstat (limited to 'win/configure.in')
-rw-r--r--win/configure.in246
1 files changed, 27 insertions, 219 deletions
diff --git a/win/configure.in b/win/configure.in
index 1b8c25a..dd1f745 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -67,225 +67,6 @@ AC_CHECK_TOOL(RC, windres)
AC_PROG_MAKE_SET
#--------------------------------------------------------------------
-# Perform additinal compiler tests.
-#--------------------------------------------------------------------
-
-dnl Currently AC_CYGWIN is disabled since it invokes AC_CANONICAL_HOST
-dnl under autoconf 2.5X.
-dnl
-dnl AC_CYGWIN
-
-AC_CACHE_CHECK(for Cygwin version of gcc,
- ac_cv_cygwin,
-AC_TRY_COMPILE([
-#ifdef __CYGWIN__
-#error cygwin
-#endif
-],
-[],
- ac_cv_cygwin=no,
- ac_cv_cygwin=yes)
-)
-if test "$ac_cv_cygwin" = "yes" ; then
- AC_MSG_ERROR([Compiling under Cygwin is not currently supported.
-A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
-file for information about building with Mingw.])
-fi
-
-
-AC_CACHE_CHECK(for SEH support in compiler,
- tcl_cv_seh,
-AC_TRY_RUN([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-int main(int argc, char** argv) {
- int a, b = 0;
- __try {
- a = 666 / b;
- }
- __except (EXCEPTION_EXECUTE_HANDLER) {
- return 0;
- }
- return 1;
-}
-],
- tcl_cv_seh=yes,
- tcl_cv_seh=no,
- tcl_cv_seh=no)
-)
-if test "$tcl_cv_seh" = "no" ; then
- AC_DEFINE(HAVE_NO_SEH, 1,
- [Defined when mingw does not support SEH])
-fi
-
-#
-# Check to see if the excpt.h include file provided contains the
-# definition for EXCEPTION_DISPOSITION; if not, which is the case
-# with Cygwin's version as of 2002-04-10, define it to be int,
-# sufficient for getting the current code to work.
-#
-AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
- tcl_cv_eh_disposition,
-AC_TRY_COMPILE([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-],
-[
- EXCEPTION_DISPOSITION x;
-],
- tcl_cv_eh_disposition=yes,
- tcl_cv_eh_disposition=no)
-)
-if test "$tcl_cv_eh_disposition" = "no" ; then
- AC_DEFINE(EXCEPTION_DISPOSITION, int,
- [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
-fi
-
-
-# Check to see if the winsock2.h include file provided contains
-# typedefs like LPFN_ACCEPT and friends.
-#
-AC_CACHE_CHECK(for LPFN_ACCEPT support in winsock2.h,
- tcl_cv_lpfn_decls,
-AC_TRY_COMPILE([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <winsock2.h>
-],
-[
- LPFN_ACCEPT accept;
-],
- tcl_cv_lpfn_decls=yes,
- tcl_cv_lpfn_decls=no)
-)
-if test "$tcl_cv_lpfn_decls" = "no" ; then
- AC_DEFINE(HAVE_NO_LPFN_DECLS, 1,
- [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
-
-# Check to see if malloc.h is missing the alloca function
-# declaration. This is known to be a problem with Mingw.
-# If we compiled without the function declaration, it
-# would work but we would get a warning message from gcc.
-# If we add the function declaration ourselves, it
-# would not compile correctly because the _alloca
-# function expects the argument to be passed in a
-# register and not on the stack. Instead, we just
-# call it from inline asm code.
-
-AC_CACHE_CHECK(for alloca declaration in malloc.h,
- tcl_cv_malloc_decl_alloca,
-AC_TRY_COMPILE([
-#include <malloc.h>
-],
-[
- size_t arg = 0;
- void* ptr;
- ptr = alloca;
- ptr = alloca(arg);
-],
- tcl_cv_malloc_decl_alloca=yes,
- tcl_cv_malloc_decl_alloca=no)
-)
-if test "$tcl_cv_malloc_decl_alloca" = "no" &&
- test "${GCC}" = "yes" ; then
- AC_DEFINE(HAVE_ALLOCA_GCC_INLINE, 1,
- [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
-
-# See if declarations like FINDEX_INFO_LEVELS are
-# missing from winbase.h. This is known to be
-# a problem with VC++ 5.2.
-
-AC_CACHE_CHECK(for FINDEX_INFO_LEVELS in winbase.h,
- tcl_cv_findex_enums,
-AC_TRY_COMPILE([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-],
-[
- FINDEX_INFO_LEVELS i;
- FINDEX_SEARCH_OPS j;
-],
- tcl_cv_findex_enums=yes,
- tcl_cv_findex_enums=no)
-)
-if test "$tcl_cv_findex_enums" = "no"; then
- AC_DEFINE(HAVE_NO_FINDEX_ENUMS, 1,
- [Defined when enums are missing from winbase.h])
-fi
-
-# See if MWMO_ALERTABLE is missing from winuser.h
-# This is known to be a problem with Mingw.
-
-AC_CACHE_CHECK(for MWMO_ALERTABLE in winuser.h,
- tcl_cv_mwmo_alertable,
-AC_TRY_COMPILE([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-],
-[
- int i = MWMO_ALERTABLE;
-],
- tcl_cv_mwmo_alertable=yes,
- tcl_cv_mwmo_alertable=no)
-)
-if test "$tcl_cv_mwmo_alertable" = "no"; then
- AC_DEFINE(HAVE_NO_MWMO_ALERTABLE, 1,
- [Defined when MWMO_ALERTABLE is missing from winuser.h])
-fi
-
-#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------
@@ -351,6 +132,33 @@ AC_CHECK_TYPE([uintptr_t], [
fi
])
#--------------------------------------------------------------------
+# Perform additinal compiler tests.
+#--------------------------------------------------------------------
+
+# See if declarations like FINDEX_INFO_LEVELS are
+# missing from winbase.h. This is known to be
+# a problem with VC++ 5.2.
+
+AC_CACHE_CHECK(for FINDEX_INFO_LEVELS in winbase.h,
+ tcl_cv_findex_enums,
+AC_TRY_COMPILE([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+],
+[
+ FINDEX_INFO_LEVELS i;
+ FINDEX_SEARCH_OPS j;
+],
+ tcl_cv_findex_enums=yes,
+ tcl_cv_findex_enums=no)
+)
+if test "$tcl_cv_findex_enums" = "no"; then
+ AC_DEFINE(HAVE_NO_FINDEX_ENUMS, 1,
+ [Defined when enums are missing from winbase.h])
+fi
+
+#--------------------------------------------------------------------
# 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.