[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: How should application code check for Arrays of Variable Length?
From: Erik Sigra <sigra () home ! se>
Date: 2003-04-02 16:51:05
[Download RAW message or body]
Wednesday 02 April 2003 18.00 skrev Erik Sigra:
> AC_DEFUN([AC_C_VARARRAYS],
> [
> AC_CACHE_CHECK([for variable-length arrays],
> ac_cv_c_vararrays,
> [AC_TRY_COMPILE(
> [],
> [static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];],
> ac_cv_c_vararrays=yes,
> ac_cv_c_vararrays=no)])
> if test $ac_cv_c_vararrays = yes; then
> AC_DEFINE(HAVE_C_VARARRAYS, 1,
> [Define to 1 if C supports variable-length arrays.])
> fi
> ])
I added both the code above and "AC_C_VARARRAYS" to configure.in and it seems
to work. But shouldn't I tell it somewhere that it is C++, not C? (In case
And does anybody know where to find a standard check for a working Ada
compiler? And how to make the descending into a subdirectiry depend on the
result of that check?
I have looked for KDE-documentation about this kind of thing but found
nothing.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic