30 lines
709 B
Plaintext
30 lines
709 B
Plaintext
$OpenBSD: patch-configure_ac,v 1.1 2007/07/28 17:06:20 naddy Exp $
|
|
--- configure.ac.orig Thu May 17 16:14:35 2007
|
|
+++ configure.ac Thu Jul 26 02:38:18 2007
|
|
@@ -40,7 +40,8 @@ AC_C_RESTRICT
|
|
|
|
AC_MSG_CHECKING(for C99 variable-size arrays)
|
|
AC_TRY_COMPILE( , [
|
|
-int foo=10;
|
|
+int foo;
|
|
+foo = 10;
|
|
int array[foo];
|
|
],
|
|
[has_var_arrays=yes;AC_DEFINE([VAR_ARRAYS], [], [Use C99 variable-size arrays])
|
|
@@ -49,8 +50,14 @@ has_var_arrays=no
|
|
)
|
|
AC_MSG_RESULT($has_var_arrays)
|
|
|
|
+AC_CHECK_HEADERS(alloca.h)
|
|
AC_MSG_CHECKING(for alloca)
|
|
-AC_TRY_COMPILE( [#include <alloca.h>], [
|
|
+AC_TRY_COMPILE( [
|
|
+#ifdef HAVE_ALLOCA_H
|
|
+# include <alloca.h>
|
|
+#endif
|
|
+#include <stdlib.h>
|
|
+], [
|
|
int foo=10;
|
|
int *array = alloca(foo);
|
|
],
|