summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/cf/vararray.m4
blob: 8511b16287b2a5f87ba5a4dc83194563b1751105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[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
])