Mercurial > hg > octave-terminal
changeset 4366:ad851d04b396
[project @ 2003-03-05 09:49:18 by jwe]
author | jwe |
---|---|
date | Wed, 05 Mar 2003 09:49:18 +0000 |
parents | 4dfce8f9ee98 |
children | aa04c532d69b |
files | ChangeLog aclocal.m4 configure.in |
diffstat | 3 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-05 Paul Kienzle <pkienzle@users.sf.net> + + * aclocal.m4 (OCTAVE_DYNAMIC_AUTO_ARRAYS): New macro. + * configure.in: Use it. + (AH_BOTTOM): Check HAVE_DYNAMIC_AUTO_ARRAYS instead of __GNUG__. + 2003-03-03 John W. Eaton <jwe@bevo.che.wisc.edu> * configure.in: Undo previous change.
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -102,6 +102,21 @@ AC_LANG_POP(C++) ]) dnl +dnl See if the compiler dynamic auto arrays +dnl +AC_DEFUN(OCTAVE_DYNAMIC_AUTO_ARRAYS, +[AC_CACHE_CHECK([whether C++ supports dynamic auto arrays], +octave_cv_dynamic_auto_arrays, +[AC_LANG_PUSH(C++) +AC_TRY_COMPILE(, +[void test(char *); int length(); char x[length()]; test(x);], +octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)]) +if test $octave_cv_dynamic_auto_arrays = yes; then +AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays]) +fi +AC_LANG_POP(C++) +]) +dnl dnl The following test is from Karl Berry's Kpathseach library. I'm dnl including it here in case we someday want to make the use of dnl kpathsea optional.
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.420 $) +AC_REVISION($Revision: 1.421 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -867,6 +867,10 @@ OCTAVE_PLACEMENT_DELETE +### See if we can auto allocate variable sized arrays. + +OCTAVE_DYNAMIC_AUTO_ARRAYS + ### Checks for header files. AC_HEADER_STDC @@ -1388,7 +1392,7 @@ #define OCTAVE_HAVE_SIG_JUMP #endif -#if defined (__GNUG__) +#if defined (HAVE_DYNAMIC_AUTO_ARRAYS) #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ T buf[size] #else