finish and test support for dynamic arrays

This commit is contained in:
Denys Duchier
2011-08-09 16:30:59 +02:00
parent 31063fdc85
commit 76dd2511a8
5 changed files with 90 additions and 31 deletions

36
configure vendored
View File

@@ -3712,6 +3712,12 @@ done
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
@@ -4186,6 +4192,36 @@ else
use_gecode=$use_gecode_default
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic arrays are supported" >&5
$as_echo_n "checking if dynamic arrays are supported... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void foo(int n) { int a[n]; a[1]=0; }
int
main ()
{
foo(3);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_DYNARRAY 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Check whether --enable-tabling was given.
if test "${enable_tabling+set}" = set; then :