summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in31
1 files changed, 30 insertions, 1 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 3901138..ed1cb51 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.167 2007/10/30 19:03:57 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.168 2007/11/10 22:24:14 msofer Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -658,6 +658,35 @@ fi
AC_MSG_RESULT([$tcl_ok])
#--------------------------------------------------------------------
+# Does the C stack grow upwards or downwards? Or cross-compiling?
+#--------------------------------------------------------------------
+
+AC_CACHE_CHECK([does the C stack grow upwards in memory?], tcl_cv_stack_grows_up, [
+ AC_TRY_RUN([
+ int StackGrowsUp(int *parent)
+ {
+ int here;
+ return (&here < parent);
+ }
+
+ int main (int argc, char *argv[])
+ {
+ int foo;
+ return StackGrowsUp(&foo);
+ }
+ ],
+ tcl_cv_stack_grows_up=yes,
+ tcl_cv_stack_grows_up=no,
+ tcl_cv_stack_grows_up=unknown)])
+if test $tcl_cv_stack_grows_up = unknown; then
+ AC_DEFINE(TCL_CROSS_COMPILE, 1,
+ [Are we cross-compiling?])
+elif test $tcl_cv_stack_grows_up = yes; then
+ AC_DEFINE(TCL_STACK_GROWS_UP, 1,
+ [The C stack grows upwards in memory])
+fi
+
+#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtcl as a shared library instead of a static library.
#--------------------------------------------------------------------