test for variable-length arrays

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12664 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2003-08-27 18:15:40 +00:00
parent cd87e37aa4
commit 48bb32ebe5

17
cf/vararray.m4 Normal file
View File

@@ -0,0 +1,17 @@
dnl
dnl $Id$
dnl
dnl Test for variable size arrays.
dnl
AC_DEFUN([rk_C_VARARRAY], [
AC_CACHE_CHECK([if the compiler supports variable-length arrays],[rk_cv_c_vararray],[
AC_TRY_COMPILE([],
[int x = 0; { int y[x]; }],
[rk_cv_c_vararray=yes],
[rk_cv_c_vararray=no])])
if test "$rk_cv_c_vararray" = yes; then
AC_DEFINE([HAVE_VARIABLE_LENGTH_ARRAY], [1],
[Define if your compiler supports variable-length arrays.])
fi
])