File: vararray.m4

package info (click to toggle)
heimdal 7.8.git20221117.28daf24%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 37,024 kB
  • sloc: ansic: 363,849; sh: 7,613; javascript: 6,382; makefile: 4,567; perl: 1,936; yacc: 1,786; lex: 732; python: 725; awk: 468; java: 119; asm: 30
file content (16 lines) | stat: -rw-r--r-- 456 bytes parent folder | download | duplicates (14)
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
])