summaryrefslogtreecommitdiffstats
path: root/win/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'win/configure.in')
-rw-r--r--win/configure.in17
1 files changed, 12 insertions, 5 deletions
diff --git a/win/configure.in b/win/configure.in
index 0b99959..16591e6 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.63 2003/01/24 08:04:28 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.64 2003/01/25 12:48:12 mdejong Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.13)
@@ -196,6 +196,13 @@ 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,
@@ -211,12 +218,12 @@ AC_TRY_COMPILE([
tcl_cv_malloc_decl_alloca=yes,
tcl_cv_malloc_decl_alloca=no)
)
-if test "$tcl_cv_malloc_decl_alloca" = "no" ; then
- AC_DEFINE(HAVE_NO_ALLOC_DECL, 1,
- [Defined when alloca decl is missing from malloc.h])
+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
-
#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------