From 2f0efe9f592255d0d83c0929423cc397bb1ebfa4 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Thu, 24 Jul 2014 08:45:16 -0700 Subject: 32853: redefine VARARR() to use heap rather than stack allocation enable old behavior via "configure --with-stack-allocation" --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0f87a6c88..37f35858f 100644 --- a/configure.ac +++ b/configure.ac @@ -140,6 +140,16 @@ AC_HELP_STRING([--enable-zsh-hash-debug], [turn on debugging of internal hash ta AC_DEFINE(ZSH_HASH_DEBUG) fi]) +dnl Do you want to dynamically allocate memory on the stack where possible? +ifdef([stack-allocation],[undefine([stack-allocation])])dnl +AH_TEMPLATE([USE_STACK_ALLOCATION], +[Define to 1 if you want to allocate stack memory e.g. with `alloca'.]) +AC_ARG_ENABLE(stack-allocation, +AC_HELP_STRING([--enable-stack-allocation], [allocate stack memory e.g. with `alloca']), +[if test x$enableval = xyes; then + AC_DEFINE(USE_STACK_ALLOCATION) +fi]) + dnl Pathnames for global zsh scripts ifdef([etcdir],[undefine([etcdir])])dnl AC_ARG_ENABLE(etcdir, -- cgit 1.4.1